summaryrefslogtreecommitdiff
path: root/test/prism
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism')
-rw-r--r--test/prism/attribute_write_test.rb60
-rw-r--r--test/prism/bom_test.rb59
-rw-r--r--test/prism/command_line_test.rb111
-rw-r--r--test/prism/comments_test.rb138
-rw-r--r--test/prism/compiler_test.rb31
-rw-r--r--test/prism/constant_path_node_test.rb91
-rw-r--r--test/prism/desugar_compiler_test.rb80
-rw-r--r--test/prism/dispatcher_test.rb46
-rw-r--r--test/prism/encoding_test.rb577
-rw-r--r--test/prism/errors_test.rb2243
-rw-r--r--test/prism/fixtures/alias.txt23
-rw-r--r--test/prism/fixtures/arithmetic.txt13
-rw-r--r--test/prism/fixtures/arrays.txt122
-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.txt55
-rw-r--r--test/prism/fixtures/classes.txt35
-rw-r--r--test/prism/fixtures/command_method_call.txt41
-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.txt10
-rw-r--r--test/prism/fixtures/dos_endings.txt20
-rw-r--r--test/prism/fixtures/dstring.txt29
-rw-r--r--test/prism/fixtures/dsym_str.txt2
-rw-r--r--test/prism/fixtures/embdoc_no_newline_at_end.txt2
-rw-r--r--test/prism/fixtures/emoji_method_calls.txt1
-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.txt28
-rw-r--r--test/prism/fixtures/heredoc.txt2
-rw-r--r--test/prism/fixtures/heredoc_with_carriage_returns.txt2
-rw-r--r--test/prism/fixtures/heredoc_with_comment.txt3
-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_leading_whitespace.txt29
-rw-r--r--test/prism/fixtures/heredocs_nested.txt22
-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.txt156
-rw-r--r--test/prism/fixtures/methods.txt183
-rw-r--r--test/prism/fixtures/modules.txt18
-rw-r--r--test/prism/fixtures/multi_write.txt4
-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.txt67
-rw-r--r--test/prism/fixtures/patterns.txt217
-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.txt49
-rw-r--r--test/prism/fixtures/regex.txt46
-rw-r--r--test/prism/fixtures/regex_char_width.txt3
-rw-r--r--test/prism/fixtures/repeat_parameters.txt38
-rw-r--r--test/prism/fixtures/rescue.txt35
-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_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_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/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/single_method_call_with_bang.txt1
-rw-r--r--test/prism/fixtures/single_quote_heredocs.txt3
-rw-r--r--test/prism/fixtures/spanning_heredoc.txt63
-rw-r--r--test/prism/fixtures/spanning_heredoc_newlines.txt23
-rw-r--r--test/prism/fixtures/strings.txt105
-rw-r--r--test/prism/fixtures/super.txt17
-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.txt97
-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/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.txt10
-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.txt11
-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/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/opasgn.txt1
-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.txt13
-rw-r--r--test/prism/fixtures/variables.txt47
-rw-r--r--test/prism/fixtures/while.txt23
-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_comma.txt1
-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/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_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_eflipflop_with_beginless_range.txt1
-rw-r--r--test/prism/fixtures/whitequark/cond_eflipflop_with_endless_range.txt1
-rw-r--r--test/prism/fixtures/whitequark/cond_iflipflop.txt3
-rw-r--r--test/prism/fixtures/whitequark/cond_iflipflop_with_beginless_range.txt1
-rw-r--r--test/prism/fixtures/whitequark/cond_iflipflop_with_endless_range.txt1
-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/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/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/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/numparam_ruby_bug_19025.txt1
-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_bug_989.txt3
-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/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/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/zsuper.txt1
-rw-r--r--test/prism/fixtures/xstring.txt13
-rw-r--r--test/prism/fixtures/xstring_with_backslash.txt1
-rw-r--r--test/prism/fixtures/yield.txt7
-rw-r--r--test/prism/format_errors_test.rb58
-rw-r--r--test/prism/fuzzer_test.rb67
-rw-r--r--test/prism/heredoc_dedent_test.rb27
-rw-r--r--test/prism/index_write_test.rb89
-rw-r--r--test/prism/integer_parse_test.rb45
-rw-r--r--test/prism/library_symbols_test.rb106
-rw-r--r--test/prism/locals_test.rb58
-rw-r--r--test/prism/location_test.rb946
-rw-r--r--test/prism/magic_comment_test.rb33
-rw-r--r--test/prism/memsize_test.rb17
-rw-r--r--test/prism/newline_test.rb101
-rw-r--r--test/prism/parameters_signature_test.rb93
-rw-r--r--test/prism/parse_comments_test.rb21
-rw-r--r--test/prism/parse_stream_test.rb74
-rw-r--r--test/prism/parse_test.rb371
-rw-r--r--test/prism/parser_test.rb186
-rw-r--r--test/prism/pattern_test.rb132
-rw-r--r--test/prism/redundant_return_test.rb73
-rw-r--r--test/prism/reflection_test.rb22
-rw-r--r--test/prism/regexp_test.rb263
-rw-r--r--test/prism/ripper_test.rb85
-rw-r--r--test/prism/ruby_api_test.rb307
-rw-r--r--test/prism/ruby_parser_test.rb144
-rw-r--r--test/prism/snapshots/alias.txt194
-rw-r--r--test/prism/snapshots/arithmetic.txt255
-rw-r--r--test/prism/snapshots/arrays.txt1837
-rw-r--r--test/prism/snapshots/begin_ensure.txt251
-rw-r--r--test/prism/snapshots/begin_rescue.txt699
-rw-r--r--test/prism/snapshots/blocks.txt774
-rw-r--r--test/prism/snapshots/boolean_operators.txt54
-rw-r--r--test/prism/snapshots/booleans.txt7
-rw-r--r--test/prism/snapshots/break.txt401
-rw-r--r--test/prism/snapshots/case.txt495
-rw-r--r--test/prism/snapshots/classes.txt365
-rw-r--r--test/prism/snapshots/command_method_call.txt755
-rw-r--r--test/prism/snapshots/comments.txt145
-rw-r--r--test/prism/snapshots/constants.txt1225
-rw-r--r--test/prism/snapshots/dash_heredocs.txt260
-rw-r--r--test/prism/snapshots/defined.txt88
-rw-r--r--test/prism/snapshots/dos_endings.txt110
-rw-r--r--test/prism/snapshots/dstring.txt85
-rw-r--r--test/prism/snapshots/dsym_str.txt11
-rw-r--r--test/prism/snapshots/embdoc_no_newline_at_end.txt5
-rw-r--r--test/prism/snapshots/emoji_method_calls.txt31
-rw-r--r--test/prism/snapshots/endless_methods.txt107
-rw-r--r--test/prism/snapshots/endless_range_in_conditional.txt53
-rw-r--r--test/prism/snapshots/for.txt188
-rw-r--r--test/prism/snapshots/global_variables.txt191
-rw-r--r--test/prism/snapshots/hashes.txt384
-rw-r--r--test/prism/snapshots/heredoc.txt11
-rw-r--r--test/prism/snapshots/heredoc_with_carriage_returns.txt11
-rw-r--r--test/prism/snapshots/heredoc_with_comment.txt21
-rw-r--r--test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt67
-rw-r--r--test/prism/snapshots/heredoc_with_trailing_newline.txt11
-rw-r--r--test/prism/snapshots/heredocs_leading_whitespace.txt63
-rw-r--r--test/prism/snapshots/heredocs_nested.txt94
-rw-r--r--test/prism/snapshots/heredocs_with_ignored_newlines.txt70
-rw-r--r--test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt11
-rw-r--r--test/prism/snapshots/if.txt531
-rw-r--r--test/prism/snapshots/indented_file_end.txt18
-rw-r--r--test/prism/snapshots/integer_operations.txt635
-rw-r--r--test/prism/snapshots/keyword_method_names.txt173
-rw-r--r--test/prism/snapshots/keywords.txt47
-rw-r--r--test/prism/snapshots/lambda.txt202
-rw-r--r--test/prism/snapshots/method_calls.txt2456
-rw-r--r--test/prism/snapshots/methods.txt2054
-rw-r--r--test/prism/snapshots/modules.txt180
-rw-r--r--test/prism/snapshots/multi_write.txt93
-rw-r--r--test/prism/snapshots/newline_terminated.txt107
-rw-r--r--test/prism/snapshots/next.txt329
-rw-r--r--test/prism/snapshots/nils.txt34
-rw-r--r--test/prism/snapshots/non_alphanumeric_methods.txt503
-rw-r--r--test/prism/snapshots/not.txt351
-rw-r--r--test/prism/snapshots/numbers.txt142
-rw-r--r--test/prism/snapshots/patterns.txt4915
-rw-r--r--test/prism/snapshots/procs.txt403
-rw-r--r--test/prism/snapshots/range_begin_open_exclusive.txt13
-rw-r--r--test/prism/snapshots/range_begin_open_inclusive.txt13
-rw-r--r--test/prism/snapshots/range_end_open_exclusive.txt13
-rw-r--r--test/prism/snapshots/range_end_open_inclusive.txt13
-rw-r--r--test/prism/snapshots/ranges.txt533
-rw-r--r--test/prism/snapshots/regex.txt510
-rw-r--r--test/prism/snapshots/regex_char_width.txt50
-rw-r--r--test/prism/snapshots/repeat_parameters.txt473
-rw-r--r--test/prism/snapshots/rescue.txt528
-rw-r--r--test/prism/snapshots/return.txt165
-rw-r--r--test/prism/snapshots/seattlerb/BEGIN.txt15
-rw-r--r--test/prism/snapshots/seattlerb/TestRubyParserShared.txt361
-rw-r--r--test/prism/snapshots/seattlerb/__ENCODING__.txt6
-rw-r--r--test/prism/snapshots/seattlerb/alias_gvar_backref.txt13
-rw-r--r--test/prism/snapshots/seattlerb/alias_resword.txt21
-rw-r--r--test/prism/snapshots/seattlerb/and_multi.txt26
-rw-r--r--test/prism/snapshots/seattlerb/aref_args_assocs.txt23
-rw-r--r--test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt26
-rw-r--r--test/prism/snapshots/seattlerb/args_kw_block.txt39
-rw-r--r--test/prism/snapshots/seattlerb/array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt35
-rw-r--r--test/prism/snapshots/seattlerb/assoc__bare.txt31
-rw-r--r--test/prism/snapshots/seattlerb/assoc_label.txt34
-rw-r--r--test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt23
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_array_arg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt83
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt31
-rw-r--r--test/prism/snapshots/seattlerb/backticks_interpolation_line.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bang_eq.txt24
-rw-r--r--test/prism/snapshots/seattlerb/bdot2.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bdot3.txt38
-rw-r--r--test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt16
-rw-r--r--test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt47
-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.txt31
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_kwsplat.txt39
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt54
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat.txt51
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt59
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_optional.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope.txt40
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope2.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_splat_arg.txt45
-rw-r--r--test/prism/snapshots/seattlerb/block_args_kwargs.txt44
-rw-r--r--test/prism/snapshots/seattlerb/block_args_no_kwargs.txt37
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt1.txt59
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2.txt52
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2_2.txt71
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt3.txt79
-rw-r--r--test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt80
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt100
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt113
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_colon.txt54
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_dot.txt54
-rw-r--r--test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt60
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_colon.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_dot.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt52
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_splat.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_kw.txt42
-rw-r--r--test/prism/snapshots/seattlerb/block_kw__required.txt38
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar.txt50
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt61
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_arg.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat.txt48
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt56
-rw-r--r--test/prism/snapshots/seattlerb/block_optarg.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_paren_splat.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_reg_optarg.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_return.txt57
-rw-r--r--test/prism/snapshots/seattlerb/block_scope.txt29
-rw-r--r--test/prism/snapshots/seattlerb/block_splat_reg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/bug169.txt28
-rw-r--r--test/prism/snapshots/seattlerb/bug179.txt28
-rw-r--r--test/prism/snapshots/seattlerb/bug190.txt11
-rw-r--r--test/prism/snapshots/seattlerb/bug191.txt87
-rw-r--r--test/prism/snapshots/seattlerb/bug202.txt22
-rw-r--r--test/prism/snapshots/seattlerb/bug236.txt70
-rw-r--r--test/prism/snapshots/seattlerb/bug290.txt24
-rw-r--r--test/prism/snapshots/seattlerb/bug_187.txt59
-rw-r--r--test/prism/snapshots/seattlerb/bug_215.txt14
-rw-r--r--test/prism/snapshots/seattlerb/bug_249.txt86
-rw-r--r--test/prism/snapshots/seattlerb/bug_and.txt21
-rw-r--r--test/prism/snapshots/seattlerb/bug_args__19.txt58
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn.txt49
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn2.txt58
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt55
-rw-r--r--test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt110
-rw-r--r--test/prism/snapshots/seattlerb/bug_case_when_regexp.txt28
-rw-r--r--test/prism/snapshots/seattlerb/bug_comma.txt41
-rw-r--r--test/prism/snapshots/seattlerb/bug_cond_pct.txt22
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_interp_array.txt26
-rw-r--r--test/prism/snapshots/seattlerb/bug_masgn_right.txt49
-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.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_assoc.txt34
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt43
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_kwsplat.txt37
-rw-r--r--test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt106
-rw-r--r--test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt34
-rw-r--r--test/prism/snapshots/seattlerb/call_args_command.txt54
-rw-r--r--test/prism/snapshots/seattlerb/call_array_arg.txt38
-rw-r--r--test/prism/snapshots/seattlerb/call_array_block_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt45
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc.txt31
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new.txt34
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt58
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt31
-rw-r--r--test/prism/snapshots/seattlerb/call_bang_command_call.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_bang_squiggle.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_begin_call_block_call.txt53
-rw-r--r--test/prism/snapshots/seattlerb/call_block_arg_named.txt28
-rw-r--r--test/prism/snapshots/seattlerb/call_carat.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_colon2.txt17
-rw-r--r--test/prism/snapshots/seattlerb/call_colon_parens.txt18
-rw-r--r--test/prism/snapshots/seattlerb/call_div.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_dot_parens.txt18
-rw-r--r--test/prism/snapshots/seattlerb/call_env.txt25
-rw-r--r--test/prism/snapshots/seattlerb/call_eq3.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_gt.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_kwsplat.txt27
-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.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_lte.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_not.txt18
-rw-r--r--test/prism/snapshots/seattlerb/call_pipe.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_rshift.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_self_brackets.txt22
-rw-r--r--test/prism/snapshots/seattlerb/call_spaceship.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_star.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_star2.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_trailing_comma.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_trailing_dots.txt35
-rw-r--r--test/prism/snapshots/seattlerb/call_unary_bang.txt18
-rw-r--r--test/prism/snapshots/seattlerb/case_in.txt976
-rw-r--r--test/prism/snapshots/seattlerb/case_in_31.txt49
-rw-r--r--test/prism/snapshots/seattlerb/case_in_37.txt58
-rw-r--r--test/prism/snapshots/seattlerb/case_in_42.txt44
-rw-r--r--test/prism/snapshots/seattlerb/case_in_42_2.txt40
-rw-r--r--test/prism/snapshots/seattlerb/case_in_47.txt52
-rw-r--r--test/prism/snapshots/seattlerb/case_in_67.txt33
-rw-r--r--test/prism/snapshots/seattlerb/case_in_86.txt51
-rw-r--r--test/prism/snapshots/seattlerb/case_in_86_2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_const.txt42
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt47
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt48
-rw-r--r--test/prism/snapshots/seattlerb/case_in_const.txt28
-rw-r--r--test/prism/snapshots/seattlerb/case_in_else.txt40
-rw-r--r--test/prism/snapshots/seattlerb/case_in_find.txt47
-rw-r--r--test/prism/snapshots/seattlerb/case_in_find_array.txt44
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat.txt68
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt86
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt51
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt47
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt55
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt42
-rw-r--r--test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt67
-rw-r--r--test/prism/snapshots/seattlerb/case_in_multiple.txt57
-rw-r--r--test/prism/snapshots/seattlerb/case_in_or.txt38
-rw-r--r--test/prism/snapshots/seattlerb/class_comments.txt31
-rw-r--r--test/prism/snapshots/seattlerb/cond_unary_minus.txt15
-rw-r--r--test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt22
-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.txt13
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt37
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_forward_args.txt49
-rw-r--r--test/prism/snapshots/seattlerb/defn_args_forward_args.txt61
-rw-r--r--test/prism/snapshots/seattlerb/defn_comments.txt18
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command.txt36
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_env.txt55
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt45
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt39
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt39
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt42
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt34
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_val.txt37
-rw-r--r--test/prism/snapshots/seattlerb/defn_no_kwargs.txt29
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner.txt47
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt47
-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.txt158
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_last_arg.txt33
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_reg.txt36
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_powarg.txt31
-rw-r--r--test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt44
-rw-r--r--test/prism/snapshots/seattlerb/defn_splat_arg.txt34
-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.txt60
-rw-r--r--test/prism/snapshots/seattlerb/defs_comments.txt19
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command.txt46
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt53
-rw-r--r--test/prism/snapshots/seattlerb/defs_kwarg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner.txt48
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt48
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt161
-rw-r--r--test/prism/snapshots/seattlerb/difficult0_.txt73
-rw-r--r--test/prism/snapshots/seattlerb/difficult1_line_numbers.txt267
-rw-r--r--test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt78
-rw-r--r--test/prism/snapshots/seattlerb/difficult2_.txt74
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_.txt52
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_2.txt42
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_3.txt47
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_4.txt38
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_5.txt48
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__10.txt52
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__11.txt46
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__12.txt49
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__6.txt55
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__7.txt49
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__8.txt52
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__9.txt49
-rw-r--r--test/prism/snapshots/seattlerb/difficult4__leading_dots.txt25
-rw-r--r--test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt16
-rw-r--r--test/prism/snapshots/seattlerb/difficult6_.txt61
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__7.txt55
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__8.txt55
-rw-r--r--test/prism/snapshots/seattlerb/difficult7_.txt93
-rw-r--r--test/prism/snapshots/seattlerb/do_bug.txt63
-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.txt38
-rw-r--r--test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt25
-rw-r--r--test/prism/snapshots/seattlerb/dstr_lex_state.txt35
-rw-r--r--test/prism/snapshots/seattlerb/dstr_str.txt28
-rw-r--r--test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt11
-rw-r--r--test/prism/snapshots/seattlerb/dsym_to_sym.txt37
-rw-r--r--test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt11
-rw-r--r--test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt50
-rw-r--r--test/prism/snapshots/seattlerb/evstr_evstr.txt42
-rw-r--r--test/prism/snapshots/seattlerb/evstr_str.txt32
-rw-r--r--test/prism/snapshots/seattlerb/expr_not_bang.txt38
-rw-r--r--test/prism/snapshots/seattlerb/f_kw.txt34
-rw-r--r--test/prism/snapshots/seattlerb/f_kw__required.txt30
-rw-r--r--test/prism/snapshots/seattlerb/flip2_env_lvar.txt37
-rw-r--r--test/prism/snapshots/seattlerb/float_with_if_modifier.txt17
-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.txt27
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_lineno.txt26
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_nested.txt42
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly.txt34
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt67
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt34
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt49
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt28
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt28
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt34
-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.txt27
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt27
-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.txt25
-rw-r--r--test/prism/snapshots/seattlerb/if_symbol.txt31
-rw-r--r--test/prism/snapshots/seattlerb/in_expr_no_case.txt17
-rw-r--r--test/prism/snapshots/seattlerb/index_0.txt38
-rw-r--r--test/prism/snapshots/seattlerb/index_0_opasgn.txt36
-rw-r--r--test/prism/snapshots/seattlerb/integer_with_if_modifier.txt18
-rw-r--r--test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_1.txt40
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_1.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_2.txt56
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_1.txt54
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_2.txt59
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_2__19.txt46
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_3.txt52
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_4.txt45
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_5.txt42
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_6.txt49
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_1.txt48
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_2.txt53
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_1.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_2.txt56
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_1.txt46
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt47
-rw-r--r--test/prism/snapshots/seattlerb/label_vs_string.txt34
-rw-r--r--test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt95
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt21
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_command.txt37
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_env.txt14
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_ivar_env.txt13
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt33
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_middle_splat.txt49
-rw-r--r--test/prism/snapshots/seattlerb/magic_encoding_comment.txt46
-rw-r--r--test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt29
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_ident.txt42
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/masgn_colon2.txt42
-rw-r--r--test/prism/snapshots/seattlerb/masgn_colon3.txt34
-rw-r--r--test/prism/snapshots/seattlerb/masgn_command_call.txt43
-rw-r--r--test/prism/snapshots/seattlerb/masgn_double_paren.txt35
-rw-r--r--test/prism/snapshots/seattlerb/masgn_lhs_splat.txt33
-rw-r--r--test/prism/snapshots/seattlerb/masgn_paren.txt39
-rw-r--r--test/prism/snapshots/seattlerb/masgn_splat_arg.txt32
-rw-r--r--test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/masgn_star.txt19
-rw-r--r--test/prism/snapshots/seattlerb/masgn_var_star_var.txt32
-rw-r--r--test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt59
-rw-r--r--test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt41
-rw-r--r--test/prism/snapshots/seattlerb/method_call_trailing_comma.txt31
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt35
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_back_splat.txt38
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt35
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_front_splat.txt38
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_keyword.txt30
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt44
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_mid_splat.txt47
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_rescue.txt36
-rw-r--r--test/prism/snapshots/seattlerb/module_comments.txt29
-rw-r--r--test/prism/snapshots/seattlerb/multiline_hash_declaration.txt95
-rw-r--r--test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_command_call.txt37
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt32
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt53
-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.txt20
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/parse_def_special_name.txt18
-rw-r--r--test/prism/snapshots/seattlerb/parse_if_not_canonical.txt62
-rw-r--r--test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt62
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block.txt30
-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.txt20
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt20
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_no_args.txt61
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_complex.txt67
-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.txt29
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot2_open.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot3.txt51
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot3_open.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt21
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt21
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt37
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_hash_lit.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc.txt43
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt33
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt74
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt74
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_multiline_str.txt14
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt14
-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.txt40
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt25
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_to_ary.txt39
-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.txt34
-rw-r--r--test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt24
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_019.txt33
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_044.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_051.txt47
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058.txt73
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058_2.txt67
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_069.txt48
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_076.txt58
-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.txt52
-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.txt51
-rw-r--r--test/prism/snapshots/seattlerb/pipe_semicolon.txt39
-rw-r--r--test/prism/snapshots/seattlerb/pipe_space.txt36
-rw-r--r--test/prism/snapshots/seattlerb/qWords_space.txt10
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols.txt28
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_empty.txt10
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_empty_space.txt10
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_interp.txt57
-rw-r--r--test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/quoted_symbol_keys.txt25
-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.txt10
-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.txt58
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt75
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_raised.txt52
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt79
-rw-r--r--test/prism/snapshots/seattlerb/rescue_in_block.txt47
-rw-r--r--test/prism/snapshots/seattlerb/rescue_parens.txt48
-rw-r--r--test/prism/snapshots/seattlerb/return_call_assocs.txt218
-rw-r--r--test/prism/snapshots/seattlerb/rhs_asgn.txt15
-rw-r--r--test/prism/snapshots/seattlerb/ruby21_numbers.txt27
-rw-r--r--test/prism/snapshots/seattlerb/safe_attrasgn.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt31
-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.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_calls.txt41
-rw-r--r--test/prism/snapshots/seattlerb/safe_op_asgn.txt41
-rw-r--r--test/prism/snapshots/seattlerb/safe_op_asgn2.txt34
-rw-r--r--test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt57
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt28
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt50
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call.txt58
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt54
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw.txt33
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw__required.txt29
-rw-r--r--test/prism/snapshots/seattlerb/stabby_proc_scope.txt31
-rw-r--r--test/prism/snapshots/seattlerb/str_backslashes.txt24
-rw-r--r--test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_double_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_double_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_evstr.txt32
-rw-r--r--test/prism/snapshots/seattlerb/str_evstr_escape.txt38
-rw-r--r--test/prism/snapshots/seattlerb/str_heredoc_interp.txt32
-rw-r--r--test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt105
-rw-r--r--test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt22
-rw-r--r--test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt14
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_Q_nested.txt38
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_nested_nested.txt42
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_q.txt11
-rw-r--r--test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_single_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_single_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_str.txt28
-rw-r--r--test/prism/snapshots/seattlerb/str_str_str.txt34
-rw-r--r--test/prism/snapshots/seattlerb/super_arg.txt17
-rw-r--r--test/prism/snapshots/seattlerb/symbol_empty.txt11
-rw-r--r--test/prism/snapshots/seattlerb/symbol_list.txt50
-rw-r--r--test/prism/snapshots/seattlerb/symbols.txt28
-rw-r--r--test/prism/snapshots/seattlerb/symbols_empty.txt10
-rw-r--r--test/prism/snapshots/seattlerb/symbols_empty_space.txt10
-rw-r--r--test/prism/snapshots/seattlerb/symbols_interp.txt28
-rw-r--r--test/prism/snapshots/seattlerb/thingy.txt57
-rw-r--r--test/prism/snapshots/seattlerb/uminus_float.txt7
-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.txt21
-rw-r--r--test/prism/snapshots/seattlerb/unary_tilde.txt25
-rw-r--r--test/prism/snapshots/seattlerb/utf8_bom.txt21
-rw-r--r--test/prism/snapshots/seattlerb/when_splat.txt39
-rw-r--r--test/prism/snapshots/seattlerb/words_interp.txt30
-rw-r--r--test/prism/snapshots/seattlerb/yield_arg.txt16
-rw-r--r--test/prism/snapshots/seattlerb/yield_call_assocs.txt224
-rw-r--r--test/prism/snapshots/seattlerb/yield_empty_parens.txt10
-rw-r--r--test/prism/snapshots/single_method_call_with_bang.txt15
-rw-r--r--test/prism/snapshots/single_quote_heredocs.txt11
-rw-r--r--test/prism/snapshots/spanning_heredoc.txt413
-rw-r--r--test/prism/snapshots/spanning_heredoc_newlines.txt155
-rw-r--r--test/prism/snapshots/strings.txt534
-rw-r--r--test/prism/snapshots/super.txt132
-rw-r--r--test/prism/snapshots/symbols.txt464
-rw-r--r--test/prism/snapshots/ternary_operator.txt295
-rw-r--r--test/prism/snapshots/tilde_heredocs.txt405
-rw-r--r--test/prism/snapshots/undef.txt117
-rw-r--r--test/prism/snapshots/unescaping.txt34
-rw-r--r--test/prism/snapshots/unless.txt173
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/alias.txt29
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/assignment.txt1076
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/block.txt1402
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/case.txt446
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/class.txt226
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/def.txt1204
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defined.txt55
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defs.txt358
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/dstr.txt353
-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.txt237
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/for.txt171
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/hookexe.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/if.txt288
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/kwbegin.txt491
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/lambda.txt151
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/literal.txt1198
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/module.txt104
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/opasgn.txt509
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/pattern.txt446
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/pragma.txt20
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/range.txt55
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/rescue.txt103
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/send.txt2190
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/27.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/30.txt88
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/31.txt90
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/32.txt156
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/singletons.txt9
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/super.txt277
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/unary.txt248
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/undef.txt29
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/variables.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/while.txt704
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/yield.txt56
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/and.txt235
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/block.txt191
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/def.txt90
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/dstr.txt598
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt259
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/literal.txt103
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/opasgn.txt69
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/send.txt163
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/undef.txt29
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/while.txt277
-rw-r--r--test/prism/snapshots/until.txt180
-rw-r--r--test/prism/snapshots/variables.txt408
-rw-r--r--test/prism/snapshots/while.txt470
-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.txt21
-rw-r--r--test/prism/snapshots/whitequark/alias_gvar.txt21
-rw-r--r--test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt60
-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.txt93
-rw-r--r--test/prism/snapshots/whitequark/anonymous_blockarg.txt46
-rw-r--r--test/prism/snapshots/whitequark/arg.txt56
-rw-r--r--test/prism/snapshots/whitequark/arg_duplicate_ignored.txt59
-rw-r--r--test/prism/snapshots/whitequark/arg_label.txt115
-rw-r--r--test/prism/snapshots/whitequark/arg_scope.txt34
-rw-r--r--test/prism/snapshots/whitequark/args.txt1075
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs.txt96
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs_comma.txt54
-rw-r--r--test/prism/snapshots/whitequark/args_args_comma.txt38
-rw-r--r--test/prism/snapshots/whitequark/args_args_star.txt90
-rw-r--r--test/prism/snapshots/whitequark/args_assocs.txt195
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_comma.txt44
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_legacy.txt195
-rw-r--r--test/prism/snapshots/whitequark/args_block_pass.txt28
-rw-r--r--test/prism/snapshots/whitequark/args_cmd.txt41
-rw-r--r--test/prism/snapshots/whitequark/args_star.txt70
-rw-r--r--test/prism/snapshots/whitequark/array_assocs.txt44
-rw-r--r--test/prism/snapshots/whitequark/array_plain.txt16
-rw-r--r--test/prism/snapshots/whitequark/array_splat.txt68
-rw-r--r--test/prism/snapshots/whitequark/array_symbols.txt22
-rw-r--r--test/prism/snapshots/whitequark/array_symbols_empty.txt15
-rw-r--r--test/prism/snapshots/whitequark/array_symbols_interp.txt67
-rw-r--r--test/prism/snapshots/whitequark/array_words.txt22
-rw-r--r--test/prism/snapshots/whitequark/array_words_empty.txt15
-rw-r--r--test/prism/snapshots/whitequark/array_words_interp.txt80
-rw-r--r--test/prism/snapshots/whitequark/asgn_cmd.txt55
-rw-r--r--test/prism/snapshots/whitequark/asgn_mrhs.txt87
-rw-r--r--test/prism/snapshots/whitequark/back_ref.txt7
-rw-r--r--test/prism/snapshots/whitequark/bang.txt25
-rw-r--r--test/prism/snapshots/whitequark/bang_cmd.txt38
-rw-r--r--test/prism/snapshots/whitequark/begin_cmdarg.txt51
-rw-r--r--test/prism/snapshots/whitequark/beginless_erange_after_newline.txt23
-rw-r--r--test/prism/snapshots/whitequark/beginless_irange_after_newline.txt23
-rw-r--r--test/prism/snapshots/whitequark/beginless_range.txt21
-rw-r--r--test/prism/snapshots/whitequark/blockarg.txt31
-rw-r--r--test/prism/snapshots/whitequark/blockargs.txt1339
-rw-r--r--test/prism/snapshots/whitequark/bug_435.txt39
-rw-r--r--test/prism/snapshots/whitequark/bug_447.txt56
-rw-r--r--test/prism/snapshots/whitequark/bug_452.txt63
-rw-r--r--test/prism/snapshots/whitequark/bug_466.txt70
-rw-r--r--test/prism/snapshots/whitequark/bug_473.txt34
-rw-r--r--test/prism/snapshots/whitequark/bug_480.txt37
-rw-r--r--test/prism/snapshots/whitequark/bug_481.txt50
-rw-r--r--test/prism/snapshots/whitequark/bug_ascii_8bit_in_literal.txt11
-rw-r--r--test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt30
-rw-r--r--test/prism/snapshots/whitequark/bug_cmdarg.txt106
-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.txt50
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt40
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt383
-rw-r--r--test/prism/snapshots/whitequark/bug_heredoc_do.txt30
-rw-r--r--test/prism/snapshots/whitequark/bug_interp_single.txt38
-rw-r--r--test/prism/snapshots/whitequark/bug_lambda_leakage.txt38
-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.txt34
-rw-r--r--test/prism/snapshots/whitequark/case_cond_else.txt46
-rw-r--r--test/prism/snapshots/whitequark/case_expr.txt44
-rw-r--r--test/prism/snapshots/whitequark/case_expr_else.txt60
-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.txt13
-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_super.txt18
-rw-r--r--test/prism/snapshots/whitequark/class_super_label.txt35
-rw-r--r--test/prism/snapshots/whitequark/comments_before_leading_dot__27.txt85
-rw-r--r--test/prism/snapshots/whitequark/complex.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_begin.txt40
-rw-r--r--test/prism/snapshots/whitequark/cond_begin_masgn.txt52
-rw-r--r--test/prism/snapshots/whitequark/cond_eflipflop.txt78
-rw-r--r--test/prism/snapshots/whitequark/cond_eflipflop_with_beginless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_eflipflop_with_endless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_iflipflop.txt78
-rw-r--r--test/prism/snapshots/whitequark/cond_iflipflop_with_beginless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_iflipflop_with_endless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_match_current_line.txt34
-rw-r--r--test/prism/snapshots/whitequark/const_op_asgn.txt97
-rw-r--r--test/prism/snapshots/whitequark/const_scoped.txt12
-rw-r--r--test/prism/snapshots/whitequark/const_toplevel.txt10
-rw-r--r--test/prism/snapshots/whitequark/const_unscoped.txt7
-rw-r--r--test/prism/snapshots/whitequark/cpath.txt31
-rw-r--r--test/prism/snapshots/whitequark/cvar.txt7
-rw-r--r--test/prism/snapshots/whitequark/cvasgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/dedenting_heredoc.txt496
-rw-r--r--test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt22
-rw-r--r--test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt22
-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.txt221
-rw-r--r--test/prism/snapshots/whitequark/endless_method.txt151
-rw-r--r--test/prism/snapshots/whitequark/endless_method_command_syntax.txt394
-rw-r--r--test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt43
-rw-r--r--test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt56
-rw-r--r--test/prism/snapshots/whitequark/endless_method_without_args.txt89
-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.txt9
-rw-r--r--test/prism/snapshots/whitequark/for.txt83
-rw-r--r--test/prism/snapshots/whitequark/for_mlhs.txt56
-rw-r--r--test/prism/snapshots/whitequark/forward_arg.txt43
-rw-r--r--test/prism/snapshots/whitequark/forward_arg_with_open_args.txt404
-rw-r--r--test/prism/snapshots/whitequark/forward_args_legacy.txt99
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt58
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt55
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg.txt52
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt63
-rw-r--r--test/prism/snapshots/whitequark/forwarded_restarg.txt49
-rw-r--r--test/prism/snapshots/whitequark/gvar.txt7
-rw-r--r--test/prism/snapshots/whitequark/gvasgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/hash_empty.txt9
-rw-r--r--test/prism/snapshots/whitequark/hash_hashrocket.txt49
-rw-r--r--test/prism/snapshots/whitequark/hash_kwsplat.txt35
-rw-r--r--test/prism/snapshots/whitequark/hash_label.txt22
-rw-r--r--test/prism/snapshots/whitequark/hash_label_end.txt100
-rw-r--r--test/prism/snapshots/whitequark/hash_pair_value_omission.txt97
-rw-r--r--test/prism/snapshots/whitequark/heredoc.txt23
-rw-r--r--test/prism/snapshots/whitequark/if.txt63
-rw-r--r--test/prism/snapshots/whitequark/if_else.txt95
-rw-r--r--test/prism/snapshots/whitequark/if_elsif.txt65
-rw-r--r--test/prism/snapshots/whitequark/if_masgn__24.txt42
-rw-r--r--test/prism/snapshots/whitequark/if_mod.txt34
-rw-r--r--test/prism/snapshots/whitequark/if_nl_then.txt34
-rw-r--r--test/prism/snapshots/whitequark/int.txt14
-rw-r--r--test/prism/snapshots/whitequark/int___LINE__.txt6
-rw-r--r--test/prism/snapshots/whitequark/interp_digit_var.txt273
-rw-r--r--test/prism/snapshots/whitequark/ivar.txt7
-rw-r--r--test/prism/snapshots/whitequark/ivasgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/keyword_argument_omission.txt65
-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.txt34
-rw-r--r--test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt58
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_named.txt31
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_unnamed.txt31
-rw-r--r--test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt54
-rw-r--r--test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt67
-rw-r--r--test/prism/snapshots/whitequark/lvar.txt15
-rw-r--r--test/prism/snapshots/whitequark/lvar_injecting_match.txt39
-rw-r--r--test/prism/snapshots/whitequark/lvasgn.txt17
-rw-r--r--test/prism/snapshots/whitequark/masgn.txt83
-rw-r--r--test/prism/snapshots/whitequark/masgn_attr.txt82
-rw-r--r--test/prism/snapshots/whitequark/masgn_cmd.txt35
-rw-r--r--test/prism/snapshots/whitequark/masgn_const.txt44
-rw-r--r--test/prism/snapshots/whitequark/masgn_nested.txt66
-rw-r--r--test/prism/snapshots/whitequark/masgn_splat.txt284
-rw-r--r--test/prism/snapshots/whitequark/module.txt14
-rw-r--r--test/prism/snapshots/whitequark/multiple_pattern_matches.txt173
-rw-r--r--test/prism/snapshots/whitequark/newline_in_hash_argument.txt163
-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.txt44
-rw-r--r--test/prism/snapshots/whitequark/not.txt55
-rw-r--r--test/prism/snapshots/whitequark/not_cmd.txt38
-rw-r--r--test/prism/snapshots/whitequark/not_masgn__24.txt45
-rw-r--r--test/prism/snapshots/whitequark/nth_ref.txt7
-rw-r--r--test/prism/snapshots/whitequark/numbered_args_after_27.txt143
-rw-r--r--test/prism/snapshots/whitequark/numparam_outside_block.txt114
-rw-r--r--test/prism/snapshots/whitequark/numparam_ruby_bug_19025.txt49
-rw-r--r--test/prism/snapshots/whitequark/op_asgn.txt74
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_cmd.txt177
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_index.txt38
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_index_cmd.txt58
-rw-r--r--test/prism/snapshots/whitequark/optarg.txt74
-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.txt42
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_490.txt106
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_507.txt36
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_518.txt18
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_525.txt65
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_604.txt57
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_640.txt22
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_645.txt35
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_830.txt11
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_989.txt11
-rw-r--r--test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt20
-rw-r--r--test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt139
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt54
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_blank_else.txt31
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_else.txt36
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_single_line.txt45
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt249
-rw-r--r--test/prism/snapshots/whitequark/postexe.txt15
-rw-r--r--test/prism/snapshots/whitequark/preexe.txt15
-rw-r--r--test/prism/snapshots/whitequark/procarg0.txt78
-rw-r--r--test/prism/snapshots/whitequark/range_exclusive.txt16
-rw-r--r--test/prism/snapshots/whitequark/range_inclusive.txt16
-rw-r--r--test/prism/snapshots/whitequark/rational.txt14
-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.txt44
-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.txt31
-rw-r--r--test/prism/snapshots/whitequark/restarg_unnamed.txt31
-rw-r--r--test/prism/snapshots/whitequark/return.txt60
-rw-r--r--test/prism/snapshots/whitequark/return_block.txt41
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_10279.txt32
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_10653.txt173
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11107.txt48
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11380.txt55
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873.txt767
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_a.txt1231
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_b.txt98
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11989.txt24
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11990.txt35
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12073.txt95
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12402.txt565
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12669.txt133
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12686.txt39
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_13547.txt31
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_14690.txt59
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_15789.txt120
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_9669.txt59
-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.txt105
-rw-r--r--test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_binary_op.txt551
-rw-r--r--test/prism/snapshots/whitequark/send_block_chain_cmd.txt325
-rw-r--r--test/prism/snapshots/whitequark/send_block_conditional.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_call.txt57
-rw-r--r--test/prism/snapshots/whitequark/send_conditional.txt25
-rw-r--r--test/prism/snapshots/whitequark/send_index.txt34
-rw-r--r--test/prism/snapshots/whitequark/send_index_asgn.txt37
-rw-r--r--test/prism/snapshots/whitequark/send_index_asgn_legacy.txt37
-rw-r--r--test/prism/snapshots/whitequark/send_index_cmd.txt51
-rw-r--r--test/prism/snapshots/whitequark/send_index_legacy.txt34
-rw-r--r--test/prism/snapshots/whitequark/send_lambda.txt44
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args.txt51
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_noparen.txt57
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_shadow.txt34
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_legacy.txt12
-rw-r--r--test/prism/snapshots/whitequark/send_op_asgn_conditional.txt27
-rw-r--r--test/prism/snapshots/whitequark/send_plain.txt65
-rw-r--r--test/prism/snapshots/whitequark/send_plain_cmd.txt104
-rw-r--r--test/prism/snapshots/whitequark/send_self.txt41
-rw-r--r--test/prism/snapshots/whitequark/send_self_block.txt75
-rw-r--r--test/prism/snapshots/whitequark/send_unary_op.txt65
-rw-r--r--test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt34
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg.txt27
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_block.txt109
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_call.txt37
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_newline.txt27
-rw-r--r--test/prism/snapshots/whitequark/space_args_block.txt28
-rw-r--r--test/prism/snapshots/whitequark/space_args_cmd.txt47
-rw-r--r--test/prism/snapshots/whitequark/string___FILE__.txt8
-rw-r--r--test/prism/snapshots/whitequark/string_concat.txt32
-rw-r--r--test/prism/snapshots/whitequark/string_dvar.txt37
-rw-r--r--test/prism/snapshots/whitequark/string_interp.txt38
-rw-r--r--test/prism/snapshots/whitequark/string_plain.txt17
-rw-r--r--test/prism/snapshots/whitequark/super.txt49
-rw-r--r--test/prism/snapshots/whitequark/super_block.txt48
-rw-r--r--test/prism/snapshots/whitequark/symbol_interp.txt37
-rw-r--r--test/prism/snapshots/whitequark/symbol_plain.txt17
-rw-r--r--test/prism/snapshots/whitequark/ternary.txt36
-rw-r--r--test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt50
-rw-r--r--test/prism/snapshots/whitequark/trailing_forward_arg.txt55
-rw-r--r--test/prism/snapshots/whitequark/true.txt6
-rw-r--r--test/prism/snapshots/whitequark/unary_num_pow_precedence.txt80
-rw-r--r--test/prism/snapshots/whitequark/undef.txt39
-rw-r--r--test/prism/snapshots/whitequark/unless.txt63
-rw-r--r--test/prism/snapshots/whitequark/unless_else.txt95
-rw-r--r--test/prism/snapshots/whitequark/unless_mod.txt34
-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.txt14
-rw-r--r--test/prism/snapshots/whitequark/var_op_asgn.txt57
-rw-r--r--test/prism/snapshots/whitequark/var_op_asgn_cmd.txt28
-rw-r--r--test/prism/snapshots/whitequark/var_or_asgn.txt14
-rw-r--r--test/prism/snapshots/whitequark/when_multi.txt50
-rw-r--r--test/prism/snapshots/whitequark/when_splat.txt72
-rw-r--r--test/prism/snapshots/whitequark/when_then.txt44
-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.txt11
-rw-r--r--test/prism/snapshots/whitequark/yield.txt51
-rw-r--r--test/prism/snapshots/whitequark/zsuper.txt7
-rw-r--r--test/prism/snapshots/xstring.txt67
-rw-r--r--test/prism/snapshots/xstring_with_backslash.txt11
-rw-r--r--test/prism/snapshots/yield.txt103
-rw-r--r--test/prism/static_inspect_test.rb90
-rw-r--r--test/prism/static_literals_test.rb92
-rw-r--r--test/prism/test_helper.rb126
-rw-r--r--test/prism/unescape_test.rb235
-rw-r--r--test/prism/version_test.rb11
-rw-r--r--test/prism/warnings_test.rb246
1874 files changed, 100773 insertions, 0 deletions
diff --git a/test/prism/attribute_write_test.rb b/test/prism/attribute_write_test.rb
new file mode 100644
index 0000000000..bd83d72da3
--- /dev/null
+++ b/test/prism/attribute_write_test.rb
@@ -0,0 +1,60 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class AttributeWriteTest < TestCase
+ module Target
+ def self.value
+ 2
+ end
+
+ def self.value=(value)
+ 2
+ end
+
+ def self.[]=(index, value)
+ 2
+ end
+ end
+
+ def test_named_call_with_operator
+ assert_attribute_write("Target.value = 1")
+ end
+
+ def test_named_call_without_operator
+ assert_attribute_write("Target.value=(1)")
+ end
+
+ def test_indexed_call_with_operator
+ assert_attribute_write("Target[0] = 1")
+ end
+
+ def test_indexed_call_without_operator
+ refute_attribute_write("Target.[]=(0, 1)")
+ end
+
+ def test_comparison_operators
+ refute_attribute_write("Target.value == 1")
+ refute_attribute_write("Target.value === 1")
+ end
+
+ private
+
+ def parse(source)
+ Prism.parse(source).value.statements.body.first
+ end
+
+ def assert_attribute_write(source)
+ call = parse(source)
+ assert(call.attribute_write?)
+ assert_equal(1, eval(source))
+ end
+
+ def refute_attribute_write(source)
+ call = parse(source)
+ refute(call.attribute_write?)
+ refute_equal(1, eval(source))
+ end
+ end
+end
diff --git a/test/prism/bom_test.rb b/test/prism/bom_test.rb
new file mode 100644
index 0000000000..1525caf458
--- /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 Prism
+ 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 Prism.lex_ripper(bommed), Prism.lex_compat(bommed).value
+ end
+ end
+end
diff --git a/test/prism/command_line_test.rb b/test/prism/command_line_test.rb
new file mode 100644
index 0000000000..4b04c36f3a
--- /dev/null
+++ b/test/prism/command_line_test.rb
@@ -0,0 +1,111 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class CommandLineTest < TestCase
+ def test_command_line_p
+ program = Prism.parse("1", command_line: "p").value
+ statements = program.statements.body
+
+ assert_equal 2, statements.length
+ assert_kind_of CallNode, statements.last
+ assert_equal :print, statements.last.name
+ end
+
+ def test_command_line_n
+ program = Prism.parse("1", command_line: "n").value
+ statements = program.statements.body
+
+ assert_equal 1, statements.length
+ assert_kind_of WhileNode, statements.first
+
+ predicate = statements.first.predicate
+ assert_kind_of CallNode, predicate
+ assert_equal :gets, predicate.name
+
+ arguments = predicate.arguments.arguments
+ assert_equal 1, arguments.length
+ assert_equal :$/, arguments.first.name
+ end
+
+ def test_command_line_a
+ program = Prism.parse("1", command_line: "na").value
+ statements = program.statements.body
+
+ assert_equal 1, statements.length
+ assert_kind_of WhileNode, statements.first
+
+ statement = statements.first.statements.body.first
+ assert_kind_of GlobalVariableWriteNode, statement
+ assert_equal :$F, statement.name
+ end
+
+ def test_command_line_l
+ program = Prism.parse("1", command_line: "nl").value
+ statements = program.statements.body
+
+ assert_equal 1, statements.length
+ assert_kind_of WhileNode, statements.first
+
+ predicate = statements.first.predicate
+ assert_kind_of CallNode, predicate
+ assert_equal :gets, predicate.name
+
+ arguments = predicate.arguments.arguments
+ assert_equal 2, arguments.length
+ assert_equal :$/, arguments.first.name
+ assert_equal "chomp", arguments.last.elements.first.key.unescaped
+ end
+
+ def test_command_line_e
+ result = Prism.parse("1 if 2..3")
+ assert_equal 2, result.warnings.length
+
+ result = Prism.parse("1 if 2..3", command_line: "e")
+ assert_equal 0, result.warnings.length
+ end
+
+ def test_command_line_x_implicit
+ result = Prism.parse(<<~RUBY)
+ #!/bin/bash
+ exit 1
+
+ #!/usr/bin/env ruby
+ 1
+ RUBY
+
+ assert_kind_of IntegerNode, result.value.statements.body.first
+ end
+
+ def test_command_line_x_explicit
+ result = Prism.parse(<<~RUBY, command_line: "x")
+ exit 1
+
+ #!/usr/bin/env ruby
+ 1
+ RUBY
+
+ assert_kind_of IntegerNode, result.value.statements.body.first
+ end
+
+ def test_command_line_x_implicit_fail
+ result = Prism.parse(<<~RUBY)
+ #!/bin/bash
+ exit 1
+ RUBY
+
+ assert_equal 1, result.errors.length
+ assert_equal :load, result.errors.first.level
+ end
+
+ def test_command_line_x_explicit_fail
+ result = Prism.parse(<<~RUBY, command_line: "x")
+ exit 1
+ RUBY
+
+ assert_equal 1, result.errors.length
+ assert_equal :load, result.errors.first.level
+ end
+ end
+end
diff --git a/test/prism/comments_test.rb b/test/prism/comments_test.rb
new file mode 100644
index 0000000000..b99c00268c
--- /dev/null
+++ b/test/prism/comments_test.rb
@@ -0,0 +1,138 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class CommentsTest < TestCase
+ def test_comment_inline
+ source = "# comment"
+ assert_equal [0], Debug.newlines(source)
+
+ assert_comment(
+ source,
+ InlineComment,
+ start_offset: 0,
+ end_offset: 9,
+ start_line: 1,
+ end_line: 1,
+ start_column: 0,
+ end_column: 9
+ )
+ end
+
+ def test_comment_inline_def
+ source = <<~RUBY
+ def foo
+ # a comment
+ end
+ RUBY
+
+ assert_comment(
+ source,
+ InlineComment,
+ start_offset: 10,
+ end_offset: 21,
+ start_line: 2,
+ end_line: 2,
+ start_column: 2,
+ end_column: 13
+ )
+ end
+
+ def test___END__
+ result = Prism.parse(<<~RUBY)
+ __END__
+ comment
+ RUBY
+
+ data_loc = result.data_loc
+ assert_equal 0, data_loc.start_offset
+ assert_equal 16, data_loc.end_offset
+ end
+
+ def test___END__crlf
+ result = Prism.parse("__END__\r\ncomment\r\n")
+
+ data_loc = result.data_loc
+ assert_equal 0, data_loc.start_offset
+ assert_equal 18, data_loc.end_offset
+ end
+
+ def test_comment_embedded_document
+ source = <<~RUBY
+ =begin
+ comment
+ =end
+ RUBY
+
+ assert_comment(
+ source,
+ EmbDocComment,
+ start_offset: 0,
+ end_offset: 20,
+ start_line: 1,
+ end_line: 4,
+ start_column: 0,
+ end_column: 0
+ )
+ end
+
+ def test_comment_embedded_document_with_content_on_same_line
+ source = <<~RUBY
+ =begin other stuff
+ =end
+ RUBY
+
+ assert_comment(
+ source,
+ EmbDocComment,
+ start_offset: 0,
+ end_offset: 24,
+ start_line: 1,
+ end_line: 3,
+ start_column: 0,
+ end_column: 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 = Prism.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, start_offset:, end_offset:, start_line:, end_line:, start_column:, end_column:)
+ result = Prism.parse(source)
+ assert result.errors.empty?, result.errors.map(&:message).join("\n")
+ assert_kind_of type, result.comments.first
+
+ location = result.comments.first.location
+ assert_equal start_offset, location.start_offset, -> { "Expected start_offset to be #{start_offset}" }
+ assert_equal end_offset, location.end_offset, -> { "Expected end_offset to be #{end_offset}" }
+ assert_equal start_line, location.start_line, -> { "Expected start_line to be #{start_line}" }
+ assert_equal end_line, location.end_line, -> { "Expected end_line to be #{end_line}" }
+ assert_equal start_column, location.start_column, -> { "Expected start_column to be #{start_column}" }
+ assert_equal end_column, location.end_column, -> { "Expected end_column to be #{end_column}" }
+ end
+ end
+end
diff --git a/test/prism/compiler_test.rb b/test/prism/compiler_test.rb
new file mode 100644
index 0000000000..9a326eb8d6
--- /dev/null
+++ b/test/prism/compiler_test.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+# typed: ignore
+
+require_relative "test_helper"
+
+module Prism
+ class CompilerTest < TestCase
+ class SExpressions < Prism::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, Prism.parse("1 + 2").value.accept(SExpressions.new)
+ end
+ end
+end
diff --git a/test/prism/constant_path_node_test.rb b/test/prism/constant_path_node_test.rb
new file mode 100644
index 0000000000..dffb55c0ff
--- /dev/null
+++ b/test/prism/constant_path_node_test.rb
@@ -0,0 +1,91 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class ConstantPathNodeTest < TestCase
+ def test_full_name_for_constant_path
+ source = <<~RUBY
+ Foo:: # comment
+ Bar::Baz::
+ Qux
+ RUBY
+
+ constant_path = Prism.parse(source).value.statements.body.first
+ assert_equal("Foo::Bar::Baz::Qux", constant_path.full_name)
+ end
+
+ def test_full_name_for_constant_path_with_self
+ source = <<~RUBY
+ self:: # comment
+ Bar::Baz::
+ Qux
+ RUBY
+
+ constant_path = Prism.parse(source).value.statements.body.first
+ assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
+ constant_path.full_name
+ end
+ end
+
+ def test_full_name_for_constant_path_with_variable
+ source = <<~RUBY
+ foo:: # comment
+ Bar::Baz::
+ Qux
+ RUBY
+
+ constant_path = Prism.parse(source).value.statements.body.first
+
+ assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
+ constant_path.full_name
+ end
+ end
+
+ def test_full_name_for_constant_path_target
+ source = <<~RUBY
+ Foo:: # comment
+ Bar::Baz::
+ Qux, Something = [1, 2]
+ RUBY
+
+ node = Prism.parse(source).value.statements.body.first
+ assert_equal("Foo::Bar::Baz::Qux", node.lefts.first.full_name)
+ end
+
+ def test_full_name_for_constant_path_with_stovetop_start
+ source = <<~RUBY
+ ::Foo:: # comment
+ Bar::Baz::
+ Qux, Something = [1, 2]
+ RUBY
+
+ node = Prism.parse(source).value.statements.body.first
+ assert_equal("::Foo::Bar::Baz::Qux", node.lefts.first.full_name)
+ end
+
+ def test_full_name_for_constant_path_target_with_non_constant_parent
+ source = <<~RUBY
+ self::Foo, Bar = [1, 2]
+ RUBY
+
+ constant_target = Prism.parse(source).value.statements.body.first
+ dynamic, static = constant_target.lefts
+
+ assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
+ dynamic.full_name
+ end
+
+ assert_equal("Bar", static.full_name)
+ end
+
+ def test_full_name_for_constant_read_node
+ source = <<~RUBY
+ Bar
+ RUBY
+
+ constant = Prism.parse(source).value.statements.body.first
+ assert_equal("Bar", constant.full_name)
+ 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..1a1d580d2d
--- /dev/null
+++ b/test/prism/desugar_compiler_test.rb
@@ -0,0 +1,80 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ 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).
+ def ensure_every_node_once_in_ast(node, all_nodes = {}.compare_by_identity)
+ 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
+ node.child_nodes.each do |child|
+ ensure_every_node_once_in_ast(child, all_nodes) unless child.nil?
+ end
+ end
+
+ def assert_desugars(expected, source)
+ ast = Prism.parse(source).value.accept(DesugarCompiler.new)
+ assert_equal expected, ast_inspect(ast.statements.body.last)
+
+ ensure_every_node_once_in_ast(ast)
+ end
+
+ def assert_not_desugared(source, reason)
+ ast = Prism.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..0d8a6d35e9
--- /dev/null
+++ b/test/prism/dispatcher_test.rb
@@ -0,0 +1,46 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ 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 = Prism.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..2aee473ddf
--- /dev/null
+++ b/test/prism/encoding_test.rb
@@ -0,0 +1,577 @@
+# frozen_string_literal: true
+
+return if RUBY_ENGINE != "ruby"
+
+require_relative "test_helper"
+
+module Prism
+ class EncodingTest < TestCase
+ codepoints_1byte = 0...0x100
+ encodings = {
+ Encoding::ASCII_8BIT => codepoints_1byte,
+ Encoding::US_ASCII => codepoints_1byte
+ }
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ encodings[Encoding::Windows_1253] = codepoints_1byte
+ end
+
+ # By default we don't test every codepoint in these encodings because it
+ # takes a very long time.
+ if ENV["PRISM_TEST_ALL_ENCODINGS"]
+ codepoints_2bytes = 0...0x10000
+ codepoints_unicode = (0...0x110000)
+
+ codepoints_eucjp = [
+ *(0...0x10000),
+ *(0...0x10000).map { |bytes| bytes | 0x8F0000 }
+ ]
+
+ codepoints_emacs_mule = [
+ *(0...0x80),
+ *((0x81...0x90).flat_map { |byte1| (0x90...0x100).map { |byte2| byte1 << 8 | byte2 } }),
+ *((0x90...0x9C).flat_map { |byte1| (0xA0...0x100).flat_map { |byte2| (0xA0...0x100).flat_map { |byte3| byte1 << 16 | byte2 << 8 | byte3 } } }),
+ *((0xF0...0xF5).flat_map { |byte2| (0xA0...0x100).flat_map { |byte3| (0xA0...0x100).flat_map { |byte4| 0x9C << 24 | byte3 << 16 | byte3 << 8 | byte4 } } }),
+ ]
+
+ codepoints_gb18030 = [
+ *(0...0x80),
+ *((0x81..0xFE).flat_map { |byte1| (0x40...0x100).map { |byte2| byte1 << 8 | byte2 } }),
+ *((0x81..0xFE).flat_map { |byte1| (0x30...0x40).flat_map { |byte2| (0x81..0xFE).flat_map { |byte3| (0x2F...0x41).map { |byte4| byte1 << 24 | byte2 << 16 | byte3 << 8 | byte4 } } } }),
+ ]
+
+ codepoints_euc_tw = [
+ *(0..0x7F),
+ *(0xA1..0xFF).flat_map { |byte1| (0xA1..0xFF).map { |byte2| (byte1 << 8) | byte2 } },
+ *(0xA1..0xB0).flat_map { |byte2| (0xA1..0xFF).flat_map { |byte3| (0xA1..0xFF).flat_map { |byte4| 0x8E << 24 | byte2 << 16 | byte3 << 8 | byte4 } } }
+ ]
+
+ encodings.merge!(
+ Encoding::CP850 => codepoints_1byte,
+ Encoding::CP852 => codepoints_1byte,
+ Encoding::CP855 => codepoints_1byte,
+ Encoding::GB1988 => codepoints_1byte,
+ Encoding::IBM437 => codepoints_1byte,
+ Encoding::IBM720 => codepoints_1byte,
+ Encoding::IBM737 => codepoints_1byte,
+ Encoding::IBM775 => codepoints_1byte,
+ Encoding::IBM852 => codepoints_1byte,
+ Encoding::IBM855 => codepoints_1byte,
+ Encoding::IBM857 => codepoints_1byte,
+ Encoding::IBM860 => codepoints_1byte,
+ Encoding::IBM861 => codepoints_1byte,
+ Encoding::IBM862 => codepoints_1byte,
+ Encoding::IBM863 => codepoints_1byte,
+ Encoding::IBM864 => codepoints_1byte,
+ Encoding::IBM865 => codepoints_1byte,
+ Encoding::IBM866 => codepoints_1byte,
+ Encoding::IBM869 => codepoints_1byte,
+ Encoding::ISO_8859_1 => codepoints_1byte,
+ Encoding::ISO_8859_2 => codepoints_1byte,
+ Encoding::ISO_8859_3 => codepoints_1byte,
+ Encoding::ISO_8859_4 => codepoints_1byte,
+ Encoding::ISO_8859_5 => codepoints_1byte,
+ Encoding::ISO_8859_6 => codepoints_1byte,
+ Encoding::ISO_8859_7 => codepoints_1byte,
+ Encoding::ISO_8859_8 => codepoints_1byte,
+ Encoding::ISO_8859_9 => codepoints_1byte,
+ Encoding::ISO_8859_10 => codepoints_1byte,
+ Encoding::ISO_8859_11 => codepoints_1byte,
+ Encoding::ISO_8859_13 => codepoints_1byte,
+ Encoding::ISO_8859_14 => codepoints_1byte,
+ Encoding::ISO_8859_15 => codepoints_1byte,
+ Encoding::ISO_8859_16 => codepoints_1byte,
+ Encoding::KOI8_R => codepoints_1byte,
+ Encoding::KOI8_U => codepoints_1byte,
+ Encoding::MACCENTEURO => codepoints_1byte,
+ Encoding::MACCROATIAN => codepoints_1byte,
+ Encoding::MACCYRILLIC => codepoints_1byte,
+ Encoding::MACGREEK => codepoints_1byte,
+ Encoding::MACICELAND => codepoints_1byte,
+ Encoding::MACROMAN => codepoints_1byte,
+ Encoding::MACROMANIA => codepoints_1byte,
+ Encoding::MACTHAI => codepoints_1byte,
+ Encoding::MACTURKISH => codepoints_1byte,
+ Encoding::MACUKRAINE => codepoints_1byte,
+ Encoding::TIS_620 => codepoints_1byte,
+ Encoding::Windows_1250 => codepoints_1byte,
+ Encoding::Windows_1251 => codepoints_1byte,
+ Encoding::Windows_1252 => codepoints_1byte,
+ Encoding::Windows_1254 => codepoints_1byte,
+ Encoding::Windows_1255 => codepoints_1byte,
+ Encoding::Windows_1256 => codepoints_1byte,
+ Encoding::Windows_1257 => codepoints_1byte,
+ Encoding::Windows_1258 => codepoints_1byte,
+ Encoding::Windows_874 => codepoints_1byte,
+ Encoding::Big5 => codepoints_2bytes,
+ Encoding::Big5_HKSCS => codepoints_2bytes,
+ Encoding::Big5_UAO => codepoints_2bytes,
+ Encoding::CP949 => codepoints_2bytes,
+ Encoding::CP950 => codepoints_2bytes,
+ Encoding::CP951 => codepoints_2bytes,
+ Encoding::EUC_KR => codepoints_2bytes,
+ Encoding::GBK => codepoints_2bytes,
+ Encoding::GB12345 => codepoints_2bytes,
+ Encoding::GB2312 => codepoints_2bytes,
+ Encoding::MACJAPANESE => codepoints_2bytes,
+ Encoding::Shift_JIS => codepoints_2bytes,
+ Encoding::SJIS_DoCoMo => codepoints_2bytes,
+ Encoding::SJIS_KDDI => codepoints_2bytes,
+ Encoding::SJIS_SoftBank => codepoints_2bytes,
+ Encoding::Windows_31J => codepoints_2bytes,
+ Encoding::UTF_8 => codepoints_unicode,
+ Encoding::UTF8_MAC => codepoints_unicode,
+ Encoding::UTF8_DoCoMo => codepoints_unicode,
+ Encoding::UTF8_KDDI => codepoints_unicode,
+ Encoding::UTF8_SoftBank => codepoints_unicode,
+ Encoding::CESU_8 => codepoints_unicode,
+ Encoding::CP51932 => codepoints_eucjp,
+ Encoding::EUC_JP => codepoints_eucjp,
+ Encoding::EUCJP_MS => codepoints_eucjp,
+ Encoding::EUC_JIS_2004 => codepoints_eucjp,
+ Encoding::EMACS_MULE => codepoints_emacs_mule,
+ Encoding::STATELESS_ISO_2022_JP => codepoints_emacs_mule,
+ Encoding::STATELESS_ISO_2022_JP_KDDI => codepoints_emacs_mule,
+ Encoding::GB18030 => codepoints_gb18030,
+ Encoding::EUC_TW => codepoints_euc_tw
+ )
+ end
+
+ # These test that we're correctly parsing codepoints for each alias of each
+ # encoding that prism supports.
+ encodings.each do |encoding, range|
+ (encoding.names - %w[external internal filesystem locale]).each do |name|
+ define_method(:"test_encoding_#{name}") do
+ assert_encoding(encoding, name, range)
+ end
+ end
+ end
+
+ # These test that we're correctly setting the flags on strings for each
+ # encoding that prism supports.
+ escapes = ["\\x00", "\\x7F", "\\x80", "\\xFF", "\\u{00}", "\\u{7F}", "\\u{80}", "\\M-\\C-?"]
+ escapes = escapes.concat(escapes.product(escapes).map(&:join))
+ symbols = [:a, :ą, :+]
+ regexps = [/a/, /ą/, //]
+
+ encodings.each_key do |encoding|
+ define_method(:"test_encoding_flags_#{encoding.name}") do
+ assert_encoding_flags(encoding, escapes)
+ end
+
+ define_method(:"test_symbol_encoding_flags_#{encoding.name}") do
+ assert_symbol_encoding_flags(encoding, symbols)
+ end
+
+ define_method(:"test_symbol_character_escape_encoding_flags_#{encoding.name}") do
+ assert_symbol_character_escape_encoding_flags(encoding, escapes)
+ end
+
+ define_method(:"test_regular_expression_encoding_flags_#{encoding.name}") do
+ assert_regular_expression_encoding_flags(encoding, regexps.map(&:inspect))
+ end
+
+ define_method(:"test_regular_expression_escape_encoding_flags_#{encoding.name}") do
+ assert_regular_expression_encoding_flags(encoding, escapes.map { |e| "/#{e}/" })
+ end
+ end
+
+ encoding_modifiers = { ascii_8bit: "n", utf_8: "u", euc_jp: "e", windows_31j: "s" }
+ regexp_sources = ["abc", "garçon", "\\x80", "gar\\xC3\\xA7on", "gar\\u{E7}on", "abc\\u{FFFFFF}", "\\x80\\u{80}" ]
+
+ encoding_modifiers.each_value do |modifier|
+ encodings.each_key do |encoding|
+ define_method(:"test_regular_expression_encoding_modifiers_/#{modifier}_#{encoding.name}") do
+ assert_regular_expression_encoding_flags(
+ encoding,
+ regexp_sources.product(encoding_modifiers.values).map { |r, modifier| "/#{r}/#{modifier}" }
+ )
+ end
+ end
+ end
+
+ def test_coding
+ result = Prism.parse("# coding: utf-8\n'string'")
+ actual = result.value.statements.body.first.unescaped.encoding
+ assert_equal Encoding.find("utf-8"), actual
+ end
+
+ def test_coding_with_whitespace
+ result = Prism.parse("# coding \t \r \v : \t \v \r ascii-8bit \n'string'")
+ actual = result.value.statements.body.first.unescaped.encoding
+ assert_equal Encoding.find("ascii-8bit"), actual
+ end
+
+ def test_emacs_style
+ result = Prism.parse("# -*- coding: utf-8 -*-\n'string'")
+ actual = result.value.statements.body.first.unescaped.encoding
+ assert_equal Encoding.find("utf-8"), actual
+ end
+
+ def test_utf_8_variations
+ %w[
+ utf-8-unix
+ utf-8-dos
+ utf-8-mac
+ utf-8-*
+ ].each do |encoding|
+ result = Prism.parse("# coding: #{encoding}\n'string'")
+ actual = result.value.statements.body.first.unescaped.encoding
+ assert_equal Encoding.find("utf-8"), actual
+ end
+ end
+
+ def test_first_lexed_token
+ encoding = Prism.lex("# encoding: ascii-8bit").value[0][0].value.encoding
+ assert_equal Encoding.find("ascii-8bit"), encoding
+ end
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ # 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 = Prism.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_slice_encoding
+ slice = Prism.parse("# encoding: Shift_JIS\nア").value.slice
+ assert_equal (+"ア").force_encoding(Encoding::SHIFT_JIS), slice
+ assert_equal Encoding::SHIFT_JIS, slice.encoding
+ end
+
+ def test_multibyte_escapes
+ [
+ ["'", "'"],
+ ["\"", "\""],
+ ["`", "`"],
+ ["/", "/"],
+ ["<<'HERE'\n", "\nHERE"],
+ ["<<-HERE\n", "\nHERE"]
+ ].each do |opening, closing|
+ assert Prism.parse_success?("# encoding: shift_jis\n'\\\x82\xA0'\n")
+ end
+ end
+ end
+
+ private
+
+ class ConstantContext < BasicObject
+ def self.const_missing(const)
+ const
+ end
+ end
+
+ def constant_context
+ ConstantContext.new
+ end
+
+ class IdentifierContext < BasicObject
+ def method_missing(name, *)
+ name
+ end
+ end
+
+ def identifier_context
+ IdentifierContext.new
+ end
+
+ def assert_encoding_constant(name, character)
+ source = "# encoding: #{name}\n#{character}"
+ expected = constant_context.instance_eval(source)
+
+ result = Prism.parse(source)
+ assert result.success?
+
+ actual = result.value.statements.body.last
+ assert_kind_of ConstantReadNode, actual
+ assert_equal expected, actual.name
+ end
+
+ def assert_encoding_identifier(name, character)
+ source = "# encoding: #{name}\n#{character}"
+ expected = identifier_context.instance_eval(source)
+
+ result = Prism.parse(source)
+ assert result.success?
+
+ actual = result.value.statements.body.last
+ assert_kind_of CallNode, actual
+ assert_equal expected, actual.name
+ end
+
+ # Check that we can properly parse every codepoint in the given encoding.
+ def assert_encoding(encoding, name, range)
+ # I'm not entirely sure, but I believe these codepoints are incorrect in
+ # their parsing in CRuby. They all report as matching `[[:lower:]]` but
+ # then they are parsed as constants. This is because CRuby determines if
+ # an identifier is a constant or not by case folding it down to lowercase
+ # and checking if there is a difference. And even though they report
+ # themselves as lowercase, their case fold is different. I have reported
+ # this bug upstream.
+ case encoding
+ when Encoding::UTF_8, Encoding::UTF_8_MAC, Encoding::UTF8_DoCoMo, Encoding::UTF8_KDDI, Encoding::UTF8_SoftBank, Encoding::CESU_8
+ range = range.to_a - [
+ 0x01c5, 0x01c8, 0x01cb, 0x01f2, 0x1f88, 0x1f89, 0x1f8a, 0x1f8b,
+ 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f, 0x1f98, 0x1f99, 0x1f9a, 0x1f9b,
+ 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, 0x1fa8, 0x1fa9, 0x1faa, 0x1fab,
+ 0x1fac, 0x1fad, 0x1fae, 0x1faf, 0x1fbc, 0x1fcc, 0x1ffc,
+ ]
+ when Encoding::Windows_1253
+ range = range.to_a - [0xb5]
+ end
+
+ range.each do |codepoint|
+ character = codepoint.chr(encoding)
+
+ if character.match?(/[[:alpha:]]/)
+ if character.match?(/[[:upper:]]/)
+ assert_encoding_constant(name, character)
+ else
+ assert_encoding_identifier(name, character)
+ end
+ elsif character.match?(/[[:alnum:]]/)
+ assert_encoding_identifier(name, "_#{character}")
+ else
+ next if ["/", "{"].include?(character)
+
+ source = "# encoding: #{name}\n/(?##{character})/\n"
+ assert Prism.parse(source).success?, "Expected #{source.inspect} to parse successfully."
+ end
+ rescue RangeError
+ source = "# encoding: #{name}\n\\x#{codepoint.to_s(16)}"
+ refute Prism.parse(source).success?
+ end
+ end
+
+ def assert_encoding_flags(encoding, escapes)
+ escapes.each do |escaped|
+ source = "# encoding: #{encoding.name}\n\"#{escaped}\""
+
+ expected =
+ begin
+ eval(source).encoding
+ rescue SyntaxError => error
+ if error.message.include?("UTF-8 mixed within")
+ error.message[/: (.+?)\n/, 1]
+ else
+ raise
+ end
+ end
+
+ actual =
+ Prism.parse(source).then do |result|
+ if result.success?
+ string = result.value.statements.body.first
+
+ if string.forced_utf8_encoding?
+ Encoding::UTF_8
+ elsif string.forced_binary_encoding?
+ Encoding::ASCII_8BIT
+ else
+ encoding
+ end
+ else
+ error = result.errors.first
+
+ if error.message.include?("mixed")
+ error.message
+ else
+ raise error.message
+ end
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+
+ # Test Symbol literals without any interpolation or escape sequences.
+ def assert_symbol_encoding_flags(encoding, symbols)
+ symbols.each do |symbol|
+ source = "# encoding: #{encoding.name}\n#{symbol.inspect}"
+
+ expected =
+ begin
+ eval(source).encoding
+ rescue SyntaxError => error
+ unless error.message.include?("invalid multibyte char")
+ raise
+ end
+ end
+
+ actual =
+ Prism.parse(source).then do |result|
+ if result.success?
+ symbol = result.value.statements.body.first
+
+ if symbol.forced_utf8_encoding?
+ Encoding::UTF_8
+ elsif symbol.forced_binary_encoding?
+ Encoding::ASCII_8BIT
+ elsif symbol.forced_us_ascii_encoding?
+ Encoding::US_ASCII
+ else
+ encoding
+ end
+ else
+ error = result.errors.last
+
+ unless error.message.include?("invalid symbol")
+ raise error.message
+ end
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+
+ def assert_symbol_character_escape_encoding_flags(encoding, escapes)
+ escapes.each do |escaped|
+ source = "# encoding: #{encoding.name}\n:\"#{escaped}\""
+
+ expected =
+ begin
+ eval(source).encoding
+ rescue SyntaxError => error
+ if error.message.include?("UTF-8 mixed within")
+ error.message[/: (.+?)\n/, 1]
+ else
+ raise
+ end
+ end
+
+ actual =
+ Prism.parse(source).then do |result|
+ if result.success?
+ symbol = result.value.statements.body.first
+
+ if symbol.forced_utf8_encoding?
+ Encoding::UTF_8
+ elsif symbol.forced_binary_encoding?
+ Encoding::ASCII_8BIT
+ elsif symbol.forced_us_ascii_encoding?
+ Encoding::US_ASCII
+ else
+ encoding
+ end
+ else
+ error = result.errors.first
+
+ if error.message.include?("mixed")
+ error.message
+ else
+ raise error.message
+ end
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+
+ def assert_regular_expression_encoding_flags(encoding, regexps)
+ regexps.each do |regexp|
+ regexp_modifier_used = regexp.end_with?("/u") || regexp.end_with?("/e") || regexp.end_with?("/s") || regexp.end_with?("/n")
+ source = "# encoding: #{encoding.name}\n#{regexp}"
+
+ encoding_errors = ["invalid multibyte char", "escaped non ASCII character in UTF-8 regexp", "differs from source encoding"]
+ skipped_errors = ["invalid multibyte escape", "incompatible character encoding", "UTF-8 character in non UTF-8 regexp", "invalid Unicode range", "invalid Unicode list"]
+
+ # TODO (nirvdrum 21-Feb-2024): Prism currently does not handle Regexp validation unless modifiers are used. So, skip processing those errors for now: https://github.com/ruby/prism/issues/2104
+ unless regexp_modifier_used
+ skipped_errors += encoding_errors
+ encoding_errors.clear
+ end
+
+ expected =
+ begin
+ eval(source).encoding
+ rescue SyntaxError => error
+ if encoding_errors.find { |e| error.message.include?(e) }
+ error.message.split("\n").map { |m| m[/: (.+?)$/, 1] }
+ elsif skipped_errors.find { |e| error.message.include?(e) }
+ next
+ else
+ raise
+ end
+ end
+
+ actual =
+ Prism.parse(source).then do |result|
+ if result.success?
+ regexp = result.value.statements.body.first
+
+ actual_encoding = if regexp.forced_utf8_encoding?
+ Encoding::UTF_8
+ elsif regexp.forced_binary_encoding?
+ Encoding::ASCII_8BIT
+ elsif regexp.forced_us_ascii_encoding?
+ Encoding::US_ASCII
+ elsif regexp.ascii_8bit?
+ Encoding::ASCII_8BIT
+ elsif regexp.utf_8?
+ Encoding::UTF_8
+ elsif regexp.euc_jp?
+ Encoding::EUC_JP
+ elsif regexp.windows_31j?
+ Encoding::Windows_31J
+ else
+ encoding
+ end
+
+ if regexp.utf_8? && actual_encoding != Encoding::UTF_8
+ raise "expected regexp encoding to be UTF-8 due to '/u' modifier, but got #{actual_encoding.name}"
+ elsif regexp.ascii_8bit? && (actual_encoding != Encoding::ASCII_8BIT && actual_encoding != Encoding::US_ASCII)
+ raise "expected regexp encoding to be ASCII-8BIT or US-ASCII due to '/n' modifier, but got #{actual_encoding.name}"
+ elsif regexp.euc_jp? && actual_encoding != Encoding::EUC_JP
+ raise "expected regexp encoding to be EUC-JP due to '/e' modifier, but got #{actual_encoding.name}"
+ elsif regexp.windows_31j? && actual_encoding != Encoding::Windows_31J
+ raise "expected regexp encoding to be Windows-31J due to '/s' modifier, but got #{actual_encoding.name}"
+ end
+
+ if regexp.utf_8? && regexp.forced_utf8_encoding?
+ raise "the forced_utf8 flag should not be set when the UTF-8 modifier (/u) is used"
+ elsif regexp.ascii_8bit? && regexp.forced_binary_encoding?
+ raise "the forced_ascii_8bit flag should not be set when the UTF-8 modifier (/u) is used"
+ end
+
+ actual_encoding
+ else
+ errors = result.errors.map(&:message)
+
+ if errors.last&.include?("UTF-8 mixed within")
+ nil
+ else
+ errors
+ end
+ end
+ end
+
+ # TODO (nirvdrum 22-Feb-2024): Remove this workaround once Prism better maps CRuby's error messages.
+ # This class of error message is tricky. The part not being compared is a representation of the regexp.
+ # Depending on the source encoding and any encoding modifiers being used, CRuby alters how the regexp is represented.
+ # Sometimes it's an MBC string. Other times it uses hexadecimal character escapes. And in other cases it uses
+ # the long-form Unicode escape sequences. This short-circuit checks that the error message is mostly correct.
+ if expected.is_a?(Array) && actual.is_a?(Array)
+ if expected.last.start_with?("/.../n has a non escaped non ASCII character in non ASCII-8BIT script:") &&
+ actual.last.start_with?("/.../n has a non escaped non ASCII character in non ASCII-8BIT script:")
+ expected.last.clear
+ actual.last.clear
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+ end
+end
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb
new file mode 100644
index 0000000000..3670b90dd7
--- /dev/null
+++ b/test/prism/errors_test.rb
@@ -0,0 +1,2243 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class ErrorsTest < TestCase
+ include DSL
+
+ def test_constant_path_with_invalid_token_after
+ assert_error_messages "A::$b", [
+ "expected a constant after the `::` operator",
+ "unexpected global variable, expecting end-of-input"
+ ]
+ 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", [
+ ["unexpected constant path after `module`; class/module name must be CONSTANT", 14..20],
+ ["unexpected 'end', assuming it is closing the parent module definition", 21..24]
+ ]
+ 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(
+ 0,
+ expression("1"),
+ nil,
+ :+,
+ Location(),
+ nil,
+ ArgumentsNode(0, [MissingNode()]),
+ nil,
+ nil
+ )
+ ]),
+ Location(),
+ Location(),
+ Location()
+ )
+
+ assert_errors expected, "BEGIN { 1 + }", [
+ ["unexpected '}'; expected an expression after the operator", 12..13],
+ ["unexpected '}', assuming it is closing the parent 'BEGIN' block", 12..13]
+ ]
+ end
+
+ def test_unterminated_embdoc
+ message = "embedded document meets end of file"
+ assert_error_messages "=begin", [message]
+ assert_error_messages "=begin\n", [message]
+
+ refute_error_messages "=begin\n=end"
+ refute_error_messages "=begin\n=end\0"
+ refute_error_messages "=begin\n=end\C-d"
+ refute_error_messages "=begin\n=end\C-z"
+ end
+
+ def test_unterminated_i_list
+ assert_errors expression("%i["), "%i[", [
+ ["unterminated list; expected a closing delimiter for the `%i`", 0..3]
+ ]
+ end
+
+ def test_unterminated_w_list
+ assert_errors expression("%w["), "%w[", [
+ ["unterminated list; expected a closing delimiter for the `%w`", 0..3]
+ ]
+ end
+
+ def test_unterminated_W_list
+ assert_errors expression("%W["), "%W[", [
+ ["unterminated list; expected a closing delimiter for the `%W`", 0..3]
+ ]
+ end
+
+ def test_unterminated_regular_expression
+ assert_errors expression("/hello"), "/hello", [
+ ["unterminated regexp meets end of file; expected a closing delimiter", 0..1]
+ ]
+ end
+
+ def test_unterminated_regular_expression_with_heredoc
+ source = "<<-END + /b\nEND\n"
+
+ assert_errors expression(source), source, [
+ ["unterminated regexp meets end of file; expected a closing delimiter", 9..10]
+ ]
+ end
+
+ def test_unterminated_xstring
+ assert_errors expression("`hello"), "`hello", [
+ ["expected a closing delimiter for the `%x` or backtick string", 0..1]
+ ]
+ end
+
+ def test_unterminated_interpolated_string
+ expr = expression('"hello')
+ assert_errors expr, '"hello', [
+ ["unterminated string meets end of file", 6..6]
+ ]
+ assert_equal expr.unescaped, "hello"
+ assert_equal expr.closing, ""
+ end
+
+ def test_unterminated_string
+ expr = expression("'hello")
+ assert_errors expr, "'hello", [
+ ["unterminated string meets end of file", 0..1]
+ ]
+ assert_equal expr.unescaped, "hello"
+ assert_equal expr.closing, ""
+ end
+
+ def test_unterminated_empty_string
+ expr = expression('"')
+ assert_errors expr, '"', [
+ ["unterminated string meets end of file", 1..1]
+ ]
+ assert_equal expr.unescaped, ""
+ assert_equal expr.closing, ""
+ end
+
+ def test_incomplete_instance_var_string
+ assert_errors expression('%@#@@#'), '%@#@@#', [
+ ["'@' without identifiers is not allowed as an instance variable name", 4..5],
+ ["unexpected instance variable, expecting end-of-input", 4..5]
+ ]
+ end
+
+ def test_unterminated_s_symbol
+ assert_errors expression("%s[abc"), "%s[abc", [
+ ["unterminated quoted string; expected a closing delimiter for the dynamic symbol", 0..3]
+ ]
+ end
+
+ def test_unterminated_parenthesized_expression
+ assert_errors expression('(1 + 2'), '(1 + 2', [
+ ["unexpected end-of-input, assuming it is closing the parent top level context", 6..6],
+ ["expected a matching `)`", 6..6]
+ ]
+ end
+
+ def test_missing_terminator_in_parentheses
+ assert_error_messages "(0 0)", [
+ "unexpected integer, expecting end-of-input"
+ ]
+ end
+
+ def test_unterminated_argument_expression
+ assert_errors expression('a %'), 'a %', [
+ ["unterminated quoted string meets end of file", 2..3],
+ ["unexpected end-of-input; expected an expression after the operator", 3..3],
+ ["unexpected end-of-input, assuming it is closing the parent top level context", 3..3]
+ ]
+ end
+
+ def test_unterminated_interpolated_symbol
+ assert_error_messages ":\"#", [
+ "unterminated symbol; expected a closing delimiter for the interpolated symbol"
+ ]
+ end
+
+ def test_cr_without_lf_in_percent_expression
+ assert_errors expression("%\r"), "%\r", [
+ ["unterminated string meets end of file", 2..2],
+ ]
+ end
+
+ def test_1_2_3
+ assert_errors expression("(1, 2, 3)"), "(1, 2, 3)", [
+ ["unexpected ',', expecting end-of-input", 2..3],
+ ["unexpected ',', ignoring it", 2..3],
+ ["expected a matching `)`", 2..2],
+ ["unexpected ',', expecting end-of-input", 2..3],
+ ["unexpected ',', ignoring it", 2..3],
+ ["unexpected ',', expecting end-of-input", 5..6],
+ ["unexpected ',', ignoring it", 5..6],
+ ["unexpected ')', expecting end-of-input", 8..9],
+ ["unexpected ')', ignoring it", 8..9]
+ ]
+ end
+
+ def test_return_1_2_3
+ assert_error_messages "return(1, 2, 3)", [
+ "unexpected ',', expecting end-of-input",
+ "unexpected ',', ignoring it",
+ "expected a matching `)`",
+ "unexpected ')', expecting end-of-input",
+ "unexpected ')', ignoring it"
+ ]
+ end
+
+ def test_return_1
+ assert_errors expression("return 1,;"), "return 1,;", [
+ ["expected an argument", 8..9]
+ ]
+ end
+
+ def test_next_1_2_3
+ assert_errors expression("next(1, 2, 3)"), "next(1, 2, 3)", [
+ ["unexpected ',', expecting end-of-input", 6..7],
+ ["unexpected ',', ignoring it", 6..7],
+ ["expected a matching `)`", 6..6],
+ ["Invalid next", 0..12],
+ ["unexpected ')', expecting end-of-input", 12..13],
+ ["unexpected ')', ignoring it", 12..13]
+ ]
+ end
+
+ def test_next_1
+ assert_errors expression("next 1,;"), "next 1,;", [
+ ["expected an argument", 6..7],
+ ["Invalid next", 0..7]
+ ]
+ end
+
+ def test_break_1_2_3
+ assert_errors expression("break(1, 2, 3)"), "break(1, 2, 3)", [
+ ["unexpected ',', expecting end-of-input", 7..8],
+ ["unexpected ',', ignoring it", 7..8],
+ ["expected a matching `)`", 7..7],
+ ["Invalid break", 0..13],
+ ["unexpected ')', expecting end-of-input", 13..14],
+ ["unexpected ')', ignoring it", 13..14]
+ ]
+ end
+
+ def test_break_1
+ assert_errors expression("break 1,;"), "break 1,;", [
+ ["expected an argument", 7..8],
+ ["Invalid break", 0..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",
+ "unexpected local variable or method, expecting end-of-input"
+ ]
+ end
+
+ def test_top_level_constant_starting_with_downcased_identifier
+ assert_error_messages "::foo::A", [
+ "expected a constant after the `::` operator",
+ "unexpected local variable or method, expecting end-of-input"
+ ]
+ 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`; can't make alias for the number variables", 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],
+ ["unexpected ';'; expected a method name", 7..8]
+ ]
+ 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 `)`", 8..8],
+ ["expected a `.` or `::` after the receiver in a method definition", 8..8],
+ ["expected a delimiter to close the parameters", 9..9],
+ ["unexpected ')', ignoring it", 10..11],
+ ["unexpected '.', ignoring it", 11..12]
+ ]
+ end
+
+ def test_def_with_empty_expression_receiver
+ assert_errors expression("def ().a; end"), "def ().a; end", [
+ ["expected a receiver for the method definition", 4..5]
+ ]
+ end
+
+ def test_block_beginning_with_brace_and_ending_with_end
+ assert_error_messages "x.each { x end", [
+ "unexpected 'end', expecting end-of-input",
+ "unexpected 'end', ignoring it",
+ "unexpected end-of-input, assuming it is closing the parent top level context",
+ "expected a block beginning with `{` to end with `}`"
+ ]
+ end
+
+ def test_double_splat_followed_by_splat_argument
+ expected = CallNode(
+ CallNodeFlags::IGNORE_VISIBILITY,
+ nil,
+ nil,
+ :a,
+ Location(),
+ Location(),
+ ArgumentsNode(
+ ArgumentsNodeFlags::CONTAINS_KEYWORDS | ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT,
+ [
+ KeywordHashNode(0, [AssocSplatNode(expression("kwargs"), Location())]),
+ SplatNode(Location(), expression("args"))
+ ]
+ ),
+ Location(),
+ nil
+ )
+
+ assert_errors expected, "a(**kwargs, *args)", [
+ ["unexpected `*` splat argument after a `**` keyword splat argument", 12..17]
+ ]
+ end
+
+ def test_arguments_after_block
+ expected = CallNode(
+ CallNodeFlags::IGNORE_VISIBILITY,
+ nil,
+ nil,
+ :a,
+ Location(),
+ Location(),
+ ArgumentsNode(0, [expression("foo")]),
+ Location(),
+ BlockArgumentNode(expression("block"), Location())
+ )
+
+ 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)", [
+ "unexpected 'and'; expected a `)` to close the arguments",
+ "unexpected ')', expecting end-of-input",
+ "unexpected ')', ignoring it"
+ ]
+ end
+
+ def test_splat_argument_after_keyword_argument
+ expected = CallNode(
+ CallNodeFlags::IGNORE_VISIBILITY,
+ nil,
+ nil,
+ :a,
+ Location(),
+ Location(),
+ ArgumentsNode(ArgumentsNodeFlags::CONTAINS_KEYWORDS, [
+ KeywordHashNode(1, [
+ AssocNode(
+ SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, nil, Location(), Location(), "foo"),
+ expression("bar"),
+ nil
+ )
+ ]),
+ SplatNode(Location(), expression("args"))
+ ]),
+ Location(),
+ nil
+ )
+
+ 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 method body", 8..14]
+ ]
+ end
+
+ def test_module_definition_in_method_body_within_block
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ nil,
+ StatementsNode(
+ [CallNode(
+ CallNodeFlags::IGNORE_VISIBILITY,
+ nil,
+ nil,
+ :bar,
+ Location(),
+ nil,
+ nil,
+ nil,
+ BlockNode(
+ [],
+ nil,
+ StatementsNode([ModuleNode([], Location(), ConstantReadNode(:Foo), nil, Location(), :Foo)]),
+ Location(),
+ Location()
+ )
+ )]
+ ),
+ [],
+ Location(),
+ nil,
+ nil,
+ nil,
+ nil,
+ Location()
+ )
+
+ assert_errors expected, <<~RUBY, [["unexpected module definition in method body", 21..27]]
+ def foo
+ bar do
+ module Foo;end
+ end
+ end
+ RUBY
+ end
+
+ def test_module_definition_in_method_defs
+ source = <<~RUBY
+ def foo(bar = module A;end);end
+ def foo;rescue;module A;end;end
+ def foo;ensure;module A;end;end
+ RUBY
+ message = "unexpected module definition in method body"
+ assert_errors expression(source), source, [
+ [message, 14..20],
+ [message, 47..53],
+ [message, 79..85],
+ ]
+ 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 method body", 8..13]
+ ]
+ end
+
+ def test_class_definition_in_method_defs
+ source = <<~RUBY
+ def foo(bar = class A;end);end
+ def foo;rescue;class A;end;end
+ def foo;ensure;class A;end;end
+ RUBY
+ message = "unexpected class definition in method body"
+ assert_errors expression(source), source, [
+ [message, 14..19],
+ [message, 46..51],
+ [message, 77..82],
+ ]
+ end
+
+ def test_bad_arguments
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([
+ RequiredParameterNode(0, :A),
+ RequiredParameterNode(0, :@a),
+ RequiredParameterNode(0, :$A),
+ RequiredParameterNode(0, :@@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
+
+ if RUBY_VERSION >= "3.0"
+ def test_cannot_assign_to_a_reserved_numbered_parameter
+ expected = BeginNode(
+ Location(),
+ StatementsNode([
+ LocalVariableWriteNode(:_1, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_2, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_3, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_4, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_5, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_6, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_7, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_8, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_9, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_10, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, 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, [
+ ["_1 is reserved for numbered parameters", 8..10],
+ ["_2 is reserved for numbered parameters", 14..16],
+ ["_3 is reserved for numbered parameters", 20..22],
+ ["_4 is reserved for numbered parameters", 26..28],
+ ["_5 is reserved for numbered parameters", 32..34],
+ ["_6 is reserved for numbered parameters", 40..42],
+ ["_7 is reserved for numbered parameters", 46..48],
+ ["_8 is reserved for numbered parameters", 52..54],
+ ["_9 is reserved for numbered parameters", 58..60],
+ ]
+ end
+ end
+
+ def test_do_not_allow_trailing_commas_in_method_parameters
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [RequiredParameterNode(0, :a), RequiredParameterNode(0, :b), RequiredParameterNode(0, :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(0, :a), RequiredParameterNode(0, :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(StringFlags::FORCED_UTF8_ENCODING, Location(), Location(), nil, "\u0001\u0002")
+
+ assert_errors expected, '?\u{0001 0002}', [
+ ["invalid Unicode escape sequence; Multiple codepoints at single character literal are disallowed", 9..12]
+ ]
+ end
+
+ def test_invalid_hex_escape
+ assert_errors expression('"\\xx"'), '"\\xx"', [
+ ["invalid hex 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],
+ ["unterminated Unicode escape", 7..7]
+ ]
+ end
+
+ def test_unterminated_unicode_brackets_should_be_a_syntax_error
+ assert_errors expression('?\\u{3'), '?\\u{3', [
+ ["unterminated Unicode escape", 1..5],
+ ]
+ end
+
+ def test_method_parameters_after_block
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [RequiredParameterNode(0, :a)],
+ [],
+ nil,
+ BlockParameterNode(0, :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(0, :a)], [], nil, BlockParameterNode(0, 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(0, :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(0, :a)],
+ [RequiredKeywordParameterNode(0, :b, Location())],
+ 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,
+ [],
+ [RequiredKeywordParameterNode(0, :b, Location())],
+ KeywordRestParameterNode(0, :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()], [], 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(0, :a)],
+ [RequiredKeywordParameterNode(0, :b, Location())],
+ KeywordRestParameterNode(0, :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(0, :a)],
+ [RequiredKeywordParameterNode(0, :b, Location())],
+ KeywordRestParameterNode(0, :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(0, :a)],
+ [RequiredKeywordParameterNode(0, :b, Location())],
+ KeywordRestParameterNode(0, :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(0, :a)],
+ [
+ OptionalParameterNode(0, :b, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL, 1)),
+ OptionalParameterNode(0, :d, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL, 2))
+ ],
+ nil,
+ [RequiredParameterNode(0, :c), RequiredParameterNode(0, :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 = CaseMatchNode(
+ SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, 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(SymbolFlags::FORCED_US_ASCII_ENCODING, 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, 42)]),
+ [],
+ 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(
+ CallNodeFlags::IGNORE_VISIBILITY,
+ nil,
+ nil,
+ :a,
+ Location(),
+ nil,
+ nil,
+ nil,
+ BlockNode(
+ [],
+ BlockParametersNode(ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil), [], Location(), Location()),
+ nil,
+ Location(),
+ Location()
+ )
+ )
+
+ 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(0, Location(), nil)]),
+ Location(),
+ :A
+ )
+
+ assert_errors expected, "class A; return; end", [
+ ["Invalid return in class/module body", 9..15]
+ ]
+ end
+
+ def test_dont_allow_return_inside_module_body
+ expected = ModuleNode(
+ [],
+ Location(),
+ ConstantReadNode(:A),
+ StatementsNode([ReturnNode(0, Location(), nil)]),
+ Location(),
+ :A
+ )
+
+ assert_errors expected, "module A; return; end", [
+ ["Invalid return in class/module body", 10..16]
+ ]
+ 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", [
+ ["Can't set variable $+", 6..8],
+ ["Can't set variable $1466", 15..20]
+ ]
+ end
+
+ def test_duplicated_parameter_names
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b), RequiredParameterNode(ParameterFlags::REPEATED_PARAMETER, :a)], [], nil, [], [], nil, nil),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,a);end", [
+ ["duplicated argument name", 12..13]
+ ]
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b)], [], RestParameterNode(ParameterFlags::REPEATED_PARAMETER, :a, Location(), Location()), [], [], nil, nil),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,*a);end", [
+ ["duplicated argument name", 13..14]
+ ]
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b)], [], nil, [], [], KeywordRestParameterNode(ParameterFlags::REPEATED_PARAMETER, :a, Location(), Location()), nil),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,**a);end", [
+ ["duplicated argument name", 14..15]
+ ]
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b)], [], nil, [], [], nil, BlockParameterNode(ParameterFlags::REPEATED_PARAMETER, :a, Location(), Location())),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,&a);end", [
+ ["duplicated argument name", 13..14]
+ ]
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([], [OptionalParameterNode(0, :a, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL, 1))], RestParameterNode(0, :c, Location(), Location()), [RequiredParameterNode(0, :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_content_after_unterminated_heredoc
+ receiver = StringNode(0, Location(), Location(), Location(), "")
+ expected = CallNode(0, receiver, Location(), :foo, Location(), nil, nil, nil, nil)
+
+ assert_errors expected, "<<~FOO.foo\n", [
+ ["unterminated heredoc; can't find string \"FOO\" anywhere before EOF", 3..6]
+ ]
+ end
+
+ def test_invalid_message_name
+ result = Prism.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
+ message = "'$' without identifiers is not allowed as a global variable name"
+
+ assert_errors expression("$"), "$", [[message, 0..1]]
+ assert_errors expression("$ "), "$ ", [[message, 0..1]]
+ end
+
+ def test_invalid_global_variable_write
+ assert_errors expression("$',"), "$',", [
+ ["Can't set variable $'", 0..2],
+ ["unexpected write target", 0..2]
+ ]
+ end
+
+ def test_invalid_multi_target
+ error_messages = ["unexpected 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,", ["Can't set variable $1", *error_messages]
+ assert_error_messages "$+,", ["Can't set variable $+", *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
+ assert_error_messages "foo((foo, bar))", error_messages
+ assert_error_messages "foo((*))", error_messages
+ assert_error_messages "foo(((foo, bar), *))", error_messages
+ assert_error_messages "(foo, bar) + 1", error_messages
+ assert_error_messages "(foo, bar) in baz", 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_index_call_with_block_and_write
+ source = "foo[1] {} &&= 1"
+ assert_errors expression(source), source, [
+ ["unexpected write target", 0..9],
+ ["unexpected operator after a call with arguments", 10..13],
+ ["unexpected operator after a call with a block", 10..13]
+ ]
+ end
+
+ def test_index_call_with_block_or_write
+ source = "foo[1] {} ||= 1"
+ assert_errors expression(source), source, [
+ ["unexpected write target", 0..9],
+ ["unexpected operator after a call with arguments", 10..13],
+ ["unexpected operator after a call with a block", 10..13]
+ ]
+ end
+
+ def test_index_call_with_block_operator_write
+ source = "foo[1] {} += 1"
+ assert_errors expression(source), source, [
+ ["unexpected write target", 0..9],
+ ["unexpected operator after a call with arguments", 10..12],
+ ["unexpected operator after a call with a block", 10..12]
+ ]
+ end
+
+ if RUBY_VERSION >= "3.0"
+ def test_writing_numbered_parameter
+ assert_errors expression("-> { _1 = 0 }"), "-> { _1 = 0 }", [
+ ["_1 is reserved for numbered parameters", 5..7]
+ ]
+ end
+
+ def test_targeting_numbered_parameter
+ assert_errors expression("-> { _1, = 0 }"), "-> { _1, = 0 }", [
+ ["_1 is reserved for numbered parameters", 5..7]
+ ]
+ end
+
+ def test_defining_numbered_parameter
+ error_messages = ["_1 is reserved for numbered parameters"]
+
+ assert_error_messages "def _1; end", error_messages
+ assert_error_messages "def self._1; end", error_messages
+ end
+ 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
+ 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
+
+ error_messages = ["trailing '_' 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
+ end
+
+ def test_alnum_delimiters
+ error_messages = ["unknown type of %string"]
+
+ 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
+
+ if RUBY_VERSION >= "3.0"
+ def test_numbered_parameters_in_block_arguments
+ source = "foo { |_1| }"
+ assert_errors expression(source), source, [
+ ["_1 is reserved for numbered parameters", 7..9],
+ ]
+ end
+ end
+
+ def test_conditional_predicate_closed
+ source = "if 0 0; elsif 0 0; end\nunless 0 0; end"
+ assert_errors expression(source), source, [
+ ["expected `then` or `;` or '\\n" + "'", 5..6],
+ ["expected `then` or `;` or '\\n" + "'", 16..17],
+ ["expected `then` or `;` or '\\n" + "'", 32..33],
+ ]
+ 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
+ end
+
+ def test_class_name
+ source = "class 0.X end"
+ assert_errors expression(source), source, [
+ ["unexpected constant path after `class`; class/module name must be CONSTANT", 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
+
+ def test_forwarding_arg_after_keyword_rest
+ source = "def f(**,...);end"
+ assert_errors expression(source), source, [
+ ["unexpected parameter order", 9..12]
+ ]
+ end
+
+ def test_semicolon_after_inheritance_operator
+ source = "class Foo < Bar end"
+ assert_errors expression(source), source, [
+ ["unexpected `end`, expecting ';' or '\\n'", 15..15],
+ ]
+ end
+
+ def test_shadow_args_in_lambda
+ source = "->a;b{}"
+
+ assert_errors expression(source), source, [
+ ["expected a `do` keyword or a `{` to open the lambda block", 3..3],
+ ["unexpected end-of-input, assuming it is closing the parent top level context", 7..7],
+ ["expected a lambda block beginning with `do` to end with `end`", 7..7]
+ ]
+ end
+
+ def test_shadow_args_in_block
+ source = "tap{|a;a|}"
+ assert_errors expression(source), source, [
+ ["duplicated argument name", 7..8],
+ ]
+ end
+
+ def test_repeated_parameter_name_in_destructured_params
+ source = "def f(a, (b, (a))); end"
+
+ assert_errors expression(source), source, [
+ ["duplicated argument name", 14..15],
+ ]
+ end
+
+ def test_assign_to_numbered_parameter
+ source = <<~RUBY
+ a in _1
+ a => _1
+ 1 => a, _1
+ 1 in a, _1
+ /(?<_1>)/ =~ a
+ RUBY
+
+ message = "_1 is reserved for numbered parameters"
+ assert_errors expression(source), source, [
+ [message, 5..7],
+ [message, 13..15],
+ [message, 24..26],
+ [message, 35..37],
+ [message, 42..44]
+ ]
+ end
+
+ def test_symbol_in_keyword_parameter
+ source = "def foo(x:'y':); end"
+ assert_errors expression(source), source, [
+ ["unexpected label terminator, expected a string literal terminator", 12..14]
+ ]
+ end
+
+ def test_symbol_in_hash
+ source = "{x:'y':}"
+ assert_errors expression(source), source, [
+ ["unexpected label terminator, expected a string literal terminator", 5..7]
+ ]
+ end
+
+ def test_while_endless_method
+ source = "while def f = g do end"
+
+ assert_errors expression(source), source, [
+ ["expected a predicate expression for the `while` statement", 22..22],
+ ["unexpected end-of-input, assuming it is closing the parent top level context", 22..22],
+ ["expected an `end` to close the `while` statement", 22..22]
+ ]
+ end
+
+ def test_match_plus
+ source = <<~RUBY
+ a in b + c
+ a => b + c
+ RUBY
+
+ assert_errors expression(source), source, [
+ ["unexpected '+', expecting end-of-input", 7..8],
+ ["unexpected '+', ignoring it", 7..8],
+ ["unexpected '+', expecting end-of-input", 18..19],
+ ["unexpected '+', ignoring it", 18..19]
+ ]
+ end
+
+ def test_rational_number_with_exponential_portion
+ source = '1e1r; 1e1ri'
+
+ assert_errors expression(source), source, [
+ ["unexpected local variable or method, expecting end-of-input", 3..4],
+ ["unexpected local variable or method, expecting end-of-input", 9..11]
+ ]
+ end
+
+ def test_check_value_expression
+ source = <<~RUBY
+ 1 => ^(return)
+ while true
+ 1 => ^(break)
+ 1 => ^(next)
+ 1 => ^(redo)
+ 1 => ^(retry)
+ 1 => ^(2 => a)
+ end
+ 1 => ^(if 1; (return) else (return) end)
+ 1 => ^(unless 1; (return) else (return) end)
+ RUBY
+
+ message = "unexpected void value expression"
+ assert_errors expression(source), source, [
+ [message, 7..13],
+ [message, 35..40],
+ [message, 51..55],
+ [message, 66..70],
+ ["Invalid retry without rescue", 81..86],
+ [message, 81..86],
+ [message, 97..103],
+ [message, 123..129],
+ [message, 168..174],
+ ]
+ end
+
+ def test_void_value_expression_in_statement
+ source = <<~RUBY
+ if (return)
+ end
+ unless (return)
+ end
+ while (return)
+ end
+ until (return)
+ end
+ case (return)
+ when 1
+ end
+ class A < (return)
+ end
+ class << (return)
+ end
+ for x in (return)
+ end
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 4..10],
+ [message, 24..30],
+ [message, 43..49],
+ [message, 62..68],
+ [message, 80..86],
+ [message, 110..116],
+ [message, 132..138],
+ [message, 154..160],
+ ]
+ end
+
+ def test_void_value_expression_in_def
+ source = <<~RUBY
+ def (return).x
+ end
+ def x(a = return)
+ end
+ def x(a: return)
+ end
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 5..11],
+ [message, 29..35],
+ [message, 50..56],
+ ]
+ end
+
+ def test_void_value_expression_in_assignment
+ source = <<~RUBY
+ a = return
+ a = 1, return
+ a, b = return, 1
+ a, b = 1, *return
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 4..10],
+ [message, 18..24],
+ [message, 32..38],
+ [message, 53..59],
+ ]
+ end
+
+ def test_void_value_expression_in_modifier
+ source = <<~RUBY
+ 1 if (return)
+ 1 unless (return)
+ 1 while (return)
+ 1 until (return)
+ (return) => a
+ (return) in a
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 6..12],
+ [message, 24..30],
+ [message, 41..47],
+ [message, 58..64],
+ [message, 67..73],
+ [message, 81..87]
+ ]
+ end
+
+ def test_void_value_expression_in_expression
+ source = <<~RUBY
+ (return) ? 1 : 1
+ (return)..1
+ 1..(return)
+ (return)...1
+ 1...(return)
+ (..(return))
+ (...(return))
+ ((return)..)
+ ((return)...)
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 1..7],
+ [message, 18..24],
+ [message, 33..39],
+ [message, 42..48],
+ [message, 59..65],
+ [message, 71..77],
+ [message, 85..91],
+ [message, 96..102],
+ [message, 109..115]
+ ]
+ end
+
+ def test_void_value_expression_in_array
+ source = <<~RUBY
+ [return]
+ [1, return]
+ [ return => 1 ]
+ [ 1 => return ]
+ [ a: return ]
+ [ *return ]
+ [ **return ]
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 1..7],
+ [message, 13..19],
+ [message, 23..29],
+ [message, 44..50],
+ [message, 58..64],
+ [message, 70..76],
+ [message, 83..89],
+ ]
+ end
+
+ def test_void_value_expression_in_hash
+ source = <<~RUBY
+ { return => 1 }
+ { 1 => return }
+ { a: return }
+ { **return }
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 2..8],
+ [message, 23..29],
+ [message, 37..43],
+ [message, 50..56],
+ ]
+ end
+
+ def test_void_value_expression_in_call
+ source = <<~RUBY
+ (return).foo
+ (return).(1)
+ (return)[1]
+ (return)[1] = 2
+ (return)::foo
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 1..7],
+ [message, 14..20],
+ [message, 27..33],
+ [message, 39..45],
+ [message, 55..61],
+ ]
+ end
+
+ def test_void_value_expression_in_constant_path
+ source = <<~RUBY
+ (return)::A
+ class (return)::A; end
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 1..7],
+ [message, 19..25],
+ ]
+ end
+
+ def test_void_value_expression_in_arguments
+ source = <<~RUBY
+ foo(return)
+ foo(1, return)
+ foo(*return)
+ foo(**return)
+ foo(&return)
+ foo(return => 1)
+ foo(:a => return)
+ foo(a: return)
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 4..10],
+ [message, 19..25],
+ [message, 32..38],
+ [message, 46..52],
+ [message, 59..65],
+ [message, 71..77],
+ [message, 94..100],
+ [message, 109..115],
+ ]
+ end
+
+ def test_void_value_expression_in_unary_call
+ source = <<~RUBY
+ +(return)
+ not return
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 2..8],
+ [message, 14..20],
+ ]
+ end
+
+ def test_void_value_expression_in_binary_call
+ source = <<~RUBY
+ 1 + (return)
+ (return) + 1
+ 1 and (return)
+ (return) and 1
+ 1 or (return)
+ (return) or 1
+ RUBY
+
+ message = 'unexpected void value expression'
+ assert_errors expression(source), source, [
+ [message, 5..11],
+ [message, 14..20],
+ [message, 42..48],
+ [message, 71..77],
+ ]
+ end
+
+ def test_trailing_comma_in_calls
+ assert_errors expression("foo 1,"), "foo 1,", [
+ ["expected an argument", 5..6]
+ ]
+ end
+
+ def test_argument_after_ellipsis
+ source = 'def foo(...); foo(..., 1); end'
+ assert_errors expression(source), source, [
+ ['unexpected argument after `...`', 23..24]
+ ]
+ end
+
+ def test_ellipsis_in_no_paren_call
+ source = 'def foo(...); foo 1, ...; end'
+ assert_errors expression(source), source, [
+ ['unexpected `...` in an non-parenthesized call', 21..24]
+ ]
+ end
+
+ def test_non_assoc_range
+ source = '1....2'
+
+ assert_errors expression(source), source, [
+ ["unexpected '.', expecting end-of-input", 4..5],
+ ["unexpected '.', ignoring it", 4..5]
+ ]
+ end
+
+ def test_upcase_end_in_def
+ assert_warning_messages "def foo; END { }; end", [
+ "END in method; use at_exit"
+ ]
+ end
+
+ def test_warnings_verbosity
+ warning = Prism.parse("def foo; END { }; end").warnings[0]
+ assert_equal "END in method; use at_exit", warning.message
+ assert_equal :default, warning.level
+
+ warning = Prism.parse("foo /regexp/").warnings[0]
+ assert_equal "ambiguous `/`; wrap regexp in parentheses or add a space after `/` operator", warning.message
+ assert_equal :verbose, warning.level
+ end
+
+ def test_statement_operators
+ source = <<~RUBY
+ alias x y + 1
+ alias x y.z
+ BEGIN { bar } + 1
+ BEGIN { bar }.z
+ END { bar } + 1
+ END { bar }.z
+ undef x + 1
+ undef x.z
+ RUBY
+
+ assert_errors expression(source), source, [
+ ["unexpected '+', expecting end-of-input", 10..11],
+ ["unexpected '+', ignoring it", 10..11],
+ ["unexpected '.', expecting end-of-input", 23..24],
+ ["unexpected '.', ignoring it", 23..24],
+ ["unexpected '+', expecting end-of-input", 40..41],
+ ["unexpected '+', ignoring it", 40..41],
+ ["unexpected '.', expecting end-of-input", 57..58],
+ ["unexpected '.', ignoring it", 57..58],
+ ["unexpected '+', expecting end-of-input", 72..73],
+ ["unexpected '+', ignoring it", 72..73],
+ ["unexpected '.', expecting end-of-input", 87..88],
+ ["unexpected '.', ignoring it", 87..88],
+ ["unexpected '+', expecting end-of-input", 98..99],
+ ["unexpected '+', ignoring it", 98..99],
+ ["unexpected '.', expecting end-of-input", 109..110],
+ ["unexpected '.', ignoring it", 109..110]
+ ]
+ end
+
+ def test_statement_at_non_statement
+ source = <<~RUBY
+ foo(alias x y)
+ foo(BEGIN { bar })
+ foo(END { bar })
+ foo(undef x)
+ RUBY
+ assert_errors expression(source), source, [
+ ['unexpected an `alias` at a non-statement position', 4..9],
+ ['unexpected a `BEGIN` at a non-statement position', 19..24],
+ ['unexpected an `END` at a non-statement position', 38..41],
+ ['unexpected an `undef` at a non-statement position', 55..60],
+ ]
+ end
+
+ def test_binary_range_with_left_unary_range
+ source = <<~RUBY
+ ..1..
+ ...1..
+ RUBY
+
+ assert_errors expression(source), source, [
+ ["unexpected .., expecting end-of-input", 3..5],
+ ["unexpected .., ignoring it", 3..5],
+ ["unexpected .., expecting end-of-input", 10..12],
+ ["unexpected .., ignoring it", 10..12]
+ ]
+ end
+
+ def test_circular_param
+ source = <<~RUBY
+ def foo(bar = bar) = 42
+ def foo(bar: bar) = 42
+ proc { |foo = foo| }
+ proc { |foo: foo| }
+ RUBY
+
+ assert_errors expression(source), source, [
+ ["circular argument reference - bar", 8..11],
+ ["circular argument reference - bar", 32..35],
+ ["circular argument reference - foo", 55..58],
+ ["circular argument reference - foo", 76..79]
+ ]
+
+ refute_error_messages("def foo(bar: bar = 1); end")
+ end
+
+ def test_command_calls
+ sources = <<~RUBY.lines
+ [a b]
+ {a: b c}
+ ...a b
+ if ...a b; end
+ a b, c d
+ a(b, c d)
+ a(*b c)
+ a(**b c)
+ a(&b c)
+ +a b
+ a + b c
+ a && b c
+ a =~ b c
+ a = b, c d
+ a = *b c
+ a, b = c = d f
+ a ? b c : d e
+ defined? a b
+ ! ! a b
+ def f a = b c; end
+ def f(a = b c); end
+ a = b rescue c d
+ def a = b rescue c d
+ ->a=b c{}
+ ->(a=b c){}
+ case; when a b; end
+ case; in a if a b; end
+ case; in a unless a b; end
+ begin; rescue a b; end
+ begin; rescue a b => c; end
+ RUBY
+
+ sources.each do |source|
+ refute_valid_syntax(source)
+ assert_false(Prism.parse(source).success?)
+ end
+ end
+
+ def test_range_and_bin_op
+ sources = <<~RUBY.lines
+ 1..2..3
+ 1..2..
+ 1.. || 2
+ 1.. & 2
+ 1.. * 2
+ 1.. / 2
+ 1.. % 2
+ 1.. ** 2
+ RUBY
+
+ sources.each do |source|
+ refute_valid_syntax(source)
+ assert_false(Prism.parse(source).success?)
+ end
+ end
+
+ def test_command_call_in
+ source = <<~RUBY
+ foo 1 in a
+ a = foo 2 in b
+ RUBY
+
+ assert_errors expression(source), source, [
+ ["unexpected `in` keyword in arguments", 9..10],
+ ["unexpected local variable or method, expecting end-of-input", 9..10],
+ ["unexpected `in` keyword in arguments", 24..25],
+ ["unexpected local variable or method, expecting end-of-input", 24..25]
+ ]
+ end
+
+ def test_constant_assignment_in_method
+ source = 'def foo();A=1;end'
+ assert_errors expression(source), source, [
+ ['dynamic constant assignment', 10..13]
+ ]
+ end
+
+ def test_non_assoc_equality
+ source = <<~RUBY
+ 1 == 2 == 3
+ 1 != 2 != 3
+ 1 === 2 === 3
+ 1 =~ 2 =~ 3
+ 1 !~ 2 !~ 3
+ 1 <=> 2 <=> 3
+ RUBY
+
+ assert_errors expression(source), source, [
+ ["unexpected '==', expecting end-of-input", 7..9],
+ ["unexpected '==', ignoring it", 7..9],
+ ["unexpected '!=', expecting end-of-input", 19..21],
+ ["unexpected '!=', ignoring it", 19..21],
+ ["unexpected '===', expecting end-of-input", 32..35],
+ ["unexpected '===', ignoring it", 32..35],
+ ["unexpected '=~', expecting end-of-input", 45..47],
+ ["unexpected '=~', ignoring it", 45..47],
+ ["unexpected '!~', expecting end-of-input", 57..59],
+ ["unexpected '!~', ignoring it", 57..59],
+ ["unexpected '<=>', expecting end-of-input", 70..73],
+ ["unexpected '<=>', ignoring it", 70..73]
+ ]
+ end
+
+ def test_block_arg_and_block
+ source = 'foo(&1) { }'
+ assert_errors expression(source), source, [
+ ["both block arg and actual block given; only one block is allowed", 8..11]
+ ]
+ end
+
+ def test_forwarding_arg_and_block
+ source = 'def foo(...) = foo(...) { }'
+ assert_errors expression(source), source, [
+ ['both block arg and actual block given; only one block is allowed', 24..27]
+ ]
+ end
+
+ def test_it_with_ordinary_parameter
+ source = "proc { || it }"
+ errors = [["`it` is not allowed when an ordinary parameter is defined", 10..12]]
+
+ assert_errors expression(source), source, errors, check_valid_syntax: RUBY_VERSION >= "3.4.0"
+ end
+
+ def test_regular_expression_with_unknown_regexp_options
+ source = "/foo/AZaz"
+ errors = [["unknown regexp options: AZaz", 4..9]]
+
+ assert_errors expression(source), source, errors
+ end
+
+ def test_interpolated_regular_expression_with_unknown_regexp_options
+ source = "/\#{foo}/AZaz"
+ errors = [["unknown regexp options: AZaz", 7..12]]
+
+ assert_errors expression(source), source, errors
+ end
+
+ def test_singleton_method_for_literals
+ source = <<~'RUBY'
+ def (1).g; end
+ def ((a; 1)).foo; end
+ def ((return; 1)).bar; end
+ def (((1))).foo; end
+ def (__FILE__).foo; end
+ def (__ENCODING__).foo; end
+ def (__LINE__).foo; end
+ def ("foo").foo; end
+ def (3.14).foo; end
+ def (3.14i).foo; end
+ def (:foo).foo; end
+ def (:'foo').foo; end
+ def (:'f{o}').foo; end
+ def ('foo').foo; end
+ def ("foo").foo; end
+ def ("#{fo}o").foo; end
+ def (/foo/).foo; end
+ def (/f#{oo}/).foo; end
+ def ([1]).foo; end
+ RUBY
+ errors = [
+ ["cannot define singleton method for literals", 5..6],
+ ["cannot define singleton method for literals", 24..25],
+ ["cannot define singleton method for literals", 51..52],
+ ["cannot define singleton method for literals", 71..72],
+ ["cannot define singleton method for literals", 90..98],
+ ["cannot define singleton method for literals", 114..126],
+ ["cannot define singleton method for literals", 142..150],
+ ["cannot define singleton method for literals", 166..171],
+ ["cannot define singleton method for literals", 187..191],
+ ["cannot define singleton method for literals", 207..212],
+ ["cannot define singleton method for literals", 228..232],
+ ["cannot define singleton method for literals", 248..254],
+ ["cannot define singleton method for literals", 270..277],
+ ["cannot define singleton method for literals", 293..298],
+ ["cannot define singleton method for literals", 314..319],
+ ["cannot define singleton method for literals", 335..343],
+ ["cannot define singleton method for literals", 359..364],
+ ["cannot define singleton method for literals", 380..388],
+ ["cannot define singleton method for literals", 404..407]
+ ]
+ assert_errors expression(source), source, errors
+ end
+
+ def test_assignment_to_literal_in_conditionals
+ source = <<~RUBY
+ if (a = 2); end
+ if ($a = 2); end
+ if (@a = 2); end
+ if (@@a = 2); end
+ if a elsif b = 2; end
+ unless (a = 2); end
+ unless ($a = 2); end
+ unless (@a = 2); end
+ unless (@@a = 2); end
+ while (a = 2); end
+ while ($a = 2); end
+ while (@a = 2); end
+ while (@@a = 2); end
+ until (a = 2); end
+ until ($a = 2); end
+ until (@a = 2); end
+ until (@@a = 2); end
+ foo if a = 2
+ foo if (a, b = 2)
+ (@foo = 1) ? a : b
+ !(a = 2)
+ not a = 2
+ RUBY
+ assert_warning_messages source, [
+ "found '= literal' in conditional, should be =="
+ ] * source.lines.count
+ end
+
+ def test_duplicate_pattern_capture
+ source = <<~RUBY
+ case (); in [a, a]; end
+ case (); in [a, *a]; end
+ case (); in {a: a, b: a}; end
+ case (); in {a: a, **a}; end
+ case (); in [a, {a:}]; end
+ case (); in [a, {a: {a: {a: [a]}}}]; end
+ case (); in a => a; end
+ case (); in [A => a, {a: b => a}]; end
+ RUBY
+
+ assert_error_messages source, Array.new(source.lines.length, "duplicated variable name")
+ refute_error_messages "case (); in [_a, _a]; end"
+ end
+
+ def test_duplicate_pattern_hash_key
+ assert_error_messages "case (); in {a:, a:}; end", ["duplicated key name", "duplicated variable name"]
+ assert_error_messages "case (); in {a:1, a:2}; end", ["duplicated key name"]
+ refute_error_messages "case (); in [{a:1}, {a:2}]; end"
+ end
+
+ def test_unexpected_block
+ assert_error_messages "def foo = yield(&:+)", ["block argument should not be given"]
+ end
+
+ private
+
+ def assert_errors(expected, source, errors, check_valid_syntax: true)
+ refute_valid_syntax(source) if check_valid_syntax
+
+ result = Prism.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)
+ refute_valid_syntax(source)
+ result = Prism.parse(source)
+ assert_equal(errors, result.errors.map(&:message))
+ end
+
+ def refute_error_messages(source)
+ assert_valid_syntax(source)
+ assert Prism.parse_success?(source), "Expected #{source.inspect} to parse successfully"
+ end
+
+ def assert_warning_messages(source, warnings)
+ result = Prism.parse(source)
+ assert_equal(warnings, result.warnings.map(&:message))
+ end
+
+ def expression(source)
+ Prism.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..2897189518
--- /dev/null
+++ b/test/prism/fixtures/arrays.txt
@@ -0,0 +1,122 @@
+[*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:]
+
+foo[] += 1
+
+foo[] ||= 1
+
+foo[] &&= 1
+
+foo.foo[] += 1
+
+foo.foo[] ||= 1
+
+foo.foo[] &&= 1
+
+foo[bar] += 1
+
+foo[bar] ||= 1
+
+foo[bar] &&= 1
+
+foo.foo[bar] += 1
+
+foo.foo[bar] ||= 1
+
+foo.foo[bar] &&= 1
+
+def f(*); a[*]; end
+
+def f(*); a[1, *]; end
+
+def f(*); a[*] = 1; end
+
+def f(*); a[1, *] = 1; end
+
+def f(*); a[*] += 1; end
+
+def f(*); a[1, *] &&= 1; end
+
+def f(*); rescue => a[*]; end
+
+def f(*); rescue => a[1, *]; end
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..82fa45bdb4
--- /dev/null
+++ b/test/prism/fixtures/break.txt
@@ -0,0 +1,25 @@
+tap { break }
+
+tap { break (1), (2), (3) }
+
+tap { break 1 }
+
+tap { break 1, 2,
+3 }
+
+tap { break 1, 2, 3 }
+
+tap { break [1, 2, 3] }
+
+tap { break(
+ 1
+ 2
+) }
+
+tap { break() }
+
+tap { 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..733e1e54d2
--- /dev/null
+++ b/test/prism/fixtures/case.txt
@@ -0,0 +1,55 @@
+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
+
+case 1 in 2
+when 3
+end
+
+case 1 in 2; when 3; end
+
+case 1 in 2
+in 3
+end
+
+case 1 in 2; in 3; end
+
+case a
+in b if c and d
+ e
+end
+
+1.then do
+ case 1
+ in ^_1
+ end
+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/command_method_call.txt b/test/prism/fixtures/command_method_call.txt
new file mode 100644
index 0000000000..182b87948b
--- /dev/null
+++ b/test/prism/fixtures/command_method_call.txt
@@ -0,0 +1,41 @@
+foo 1
+
+foo bar 1
+
+foo 1 if bar 2
+
+foo 1 unless bar 2
+
+foo 1 while bar 2
+
+foo 1 until bar 2
+
+foo 1 rescue bar 2
+
+foo[bar 1]
+
+foo 1 and bar 2
+
+foo 1 or bar 2
+
+not foo 1
+
+foo = bar = baz 1
+
+def foo = bar 1
+
+1.foo 2
+
+1.foo.bar 2
+
+1.foo[2].bar 3
+
+1.foo(2).bar 3
+
+1.foo(&2).bar 3
+
+!foo 1 and !bar 2
+
+!foo 1 or !bar 2
+
+not !foo 1
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..247fa94e3a
--- /dev/null
+++ b/test/prism/fixtures/defined.txt
@@ -0,0 +1,10 @@
+defined? 1 and defined? 2
+
+defined?(x %= 2)
+
+defined?(foo and bar)
+
+defined? 1
+
+defined?("foo"
+)
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/dstring.txt b/test/prism/fixtures/dstring.txt
new file mode 100644
index 0000000000..085e0c6852
--- /dev/null
+++ b/test/prism/fixtures/dstring.txt
@@ -0,0 +1,29 @@
+"foo
+ bar"
+
+"foo
+ #{bar}"
+
+"fo
+o" "ba
+r"
+
+"
+foo\
+"
+
+"
+foo\\
+"
+
+"
+foo\\\
+"
+
+"
+foo\\\\
+"
+
+"
+foo\\\\\
+"
diff --git a/test/prism/fixtures/dsym_str.txt b/test/prism/fixtures/dsym_str.txt
new file mode 100644
index 0000000000..ee68dde88d
--- /dev/null
+++ b/test/prism/fixtures/dsym_str.txt
@@ -0,0 +1,2 @@
+:"foo
+ bar"
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/emoji_method_calls.txt b/test/prism/fixtures/emoji_method_calls.txt
new file mode 100644
index 0000000000..96d0daba33
--- /dev/null
+++ b/test/prism/fixtures/emoji_method_calls.txt
@@ -0,0 +1 @@
+foo.🌊 = 1
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..0afb8db496
--- /dev/null
+++ b/test/prism/fixtures/hashes.txt
@@ -0,0 +1,28 @@
+{}
+
+{
+}
+
+{ 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
+
+{ a: -1 }
diff --git a/test/prism/fixtures/heredoc.txt b/test/prism/fixtures/heredoc.txt
new file mode 100644
index 0000000000..f94fd912df
--- /dev/null
+++ b/test/prism/fixtures/heredoc.txt
@@ -0,0 +1,2 @@
+<<TEXT
+TEXT
diff --git a/test/prism/fixtures/heredoc_with_carriage_returns.txt b/test/prism/fixtures/heredoc_with_carriage_returns.txt
new file mode 100644
index 0000000000..32a2d87b24
--- /dev/null
+++ b/test/prism/fixtures/heredoc_with_carriage_returns.txt
@@ -0,0 +1,2 @@
+<<TEXT
+TEXT
diff --git a/test/prism/fixtures/heredoc_with_comment.txt b/test/prism/fixtures/heredoc_with_comment.txt
new file mode 100644
index 0000000000..8e7b7275bd
--- /dev/null
+++ b/test/prism/fixtures/heredoc_with_comment.txt
@@ -0,0 +1,3 @@
+<<-TARGET.chomp # the heredoc end token doesn't always precede the comment
+ content makes for an obvious error
+TARGET \ No newline at end of file
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_leading_whitespace.txt b/test/prism/fixtures/heredocs_leading_whitespace.txt
new file mode 100644
index 0000000000..660ecb4543
--- /dev/null
+++ b/test/prism/fixtures/heredocs_leading_whitespace.txt
@@ -0,0 +1,29 @@
+<<-' FOO'
+a
+b
+ FOO
+
+<<-" FOO"
+a
+b
+ FOO
+
+<<-` FOO`
+a
+b
+ FOO
+
+<<-' FOO'
+a
+b
+ FOO
+
+<<~' FOO'
+a
+b
+ FOO
+
+<<~' FOO'
+a
+b
+ FOO
diff --git a/test/prism/fixtures/heredocs_nested.txt b/test/prism/fixtures/heredocs_nested.txt
new file mode 100644
index 0000000000..0802378278
--- /dev/null
+++ b/test/prism/fixtures/heredocs_nested.txt
@@ -0,0 +1,22 @@
+<<~RUBY
+pre
+#{
+<<RUBY
+ hello
+RUBY
+}
+post
+RUBY
+
+# depth greater than PM_LEX_STACK_SIZE
+<<-A
+#{
+<<-B
+#{
+<<-C
+#{3}
+C
+}
+B
+}
+A
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..4139bae5ed
--- /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
+
+tap { break if true }
+
+tap { next if true }
+
+return if true
+
+tap { 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 f1
+ lambda do |_|
+ end
+elsif f2
+ 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..6d24a9f476
--- /dev/null
+++ b/test/prism/fixtures/keywords.txt
@@ -0,0 +1,11 @@
+tap { redo }
+
+begin; rescue; retry; end
+
+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..987fb3f90f
--- /dev/null
+++ b/test/prism/fixtures/method_calls.txt
@@ -0,0 +1,156 @@
+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)}"
+
+def f(*); p *; end
+
+foo 1, Bar { 1 }
+
+foo = 1
+foo {}
+
+@a.b "c#{name}": 42
diff --git a/test/prism/fixtures/methods.txt b/test/prism/fixtures/methods.txt
new file mode 100644
index 0000000000..4bfd976eda
--- /dev/null
+++ b/test/prism/fixtures/methods.txt
@@ -0,0 +1,183 @@
+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
+
+foo = 1
+def foo.bar; end
+
+def f(*); [*]; end
+
+def f x:-a; end
+
+def f x:+a; end
+
+def f x:!a; end
+
+def foo x:%(xx); end
+
+def foo(...)
+ bar(...)
+end
+
+def foo(bar = (def baz(bar) = bar; 1)) = 2
+
+def (class Foo; end).foo(bar = 1) = 2
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/multi_write.txt b/test/prism/fixtures/multi_write.txt
new file mode 100644
index 0000000000..edbcafb969
--- /dev/null
+++ b/test/prism/fixtures/multi_write.txt
@@ -0,0 +1,4 @@
+foo = 1 rescue nil
+foo, bar = 1 rescue nil
+foo = 1, 2 rescue nil
+foo, bar = 1, 2 rescue nil
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..2ef14c6304
--- /dev/null
+++ b/test/prism/fixtures/next.txt
@@ -0,0 +1,24 @@
+tap { next }
+
+tap { next (1), (2), (3) }
+
+tap { next 1 }
+
+tap { next 1, 2,
+3 }
+
+tap { next 1, 2, 3 }
+
+tap { next [1, 2, 3] }
+
+tap { next(
+ 1
+ 2
+) }
+
+tap { next
+1 }
+
+tap { next() }
+
+tap { 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..47f20dcb42
--- /dev/null
+++ b/test/prism/fixtures/numbers.txt
@@ -0,0 +1,67 @@
+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.2r
+
+1.2ri
+
+-1ri
+
+-1.2r
+
+-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..7ce3b9e4a8
--- /dev/null
+++ b/test/prism/fixtures/patterns.txt
@@ -0,0 +1,217 @@
+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 }
+
+bar = 1; 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 => bar,
+
+; # end the previous pattern for ParseTest#test_filepath_patterns.txt which parses the whole file at once
+
+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 }
+
+foo in bar,
+
+; # end the previous pattern for ParseTest#test_filepath_patterns.txt which parses the whole file at once
+
+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
+ ]
+]
+
+foo in bar => baz
+foo => bar => baz
+
+foo, bar, baz = 1, 2
+foo do
+ [1, 2] => [foo, bar] => baz
+end
+
+foo => Object[{x:}]
+
+1.then { 1 in ^_1 }
+
+(
+ a,
+ b
+) = c
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..e2e4136ae9
--- /dev/null
+++ b/test/prism/fixtures/ranges.txt
@@ -0,0 +1,49 @@
+(...2)
+
+(..2)
+
+1...2
+
+foo[...2]
+
+{ foo: ...bar }
+
+(1...)
+
+1..2
+
+{ foo: ..bar }
+
+(1..)
+
+1 .. ..1
+
+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.. + 2
+
+1.. - 2
diff --git a/test/prism/fixtures/regex.txt b/test/prism/fixtures/regex.txt
new file mode 100644
index 0000000000..84b5ca0600
--- /dev/null
+++ b/test/prism/fixtures/regex.txt
@@ -0,0 +1,46 @@
+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(
+(?:[#$%_']|\(\)|\(,\)|\[\]|[0-9])*
+ (?:[#$%_']+)
+)
+
+/(?#\))/ =~ "hi"
+
+%r#pound#
+
+/aaa #{bbb}/o
+
+/(?<a\
+b>)/ =~ ""; ab
+
+/(?<abc>)(?<abc>)/ =~ ""; abc
+
+/(?<a b>)/ =~ ""
+
+a = 1
+tap { /(?<a>)/ =~ to_s }
+
+/(?<foo>)/ =~ ""
+/(?<Foo>)/ =~ ""
+
+/(?<nil>)/ =~ ""
+def foo(nil:) = /(?<nil>)/ =~ ""
diff --git a/test/prism/fixtures/regex_char_width.txt b/test/prism/fixtures/regex_char_width.txt
new file mode 100644
index 0000000000..7096b71584
--- /dev/null
+++ b/test/prism/fixtures/regex_char_width.txt
@@ -0,0 +1,3 @@
+# encoding: sjis
+/Ⅷ(?<a>.)Ⅹ(?<b>.)/ =~ 'ⅧaⅩb'
+[a, b]
diff --git a/test/prism/fixtures/repeat_parameters.txt b/test/prism/fixtures/repeat_parameters.txt
new file mode 100644
index 0000000000..9c69e9718a
--- /dev/null
+++ b/test/prism/fixtures/repeat_parameters.txt
@@ -0,0 +1,38 @@
+def foo(a, _)
+end
+
+def foo(a, _, _)
+end
+
+def foo(a, _, _, _b)
+end
+
+def foo(a, _, _, _b, _b)
+end
+
+def foo(a, (b, *_c, d), (e, *_c, f))
+end
+
+def foo(_a, _a, b, c)
+end
+
+def foo((a, *_b, c), (d, *_b, e))
+end
+
+def foo(_a = 1, _a = 2)
+end
+
+def foo(_a:, _a:)
+end
+
+def foo(_a: 1, _a: 2)
+end
+
+def foo(_a, **_a)
+end
+
+def foo(_a, &_a)
+end
+
+def foo(_a, *_a)
+end
diff --git a/test/prism/fixtures/rescue.txt b/test/prism/fixtures/rescue.txt
new file mode 100644
index 0000000000..99170fbe0f
--- /dev/null
+++ b/test/prism/fixtures/rescue.txt
@@ -0,0 +1,35 @@
+foo rescue nil
+
+foo rescue
+nil
+
+tap { break rescue nil }
+
+tap { 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
+
+foo if bar rescue baz
+
+z = x y rescue c d
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..1e5bfbdfe0
--- /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_parser[23].yy.
+* Extend lib/ruby_parser[23].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_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_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/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..d88e1fd21c
--- /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/single_method_call_with_bang.txt b/test/prism/fixtures/single_method_call_with_bang.txt
new file mode 100644
index 0000000000..929efb3053
--- /dev/null
+++ b/test/prism/fixtures/single_method_call_with_bang.txt
@@ -0,0 +1 @@
+foo!
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..d09cb11b1f
--- /dev/null
+++ b/test/prism/fixtures/spanning_heredoc.txt
@@ -0,0 +1,63 @@
+# 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: prism 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 prism does ...
+# TODO: prism does not include the "\n" in "p\np" in the AST like ruby does
+pp <<-A, %I[p\
+o
+A
+p]
+
+<<A; /\
+A
+(?<a>)/ =~ ''
+
+<<A; :'a
+A
+b'
+
+<<A; :"a
+A
+b"
diff --git a/test/prism/fixtures/spanning_heredoc_newlines.txt b/test/prism/fixtures/spanning_heredoc_newlines.txt
new file mode 100644
index 0000000000..32c9943aeb
--- /dev/null
+++ b/test/prism/fixtures/spanning_heredoc_newlines.txt
@@ -0,0 +1,23 @@
+<<A+%
+A
+
+
+<<A+%r
+A
+
+
+<<A+%q
+A
+
+
+<<A+%Q
+A
+
+
+<<A+%s
+A
+
+
+<<A+%x
+A
+
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..cd7aaf992e
--- /dev/null
+++ b/test/prism/fixtures/super.txt
@@ -0,0 +1,17 @@
+super
+
+super()
+
+super(1)
+
+super(1, 2, 3)
+
+super &:foo
+
+super(&:foo)
+
+super {}
+
+super(1, 2, 3) {}
+
+super(1, 2, 3, &:foo)
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..cca47ef00b
--- /dev/null
+++ b/test/prism/fixtures/tilde_heredocs.txt
@@ -0,0 +1,97 @@
+<<~EOF
+ a
+#{1}
+ a
+EOF
+
+<<~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..678d58991b
--- /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
+
+tap { break unless true }
+
+tap { 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/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..139904a53f
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/flipflop.txt
@@ -0,0 +1,10 @@
+if ((i == 4)..(i == 4))
+ foo
+end
+if ((i == 4)...(i == 4))
+ foo
+end
+if ..foo
+end
+if 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..b8e096d8fc
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/since/32.txt
@@ -0,0 +1,11 @@
+def foo(argument, **)
+ bar(argument, **)
+end
+
+def foo(argument, *)
+ bar(argument, *)
+end
+
+def foo(**)
+ { default: 1, ** }
+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/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/opasgn.txt b/test/prism/fixtures/unparser/corpus/semantic/opasgn.txt
new file mode 100644
index 0000000000..8b4bc5d239
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/opasgn.txt
@@ -0,0 +1 @@
+y["#{42}\n"] += "#{42}\n"
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..652fc8c5a7
--- /dev/null
+++ b/test/prism/fixtures/until.txt
@@ -0,0 +1,13 @@
+until true; 1; end
+
+1 until true
+
+tap { break until true }
+
+tap { next until true }
+
+return until true
+
+foo :a, :b until bar?
+
+foo while bar in baz
diff --git a/test/prism/fixtures/variables.txt b/test/prism/fixtures/variables.txt
new file mode 100644
index 0000000000..1545c30c80
--- /dev/null
+++ b/test/prism/fixtures/variables.txt
@@ -0,0 +1,47 @@
+@@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)
+
+a, (b, c), d = []
diff --git a/test/prism/fixtures/while.txt b/test/prism/fixtures/while.txt
new file mode 100644
index 0000000000..b776f755ee
--- /dev/null
+++ b/test/prism/fixtures/while.txt
@@ -0,0 +1,23 @@
+while true; 1; end
+
+1 while true
+
+tap { break while true }
+
+tap { next while true }
+
+return while true
+
+foo :a, :b while bar?
+
+tap { while def self.foo a = tap do end; end; break; end }
+
+tap { while class Foo a = tap do end; end; break; end }
+
+tap { while class << self; tap do end; end; break; end }
+
+tap { while class << self; a = tap do end; end; break; end }
+
+while def foo = bar do end; end
+
+foo while bar in baz
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_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_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/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_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_eflipflop_with_beginless_range.txt b/test/prism/fixtures/whitequark/cond_eflipflop_with_beginless_range.txt
new file mode 100644
index 0000000000..757863b12b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_eflipflop_with_beginless_range.txt
@@ -0,0 +1 @@
+if ...bar; end
diff --git a/test/prism/fixtures/whitequark/cond_eflipflop_with_endless_range.txt b/test/prism/fixtures/whitequark/cond_eflipflop_with_endless_range.txt
new file mode 100644
index 0000000000..8a3b815ec9
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_eflipflop_with_endless_range.txt
@@ -0,0 +1 @@
+if foo...; 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_iflipflop_with_beginless_range.txt b/test/prism/fixtures/whitequark/cond_iflipflop_with_beginless_range.txt
new file mode 100644
index 0000000000..4ff5b09690
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_iflipflop_with_beginless_range.txt
@@ -0,0 +1 @@
+if ..bar; end
diff --git a/test/prism/fixtures/whitequark/cond_iflipflop_with_endless_range.txt b/test/prism/fixtures/whitequark/cond_iflipflop_with_endless_range.txt
new file mode 100644
index 0000000000..2739ad0e2a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_iflipflop_with_endless_range.txt
@@ -0,0 +1 @@
+if foo..; 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/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/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/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/numparam_ruby_bug_19025.txt b/test/prism/fixtures/whitequark/numparam_ruby_bug_19025.txt
new file mode 100644
index 0000000000..f9ffd4329a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/numparam_ruby_bug_19025.txt
@@ -0,0 +1 @@
+p { [_1 **2] }
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_bug_989.txt b/test/prism/fixtures/whitequark/parser_bug_989.txt
new file mode 100644
index 0000000000..b7b99612b4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_989.txt
@@ -0,0 +1,3 @@
+ <<-HERE
+ content
+ HERE
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/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/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/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..7ec09468d8
--- /dev/null
+++ b/test/prism/fixtures/xstring.txt
@@ -0,0 +1,13 @@
+%x[foo]
+
+`foo #{bar} baz`
+
+`foo`
+
+%x{
+ foo
+}
+
+``
+
+%x{}
diff --git a/test/prism/fixtures/xstring_with_backslash.txt b/test/prism/fixtures/xstring_with_backslash.txt
new file mode 100644
index 0000000000..b51bb0f6f9
--- /dev/null
+++ b/test/prism/fixtures/xstring_with_backslash.txt
@@ -0,0 +1 @@
+`f\oo`
diff --git a/test/prism/fixtures/yield.txt b/test/prism/fixtures/yield.txt
new file mode 100644
index 0000000000..752ba27a2e
--- /dev/null
+++ b/test/prism/fixtures/yield.txt
@@ -0,0 +1,7 @@
+def foo; yield; end
+
+def foo; yield(); end
+
+def foo; yield(1); end
+
+def foo; yield(1, 2, 3); end
diff --git a/test/prism/format_errors_test.rb b/test/prism/format_errors_test.rb
new file mode 100644
index 0000000000..63206d5765
--- /dev/null
+++ b/test/prism/format_errors_test.rb
@@ -0,0 +1,58 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if Prism::BACKEND == :FFI
+
+module Prism
+ class FormatErrorsTest < TestCase
+ def test_basic
+ expected = <<~ERROR
+ > 1 | <>
+ | ^ unexpected '<', ignoring it
+ | ^ unexpected '>', ignoring it
+ ERROR
+
+ assert_equal expected, Debug.format_errors("<>", false)
+ end
+
+ def test_multiple
+ expected = <<~ERROR
+ > 1 | "%W"\\u"
+ | ^ unexpected backslash, ignoring it
+ | ^ unexpected local variable or method, expecting end-of-input
+ | ^ unterminated string meets end of file
+ ERROR
+
+ assert_equal expected, Debug.format_errors('"%W"\u"', false)
+ end
+
+ def test_truncate_start
+ expected = <<~ERROR
+ > 1 | ... <>
+ | ^ unexpected '<', ignoring it
+ | ^ unexpected '>', ignoring it
+ ERROR
+
+ assert_equal expected, Debug.format_errors("#{" " * 30}<>", false)
+ end
+
+ def test_truncate_end
+ expected = <<~ERROR
+ > 1 | <#{" " * 30} ...
+ | ^ unexpected '<', ignoring it
+ ERROR
+
+ assert_equal expected, Debug.format_errors("<#{" " * 30}a", false)
+ end
+
+ def test_truncate_both
+ expected = <<~ERROR
+ > 1 | ... <#{" " * 30} ...
+ | ^ unexpected '<', ignoring it
+ ERROR
+
+ assert_equal expected, Debug.format_errors("#{" " * 30}<#{" " * 30}a", false)
+ end
+ end
+end
diff --git a/test/prism/fuzzer_test.rb b/test/prism/fuzzer_test.rb
new file mode 100644
index 0000000000..511210e7ee
--- /dev/null
+++ b/test/prism/fuzzer_test.rb
@@ -0,0 +1,67 @@
+# frozen_string_literal: true
+
+return if ENV["PRISM_BUILD_MINIMAL"]
+
+require_relative "test_helper"
+
+module Prism
+ # 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}") { Prism.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 "float suffix at end of file", "1e"
+
+ 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
+
+ snippet "parameter name that is zero length", "a { |b;"
+ end
+end
diff --git a/test/prism/heredoc_dedent_test.rb b/test/prism/heredoc_dedent_test.rb
new file mode 100644
index 0000000000..9fbc4d936a
--- /dev/null
+++ b/test/prism/heredoc_dedent_test.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class HeredocDedentTest < TestCase
+ filepath = File.expand_path("fixtures/tilde_heredocs.txt", __dir__)
+
+ File.read(filepath).split(/(?=\n)\n(?=<)/).each_with_index do |heredoc, index|
+ # The first example in this file has incorrect dedent calculated by
+ # TruffleRuby so we skip it.
+ next if index == 0 && RUBY_ENGINE == "truffleruby"
+
+ define_method "test_heredoc_#{index}" do
+ node = Prism.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/index_write_test.rb b/test/prism/index_write_test.rb
new file mode 100644
index 0000000000..cf90eb082f
--- /dev/null
+++ b/test/prism/index_write_test.rb
@@ -0,0 +1,89 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class IndexWriteTest < TestCase
+ def test_keywords_3_3
+ assert_parse_success(<<~RUBY, "3.3.0")
+ foo[bar: 1] = 1
+ foo[bar: 1] &&= 1
+ foo[bar: 1] ||= 1
+ foo[bar: 1] += 1
+ RUBY
+
+ assert_parse_success(<<~RUBY, "3.3.0")
+ def foo(**)
+ bar[**] = 1
+ bar[**] &&= 1
+ bar[**] ||= 1
+ bar[**] += 1
+ end
+ RUBY
+ end
+
+ def test_block_3_3
+ assert_parse_success(<<~RUBY, "3.3.0")
+ foo[&bar] = 1
+ foo[&bar] &&= 1
+ foo[&bar] ||= 1
+ foo[&bar] += 1
+ RUBY
+
+ assert_parse_success(<<~RUBY, "3.3.0")
+ def foo(&)
+ bar[&] = 1
+ bar[&] &&= 1
+ bar[&] ||= 1
+ bar[&] += 1
+ end
+ RUBY
+ end
+
+ def test_keywords_latest
+ assert_parse_failure(<<~RUBY)
+ foo[bar: 1] = 1
+ foo[bar: 1] &&= 1
+ foo[bar: 1] ||= 1
+ foo[bar: 1] += 1
+ RUBY
+
+ assert_parse_failure(<<~RUBY)
+ def foo(**)
+ bar[**] = 1
+ bar[**] &&= 1
+ bar[**] ||= 1
+ bar[**] += 1
+ end
+ RUBY
+ end
+
+ def test_block_latest
+ assert_parse_failure(<<~RUBY)
+ foo[&bar] = 1
+ foo[&bar] &&= 1
+ foo[&bar] ||= 1
+ foo[&bar] += 1
+ RUBY
+
+ assert_parse_failure(<<~RUBY)
+ def foo(&)
+ bar[&] = 1
+ bar[&] &&= 1
+ bar[&] ||= 1
+ bar[&] += 1
+ end
+ RUBY
+ end
+
+ private
+
+ def assert_parse_success(source, version = "latest")
+ assert Prism.parse_success?(source, version: version)
+ end
+
+ def assert_parse_failure(source, version = "latest")
+ assert Prism.parse_failure?(source, version: version)
+ end
+ end
+end
diff --git a/test/prism/integer_parse_test.rb b/test/prism/integer_parse_test.rb
new file mode 100644
index 0000000000..f42e817e79
--- /dev/null
+++ b/test/prism/integer_parse_test.rb
@@ -0,0 +1,45 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if Prism::BACKEND == :FFI
+
+module Prism
+ class IntegerParseTest < TestCase
+ def test_integer_parse
+ assert_integer_parse(1)
+ assert_integer_parse(50)
+ assert_integer_parse(100)
+ assert_integer_parse(100, "1_0_0")
+ assert_integer_parse(8, "0_1_0")
+
+ assert_integer_parse(10, "0b1010")
+ assert_integer_parse(10, "0B1010")
+ assert_integer_parse(10, "0o12")
+ assert_integer_parse(10, "0O12")
+ assert_integer_parse(10, "012")
+ assert_integer_parse(10, "0d10")
+ assert_integer_parse(10, "0D10")
+ assert_integer_parse(10, "0xA")
+ assert_integer_parse(10, "0XA")
+
+ assert_integer_parse(2**32)
+ assert_integer_parse(2**64 + 2**32)
+ assert_integer_parse(2**128 + 2**64 + 2**32)
+
+ num = 99 ** 99
+ assert_integer_parse(num, "0b#{num.to_s(2)}")
+ assert_integer_parse(num, "0o#{num.to_s(8)}")
+ assert_integer_parse(num, "0d#{num.to_s(10)}")
+ assert_integer_parse(num, "0x#{num.to_s(16)}")
+ end
+
+ private
+
+ def assert_integer_parse(expected, source = expected.to_s)
+ integer, string = Debug.integer_parse(source)
+ assert_equal expected, integer
+ assert_equal expected.to_s, string
+ 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..b10a367c18
--- /dev/null
+++ b/test/prism/library_symbols_test.rb
@@ -0,0 +1,106 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if RUBY_PLATFORM !~ /linux/
+
+# TODO: determine why these symbols are incorrect on ppc64le
+return if RUBY_PLATFORM =~ /powerpc64le/
+
+module Prism
+ #
+ # examine a prism dll or static archive for expected external symbols.
+ # these tests only work on a linux system right now.
+ #
+ class LibrarySymbolsTest < TestCase
+ def setup
+ super
+
+ @libprism_a = File.expand_path("../../build/libprism.a", __dir__)
+ @libprism_so = File.expand_path("../../build/libprism.so", __dir__)
+ @prism_so = File.expand_path("../../lib/prism/prism.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 - libprism.a
+ #
+ def test_libprism_a_contains_nothing_globally_visible
+ omit("libprism.a is not built") unless File.exist?(@libprism_a)
+
+ assert_empty(names(visible_global_objdump_symbols(@libprism_a)))
+ end
+
+ def test_libprism_a_contains_hidden_pm_symbols
+ omit("libprism.a is not built") unless File.exist?(@libprism_a)
+
+ names(hidden_global_objdump_symbols(@libprism_a)).tap do |symbols|
+ assert_includes(symbols, "pm_parse")
+ assert_includes(symbols, "pm_version")
+ end
+ end
+
+ #
+ # shared object - libprism.so
+ #
+ def test_libprism_so_exports_only_the_necessary_functions
+ omit("libprism.so is not built") unless File.exist?(@libprism_so)
+
+ names(global_nm_symbols(@libprism_so)).tap do |symbols|
+ assert_includes(symbols, "pm_parse")
+ assert_includes(symbols, "pm_version")
+ end
+ names(local_nm_symbols(@libprism_so)).tap do |symbols|
+ assert_includes(symbols, "pm_encoding_utf_8_isupper_char")
+ end
+ # TODO: someone who uses this library needs to finish this test
+ end
+
+ #
+ # shared object - prism.so
+ #
+ def test_prism_so_exports_only_the_C_extension_init_function
+ omit("prism.so is not built") unless File.exist?(@prism_so)
+
+ names(global_nm_symbols(@prism_so)).tap do |symbols|
+ assert_equal(["Init_prism"], 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..0eb73f1b9c
--- /dev/null
+++ b/test/prism/locals_test.rb
@@ -0,0 +1,58 @@
+# 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.4.0"
+
+# 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 Prism
+ class LocalsTest < TestCase
+ base = File.join(__dir__, "fixtures")
+ Dir["**/*.txt", base: base].each do |relative|
+ # Skip this fixture because it has a different number of locals because
+ # CRuby is eliminating dead code.
+ next if relative == "whitequark/ruby_bug_10653.txt"
+
+ 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.prism_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..0724995671
--- /dev/null
+++ b/test/prism/location_test.rb
@@ -0,0 +1,946 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ 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, "{ '': 1 }", 2...7) { |node| node.elements.first }
+ 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", 0..25, &:body)
+ assert_location(BeginNode, "module Foo\nrescue then end", 0..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, "tap { break }", 6...11) { |node| node.block.body.body.first }
+ assert_location(BreakNode, "tap { break foo }", 6...15) { |node| node.block.body.body.first }
+ assert_location(BreakNode, "tap { break foo, bar }", 6...20) { |node| node.block.body.body.first }
+ assert_location(BreakNode, "tap { break(foo) }", 6...16) { |node| node.block.body.body.first }
+ 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')")
+
+ assert_location(CallNode, "-> { it }", 5...7, version: "3.3.0") do |node|
+ node.body.body.first
+ end
+
+ assert_location(LocalVariableReadNode, "-> { it }", 5...7, version: "3.4.0") do |node|
+ node.body.body.first
+ end
+ end
+
+ def test_CallAndWriteNode
+ assert_location(CallAndWriteNode, "foo.foo &&= bar")
+ end
+
+ def test_CallOperatorWriteNode
+ assert_location(CallOperatorWriteNode, "foo.foo += bar")
+ end
+
+ def test_CallOrWriteNode
+ assert_location(CallOrWriteNode, "foo.foo ||= bar")
+ end
+
+ def test_CallTargetNode
+ assert_location(CallTargetNode, "foo.bar, = baz", 0...7) do |node|
+ node.lefts.first
+ end
+ 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_CaseMatchNode
+ assert_location(CaseMatchNode, "case foo; in bar; end")
+ assert_location(CaseMatchNode, "case foo; in bar; else; end")
+ assert_location(CaseMatchNode, "case foo; in bar; in baz; end")
+ assert_location(CaseMatchNode, "case foo; in bar; in 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.lefts.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.lefts.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")
+ end
+
+ def test_ConstantTargetNode
+ assert_location(ConstantTargetNode, "Foo, Bar = baz", 0...3) do |node|
+ node.lefts.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.lefts.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_ImplicitRestNode
+ assert_location(ImplicitRestNode, "foo, = bar", 3..4, &:rest)
+
+ assert_location(ImplicitRestNode, "for foo, in bar do end", 7..8) do |node|
+ node.index.rest
+ end
+
+ assert_location(ImplicitRestNode, "foo { |bar,| }", 10..11) do |node|
+ node.block.parameters.parameters.rest
+ end
+
+ assert_location(ImplicitRestNode, "foo in [bar,]", 11..12) do |node|
+ node.pattern.rest
+ end
+ end
+
+ def test_InNode
+ assert_location(InNode, "case foo; in bar; end", 10...16) do |node|
+ node.conditions.first
+ end
+ end
+
+ def test_IndexAndWriteNode
+ assert_location(IndexAndWriteNode, "foo[foo] &&= bar")
+ end
+
+ def test_IndexOperatorWriteNode
+ assert_location(IndexOperatorWriteNode, "foo[foo] += bar")
+ end
+
+ def test_IndexOrWriteNode
+ assert_location(IndexOrWriteNode, "foo[foo] ||= bar")
+ end
+
+ def test_IndexTargetNode
+ assert_location(IndexTargetNode, "foo[bar], = qux", 0...8) do |node|
+ node.lefts.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.lefts.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}/")
+ assert_location(InterpolatedRegularExpressionNode, "/\#{foo}/io")
+ end
+
+ def test_InterpolatedStringNode
+ assert_location(InterpolatedStringNode, "\"foo \#@bar baz\"")
+ assert_location(InterpolatedStringNode, "<<~A\nhello \#{1} world\nA", 0...4)
+ assert_location(InterpolatedStringNode, '"foo" "bar"')
+ end
+
+ def test_InterpolatedSymbolNode
+ assert_location(InterpolatedSymbolNode, ':"#{foo}bar"')
+ end
+
+ def test_InterpolatedXStringNode
+ assert_location(InterpolatedXStringNode, '`foo #{bar} baz`')
+ end
+
+ def test_ItParametersNode
+ assert_location(ItParametersNode, "-> { it }", &:parameters)
+ end
+
+ def test_KeywordHashNode
+ assert_location(KeywordHashNode, "foo(a, b: 1)", 7...11) { |node| node.arguments.arguments[1] }
+ 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)
+ assert_location(LocalVariableReadNode, "-> { it }", 5...7) do |node|
+ node.body.body.first
+ end
+ assert_location(LocalVariableReadNode, "foo { it }", 6...8) do |node|
+ node.block.body.body.first
+ end
+ end
+
+ def test_LocalVariableTargetNode
+ assert_location(LocalVariableTargetNode, "foo, bar = baz", 0...3) do |node|
+ node.lefts.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.lefts.last }
+ assert_location(MultiTargetNode, "def foo((bar)); end", 8...13) do |node|
+ node.parameters.requireds.first
+ end
+ 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, "tap { next }", 6...10) { |node| node.block.body.body.first }
+ assert_location(NextNode, "tap { next foo }", 6...14) { |node| node.block.body.body.first }
+ assert_location(NextNode, "tap { next foo, bar }", 6...19) { |node| node.block.body.body.first }
+ assert_location(NextNode, "tap { next(foo) }", 6...15) { |node| node.block.body.body.first }
+ 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_NumberedParametersNode
+ assert_location(NumberedParametersNode, "-> { _1 }", &:parameters)
+ assert_location(NumberedParametersNode, "foo { _1 }", 4...10) { |node| node.block.parameters }
+ end
+
+ def test_NumberedReferenceReadNode
+ assert_location(NumberedReferenceReadNode, "$1")
+ end
+
+ def test_OptionalKeywordParameterNode
+ assert_location(OptionalKeywordParameterNode, "def foo(bar: nil); end", 8...16) do |node|
+ node.parameters.keywords.first
+ end
+ 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, "bar = 1; foo in ^bar", 16...20, &:pattern)
+ assert_location(PinnedVariableNode, "proc { 1 in ^it }.call(1)", 12...15) do |node|
+ node.receiver.block.body.body.first.pattern
+ end
+ 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, "tap { redo }", 6...10) { |node| node.block.body.body.first }
+ end
+
+ def test_RegularExpressionNode
+ assert_location(RegularExpressionNode, "/foo/")
+ assert_location(RegularExpressionNode, "/foo/io")
+ end
+
+ def test_RequiredKeywordParameterNode
+ assert_location(RequiredKeywordParameterNode, "def foo(bar:); end", 8...12) do |node|
+ node.parameters.keywords.first
+ end
+ end
+
+ def test_RequiredParameterNode
+ assert_location(RequiredParameterNode, "def foo(bar); end", 8...11) 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, "begin; rescue; retry; end", 15...20) { |node| node.rescue_clause.statements.body.first }
+ 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_ShareableConstantNode
+ source = <<~RUBY
+ # shareable_constant_value: literal
+ C = { foo: 1 }
+ RUBY
+
+ assert_location(ShareableConstantNode, source, 36...50)
+ 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, &:rest)
+ 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_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, "def test; yield; end", 10...15) { |node| node.body.body.first }
+ assert_location(YieldNode, "def test; yield foo; end", 10...19) { |node| node.body.body.first }
+ assert_location(YieldNode, "def test; yield foo, bar; end", 10...24) { |node| node.body.body.first }
+ assert_location(YieldNode, "def test; yield(foo); end", 10...20) { |node| node.body.body.first }
+ end
+
+ def test_all_tested
+ expected = Prism.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, **options)
+ result = Prism.parse(source, **options)
+ assert result.success?
+
+ 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/magic_comment_test.rb b/test/prism/magic_comment_test.rb
new file mode 100644
index 0000000000..9e2e92af92
--- /dev/null
+++ b/test/prism/magic_comment_test.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if RUBY_ENGINE != "ruby"
+
+module Prism
+ class MagicCommentTest < TestCase
+ examples = [
+ "# encoding: ascii",
+ "# coding: ascii",
+ "# eNcOdInG: ascii",
+ "# CoDiNg: ascii",
+ "# \s\t\v encoding \s\t\v : \s\t\v ascii \s\t\v",
+ "# -*- encoding: ascii -*-",
+ "# -*- coding: ascii -*-",
+ "# -*- eNcOdInG: ascii -*-",
+ "# -*- CoDiNg: ascii -*-",
+ "# -*- \s\t\v encoding \s\t\v : \s\t\v ascii \s\t\v -*-",
+ "# -*- foo: bar; encoding: ascii -*-",
+ "# coding \t \r \v : \t \v \r ascii-8bit",
+ "# vim: filetype=ruby, fileencoding=windows-31j, tabsize=3, shiftwidth=3"
+ ]
+
+ examples.each.with_index(1) do |example, index|
+ define_method(:"test_magic_comment_#{index}") do
+ expected = RubyVM::InstructionSequence.compile(%Q{#{example}\n""}).eval.encoding
+ actual = Prism.parse(example).encoding
+ assert_equal expected, actual
+ end
+ end
+ end
+end
diff --git a/test/prism/memsize_test.rb b/test/prism/memsize_test.rb
new file mode 100644
index 0000000000..d7e1448dbc
--- /dev/null
+++ b/test/prism/memsize_test.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if Prism::BACKEND == :FFI
+
+module Prism
+ 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..f7511f665c
--- /dev/null
+++ b/test/prism/newline_test.rb
@@ -0,0 +1,101 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return unless defined?(RubyVM::InstructionSequence)
+
+module Prism
+ class NewlineTest < TestCase
+ base = File.expand_path("../", __FILE__)
+ filepaths = Dir["*.rb", base: base] - %w[
+ encoding_test.rb
+ errors_test.rb
+ format_errors_test.rb
+ parser_test.rb
+ regexp_test.rb
+ static_literals_test.rb
+ unescape_test.rb
+ ]
+
+ filepaths.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 = Prism.parse_file(filepath)
+ assert_empty result.errors
+ actual = prism_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 prism_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/parameters_signature_test.rb b/test/prism/parameters_signature_test.rb
new file mode 100644
index 0000000000..0eed8d993d
--- /dev/null
+++ b/test/prism/parameters_signature_test.rb
@@ -0,0 +1,93 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if RUBY_VERSION < "3.2"
+
+module Prism
+ class ParametersSignatureTest < TestCase
+ def test_req
+ assert_parameters([[:req, :a]], "a")
+ end
+
+ def test_req_destructure
+ assert_parameters([[:req]], "(a, b)")
+ end
+
+ def test_opt
+ assert_parameters([[:opt, :a]], "a = 1")
+ end
+
+ def test_rest
+ assert_parameters([[:rest, :a]], "*a")
+ end
+
+ def test_rest_anonymous
+ assert_parameters([[:rest, :*]], "*")
+ end
+
+ def test_post
+ assert_parameters([[:rest, :a], [:req, :b]], "*a, b")
+ end
+
+ def test_post_destructure
+ assert_parameters([[:rest, :a], [:req]], "*a, (b, c)")
+ end
+
+ def test_keyreq
+ assert_parameters([[:keyreq, :a]], "a:")
+ end
+
+ def test_key
+ assert_parameters([[:key, :a]], "a: 1")
+ end
+
+ def test_keyrest
+ assert_parameters([[:keyrest, :a]], "**a")
+ end
+
+ def test_nokey
+ assert_parameters([[:nokey]], "**nil")
+ end
+
+ def test_keyrest_anonymous
+ assert_parameters([[:keyrest, :**]], "**")
+ end
+
+ def test_key_ordering
+ omit("TruffleRuby returns keys in order they were declared") if RUBY_ENGINE == "truffleruby"
+
+ assert_parameters([[:keyreq, :a], [:keyreq, :b], [:key, :c], [:key, :d]], "a:, c: 1, b:, d: 2")
+ end
+
+ def test_block
+ assert_parameters([[:block, :a]], "&a")
+ end
+
+ def test_block_anonymous
+ assert_parameters([[:block, :&]], "&")
+ end
+
+ def test_forwarding
+ assert_parameters([[:rest, :*], [:keyrest, :**], [:block, :&]], "...")
+ end
+
+ private
+
+ def assert_parameters(expected, source)
+ eval("def self.m(#{source}); end")
+
+ begin
+ assert_equal(expected, method(:m).parameters)
+ assert_equal(expected, signature(source))
+ ensure
+ singleton_class.undef_method(:m)
+ end
+ end
+
+ def signature(source)
+ program = Prism.parse("def m(#{source}); end").value
+ program.statements.body.first.parameters.signature
+ end
+ end
+end
diff --git a/test/prism/parse_comments_test.rb b/test/prism/parse_comments_test.rb
new file mode 100644
index 0000000000..30086e3155
--- /dev/null
+++ b/test/prism/parse_comments_test.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class ParseCommentsTest < TestCase
+ def test_parse_comments
+ comments = Prism.parse_comments("# foo")
+
+ assert_kind_of Array, comments
+ assert_equal 1, comments.length
+ end
+
+ def test_parse_file_comments
+ comments = Prism.parse_file_comments(__FILE__)
+
+ assert_kind_of Array, comments
+ assert_equal 1, comments.length
+ end
+ end
+end
diff --git a/test/prism/parse_stream_test.rb b/test/prism/parse_stream_test.rb
new file mode 100644
index 0000000000..9e6347b92b
--- /dev/null
+++ b/test/prism/parse_stream_test.rb
@@ -0,0 +1,74 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+require "stringio"
+
+module Prism
+ class ParseStreamTest < TestCase
+ def test_single_line
+ io = StringIO.new("1 + 2")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_kind_of Prism::CallNode, result.value.statements.body.first
+ end
+
+ def test_multi_line
+ io = StringIO.new("1 + 2\n3 + 4")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_kind_of Prism::CallNode, result.value.statements.body.first
+ assert_kind_of Prism::CallNode, result.value.statements.body.last
+ end
+
+ def test_multi_read
+ io = StringIO.new("a" * 4096 * 4)
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_kind_of Prism::CallNode, result.value.statements.body.first
+ end
+
+ def test___END__
+ io = StringIO.new("1 + 2\n3 + 4\n__END__\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 2, result.value.statements.body.length
+ assert_equal "5 + 6", io.read
+ end
+
+ def test_false___END___in_string
+ io = StringIO.new("1 + 2\n3 + 4\n\"\n__END__\n\"\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+
+ def test_false___END___in_regexp
+ io = StringIO.new("1 + 2\n3 + 4\n/\n__END__\n/\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+
+ def test_false___END___in_list
+ io = StringIO.new("1 + 2\n3 + 4\n%w[\n__END__\n]\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+
+ def test_false___END___in_heredoc
+ io = StringIO.new("1 + 2\n3 + 4\n<<-EOF\n__END__\nEOF\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+ end
+end
diff --git a/test/prism/parse_test.rb b/test/prism/parse_test.rb
new file mode 100644
index 0000000000..afb53e0668
--- /dev/null
+++ b/test/prism/parse_test.rb
@@ -0,0 +1,371 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class ParseTest < TestCase
+ # A subclass of Ripper that extracts out magic comments.
+ class MagicCommentRipper < Ripper
+ attr_reader :magic_comments
+
+ def initialize(*)
+ super
+ @magic_comments = []
+ end
+
+ def on_magic_comment(key, value)
+ @magic_comments << [key, value]
+ super
+ end
+ end
+
+ # 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 = Prism.parse("")
+ assert_equal [], result.value.statements.body
+ end
+
+ def test_parse_takes_file_path
+ filepath = "filepath.rb"
+ result = Prism.parse("def foo; __FILE__; end", filepath: filepath)
+
+ assert_equal filepath, find_source_file_node(result.value).filepath
+ end
+
+ def test_parse_takes_line
+ line = 4
+ result = Prism.parse("def foo\n __FILE__\nend", line: line)
+
+ assert_equal line, result.value.location.start_line
+ assert_equal line + 1, find_source_file_node(result.value).location.start_line
+
+ result = Prism.parse_lex("def foo\n __FILE__\nend", line: line)
+ assert_equal line, result.value.first.location.start_line
+ end
+
+ def test_parse_takes_negative_lines
+ line = -2
+ result = Prism.parse("def foo\n __FILE__\nend", line: line)
+
+ assert_equal line, result.value.location.start_line
+ assert_equal line + 1, find_source_file_node(result.value).location.start_line
+
+ result = Prism.parse_lex("def foo\n __FILE__\nend", line: line)
+ assert_equal line, result.value.first.location.start_line
+ end
+
+ def test_parse_lex
+ node, tokens = Prism.parse_lex("def foo; end").value
+
+ assert_kind_of ProgramNode, node
+ assert_equal 5, tokens.length
+ end
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ def test_dump_file
+ assert_nothing_raised do
+ Prism.dump_file(__FILE__)
+ end
+
+ error = assert_raise Errno::ENOENT do
+ Prism.dump_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.dump_file(nil)
+ end
+ end
+ end
+
+ def test_lex_file
+ assert_nothing_raised do
+ Prism.lex_file(__FILE__)
+ end
+
+ error = assert_raise Errno::ENOENT do
+ Prism.lex_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.lex_file(nil)
+ end
+ end
+
+ def test_parse_lex_file
+ node, tokens = Prism.parse_lex_file(__FILE__).value
+
+ assert_kind_of ProgramNode, node
+ refute_empty tokens
+
+ error = assert_raise Errno::ENOENT do
+ Prism.parse_lex_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.parse_lex_file(nil)
+ end
+ end
+
+ def test_parse_file
+ node = Prism.parse_file(__FILE__).value
+ assert_kind_of ProgramNode, node
+
+ error = assert_raise Errno::ENOENT do
+ Prism.parse_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.parse_file(nil)
+ end
+ end
+
+ def test_parse_file_success
+ assert_predicate Prism.parse_file_comments(__FILE__), :any?
+
+ error = assert_raise Errno::ENOENT do
+ Prism.parse_file_comments("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.parse_file_comments(nil)
+ end
+ end
+
+ def test_parse_file_comments
+ assert_predicate Prism.parse_file_comments(__FILE__), :any?
+
+ error = assert_raise Errno::ENOENT do
+ Prism.parse_file_comments("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.parse_file_comments(nil)
+ end
+ 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[emoji_method_calls.txt 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_match = ripper_enabled
+ check_valid_syntax = RUBY_VERSION >= "3.2.0"
+
+ case relative
+ when "seattlerb/pct_w_heredoc_interp_nested.txt"
+ # 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 RUBY_VERSION < "3.3.0"
+ when "seattlerb/heredoc_nested.txt", "whitequark/dedenting_heredoc.txt"
+ # 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
+ when "spanning_heredoc.txt", "spanning_heredoc_newlines.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.
+ ripper_should_match = false
+ when "heredocs_leading_whitespace.txt"
+ # Ruby < 3.3.0 cannot parse heredocs where there are leading whitespace
+ # characters in the heredoc start.
+ # Example: <<~' EOF' or <<-' EOF'
+ # https://bugs.ruby-lang.org/issues/19539
+ if RUBY_VERSION < "3.3.0"
+ ripper_should_match = false
+ check_valid_syntax = false
+ end
+ end
+
+ 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)
+
+ # Make sure that the given source is valid syntax, otherwise we have an
+ # invalid fixture.
+ assert_valid_syntax(source) if check_valid_syntax
+
+ # Next, assert that there were no errors during parsing.
+ result = Prism.parse(source, filepath: 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
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ # Next, assert that the value can be serialized and deserialized
+ # without changing the shape of the tree.
+ assert_equal_nodes(result.value, Prism.load(source, Prism.dump(source, filepath: relative)).value)
+ end
+
+ # 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_match
+ # Finally, assert that we can lex the source and get the same tokens as
+ # Ripper.
+ lex_result = Prism.lex_compat(source)
+ assert_equal [], lex_result.errors
+ tokens = lex_result.value
+
+ begin
+ Prism.lex_ripper(source).zip(tokens).each do |(ripper, prism)|
+ assert_equal ripper, prism
+ end
+ rescue SyntaxError
+ raise ArgumentError, "Test file has invalid syntax #{filepath}"
+ end
+
+ # Next, check that we get the correct number of magic comments when
+ # lexing with ripper.
+ expected = MagicCommentRipper.new(source).tap(&:parse).magic_comments
+ actual = result.magic_comments
+
+ assert_equal expected.length, actual.length
+ expected.zip(actual).each do |(expected_key, expected_value), magic_comment|
+ assert_equal expected_key, magic_comment.key
+ assert_equal expected_value, magic_comment.value
+ end
+ end
+ end
+ end
+
+ Dir["*.txt", base: base].each do |relative|
+ next if relative == "newline_terminated.txt" || relative == "spanning_heredoc_newlines.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 = Prism.parse(snippet, filepath: relative)
+ assert_empty result.errors
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ assert_equal_nodes(result.value, Prism.load(snippet, Prism.dump(snippet, filepath: relative)).value)
+ end
+ 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/parser_test.rb b/test/prism/parser_test.rb
new file mode 100644
index 0000000000..79b65cf75b
--- /dev/null
+++ b/test/prism/parser_test.rb
@@ -0,0 +1,186 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+begin
+ verbose, $VERBOSE = $VERBOSE, nil
+ require "parser/ruby33"
+ require "prism/translation/parser33"
+rescue LoadError
+ # In CRuby's CI, we're not going to test against the parser gem because we
+ # don't want to have to install it. So in this case we'll just skip this test.
+ return
+ensure
+ $VERBOSE = verbose
+end
+
+# First, opt in to every AST feature.
+Parser::Builders::Default.modernize
+
+# Modify the source map == check so that it doesn't check against the node
+# itself so we don't get into a recursive loop.
+Parser::Source::Map.prepend(
+ Module.new {
+ def ==(other)
+ self.class == other.class &&
+ (instance_variables - %i[@node]).map do |ivar|
+ instance_variable_get(ivar) == other.instance_variable_get(ivar)
+ end.reduce(:&)
+ end
+ }
+)
+
+# Next, ensure that we're comparing the nodes and also comparing the source
+# ranges so that we're getting all of the necessary information.
+Parser::AST::Node.prepend(
+ Module.new {
+ def ==(other)
+ super && (location == other.location)
+ end
+ }
+)
+
+module Prism
+ class ParserTest < TestCase
+ base = File.join(__dir__, "fixtures")
+
+ # These files are erroring because of the parser gem being wrong.
+ skip_incorrect = [
+ "embdoc_no_newline_at_end.txt"
+ ]
+
+ # These files are either failing to parse or failing to translate, so we'll
+ # skip them for now.
+ skip_all = skip_incorrect | [
+ "dash_heredocs.txt",
+ "dos_endings.txt",
+ "heredocs_with_ignored_newlines.txt",
+ "regex.txt",
+ "regex_char_width.txt",
+ "spanning_heredoc.txt",
+ "spanning_heredoc_newlines.txt",
+ "unescaping.txt"
+ ]
+
+ # Not sure why these files are failing on JRuby, but skipping them for now.
+ if RUBY_ENGINE == "jruby"
+ skip_all.push("emoji_method_calls.txt", "symbols.txt")
+ end
+
+ # These files are failing to translate their lexer output into the lexer
+ # output expected by the parser gem, so we'll skip them for now.
+ skip_tokens = [
+ "comments.txt",
+ "heredoc_with_comment.txt",
+ "indented_file_end.txt",
+ "methods.txt",
+ "strings.txt",
+ "tilde_heredocs.txt",
+ "xstring_with_backslash.txt"
+ ]
+
+ Dir["*.txt", base: base].each do |name|
+ next if skip_all.include?(name)
+
+ define_method("test_#{name}") do
+ assert_equal_parses(File.join(base, name), compare_tokens: !skip_tokens.include?(name))
+ end
+ end
+
+ private
+
+ def assert_equal_parses(filepath, compare_tokens: true)
+ buffer = Parser::Source::Buffer.new(filepath, 1)
+ buffer.source = File.read(filepath)
+
+ parser = Parser::Ruby33.new
+ parser.diagnostics.consumer = ->(*) {}
+ parser.diagnostics.all_errors_are_fatal = true
+
+ expected_ast, expected_comments, expected_tokens =
+ begin
+ parser.tokenize(buffer)
+ rescue ArgumentError, Parser::SyntaxError
+ return
+ end
+
+ actual_ast, actual_comments, actual_tokens =
+ Prism::Translation::Parser33.new.tokenize(buffer)
+
+ assert_equal expected_ast, actual_ast, -> { assert_equal_asts_message(expected_ast, actual_ast) }
+ assert_equal_tokens(expected_tokens, actual_tokens) if compare_tokens
+ assert_equal_comments(expected_comments, actual_comments)
+ end
+
+ def assert_equal_asts_message(expected_ast, actual_ast)
+ queue = [[expected_ast, actual_ast]]
+
+ while (left, right = queue.shift)
+ if left.type != right.type
+ return "expected: #{left.type}\nactual: #{right.type}"
+ end
+
+ if left.location != right.location
+ return "expected:\n#{left.inspect}\n#{left.location.inspect}\nactual:\n#{right.inspect}\n#{right.location.inspect}"
+ end
+
+ if left.type == :str && left.children[0] != right.children[0]
+ return "expected: #{left.inspect}\nactual: #{right.inspect}"
+ end
+
+ left.children.zip(right.children).each do |left_child, right_child|
+ queue << [left_child, right_child] if left_child.is_a?(Parser::AST::Node)
+ end
+ end
+
+ "expected: #{expected_ast.inspect}\nactual: #{actual_ast.inspect}"
+ end
+
+ def assert_equal_tokens(expected_tokens, actual_tokens)
+ if expected_tokens != actual_tokens
+ expected_index = 0
+ actual_index = 0
+
+ while expected_index < expected_tokens.length
+ expected_token = expected_tokens[expected_index]
+ actual_token = actual_tokens[actual_index]
+
+ expected_index += 1
+ actual_index += 1
+
+ # The parser gem always has a space before a string end in list
+ # literals, but we don't. So we'll skip over the space.
+ if expected_token[0] == :tSPACE && actual_token[0] == :tSTRING_END
+ expected_index += 1
+ next
+ end
+
+ # There are a lot of tokens that have very specific meaning according
+ # to the context of the parser. We don't expose that information in
+ # prism, so we need to normalize these tokens a bit.
+ case actual_token[0]
+ when :kDO
+ actual_token[0] = expected_token[0] if %i[kDO_BLOCK kDO_LAMBDA].include?(expected_token[0])
+ when :tLPAREN
+ actual_token[0] = expected_token[0] if expected_token[0] == :tLPAREN2
+ when :tPOW
+ actual_token[0] = expected_token[0] if expected_token[0] == :tDSTAR
+ end
+
+ # Now we can assert that the tokens are actually equal.
+ assert_equal expected_token, actual_token, -> {
+ "expected: #{expected_token.inspect}\n" \
+ "actual: #{actual_token.inspect}"
+ }
+ end
+ end
+ end
+
+ def assert_equal_comments(expected_comments, actual_comments)
+ assert_equal expected_comments, actual_comments, -> {
+ "expected: #{expected_comments.inspect}\n" \
+ "actual: #{actual_comments.inspect}"
+ }
+ end
+ end
+end
diff --git a/test/prism/pattern_test.rb b/test/prism/pattern_test.rb
new file mode 100644
index 0000000000..e0aa079cb9
--- /dev/null
+++ b/test/prism/pattern_test.rb
@@ -0,0 +1,132 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ 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", "Prism::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 ["Prism::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)
+ Prism::Pattern.new(query).scan(Prism.parse(source).value).to_a
+ end
+ end
+end
diff --git a/test/prism/redundant_return_test.rb b/test/prism/redundant_return_test.rb
new file mode 100644
index 0000000000..c668169245
--- /dev/null
+++ b/test/prism/redundant_return_test.rb
@@ -0,0 +1,73 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class RedundantReturnTest < TestCase
+ def test_statements
+ assert_redundant_return("def foo; return; end")
+ refute_redundant_return("def foo; return; 1; end")
+ end
+
+ def test_begin_implicit
+ assert_redundant_return("def foo; return; rescue; end")
+ refute_redundant_return("def foo; return; 1; rescue; end")
+ refute_redundant_return("def foo; return; rescue; else; end")
+ end
+
+ def test_begin_explicit
+ assert_redundant_return("def foo; begin; return; rescue; end; end")
+ refute_redundant_return("def foo; begin; return; 1; rescue; end; end")
+ refute_redundant_return("def foo; begin; return; rescue; else; end; end")
+ end
+
+ def test_if
+ assert_redundant_return("def foo; return if bar; end")
+ end
+
+ def test_unless
+ assert_redundant_return("def foo; return unless bar; end")
+ end
+
+ def test_else
+ assert_redundant_return("def foo; if bar; baz; else; return; end; end")
+ end
+
+ def test_case_when
+ assert_redundant_return("def foo; case bar; when baz; return; end; end")
+ end
+
+ def test_case_else
+ assert_redundant_return("def foo; case bar; when baz; else; return; end; end")
+ end
+
+ def test_case_match_in
+ assert_redundant_return("def foo; case bar; in baz; return; end; end")
+ end
+
+ def test_case_match_else
+ assert_redundant_return("def foo; case bar; in baz; else; return; end; end")
+ end
+
+ private
+
+ def assert_redundant_return(source)
+ assert find_return(source).redundant?
+ end
+
+ def refute_redundant_return(source)
+ refute find_return(source).redundant?
+ end
+
+ def find_return(source)
+ queue = [Prism.parse(source).value]
+
+ while (current = queue.shift)
+ return current if current.is_a?(ReturnNode)
+ queue.concat(current.compact_child_nodes)
+ end
+
+ flunk "Could not find return node in #{node.inspect}"
+ end
+ end
+end
diff --git a/test/prism/reflection_test.rb b/test/prism/reflection_test.rb
new file mode 100644
index 0000000000..869b68b1f8
--- /dev/null
+++ b/test/prism/reflection_test.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class ReflectionTest < TestCase
+ def test_fields_for
+ fields = Reflection.fields_for(CallNode)
+ methods = CallNode.instance_methods(false)
+
+ fields.each do |field|
+ if field.is_a?(Reflection::FlagsField)
+ field.flags.each do |flag|
+ assert_includes methods, flag
+ end
+ else
+ assert_includes methods, field.name
+ end
+ end
+ end
+ end
+end
diff --git a/test/prism/regexp_test.rb b/test/prism/regexp_test.rb
new file mode 100644
index 0000000000..0a5fc2b4fc
--- /dev/null
+++ b/test/prism/regexp_test.rb
@@ -0,0 +1,263 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if Prism::BACKEND == :FFI
+
+module Prism
+ 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
+
+ def test_last_encoding_option_wins
+ regex = "/foo/nu"
+ option = Prism.parse(regex).value.statements.body.first.options
+
+ assert_equal Regexp::FIXEDENCODING, option
+
+ regex = "/foo/un"
+ option = Prism.parse(regex).value.statements.body.first.options
+
+ assert_equal Regexp::NOENCODING, option
+ end
+
+ private
+
+ def named_captures(source)
+ Debug.named_captures(source)
+ end
+
+ def options(flags)
+ options =
+ ["/foo/#{flags}", "/foo\#{1}/#{flags}"].map do |source|
+ Prism.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_test.rb b/test/prism/ripper_test.rb
new file mode 100644
index 0000000000..07238fc3d5
--- /dev/null
+++ b/test/prism/ripper_test.rb
@@ -0,0 +1,85 @@
+# frozen_string_literal: true
+
+return if RUBY_VERSION < "3.3"
+
+require_relative "test_helper"
+
+module Prism
+ class RipperTest < TestCase
+ base = File.join(__dir__, "fixtures")
+ relatives = ENV["FOCUS"] ? [ENV["FOCUS"]] : Dir["**/*.txt", base: base]
+
+ incorrect = [
+ # Ripper incorrectly attributes the block to the keyword.
+ "seattlerb/block_break.txt",
+ "seattlerb/block_next.txt",
+ "seattlerb/block_return.txt",
+ "whitequark/break_block.txt",
+ "whitequark/next_block.txt",
+ "whitequark/return_block.txt",
+
+ # Ripper is not accounting for locals created by patterns using the **
+ # operator within an `in` clause.
+ "seattlerb/parse_pattern_058.txt",
+
+ # Ripper cannot handle named capture groups in regular expressions.
+ "regex.txt",
+ "regex_char_width.txt",
+ "whitequark/lvar_injecting_match.txt",
+
+ # Ripper fails to understand some structures that span across heredocs.
+ "spanning_heredoc.txt"
+ ]
+
+ omitted = [
+ "dos_endings.txt",
+ "heredocs_with_ignored_newlines.txt",
+ "seattlerb/block_call_dot_op2_brace_block.txt",
+ "seattlerb/block_command_operation_colon.txt",
+ "seattlerb/block_command_operation_dot.txt",
+ "seattlerb/heredoc__backslash_dos_format.txt",
+ "seattlerb/heredoc_backslash_nl.txt",
+ "seattlerb/heredoc_nested.txt",
+ "seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt",
+ "tilde_heredocs.txt",
+ "unparser/corpus/semantic/dstr.txt",
+ "whitequark/dedenting_heredoc.txt",
+ "whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt",
+ "whitequark/parser_slash_slash_n_escaping_in_literals.txt",
+ "whitequark/send_block_chain_cmd.txt",
+ "whitequark/slash_newline_in_heredocs.txt"
+ ]
+
+ relatives.each do |relative|
+ # Skip the tests that Ripper is reporting the wrong results for.
+ next if incorrect.include?(relative)
+
+ # Skip the tests we haven't implemented yet.
+ next if omitted.include?(relative)
+
+ filepath = File.join(__dir__, "fixtures", relative)
+
+ define_method "test_ripper_#{relative}" do
+ source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
+
+ case relative
+ when /break|next|redo|if|unless|rescue|control|keywords|retry/
+ source = "-> do\nrescue\n#{source}\nend"
+ end
+
+ case source
+ when /^ *yield/
+ source = "def __invalid_yield__\n#{source}\nend"
+ end
+
+ assert_ripper(source)
+ end
+ end
+
+ private
+
+ def assert_ripper(source)
+ assert_equal Ripper.sexp_raw(source), Prism::Translation::Ripper.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..a1e2592d3d
--- /dev/null
+++ b/test/prism/ruby_api_test.rb
@@ -0,0 +1,307 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class RubyAPITest < TestCase
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ def test_ruby_api
+ filepath = __FILE__
+ source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
+
+ assert_equal Prism.lex(source, filepath: filepath).value, Prism.lex_file(filepath).value
+ assert_equal Prism.dump(source, filepath: filepath), Prism.dump_file(filepath)
+
+ serialized = Prism.dump(source, filepath: filepath)
+ ast1 = Prism.load(source, serialized).value
+ ast2 = Prism.parse(source, filepath: filepath).value
+ ast3 = Prism.parse_file(filepath).value
+
+ assert_equal_nodes ast1, ast2
+ assert_equal_nodes ast2, ast3
+ end
+ end
+
+ def test_parse_success?
+ assert Prism.parse_success?("1")
+ refute Prism.parse_success?("<>")
+ end
+
+ def test_parse_file_success?
+ assert Prism.parse_file_success?(__FILE__)
+ end
+
+ def test_options
+ assert_equal "", Prism.parse("__FILE__").value.statements.body[0].filepath
+ assert_equal "foo.rb", Prism.parse("__FILE__", filepath: "foo.rb").value.statements.body[0].filepath
+
+ assert_equal 1, Prism.parse("foo").value.statements.body[0].location.start_line
+ assert_equal 10, Prism.parse("foo", line: 10).value.statements.body[0].location.start_line
+
+ refute Prism.parse("\"foo\"").value.statements.body[0].frozen?
+ assert Prism.parse("\"foo\"", frozen_string_literal: true).value.statements.body[0].frozen?
+ refute Prism.parse("\"foo\"", frozen_string_literal: false).value.statements.body[0].frozen?
+
+ assert_kind_of Prism::CallNode, Prism.parse("foo").value.statements.body[0]
+ assert_kind_of Prism::LocalVariableReadNode, Prism.parse("foo", scopes: [[:foo]]).value.statements.body[0]
+ assert_equal 1, Prism.parse("foo", scopes: [[:foo], []]).value.statements.body[0].depth
+
+ assert_equal [:foo], Prism.parse("foo", scopes: [[:foo]]).value.locals
+ 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
+ assert_equal 0xFFr, parse_expression("0xFFr").value
+ assert_equal 0xFFri, parse_expression("0xFFri").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
+
+ def test_location_character_offsets
+ program = Prism.parse("😀 + 😀\n😍 ||= 😍").value
+
+ # first 😀
+ location = program.statements.body.first.receiver.location
+ assert_equal 0, location.start_character_offset
+ assert_equal 1, location.end_character_offset
+ assert_equal 0, location.start_character_column
+ assert_equal 1, location.end_character_column
+
+ # second 😀
+ location = program.statements.body.first.arguments.arguments.first.location
+ assert_equal 4, location.start_character_offset
+ assert_equal 5, location.end_character_offset
+ assert_equal 4, location.start_character_column
+ assert_equal 5, location.end_character_column
+
+ # first 😍
+ location = program.statements.body.last.name_loc
+ assert_equal 6, location.start_character_offset
+ assert_equal 7, location.end_character_offset
+ assert_equal 0, location.start_character_column
+ assert_equal 1, location.end_character_column
+
+ # second 😍
+ location = program.statements.body.last.value.location
+ assert_equal 12, location.start_character_offset
+ assert_equal 13, location.end_character_offset
+ assert_equal 6, location.start_character_column
+ assert_equal 7, location.end_character_column
+ end
+
+ def test_location_code_units
+ program = Prism.parse("😀 + 😀\n😍 ||= 😍").value
+
+ # first 😀
+ location = program.statements.body.first.receiver.location
+
+ assert_equal 0, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 0, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 0, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 1, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 2, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 1, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 2, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_32LE)
+
+ # second 😀
+ location = program.statements.body.first.arguments.arguments.first.location
+
+ assert_equal 4, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 5, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 4, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 5, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 7, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 5, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 4, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 5, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 4, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 5, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 7, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 5, location.end_code_units_column(Encoding::UTF_32LE)
+
+ # first 😍
+ location = program.statements.body.last.name_loc
+
+ assert_equal 6, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 8, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 6, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 7, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 10, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 7, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 2, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_32LE)
+
+ # second 😍
+ location = program.statements.body.last.value.location
+
+ assert_equal 12, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 15, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 12, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 13, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 17, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 13, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 6, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 7, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 6, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 7, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 9, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 7, location.end_code_units_column(Encoding::UTF_32LE)
+ end
+
+ def test_location_chop
+ location = Prism.parse("foo").value.location
+
+ assert_equal "fo", location.chop.slice
+ assert_equal "", location.chop.chop.chop.slice
+
+ # Check that we don't go negative.
+ 10.times { location = location.chop }
+ assert_equal "", location.slice
+ end
+
+ def test_location_slice_lines
+ result = Prism.parse("\nprivate def foo\nend\n")
+ method = result.value.statements.body.first.arguments.arguments.first
+
+ assert_equal "private def foo\nend\n", method.slice_lines
+ end
+
+ def test_heredoc?
+ refute parse_expression("\"foo\"").heredoc?
+ refute parse_expression("\"foo \#{1}\"").heredoc?
+ refute parse_expression("`foo`").heredoc?
+ refute parse_expression("`foo \#{1}`").heredoc?
+
+ assert parse_expression("<<~HERE\nfoo\nHERE\n").heredoc?
+ assert parse_expression("<<~HERE\nfoo \#{1}\nHERE\n").heredoc?
+ assert parse_expression("<<~`HERE`\nfoo\nHERE\n").heredoc?
+ assert parse_expression("<<~`HERE`\nfoo \#{1}\nHERE\n").heredoc?
+ end
+
+ # Through some bit hackery, we want to allow consumers to use the integer
+ # base flags as the base itself. It has a nice property that the current
+ # alignment provides them in the correct order. So here we test that our
+ # assumption holds so that it doesn't change out from under us.
+ #
+ # In C, this would look something like:
+ #
+ # ((flags & ~DECIMAL) << 1) || 10
+ #
+ # We have to do some other work in Ruby because 0 is truthy and ~ on an
+ # integer doesn't have a fixed width.
+ def test_integer_base_flags
+ base = -> (node) do
+ value = (node.send(:flags) & (0b1111 - IntegerBaseFlags::DECIMAL)) << 1
+ value == 0 ? 10 : value
+ end
+
+ assert_equal 2, base[parse_expression("0b1")]
+ assert_equal 8, base[parse_expression("0o1")]
+ assert_equal 10, base[parse_expression("0d1")]
+ assert_equal 16, base[parse_expression("0x1")]
+ end
+
+ def test_node_equality
+ assert_operator parse_expression("1"), :===, parse_expression("1")
+ assert_operator Prism.parse("1").value, :===, Prism.parse("1").value
+
+ complex_source = "class Something; @var = something.else { _1 }; end"
+ assert_operator parse_expression(complex_source), :===, parse_expression(complex_source)
+
+ refute_operator parse_expression("1"), :===, parse_expression("2")
+ refute_operator parse_expression("1"), :===, parse_expression("0x1")
+
+ complex_source_1 = "class Something; @var = something.else { _1 }; end"
+ complex_source_2 = "class Something; @var = something.else { _2 }; end"
+ refute_operator parse_expression(complex_source_1), :===, parse_expression(complex_source_2)
+ end
+
+ def test_node_tunnel
+ program = Prism.parse("foo(1) +\n bar(2, 3) +\n baz(3, 4, 5)").value
+
+ tunnel = program.tunnel(1, 4).last
+ assert_kind_of IntegerNode, tunnel
+ assert_equal 1, tunnel.value
+
+ tunnel = program.tunnel(2, 6).last
+ assert_kind_of IntegerNode, tunnel
+ assert_equal 2, tunnel.value
+
+ tunnel = program.tunnel(3, 9).last
+ assert_kind_of IntegerNode, tunnel
+ assert_equal 4, tunnel.value
+
+ tunnel = program.tunnel(3, 8)
+ assert_equal [ProgramNode, StatementsNode, CallNode, ArgumentsNode, CallNode, ArgumentsNode], tunnel.map(&:class)
+ end
+
+ def test_location_adjoin
+ program = Prism.parse("foo.bar = 1").value
+
+ location = program.statements.body.first.message_loc
+ adjoined = location.adjoin("=")
+
+ assert_kind_of Location, adjoined
+ refute_equal location, adjoined
+
+ assert_equal 4, adjoined.start_offset
+ assert_equal 9, adjoined.end_offset
+ end
+
+ private
+
+ def parse_expression(source)
+ Prism.parse(source).value.statements.body.first
+ end
+ end
+end
diff --git a/test/prism/ruby_parser_test.rb b/test/prism/ruby_parser_test.rb
new file mode 100644
index 0000000000..8edeac4b4f
--- /dev/null
+++ b/test/prism/ruby_parser_test.rb
@@ -0,0 +1,144 @@
+# frozen_string_literal: true
+
+return if RUBY_ENGINE == "jruby"
+
+require_relative "test_helper"
+
+begin
+ require "ruby_parser"
+rescue LoadError
+ # In CRuby's CI, we're not going to test against the ruby_parser gem because
+ # we don't want to have to install it. So in this case we'll just skip this
+ # test.
+ return
+end
+
+# We want to also compare lines and files to make sure we're setting them
+# correctly.
+Sexp.prepend(
+ Module.new do
+ def ==(other)
+ super && line == other.line && line_max == other.line_max && file == other.file
+ end
+ end
+)
+
+module Prism
+ class RubyParserTest < TestCase
+ base = File.join(__dir__, "fixtures")
+
+ todos = %w[
+ heredocs_nested.txt
+ newline_terminated.txt
+ regex_char_width.txt
+ seattlerb/bug169.txt
+ seattlerb/dstr_evstr.txt
+ seattlerb/heredoc_squiggly_interp.txt
+ seattlerb/masgn_colon3.txt
+ seattlerb/messy_op_asgn_lineno.txt
+ seattlerb/op_asgn_primary_colon_const_command_call.txt
+ seattlerb/parse_line_evstr_after_break.txt
+ seattlerb/regexp_esc_C_slash.txt
+ seattlerb/str_lit_concat_bad_encodings.txt
+ seattlerb/str_pct_nested_nested.txt
+ unescaping.txt
+ unparser/corpus/literal/kwbegin.txt
+ unparser/corpus/literal/send.txt
+ unparser/corpus/semantic/dstr.txt
+ whitequark/masgn_const.txt
+ whitequark/ruby_bug_12402.txt
+ whitequark/ruby_bug_14690.txt
+ whitequark/space_args_block.txt
+ whitequark/string_concat.txt
+ ]
+
+ # https://github.com/seattlerb/ruby_parser/issues/344
+ failures = %w[
+ alias.txt
+ dos_endings.txt
+ heredocs_with_ignored_newlines.txt
+ method_calls.txt
+ methods.txt
+ multi_write.txt
+ not.txt
+ patterns.txt
+ regex.txt
+ seattlerb/and_multi.txt
+ seattlerb/heredoc__backslash_dos_format.txt
+ seattlerb/heredoc_bad_hex_escape.txt
+ seattlerb/heredoc_bad_oct_escape.txt
+ seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
+ seattlerb/heredoc_with_extra_carriage_returns_windows.txt
+ seattlerb/heredoc_with_only_carriage_returns_windows.txt
+ seattlerb/heredoc_with_only_carriage_returns.txt
+ spanning_heredoc_newlines.txt
+ spanning_heredoc.txt
+ tilde_heredocs.txt
+ unparser/corpus/literal/literal.txt
+ while.txt
+ whitequark/class_definition_in_while_cond.txt
+ whitequark/cond_eflipflop.txt
+ whitequark/cond_iflipflop.txt
+ whitequark/cond_match_current_line.txt
+ whitequark/dedenting_heredoc.txt
+ whitequark/if_while_after_class__since_32.txt
+ whitequark/lvar_injecting_match.txt
+ whitequark/not.txt
+ whitequark/numparam_ruby_bug_19025.txt
+ whitequark/op_asgn_cmd.txt
+ whitequark/parser_bug_640.txt
+ whitequark/parser_slash_slash_n_escaping_in_literals.txt
+ whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
+ whitequark/pattern_matching_single_line.txt
+ whitequark/ruby_bug_11989.txt
+ whitequark/slash_newline_in_heredocs.txt
+ ]
+
+ Dir["**/*.txt", base: base].each do |name|
+ next if failures.include?(name)
+
+ define_method("test_#{name}") do
+ begin
+ # Parsing with ruby parser tends to be noisy with warnings, so we're
+ # turning those off.
+ previous_verbose, $VERBOSE = $VERBOSE, nil
+ assert_parse_file(base, name, todos.include?(name))
+ ensure
+ $VERBOSE = previous_verbose
+ end
+ end
+ end
+
+ private
+
+ def assert_parse_file(base, name, allowed_failure)
+ filepath = File.join(base, name)
+ expected = ::RubyParser.new.parse(File.read(filepath), filepath)
+ actual = Prism::Translation::RubyParser.parse_file(filepath)
+
+ if !allowed_failure
+ assert_equal_nodes expected, actual
+ elsif expected == actual
+ puts "#{name} now passes"
+ end
+ end
+
+ def assert_equal_nodes(left, right)
+ return if left == right
+
+ if left.is_a?(Sexp) && right.is_a?(Sexp)
+ if left.line != right.line
+ assert_equal "(#{left.inspect} line=#{left.line})", "(#{right.inspect} line=#{right.line})"
+ elsif left.file != right.file
+ assert_equal "(#{left.inspect} file=#{left.file})", "(#{right.inspect} file=#{right.file})"
+ elsif left.length != right.length
+ assert_equal "(#{left.inspect} length=#{left.length})", "(#{right.inspect} length=#{right.length})"
+ else
+ left.zip(right).each { |l, r| assert_equal_nodes(l, r) }
+ end
+ else
+ assert_equal left, right
+ end
+ end
+ end
+end
diff --git a/test/prism/snapshots/alias.txt b/test/prism/snapshots/alias.txt
new file mode 100644
index 0000000000..a952e96f67
--- /dev/null
+++ b/test/prism/snapshots/alias.txt
@@ -0,0 +1,194 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: frozen
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (7,14)-(7,15) = "}"
+ │ │ └── closing_loc: (7,15)-(7,16) = "\""
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (7,17)-(7,23))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ └── name: :$'
+ │ └── keyword_loc: (9,0)-(9,5) = "alias"
+ ├── @ AliasMethodNode (location: (11,0)-(11,13))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (11,6)-(11,9))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (11,6)-(11,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (11,10)-(11,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (15,6)-(15,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (15,10)-(15,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (17,6)-(17,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (17,10)-(17,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (19,6)-(19,7) = ":"
+ │ │ ├── value_loc: (19,7)-(19,9) = "=="
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "=="
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (19,10)-(19,15))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (21,6)-(21,7) = "A"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "A"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (21,8)-(21,9))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..c8a31c3d70
--- /dev/null
+++ b/test/prism/snapshots/arithmetic.txt
@@ -0,0 +1,255 @@
+@ ProgramNode (location: (1,0)-(13,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,8))
+ └── body: (length: 7)
+ ├── @ CallNode (location: (1,0)-(1,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,5)-(1,8) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (1,4)-(1,5) = "!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,4))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (3,1)-(3,4))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (3,1)-(3,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :-@
+ │ │ ├── message_loc: (3,0)-(3,1) = "-"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :*
+ │ ├── message_loc: (3,4)-(3,5) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,5)-(3,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,5)-(3,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,5)-(3,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,4))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (5,1)-(5,4))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (5,1)-(5,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+@
+ │ │ ├── message_loc: (5,0)-(5,1) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :**
+ │ ├── message_loc: (5,4)-(5,6) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (5,6)-(5,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (5,6)-(5,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(7,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,4)-(7,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,4)-(7,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (7,5)-(7,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (7,5)-(7,8) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :~
+ │ │ ├── message_loc: (7,4)-(7,5) = "~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (9,0)-(9,17))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,10))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (9,0)-(9,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :<<
+ │ │ ├── message_loc: (9,4)-(9,6) = "<<"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,7)-(9,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (9,7)-(9,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (9,7)-(9,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<<
+ │ ├── message_loc: (9,11)-(9,13) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,14)-(9,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (9,14)-(9,17))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (9,14)-(9,17) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (11,0)-(11,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,1)-(11,5))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (11,1)-(11,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :**
+ │ │ ├── message_loc: (11,2)-(11,4) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :-@
+ │ ├── message_loc: (11,0)-(11,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (13,0)-(13,8))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (13,0)-(13,2))
+ │ ├── flags: decimal
+ │ └── value: -1
+ ├── call_operator_loc: (13,2)-(13,3) = "."
+ ├── name: :zero?
+ ├── message_loc: (13,3)-(13,8) = "zero?"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/arrays.txt b/test/prism/snapshots/arrays.txt
new file mode 100644
index 0000000000..90a4d8f3bb
--- /dev/null
+++ b/test/prism/snapshots/arrays.txt
@@ -0,0 +1,1837 @@
+@ ProgramNode (location: (1,0)-(122,32))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(122,32))
+ └── body: (length: 50)
+ ├── @ ArrayNode (location: (1,0)-(1,4))
+ │ ├── flags: contains_splat
+ │ ├── elements: (length: 1)
+ │ │ └── @ SplatNode (location: (1,1)-(1,3))
+ │ │ ├── operator_loc: (1,1)-(1,2) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,3)-(1,4) = "]"
+ ├── @ CallNode (location: (3,0)-(3,23))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (3,3)-(3,13) = "[bar, baz]"
+ │ ├── opening_loc: (3,3)-(3,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,23))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ CallNode (location: (3,4)-(3,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (3,4)-(3,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── @ CallNode (location: (3,9)-(3,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (3,9)-(3,12) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ ArrayNode (location: (3,16)-(3,23))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (3,16)-(3,17))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (3,19)-(3,20))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (3,22)-(3,23))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── closing_loc: (3,12)-(3,13) = "]"
+ │ └── block: ∅
+ ├── @ ArrayNode (location: (5,0)-(5,13))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (5,1)-(5,12))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,1)-(5,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,1)-(5,3))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (5,1)-(5,2) = "a"
+ │ │ │ ├── closing_loc: (5,2)-(5,3) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ ArrayNode (location: (5,4)-(5,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (5,5)-(5,7))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (5,5)-(5,6) = ":"
+ │ │ │ │ │ ├── value_loc: (5,6)-(5,7) = "b"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ └── @ SymbolNode (location: (5,9)-(5,11))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 5)
+ │ │ ├── @ SymbolNode (location: (9,1)-(9,3))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (9,1)-(9,2) = ":"
+ │ │ │ ├── value_loc: (9,2)-(9,3) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (9,5)-(9,7))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (9,5)-(9,6) = ":"
+ │ │ │ ├── value_loc: (9,6)-(9,7) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── @ SymbolNode (location: (10,0)-(10,2))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── @ SymbolNode (location: (14,0)-(14,2))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 5)
+ │ │ ├── @ SymbolNode (location: (18,1)-(18,3))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (18,1)-(18,2) = ":"
+ │ │ │ ├── value_loc: (18,2)-(18,3) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (18,5)-(18,7))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (18,5)-(18,6) = ":"
+ │ │ │ ├── value_loc: (18,6)-(18,7) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── @ SymbolNode (location: (19,0)-(19,2))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── @ SymbolNode (location: (23,0)-(23,2))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (28,1)-(28,11))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (28,1)-(28,11))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (28,1)-(28,4))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (28,1)-(28,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (28,8)-(28,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (28,8)-(28,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (28,5)-(28,7) = "=>"
+ │ ├── opening_loc: (28,0)-(28,1) = "["
+ │ └── closing_loc: (28,11)-(28,12) = "]"
+ ├── @ CallNode (location: (30,0)-(30,19))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (30,0)-(30,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]
+ │ │ ├── message_loc: (30,3)-(30,8) = "[bar]"
+ │ │ ├── opening_loc: (30,3)-(30,4) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (30,4)-(30,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (30,4)-(30,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (30,4)-(30,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (30,7)-(30,8) = "]"
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (30,8)-(30,13) = "[baz]"
+ │ ├── opening_loc: (30,8)-(30,9) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (30,9)-(30,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (30,9)-(30,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (30,9)-(30,12) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (30,16)-(30,19))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :qux
+ │ │ ├── message_loc: (30,16)-(30,19) = "qux"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (30,12)-(30,13) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (32,0)-(32,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (32,0)-(32,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (32,0)-(32,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (32,0)-(32,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]
+ │ │ ├── message_loc: (32,3)-(32,8) = "[bar]"
+ │ │ ├── opening_loc: (32,3)-(32,4) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (32,4)-(32,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (32,4)-(32,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (32,4)-(32,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (32,7)-(32,8) = "]"
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (32,8)-(32,13) = "[baz]"
+ │ ├── opening_loc: (32,8)-(32,9) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (32,9)-(32,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (32,9)-(32,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (32,9)-(32,12) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (32,12)-(32,13) = "]"
+ │ └── block: ∅
+ ├── @ ArrayNode (location: (34,0)-(35,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (34,0)-(34,1) = "["
+ │ └── closing_loc: (35,0)-(35,1) = "]"
+ ├── @ CallNode (location: (37,0)-(37,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (37,0)-(37,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (37,0)-(37,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (37,3)-(37,13) = "[bar, baz]"
+ │ ├── opening_loc: (37,3)-(37,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,4)-(37,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (37,4)-(37,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (37,4)-(37,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (37,9)-(37,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (37,9)-(37,12) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (37,12)-(37,13) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (39,0)-(39,19))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (39,0)-(39,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (39,0)-(39,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (39,3)-(39,13) = "[bar, baz]"
+ │ ├── opening_loc: (39,3)-(39,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,4)-(39,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ CallNode (location: (39,4)-(39,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (39,4)-(39,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── @ CallNode (location: (39,9)-(39,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (39,9)-(39,12) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (39,16)-(39,19))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :qux
+ │ │ ├── message_loc: (39,16)-(39,19) = "qux"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (39,12)-(39,13) = "]"
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (41,0)-(41,21))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ IndexTargetNode (location: (41,0)-(41,6))
+ │ │ │ ├── flags: attribute_write
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (41,3)-(41,4) = "["
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (41,4)-(41,5))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (41,4)-(41,5))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 0
+ │ │ │ ├── closing_loc: (41,5)-(41,6) = "]"
+ │ │ │ └── block: ∅
+ │ │ └── @ IndexTargetNode (location: (41,8)-(41,14))
+ │ │ ├── flags: attribute_write
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (41,8)-(41,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (41,8)-(41,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (41,11)-(41,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (41,12)-(41,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (41,12)-(41,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 0
+ │ │ ├── closing_loc: (41,13)-(41,14) = "]"
+ │ │ └── block: ∅
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (41,15)-(41,16) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (41,17)-(41,21))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (41,17)-(41,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (41,20)-(41,21))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ CallNode (location: (43,0)-(43,19))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (43,0)-(43,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (43,0)-(43,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (43,3)-(43,19) = "[bar[baz] = qux]"
+ │ ├── opening_loc: (43,3)-(43,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (43,4)-(43,18))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (43,4)-(43,18))
+ │ │ ├── flags: attribute_write
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (43,4)-(43,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (43,4)-(43,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]=
+ │ │ ├── message_loc: (43,7)-(43,12) = "[baz]"
+ │ │ ├── opening_loc: (43,7)-(43,8) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (43,8)-(43,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ CallNode (location: (43,8)-(43,11))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (43,8)-(43,11) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── @ CallNode (location: (43,15)-(43,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :qux
+ │ │ │ ├── message_loc: (43,15)-(43,18) = "qux"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (43,11)-(43,12) = "]"
+ │ │ └── block: ∅
+ │ ├── closing_loc: (43,18)-(43,19) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (45,0)-(45,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (45,0)-(45,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (45,3)-(45,8) = "[bar]"
+ │ ├── opening_loc: (45,3)-(45,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,4)-(45,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (45,4)-(45,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (45,4)-(45,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (45,7)-(45,8) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (47,0)-(47,14))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (47,0)-(47,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (47,3)-(47,8) = "[bar]"
+ │ ├── opening_loc: (47,3)-(47,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (47,4)-(47,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (47,4)-(47,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (47,4)-(47,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (47,11)-(47,14))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (47,11)-(47,14) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (47,7)-(47,8) = "]"
+ │ └── block: ∅
+ ├── @ ArrayNode (location: (49,0)-(49,6))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (49,1)-(49,5))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (51,1)-(51,5))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (51,1)-(51,5))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (51,3)-(51,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :kw
+ │ │ │ ├── message_loc: (51,3)-(51,5) = "kw"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (51,1)-(51,3) = "**"
+ │ ├── opening_loc: (51,0)-(51,1) = "["
+ │ └── closing_loc: (51,5)-(51,6) = "]"
+ ├── @ ArrayNode (location: (53,0)-(53,9))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (53,1)-(53,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ KeywordHashNode (location: (53,4)-(53,8))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (53,4)-(53,8))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (53,6)-(53,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :kw
+ │ │ │ ├── message_loc: (53,6)-(53,8) = "kw"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (53,4)-(53,6) = "**"
+ │ ├── opening_loc: (53,0)-(53,1) = "["
+ │ └── closing_loc: (53,8)-(53,9) = "]"
+ ├── @ ArrayNode (location: (55,0)-(55,21))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (55,1)-(55,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ KeywordHashNode (location: (55,4)-(55,20))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 3)
+ │ │ ├── @ AssocSplatNode (location: (55,4)-(55,8))
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (55,6)-(55,8))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :kw
+ │ │ │ │ ├── message_loc: (55,6)-(55,8) = "kw"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :kw
+ │ │ │ ├── message_loc: (55,18)-(55,20) = "kw"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (55,16)-(55,18) = "**"
+ │ ├── opening_loc: (55,0)-(55,1) = "["
+ │ └── closing_loc: (55,20)-(55,21) = "]"
+ ├── @ ArrayNode (location: (57,0)-(59,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (58,2)-(58,12))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (58,2)-(58,12))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (58,2)-(58,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (58,2)-(58,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (58,9)-(58,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (58,9)-(58,12) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (58,6)-(58,8) = "=>"
+ │ ├── opening_loc: (57,0)-(57,1) = "["
+ │ └── closing_loc: (59,0)-(59,1) = "]"
+ ├── @ ArrayNode (location: (62,0)-(62,17))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (62,3)-(62,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (62,3)-(62,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ SymbolNode (location: (62,7)-(62,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (62,7)-(62,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ SymbolNode (location: (62,11)-(62,16))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (69,3)-(69,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (69,3)-(69,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ SymbolNode (location: (69,7)-(69,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (69,7)-(69,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ SymbolNode (location: (69,11)-(69,16))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (76,3)-(76,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (76,3)-(76,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ SymbolNode (location: (76,7)-(76,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (76,7)-(76,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ SymbolNode (location: (76,11)-(76,16))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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) = "]"
+ ├── @ IndexOperatorWriteNode (location: (84,0)-(84,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (84,0)-(84,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (84,0)-(84,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (84,3)-(84,4) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (84,4)-(84,5) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (84,6)-(84,8) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (84,9)-(84,10))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexOrWriteNode (location: (86,0)-(86,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (86,0)-(86,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (86,0)-(86,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (86,3)-(86,4) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (86,4)-(86,5) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (86,6)-(86,9) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (86,10)-(86,11))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexAndWriteNode (location: (88,0)-(88,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (88,0)-(88,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (88,0)-(88,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (88,3)-(88,4) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (88,4)-(88,5) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (88,6)-(88,9) = "&&="
+ │ └── value:
+ │ @ IntegerNode (location: (88,10)-(88,11))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexOperatorWriteNode (location: (90,0)-(90,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (90,0)-(90,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (90,0)-(90,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (90,0)-(90,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (90,3)-(90,4) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (90,4)-(90,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (90,7)-(90,8) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (90,8)-(90,9) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (90,10)-(90,12) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (90,13)-(90,14))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexOrWriteNode (location: (92,0)-(92,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (92,0)-(92,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (92,0)-(92,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (92,0)-(92,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (92,3)-(92,4) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (92,4)-(92,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (92,7)-(92,8) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (92,8)-(92,9) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (92,10)-(92,13) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (92,14)-(92,15))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexAndWriteNode (location: (94,0)-(94,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (94,0)-(94,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (94,0)-(94,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (94,0)-(94,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (94,3)-(94,4) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (94,4)-(94,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (94,7)-(94,8) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (94,8)-(94,9) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (94,10)-(94,13) = "&&="
+ │ └── value:
+ │ @ IntegerNode (location: (94,14)-(94,15))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexOperatorWriteNode (location: (96,0)-(96,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (96,0)-(96,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (96,0)-(96,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (96,3)-(96,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (96,4)-(96,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (96,4)-(96,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (96,4)-(96,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (96,7)-(96,8) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (96,9)-(96,11) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (96,12)-(96,13))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexOrWriteNode (location: (98,0)-(98,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (98,0)-(98,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (98,0)-(98,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (98,3)-(98,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (98,4)-(98,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (98,4)-(98,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (98,4)-(98,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (98,7)-(98,8) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (98,9)-(98,12) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (98,13)-(98,14))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexAndWriteNode (location: (100,0)-(100,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (100,0)-(100,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (100,0)-(100,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (100,3)-(100,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (100,4)-(100,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (100,4)-(100,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (100,4)-(100,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (100,7)-(100,8) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (100,9)-(100,12) = "&&="
+ │ └── value:
+ │ @ IntegerNode (location: (100,13)-(100,14))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexOperatorWriteNode (location: (102,0)-(102,17))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (102,0)-(102,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (102,0)-(102,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (102,0)-(102,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (102,3)-(102,4) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (102,4)-(102,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (102,7)-(102,8) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (102,8)-(102,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (102,8)-(102,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (102,8)-(102,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (102,11)-(102,12) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (102,13)-(102,15) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (102,16)-(102,17))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexOrWriteNode (location: (104,0)-(104,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (104,0)-(104,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (104,0)-(104,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (104,0)-(104,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (104,3)-(104,4) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (104,4)-(104,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (104,7)-(104,8) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (104,8)-(104,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (104,8)-(104,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (104,8)-(104,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (104,11)-(104,12) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (104,13)-(104,16) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (104,17)-(104,18))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IndexAndWriteNode (location: (106,0)-(106,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (106,0)-(106,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (106,0)-(106,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (106,0)-(106,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (106,3)-(106,4) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (106,4)-(106,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (106,7)-(106,8) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (106,8)-(106,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (106,8)-(106,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (106,8)-(106,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (106,11)-(106,12) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (106,13)-(106,16) = "&&="
+ │ └── value:
+ │ @ IntegerNode (location: (106,17)-(106,18))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ DefNode (location: (108,0)-(108,19))
+ │ ├── name: :f
+ │ ├── name_loc: (108,4)-(108,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (108,6)-(108,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (108,6)-(108,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (108,6)-(108,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (108,10)-(108,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (108,10)-(108,14))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (108,10)-(108,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (108,10)-(108,11) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]
+ │ │ ├── message_loc: (108,11)-(108,14) = "[*]"
+ │ │ ├── opening_loc: (108,11)-(108,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (108,12)-(108,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SplatNode (location: (108,12)-(108,13))
+ │ │ │ ├── operator_loc: (108,12)-(108,13) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── closing_loc: (108,13)-(108,14) = "]"
+ │ │ └── block: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (108,0)-(108,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (108,5)-(108,6) = "("
+ │ ├── rparen_loc: (108,7)-(108,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (108,16)-(108,19) = "end"
+ ├── @ DefNode (location: (110,0)-(110,22))
+ │ ├── name: :f
+ │ ├── name_loc: (110,4)-(110,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (110,6)-(110,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (110,6)-(110,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (110,6)-(110,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (110,10)-(110,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (110,10)-(110,17))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (110,10)-(110,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (110,10)-(110,11) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]
+ │ │ ├── message_loc: (110,11)-(110,17) = "[1, *]"
+ │ │ ├── opening_loc: (110,11)-(110,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (110,12)-(110,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (110,12)-(110,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ SplatNode (location: (110,15)-(110,16))
+ │ │ │ ├── operator_loc: (110,15)-(110,16) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── closing_loc: (110,16)-(110,17) = "]"
+ │ │ └── block: ∅
+ │ ├── 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,19)-(110,22) = "end"
+ ├── @ DefNode (location: (112,0)-(112,23))
+ │ ├── name: :f
+ │ ├── name_loc: (112,4)-(112,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (112,6)-(112,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (112,6)-(112,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (112,6)-(112,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (112,10)-(112,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (112,10)-(112,18))
+ │ │ ├── flags: attribute_write
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (112,10)-(112,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (112,10)-(112,11) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]=
+ │ │ ├── message_loc: (112,11)-(112,14) = "[*]"
+ │ │ ├── opening_loc: (112,11)-(112,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (112,12)-(112,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ SplatNode (location: (112,12)-(112,13))
+ │ │ │ │ ├── operator_loc: (112,12)-(112,13) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ └── @ IntegerNode (location: (112,17)-(112,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: (112,13)-(112,14) = "]"
+ │ │ └── block: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (112,0)-(112,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (112,5)-(112,6) = "("
+ │ ├── rparen_loc: (112,7)-(112,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (112,20)-(112,23) = "end"
+ ├── @ DefNode (location: (114,0)-(114,26))
+ │ ├── name: :f
+ │ ├── name_loc: (114,4)-(114,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (114,6)-(114,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (114,6)-(114,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (114,6)-(114,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (114,10)-(114,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (114,10)-(114,21))
+ │ │ ├── flags: attribute_write
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (114,10)-(114,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (114,10)-(114,11) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]=
+ │ │ ├── message_loc: (114,11)-(114,17) = "[1, *]"
+ │ │ ├── opening_loc: (114,11)-(114,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (114,12)-(114,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (114,12)-(114,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ SplatNode (location: (114,15)-(114,16))
+ │ │ │ │ ├── operator_loc: (114,15)-(114,16) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ └── @ IntegerNode (location: (114,20)-(114,21))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: (114,16)-(114,17) = "]"
+ │ │ └── block: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (114,0)-(114,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (114,5)-(114,6) = "("
+ │ ├── rparen_loc: (114,7)-(114,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (114,23)-(114,26) = "end"
+ ├── @ DefNode (location: (116,0)-(116,24))
+ │ ├── name: :f
+ │ ├── name_loc: (116,4)-(116,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (116,6)-(116,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (116,6)-(116,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (116,6)-(116,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (116,10)-(116,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IndexOperatorWriteNode (location: (116,10)-(116,19))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (116,10)-(116,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (116,10)-(116,11) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── opening_loc: (116,11)-(116,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (116,12)-(116,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SplatNode (location: (116,12)-(116,13))
+ │ │ │ ├── operator_loc: (116,12)-(116,13) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── closing_loc: (116,13)-(116,14) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── binary_operator: :+
+ │ │ ├── binary_operator_loc: (116,15)-(116,17) = "+="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (116,18)-(116,19))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (116,0)-(116,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (116,5)-(116,6) = "("
+ │ ├── rparen_loc: (116,7)-(116,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (116,21)-(116,24) = "end"
+ ├── @ DefNode (location: (118,0)-(118,28))
+ │ ├── name: :f
+ │ ├── name_loc: (118,4)-(118,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (118,6)-(118,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (118,6)-(118,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (118,6)-(118,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (118,10)-(118,23))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IndexAndWriteNode (location: (118,10)-(118,23))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (118,10)-(118,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (118,10)-(118,11) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── opening_loc: (118,11)-(118,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (118,12)-(118,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (118,12)-(118,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ SplatNode (location: (118,15)-(118,16))
+ │ │ │ ├── operator_loc: (118,15)-(118,16) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── closing_loc: (118,16)-(118,17) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── operator_loc: (118,18)-(118,21) = "&&="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (118,22)-(118,23))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (118,0)-(118,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (118,5)-(118,6) = "("
+ │ ├── rparen_loc: (118,7)-(118,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (118,25)-(118,28) = "end"
+ ├── @ DefNode (location: (120,0)-(120,29))
+ │ ├── name: :f
+ │ ├── name_loc: (120,4)-(120,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (120,6)-(120,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (120,6)-(120,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (120,6)-(120,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (120,0)-(120,29))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (120,10)-(120,24))
+ │ │ │ ├── keyword_loc: (120,10)-(120,16) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: (120,17)-(120,19) = "=>"
+ │ │ │ ├── reference:
+ │ │ │ │ @ IndexTargetNode (location: (120,20)-(120,24))
+ │ │ │ │ ├── flags: attribute_write
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (120,20)-(120,21))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ ├── message_loc: (120,20)-(120,21) = "a"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── opening_loc: (120,21)-(120,22) = "["
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (120,22)-(120,23))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ SplatNode (location: (120,22)-(120,23))
+ │ │ │ │ │ ├── operator_loc: (120,22)-(120,23) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ ├── closing_loc: (120,23)-(120,24) = "]"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (120,26)-(120,29) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (120,0)-(120,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (120,5)-(120,6) = "("
+ │ ├── rparen_loc: (120,7)-(120,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (120,26)-(120,29) = "end"
+ └── @ DefNode (location: (122,0)-(122,32))
+ ├── name: :f
+ ├── name_loc: (122,4)-(122,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (122,6)-(122,7))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (122,6)-(122,7))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (122,6)-(122,7) = "*"
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ BeginNode (location: (122,0)-(122,32))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (122,10)-(122,27))
+ │ │ ├── keyword_loc: (122,10)-(122,16) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: (122,17)-(122,19) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ IndexTargetNode (location: (122,20)-(122,27))
+ │ │ │ ├── flags: attribute_write
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (122,20)-(122,21))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (122,20)-(122,21) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (122,21)-(122,22) = "["
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (122,22)-(122,26))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (122,22)-(122,23))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ SplatNode (location: (122,25)-(122,26))
+ │ │ │ │ ├── operator_loc: (122,25)-(122,26) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── closing_loc: (122,26)-(122,27) = "]"
+ │ │ │ └── block: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (122,29)-(122,32) = "end"
+ ├── 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: (122,29)-(122,32) = "end"
diff --git a/test/prism/snapshots/begin_ensure.txt b/test/prism/snapshots/begin_ensure.txt
new file mode 100644
index 0000000000..9af9b9e573
--- /dev/null
+++ b/test/prism/snapshots/begin_ensure.txt
@@ -0,0 +1,251 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (4,0)-(4,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (7,7)-(7,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (7,18)-(7,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (9,6)-(9,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (10,8)-(10,9) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (13,6)-(13,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (13,16)-(13,17) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ SymbolNode (location: (15,11)-(15,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (15,11)-(15,12) = ":"
+ │ │ │ ├── value_loc: (15,12)-(15,13) = "s"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "s"
+ │ │ ├── call_operator_loc: (15,13)-(15,14) = "."
+ │ │ ├── name: :l
+ │ │ ├── message_loc: (15,14)-(15,15) = "l"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,16)-(21,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ ConstantReadNode (location: (15,29)-(15,35))
+ │ │ │ │ │ │ └── name: :Module
+ │ │ │ │ │ ├── call_operator_loc: (15,35)-(15,36) = "."
+ │ │ │ │ │ ├── name: :new
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ │ │ │ @ ConstantReadNode (location: (18,11)-(18,17))
+ │ │ │ │ │ │ │ │ │ └── name: :Module
+ │ │ │ │ │ │ │ │ ├── call_operator_loc: (18,17)-(18,18) = "."
+ │ │ │ │ │ │ │ │ ├── name: :new
+ │ │ │ │ │ │ │ │ ├── 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"
+ │ │ │ │ │ │ │ └── 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"
+ │ │ │ │ └── end_keyword_loc: (21,4)-(21,7) = "end"
+ │ │ │ └── end_keyword_loc: (21,4)-(21,7) = "end"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..f624f85c07
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,7)-(1,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,18)-(1,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (1,27)-(1,28) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (3,7)-(3,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (3,18)-(3,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (3,27)-(3,28) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (3,38)-(3,39) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (9,7)-(9,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (11,6)-(11,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (14,6)-(14,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (19,0)-(19,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (21,0)-(21,1) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (23,0)-(23,1) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (27,2)-(27,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (29,2)-(29,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (31,2)-(31,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (35,2)-(35,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (39,2)-(39,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (45,0)-(45,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (47,0)-(47,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (50,6)-(50,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (50,15)-(50,16) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (53,0)-(53,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (54,0)-(54,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (57,0)-(57,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (59,0)-(59,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (63,0)-(63,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (65,0)-(65,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (69,2)-(69,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (71,2)-(71,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (75,2)-(75,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (77,2)-(77,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..1c996ebd09
--- /dev/null
+++ b/test/prism/snapshots/blocks.txt
@@ -0,0 +1,774 @@
+@ ProgramNode (location: (1,0)-(54,17))
+├── locals: [:fork]
+└── statements:
+ @ StatementsNode (location: (1,0)-(54,17))
+ └── body: (length: 20)
+ ├── @ CallNode (location: (1,0)-(1,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (1,3)-(1,8) = "[bar]"
+ │ ├── opening_loc: (1,3)-(1,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (1,11)-(1,14) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,9)-(1,10) = "{"
+ │ └── closing_loc: (1,15)-(1,16) = "}"
+ ├── @ CallNode (location: (3,0)-(5,3))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (3,3)-(3,8) = "[bar]"
+ │ ├── opening_loc: (3,3)-(3,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,4)-(3,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,4)-(3,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (4,0)-(4,3) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (3,9)-(3,11) = "do"
+ │ └── closing_loc: (5,0)-(5,3) = "end"
+ ├── @ CallNode (location: (7,0)-(7,35))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :x
+ │ │ ├── message_loc: (7,0)-(7,1) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (7,1)-(7,2) = "."
+ │ ├── name: :reduce
+ │ ├── message_loc: (7,2)-(7,8) = "reduce"
+ │ ├── opening_loc: (7,8)-(7,9) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,9)-(7,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,9)-(7,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :x
+ │ │ │ │ └── @ RequiredParameterNode (location: (7,18)-(7,22))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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"
+ │ │ ├── binary_operator_loc: (7,29)-(7,31) = "+="
+ │ │ ├── value:
+ │ │ │ @ LocalVariableReadNode (location: (7,32)-(7,33))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── name: :memo
+ │ │ ├── binary_operator: :+
+ │ │ └── depth: 0
+ │ ├── opening_loc: (7,12)-(7,13) = "{"
+ │ └── closing_loc: (7,34)-(7,35) = "}"
+ ├── @ CallNode (location: (9,0)-(9,10))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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"
+ ├── @ CallNode (location: (11,0)-(11,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (11,4)-(11,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (11,4)-(11,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ ParenthesesNode (location: (11,9)-(11,21))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (11,10)-(11,20))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (11,10)-(11,20))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── 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"
+ │ │ ├── opening_loc: (11,9)-(11,10) = "("
+ │ │ └── closing_loc: (11,20)-(11,21) = ")"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (13,0)-(13,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,4)-(13,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (13,4)-(13,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (13,4)-(13,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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"
+ ├── @ CallNode (location: (15,0)-(15,18))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (15,0)-(15,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,4)-(15,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (15,4)-(15,11))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (15,4)-(15,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,8)-(15,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (15,8)-(15,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (15,8)-(15,11) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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"
+ ├── @ CallNode (location: (17,0)-(18,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (17,8)-(17,9) = "a"
+ │ │ │ │ ├── operator_loc: (17,10)-(17,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (17,12)-(17,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (17,12)-(17,13))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── message_loc: (17,12)-(17,13) = "b"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :[]
+ │ │ │ │ ├── message_loc: (17,13)-(17,16) = "[1]"
+ │ │ │ │ ├── opening_loc: (17,13)-(17,14) = "["
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (17,14)-(17,15))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (17,14)-(17,15))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── closing_loc: (17,15)-(17,16) = "]"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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"
+ ├── @ CallNode (location: (20,0)-(22,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (20,0)-(20,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (20,4)-(22,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (20,4)-(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"
+ ├── @ CallNode (location: (24,0)-(29,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── 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"
+ │ │ ├── opening_loc: (25,6)-(25,8) = "do"
+ │ │ └── closing_loc: (28,2)-(28,5) = "end"
+ │ ├── opening_loc: (24,4)-(24,6) = "do"
+ │ └── closing_loc: (29,0)-(29,3) = "end"
+ ├── @ CallNode (location: (31,0)-(31,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (31,0)-(31,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (31,3)-(31,8) = "[bar]"
+ │ ├── opening_loc: (31,3)-(31,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,4)-(31,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (31,4)-(31,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (31,4)-(31,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (31,11)-(31,14) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (31,9)-(31,10) = "{"
+ │ └── closing_loc: (31,15)-(31,16) = "}"
+ ├── @ CallNode (location: (33,0)-(33,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :x
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (33,10)-(33,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :y
+ │ │ │ │ ├── name_loc: (33,10)-(33,11) = "y"
+ │ │ │ │ ├── operator_loc: (33,12)-(33,13) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (33,14)-(33,15))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (33,17)-(33,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :z
+ │ │ │ │ └── name_loc: (33,17)-(33,19) = "z:"
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (35,0)-(35,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ 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
+ │ │ └── value: 1
+ │ └── operator_loc: (37,5)-(37,6) = "="
+ ├── @ CallNode (location: (38,0)-(39,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fork
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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"
+ ├── @ CallNode (location: (41,0)-(41,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fork
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (43,0)-(44,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :C
+ │ ├── 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"
+ ├── @ CallNode (location: (46,0)-(46,4))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :C
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (48,0)-(52,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (48,0)-(48,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (48,4)-(52,1))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (48,4)-(52,1))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :lambda
+ │ │ ├── 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)
+ │ │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (49,2)-(49,6))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ ├── name_loc: (49,2)-(49,4) = "a:"
+ │ │ │ │ │ │ └── value:
+ │ │ │ │ │ │ @ IntegerNode (location: (49,5)-(49,6))
+ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (50,2)-(50,6))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── name_loc: (50,2)-(50,4) = "b:"
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (50,5)-(50,6))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ ├── 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) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (54,0)-(54,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ ImplicitRestNode (location: (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"
diff --git a/test/prism/snapshots/boolean_operators.txt b/test/prism/snapshots/boolean_operators.txt
new file mode 100644
index 0000000000..3bf33430c9
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,6))
+ │ ├── name_loc: (3,0)-(3,1) = "a"
+ │ ├── binary_operator_loc: (3,2)-(3,4) = "+="
+ │ ├── value:
+ │ │ @ CallNode (location: (3,5)-(3,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (3,5)-(3,6) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── name: :a
+ │ ├── binary_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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (5,6)-(5,7) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..c15a9e4675
--- /dev/null
+++ b/test/prism/snapshots/break.txt
@@ -0,0 +1,401 @@
+@ ProgramNode (location: (1,0)-(25,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(25,23))
+ └── body: (length: 11)
+ ├── @ CallNode (location: (1,0)-(1,13))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (1,0)-(1,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (1,4)-(1,13))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,6)-(1,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (1,6)-(1,11))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (1,6)-(1,11) = "break"
+ │ ├── opening_loc: (1,4)-(1,5) = "{"
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ ├── @ CallNode (location: (3,0)-(3,27))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (3,0)-(3,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (3,4)-(3,27))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,6)-(3,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (3,6)-(3,25))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,12)-(3,25))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ ParenthesesNode (location: (3,12)-(3,15))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (3,13)-(3,14))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (3,13)-(3,14))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ ├── opening_loc: (3,17)-(3,18) = "("
+ │ │ │ │ └── closing_loc: (3,19)-(3,20) = ")"
+ │ │ │ └── @ ParenthesesNode (location: (3,22)-(3,25))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (3,23)-(3,24))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (3,23)-(3,24))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 3
+ │ │ │ ├── opening_loc: (3,22)-(3,23) = "("
+ │ │ │ └── closing_loc: (3,24)-(3,25) = ")"
+ │ │ └── keyword_loc: (3,6)-(3,11) = "break"
+ │ ├── opening_loc: (3,4)-(3,5) = "{"
+ │ └── closing_loc: (3,26)-(3,27) = "}"
+ ├── @ CallNode (location: (5,0)-(5,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (5,0)-(5,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (5,4)-(5,15))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,6)-(5,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (5,6)-(5,13))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,12)-(5,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,12)-(5,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── keyword_loc: (5,6)-(5,11) = "break"
+ │ ├── opening_loc: (5,4)-(5,5) = "{"
+ │ └── closing_loc: (5,14)-(5,15) = "}"
+ ├── @ CallNode (location: (7,0)-(8,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (7,0)-(7,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (7,4)-(8,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,6)-(8,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (7,6)-(8,1))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,12)-(8,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (7,12)-(7,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (7,15)-(7,16))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ └── keyword_loc: (7,6)-(7,11) = "break"
+ │ ├── opening_loc: (7,4)-(7,5) = "{"
+ │ └── closing_loc: (8,2)-(8,3) = "}"
+ ├── @ CallNode (location: (10,0)-(10,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (10,0)-(10,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (10,4)-(10,21))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (10,6)-(10,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (10,6)-(10,19))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (10,12)-(10,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (10,12)-(10,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (10,15)-(10,16))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (10,18)-(10,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ └── keyword_loc: (10,6)-(10,11) = "break"
+ │ ├── opening_loc: (10,4)-(10,5) = "{"
+ │ └── closing_loc: (10,20)-(10,21) = "}"
+ ├── @ CallNode (location: (12,0)-(12,23))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (12,0)-(12,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (12,4)-(12,23))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (12,6)-(12,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (12,6)-(12,21))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (12,12)-(12,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ArrayNode (location: (12,12)-(12,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 3)
+ │ │ │ │ ├── @ IntegerNode (location: (12,13)-(12,14))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── @ IntegerNode (location: (12,16)-(12,17))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ └── @ IntegerNode (location: (12,19)-(12,20))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 3
+ │ │ │ ├── opening_loc: (12,12)-(12,13) = "["
+ │ │ │ └── closing_loc: (12,20)-(12,21) = "]"
+ │ │ └── keyword_loc: (12,6)-(12,11) = "break"
+ │ ├── opening_loc: (12,4)-(12,5) = "{"
+ │ └── closing_loc: (12,22)-(12,23) = "}"
+ ├── @ CallNode (location: (14,0)-(17,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (14,0)-(14,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (14,4)-(17,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (14,6)-(17,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (14,6)-(17,1))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (14,11)-(17,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ParenthesesNode (location: (14,11)-(17,1))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (15,2)-(16,3))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (15,2)-(15,3))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── opening_loc: (14,11)-(14,12) = "("
+ │ │ │ └── closing_loc: (17,0)-(17,1) = ")"
+ │ │ └── keyword_loc: (14,6)-(14,11) = "break"
+ │ ├── opening_loc: (14,4)-(14,5) = "{"
+ │ └── closing_loc: (17,2)-(17,3) = "}"
+ ├── @ CallNode (location: (19,0)-(19,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (19,0)-(19,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (19,4)-(19,15))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (19,6)-(19,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (19,6)-(19,13))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (19,11)-(19,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ParenthesesNode (location: (19,11)-(19,13))
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (19,11)-(19,12) = "("
+ │ │ │ └── closing_loc: (19,12)-(19,13) = ")"
+ │ │ └── keyword_loc: (19,6)-(19,11) = "break"
+ │ ├── opening_loc: (19,4)-(19,5) = "{"
+ │ └── closing_loc: (19,14)-(19,15) = "}"
+ ├── @ CallNode (location: (21,0)-(21,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (21,0)-(21,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (21,4)-(21,16))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (21,6)-(21,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (21,6)-(21,14))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (21,11)-(21,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ParenthesesNode (location: (21,11)-(21,14))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (21,12)-(21,13))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (21,12)-(21,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── opening_loc: (21,11)-(21,12) = "("
+ │ │ │ └── closing_loc: (21,13)-(21,14) = ")"
+ │ │ └── keyword_loc: (21,6)-(21,11) = "break"
+ │ ├── opening_loc: (21,4)-(21,5) = "{"
+ │ └── closing_loc: (21,15)-(21,16) = "}"
+ ├── @ CallNode (location: (23,0)-(23,22))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,16))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (23,12)-(23,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 42
+ │ │ │ └── keyword_loc: (23,6)-(23,11) = "break"
+ │ │ ├── opening_loc: (23,4)-(23,5) = "{"
+ │ │ └── closing_loc: (23,15)-(23,16) = "}"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :==
+ │ ├── message_loc: (23,17)-(23,19) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,20)-(23,22))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (23,20)-(23,22))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (25,0)-(25,23))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (25,0)-(25,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── call_operator_loc: ∅
+ ├── name: :==
+ ├── message_loc: (25,18)-(25,20) = "=="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (25,21)-(25,23))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (25,21)-(25,23))
+ │ ├── flags: decimal
+ │ └── value: 42
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/case.txt b/test/prism/snapshots/case.txt
new file mode 100644
index 0000000000..417bf9492a
--- /dev/null
+++ b/test/prism/snapshots/case.txt
@@ -0,0 +1,495 @@
+@ ProgramNode (location: (1,0)-(55,3))
+├── locals: [:b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(55,3))
+ └── body: (length: 15)
+ ├── @ CaseNode (location: (1,0)-(3,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (1,5)-(1,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (2,5)-(2,6) = ":"
+ │ │ │ ├── value_loc: (2,6)-(2,8) = "hi"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "hi"
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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))
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ └── statements:
+ │ │ │ @ StatementsNode (location: (5,22)-(5,30))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,22)-(5,30))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :puts
+ │ │ │ ├── message_loc: (5,22)-(5,26) = "puts"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,27)-(5,30))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (5,27)-(5,30))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (5,27)-(5,28) = ":"
+ │ │ │ │ ├── value_loc: (5,28)-(5,30) = "hi"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "hi"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ WhenNode (location: (5,32)-(5,53))
+ │ │ ├── keyword_loc: (5,32)-(5,36) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ FalseNode (location: (5,37)-(5,42))
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (5,44)-(5,53))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,44)-(5,53))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (5,44)-(5,48) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,49)-(5,53))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (5,49)-(5,53))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (5,49)-(5,50) = ":"
+ │ │ │ ├── value_loc: (5,50)-(5,53) = "bye"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "bye"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (7,12)-(7,15) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (10,5)-(10,6) = ":"
+ │ │ │ ├── value_loc: (10,6)-(10,8) = "hi"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "hi"
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :this
+ │ │ ├── message_loc: (15,5)-(15,9) = "this"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (18,5)-(18,8))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (18,5)-(18,8) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :==
+ │ │ │ ├── message_loc: (18,9)-(18,11) = "=="
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (18,12)-(18,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (18,12)-(18,15))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (18,12)-(18,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (22,5)-(22,6) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :type
+ │ │ ├── message_loc: (27,5)-(27,9) = "type"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (28,8)-(28,9) = ":"
+ │ │ │ ├── value_loc: (28,9)-(28,10) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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
+ │ │ │ └── value: 1
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (32,0)-(32,4) = "case"
+ │ └── end_keyword_loc: (32,22)-(32,25) = "end"
+ ├── @ CaseNode (location: (34,0)-(36,3))
+ │ ├── predicate:
+ │ │ @ MatchPredicateNode (location: (34,5)-(34,11))
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (34,5)-(34,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (34,10)-(34,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (34,7)-(34,9) = "in"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (35,0)-(35,6))
+ │ │ ├── keyword_loc: (35,0)-(35,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (35,5)-(35,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (34,0)-(34,4) = "case"
+ │ └── end_keyword_loc: (36,0)-(36,3) = "end"
+ ├── @ CaseNode (location: (38,0)-(38,24))
+ │ ├── predicate:
+ │ │ @ MatchPredicateNode (location: (38,5)-(38,11))
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (38,5)-(38,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (38,10)-(38,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (38,7)-(38,9) = "in"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (38,13)-(38,19))
+ │ │ ├── keyword_loc: (38,13)-(38,17) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (38,18)-(38,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (38,0)-(38,4) = "case"
+ │ └── end_keyword_loc: (38,21)-(38,24) = "end"
+ ├── @ CaseMatchNode (location: (40,0)-(42,3))
+ │ ├── predicate:
+ │ │ @ MatchPredicateNode (location: (40,5)-(40,11))
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (40,5)-(40,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (40,10)-(40,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (40,7)-(40,9) = "in"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (41,0)-(41,4))
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (41,3)-(41,4))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (41,0)-(41,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (40,0)-(40,4) = "case"
+ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
+ ├── @ CaseMatchNode (location: (44,0)-(44,22))
+ │ ├── predicate:
+ │ │ @ MatchPredicateNode (location: (44,5)-(44,11))
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (44,5)-(44,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (44,10)-(44,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (44,7)-(44,9) = "in"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (44,13)-(44,17))
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (44,16)-(44,17))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (44,13)-(44,15) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (44,0)-(44,4) = "case"
+ │ └── end_keyword_loc: (44,19)-(44,22) = "end"
+ ├── @ CaseMatchNode (location: (46,0)-(49,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (46,5)-(46,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (46,5)-(46,6) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (47,0)-(48,3))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (47,3)-(47,15))
+ │ │ │ ├── if_keyword_loc: (47,5)-(47,7) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ AndNode (location: (47,8)-(47,15))
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ CallNode (location: (47,8)-(47,9))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ ├── message_loc: (47,8)-(47,9) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ CallNode (location: (47,14)-(47,15))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (47,14)-(47,15) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── operator_loc: (47,10)-(47,13) = "and"
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (47,3)-(47,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (47,3)-(47,4))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (48,2)-(48,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (48,2)-(48,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :e
+ │ │ │ ├── message_loc: (48,2)-(48,3) = "e"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── in_loc: (47,0)-(47,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (46,0)-(46,4) = "case"
+ │ └── end_keyword_loc: (49,0)-(49,3) = "end"
+ └── @ CallNode (location: (51,0)-(55,3))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (51,0)-(51,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: (51,1)-(51,2) = "."
+ ├── name: :then
+ ├── message_loc: (51,2)-(51,6) = "then"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (51,7)-(55,3))
+ ├── locals: [:_1]
+ ├── parameters:
+ │ @ NumberedParametersNode (location: (51,7)-(55,3))
+ │ └── maximum: 1
+ ├── body:
+ │ @ StatementsNode (location: (52,2)-(54,5))
+ │ └── body: (length: 1)
+ │ └── @ CaseMatchNode (location: (52,2)-(54,5))
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (52,7)-(52,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (53,2)-(53,8))
+ │ │ ├── pattern:
+ │ │ │ @ PinnedVariableNode (location: (53,5)-(53,8))
+ │ │ │ ├── variable:
+ │ │ │ │ @ LocalVariableReadNode (location: (53,6)-(53,8))
+ │ │ │ │ ├── name: :_1
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (53,5)-(53,6) = "^"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (53,2)-(53,4) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (52,2)-(52,6) = "case"
+ │ └── end_keyword_loc: (54,2)-(54,5) = "end"
+ ├── opening_loc: (51,7)-(51,9) = "do"
+ └── closing_loc: (55,0)-(55,3) = "end"
diff --git a/test/prism/snapshots/classes.txt b/test/prism/snapshots/classes.txt
new file mode 100644
index 0000000000..4a36bd5cdc
--- /dev/null
+++ b/test/prism/snapshots/classes.txt
@@ -0,0 +1,365 @@
+@ 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
+ │ │ │ └── value: 1
+ │ │ └── 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,0)-(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,0)-(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
+ │ │ │ └── value: 1
+ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (11,13)-(11,16))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (11,13)-(11,16) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (11,9)-(11,12) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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,9)-(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,9)-(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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (18,9)-(18,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (18,9)-(18,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (18,12)-(18,13) = "."
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (18,13)-(18,16) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (21,9)-(21,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (21,9)-(21,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (21,12)-(21,13) = "."
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (21,13)-(21,16) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (29,0)-(29,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+
+ │ │ ├── message_loc: (29,2)-(29,3) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (29,4)-(29,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (29,4)-(29,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (32,14)-(32,15))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+
+ │ │ ├── message_loc: (32,16)-(32,17) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (32,18)-(32,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (32,18)-(32,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (34,10)-(34,11))
+ │ │ └── name: :B
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (34,11)-(34,14) = "[1]"
+ │ ├── opening_loc: (34,11)-(34,12) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (34,12)-(34,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (34,12)-(34,13))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: (34,13)-(34,14) = "]"
+ │ └── block: ∅
+ ├── body: ∅
+ ├── end_keyword_loc: (35,0)-(35,3) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/command_method_call.txt b/test/prism/snapshots/command_method_call.txt
new file mode 100644
index 0000000000..7fd6341304
--- /dev/null
+++ b/test/prism/snapshots/command_method_call.txt
@@ -0,0 +1,755 @@
+@ ProgramNode (location: (1,0)-(41,10))
+├── locals: [:foo, :bar]
+└── statements:
+ @ StatementsNode (location: (1,0)-(41,10))
+ └── body: (length: 21)
+ ├── @ CallNode (location: (1,0)-(1,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,4)-(3,9))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,4)-(3,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,8)-(3,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,8)-(3,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ IfNode (location: (5,0)-(5,14))
+ │ ├── if_keyword_loc: (5,6)-(5,8) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (5,9)-(5,14))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (5,9)-(5,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,13)-(5,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,13)-(5,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,0)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,0)-(5,5))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,4)-(5,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,4)-(5,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ UnlessNode (location: (7,0)-(7,18))
+ │ ├── keyword_loc: (7,6)-(7,12) = "unless"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (7,13)-(7,18))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (7,13)-(7,16) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,17)-(7,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (7,17)-(7,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (7,0)-(7,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,0)-(7,5))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,4)-(7,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (7,4)-(7,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ WhileNode (location: (9,0)-(9,17))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (9,6)-(9,11) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (9,12)-(9,17))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (9,12)-(9,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,16)-(9,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (9,16)-(9,17))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (9,0)-(9,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (9,0)-(9,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,4)-(9,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (9,4)-(9,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ UntilNode (location: (11,0)-(11,17))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (11,6)-(11,11) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (11,12)-(11,17))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (11,12)-(11,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,16)-(11,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (11,16)-(11,17))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (11,0)-(11,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,0)-(11,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ RescueModifierNode (location: (13,0)-(13,18))
+ │ ├── expression:
+ │ │ @ CallNode (location: (13,0)-(13,5))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,4)-(13,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (13,4)-(13,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (13,6)-(13,12) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (13,13)-(13,18))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (13,13)-(13,16) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,17)-(13,18))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,17)-(13,18))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (15,0)-(15,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (15,0)-(15,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (15,0)-(15,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (15,3)-(15,10) = "[bar 1]"
+ │ ├── opening_loc: (15,3)-(15,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,4)-(15,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (15,4)-(15,9))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (15,4)-(15,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,8)-(15,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (15,8)-(15,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (15,9)-(15,10) = "]"
+ │ └── block: ∅
+ ├── @ AndNode (location: (17,0)-(17,15))
+ │ ├── left:
+ │ │ @ CallNode (location: (17,0)-(17,5))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (17,0)-(17,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (17,4)-(17,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (17,4)-(17,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (17,10)-(17,15))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (17,10)-(17,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (17,14)-(17,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (17,14)-(17,15))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (17,6)-(17,9) = "and"
+ ├── @ OrNode (location: (19,0)-(19,14))
+ │ ├── left:
+ │ │ @ CallNode (location: (19,0)-(19,5))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (19,0)-(19,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (19,4)-(19,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (19,4)-(19,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (19,9)-(19,14))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (19,9)-(19,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (19,13)-(19,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (19,13)-(19,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (19,6)-(19,8) = "or"
+ ├── @ CallNode (location: (21,0)-(21,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (21,4)-(21,9))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (21,4)-(21,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (21,8)-(21,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (21,8)-(21,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (21,0)-(21,3) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ LocalVariableWriteNode (location: (23,0)-(23,17))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (23,0)-(23,3) = "foo"
+ │ ├── value:
+ │ │ @ LocalVariableWriteNode (location: (23,6)-(23,17))
+ │ │ ├── name: :bar
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (23,6)-(23,9) = "bar"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (23,12)-(23,17))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (23,12)-(23,15) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (23,16)-(23,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (23,16)-(23,17))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (23,10)-(23,11) = "="
+ │ └── operator_loc: (23,4)-(23,5) = "="
+ ├── @ DefNode (location: (25,0)-(25,15))
+ │ ├── name: :foo
+ │ ├── name_loc: (25,4)-(25,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (25,10)-(25,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (25,10)-(25,15))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (25,10)-(25,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (25,14)-(25,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (25,14)-(25,15))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (25,8)-(25,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ CallNode (location: (27,0)-(27,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (27,0)-(27,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: (27,1)-(27,2) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (27,2)-(27,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,6)-(27,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (27,6)-(27,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (29,0)-(29,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (29,0)-(29,5))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (29,0)-(29,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: (29,1)-(29,2) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (29,2)-(29,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (29,5)-(29,6) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (29,6)-(29,9) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,10)-(29,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (29,10)-(29,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(31,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (31,0)-(31,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (31,0)-(31,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ IntegerNode (location: (31,0)-(31,1))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── call_operator_loc: (31,1)-(31,2) = "."
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (31,2)-(31,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]
+ │ │ ├── message_loc: (31,5)-(31,8) = "[2]"
+ │ │ ├── opening_loc: (31,5)-(31,6) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (31,6)-(31,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (31,6)-(31,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: (31,7)-(31,8) = "]"
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (31,8)-(31,9) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (31,9)-(31,12) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,13)-(31,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,13)-(31,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (33,0)-(33,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (33,0)-(33,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (33,0)-(33,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: (33,1)-(33,2) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (33,2)-(33,5) = "foo"
+ │ │ ├── opening_loc: (33,5)-(33,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (33,6)-(33,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (33,6)-(33,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: (33,7)-(33,8) = ")"
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (33,8)-(33,9) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (33,9)-(33,12) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,13)-(33,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (33,13)-(33,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (35,0)-(35,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (35,0)-(35,9))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (35,0)-(35,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: (35,1)-(35,2) = "."
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (35,2)-(35,5) = "foo"
+ │ │ ├── opening_loc: (35,5)-(35,6) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (35,8)-(35,9) = ")"
+ │ │ └── block:
+ │ │ @ BlockArgumentNode (location: (35,6)-(35,8))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (35,7)-(35,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (35,6)-(35,7) = "&"
+ │ ├── call_operator_loc: (35,9)-(35,10) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (35,10)-(35,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,14)-(35,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (35,14)-(35,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ AndNode (location: (37,0)-(37,17))
+ │ ├── left:
+ │ │ @ CallNode (location: (37,0)-(37,6))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (37,1)-(37,6))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (37,1)-(37,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (37,5)-(37,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (37,5)-(37,6))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (37,0)-(37,1) = "!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (37,11)-(37,17))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (37,12)-(37,17))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (37,12)-(37,15) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (37,16)-(37,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (37,16)-(37,17))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (37,11)-(37,12) = "!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (37,7)-(37,10) = "and"
+ ├── @ OrNode (location: (39,0)-(39,16))
+ │ ├── left:
+ │ │ @ CallNode (location: (39,0)-(39,6))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (39,1)-(39,6))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (39,1)-(39,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (39,5)-(39,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (39,5)-(39,6))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (39,0)-(39,1) = "!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (39,10)-(39,16))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (39,11)-(39,16))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (39,11)-(39,14) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (39,15)-(39,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (39,15)-(39,16))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (39,10)-(39,11) = "!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (39,7)-(39,9) = "or"
+ └── @ CallNode (location: (41,0)-(41,10))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (41,4)-(41,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (41,5)-(41,10))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (41,5)-(41,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (41,9)-(41,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (41,9)-(41,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (41,4)-(41,5) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (41,0)-(41,3) = "not"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/comments.txt b/test/prism/snapshots/comments.txt
new file mode 100644
index 0000000000..b7088adcd5
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (3,0)-(3,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (5,0)-(5,1) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (6,0)-(6,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :d
+ │ ├── message_loc: (6,0)-(6,1) = "d"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (8,0)-(10,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (8,0)-(8,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :e
+ │ │ ├── message_loc: (8,0)-(8,1) = "e"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (10,2)-(10,3) = "."
+ │ ├── name: :f
+ │ ├── message_loc: (10,3)-(10,4) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (12,0)-(14,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (12,0)-(12,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :g
+ │ │ ├── message_loc: (12,0)-(12,1) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (14,0)-(14,1) = "."
+ │ ├── name: :h
+ │ ├── message_loc: (14,1)-(14,2) = "h"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (16,0)-(17,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (16,0)-(16,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :i
+ │ │ ├── message_loc: (16,0)-(16,1) = "i"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (17,0)-(17,1) = "."
+ │ ├── name: :j
+ │ ├── message_loc: (17,1)-(17,2) = "j"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (19,0)-(20,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (19,0)-(19,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :k
+ │ │ ├── message_loc: (19,0)-(19,1) = "k"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (20,2)-(20,3) = "."
+ │ ├── name: :l
+ │ ├── message_loc: (20,3)-(20,4) = "l"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (22,0)-(24,5))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (22,0)-(22,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (22,0)-(22,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (24,2)-(24,4) = "&."
+ ├── name: :n
+ ├── message_loc: (24,4)-(24,5) = "n"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/constants.txt b/test/prism/snapshots/constants.txt
new file mode 100644
index 0000000000..1251833663
--- /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
+ │ ├── name: :B
+ │ ├── delimiter_loc: (1,1)-(1,3) = "::"
+ │ └── name_loc: (1,3)-(1,4) = "B"
+ ├── @ ConstantPathNode (location: (3,0)-(3,7))
+ │ ├── parent:
+ │ │ @ ConstantPathNode (location: (3,0)-(3,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (3,0)-(3,1))
+ │ │ │ └── name: :A
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (3,1)-(3,3) = "::"
+ │ │ └── name_loc: (3,3)-(3,4) = "B"
+ │ ├── name: :C
+ │ ├── delimiter_loc: (3,4)-(3,6) = "::"
+ │ └── name_loc: (3,6)-(3,7) = "C"
+ ├── @ ConstantPathNode (location: (5,0)-(5,4))
+ │ ├── parent:
+ │ │ @ CallNode (location: (5,0)-(5,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── name: :B
+ │ ├── delimiter_loc: (5,1)-(5,3) = "::"
+ │ └── name_loc: (5,3)-(5,4) = "B"
+ ├── @ ConstantPathWriteNode (location: (7,0)-(7,8))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (7,0)-(7,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (7,0)-(7,1))
+ │ │ │ └── name: :A
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (7,1)-(7,3) = "::"
+ │ │ └── name_loc: (7,3)-(7,4) = "B"
+ │ ├── operator_loc: (7,5)-(7,6) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (7,7)-(7,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ ConstantWriteNode (location: (9,0)-(9,5))
+ │ ├── name: :A
+ │ ├── name_loc: (9,0)-(9,1) = "A"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (9,4)-(9,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (9,2)-(9,3) = "="
+ ├── @ ConstantReadNode (location: (11,0)-(11,3))
+ │ └── name: :ABC
+ ├── @ CallNode (location: (13,0)-(13,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :Foo
+ │ ├── message_loc: (13,0)-(13,3) = "Foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,4)-(13,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,4)-(13,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (15,0)-(15,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :Foo
+ │ ├── message_loc: (15,0)-(15,3) = "Foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,4)-(15,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (15,4)-(15,8))
+ │ │ ├── operator_loc: (15,4)-(15,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (15,5)-(15,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (15,5)-(15,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (17,0)-(17,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :Foo
+ │ ├── message_loc: (17,0)-(17,3) = "Foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,4)-(17,9))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (17,4)-(17,9))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (17,4)-(17,9))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (17,6)-(17,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (17,6)-(17,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (17,4)-(17,6) = "**"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (19,0)-(19,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :Foo
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (19,5)-(19,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (19,4)-(19,5) = "&"
+ ├── @ CallNode (location: (21,0)-(21,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (21,0)-(21,3))
+ │ │ └── name: :Foo
+ │ ├── call_operator_loc: (21,3)-(21,5) = "::"
+ │ ├── name: :Bar
+ │ ├── message_loc: (21,5)-(21,8) = "Bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,9)-(21,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (21,9)-(21,13))
+ │ │ ├── operator_loc: (21,9)-(21,10) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (21,10)-(21,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (21,10)-(21,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (23,0)-(23,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (23,0)-(23,3))
+ │ │ └── name: :Foo
+ │ ├── call_operator_loc: (23,3)-(23,5) = "::"
+ │ ├── name: :Bar
+ │ ├── message_loc: (23,5)-(23,8) = "Bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,9)-(23,14))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (23,9)-(23,14))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (23,9)-(23,14))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (23,11)-(23,14))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (23,11)-(23,14) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (23,9)-(23,11) = "**"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (25,0)-(25,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (25,0)-(25,3))
+ │ │ └── name: :Foo
+ │ ├── call_operator_loc: (25,3)-(25,5) = "::"
+ │ ├── name: :Bar
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (25,10)-(25,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (25,9)-(25,10) = "&"
+ ├── @ CallNode (location: (27,0)-(27,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (27,0)-(27,3))
+ │ │ ├── parent: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (27,0)-(27,2) = "::"
+ │ │ └── name_loc: (27,2)-(27,3) = "A"
+ │ ├── call_operator_loc: (27,3)-(27,5) = "::"
+ │ ├── name: :foo
+ │ ├── message_loc: (27,5)-(27,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ConstantPathWriteNode (location: (29,0)-(29,7))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (29,0)-(29,3))
+ │ │ ├── parent: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (29,0)-(29,2) = "::"
+ │ │ └── name_loc: (29,2)-(29,3) = "A"
+ │ ├── operator_loc: (29,4)-(29,5) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (29,6)-(29,7))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ ConstantPathWriteNode (location: (31,0)-(31,10))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (31,0)-(31,6))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (31,0)-(31,3))
+ │ │ │ ├── parent: ∅
+ │ │ │ ├── name: :A
+ │ │ │ ├── delimiter_loc: (31,0)-(31,2) = "::"
+ │ │ │ └── name_loc: (31,2)-(31,3) = "A"
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (31,3)-(31,5) = "::"
+ │ │ └── name_loc: (31,5)-(31,6) = "B"
+ │ ├── operator_loc: (31,7)-(31,8) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (31,9)-(31,10))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ ConstantPathNode (location: (33,0)-(33,6))
+ │ ├── parent:
+ │ │ @ ConstantPathNode (location: (33,0)-(33,3))
+ │ │ ├── parent: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (33,0)-(33,2) = "::"
+ │ │ └── name_loc: (33,2)-(33,3) = "A"
+ │ ├── name: :B
+ │ ├── delimiter_loc: (33,3)-(33,5) = "::"
+ │ └── name_loc: (33,5)-(33,6) = "B"
+ ├── @ ConstantPathNode (location: (35,0)-(35,3))
+ │ ├── parent: ∅
+ │ ├── name: :A
+ │ ├── delimiter_loc: (35,0)-(35,2) = "::"
+ │ └── name_loc: (35,2)-(35,3) = "A"
+ ├── @ CallNode (location: (37,0)-(37,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (37,0)-(37,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (37,1)-(37,3) = "::"
+ │ ├── name: :false
+ │ ├── message_loc: (37,3)-(37,8) = "false"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (39,0)-(39,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (39,0)-(39,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (39,0)-(39,1))
+ │ │ │ └── name: :A
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (39,1)-(39,3) = "::"
+ │ │ └── name_loc: (39,3)-(39,4) = "B"
+ │ ├── call_operator_loc: (39,4)-(39,6) = "::"
+ │ ├── name: :true
+ │ ├── message_loc: (39,6)-(39,10) = "true"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (41,0)-(41,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (41,0)-(41,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (41,1)-(41,3) = "::"
+ │ ├── name: :&
+ │ ├── message_loc: (41,3)-(41,4) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (43,0)-(43,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (43,0)-(43,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (43,1)-(43,3) = "::"
+ │ ├── name: :`
+ │ ├── message_loc: (43,3)-(43,4) = "`"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (45,0)-(45,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (45,1)-(45,3) = "::"
+ │ ├── name: :!
+ │ ├── message_loc: (45,3)-(45,4) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (47,0)-(47,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (47,0)-(47,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (47,1)-(47,3) = "::"
+ │ ├── name: :!=
+ │ ├── message_loc: (47,3)-(47,5) = "!="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (49,0)-(49,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (49,0)-(49,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (49,1)-(49,3) = "::"
+ │ ├── name: :^
+ │ ├── message_loc: (49,3)-(49,4) = "^"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (51,0)-(51,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (51,0)-(51,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (51,1)-(51,3) = "::"
+ │ ├── name: :==
+ │ ├── message_loc: (51,3)-(51,5) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (53,0)-(53,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (53,0)-(53,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (53,1)-(53,3) = "::"
+ │ ├── name: :===
+ │ ├── message_loc: (53,3)-(53,6) = "==="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (55,0)-(55,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (55,0)-(55,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (55,1)-(55,3) = "::"
+ │ ├── name: :=~
+ │ ├── message_loc: (55,3)-(55,5) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (57,0)-(57,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (57,0)-(57,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (57,1)-(57,3) = "::"
+ │ ├── name: :>
+ │ ├── message_loc: (57,3)-(57,4) = ">"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (59,0)-(59,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (59,0)-(59,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (59,1)-(59,3) = "::"
+ │ ├── name: :>=
+ │ ├── message_loc: (59,3)-(59,5) = ">="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (61,0)-(61,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (61,0)-(61,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (61,1)-(61,3) = "::"
+ │ ├── name: :>>
+ │ ├── message_loc: (61,3)-(61,5) = ">>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (63,0)-(63,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (63,0)-(63,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (63,1)-(63,3) = "::"
+ │ ├── name: :<<
+ │ ├── message_loc: (63,3)-(63,5) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ConstantPathNode (location: (65,0)-(67,1))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (65,0)-(65,1))
+ │ │ └── name: :A
+ │ ├── name: :C
+ │ ├── delimiter_loc: (65,1)-(65,3) = "::"
+ │ └── name_loc: (67,0)-(67,1) = "C"
+ ├── @ CallNode (location: (69,0)-(69,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (69,0)-(69,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (69,1)-(69,3) = "::"
+ │ ├── name: :alias
+ │ ├── message_loc: (69,3)-(69,8) = "alias"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (71,0)-(71,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (71,0)-(71,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (71,1)-(71,3) = "::"
+ │ ├── name: :and
+ │ ├── message_loc: (71,3)-(71,6) = "and"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (73,0)-(73,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (73,0)-(73,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (73,1)-(73,3) = "::"
+ │ ├── name: :begin
+ │ ├── message_loc: (73,3)-(73,8) = "begin"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ConstantPathNode (location: (75,0)-(75,8))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (75,0)-(75,1))
+ │ │ └── name: :A
+ │ ├── name: :BEGIN
+ │ ├── delimiter_loc: (75,1)-(75,3) = "::"
+ │ └── name_loc: (75,3)-(75,8) = "BEGIN"
+ ├── @ CallNode (location: (77,0)-(77,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (77,0)-(77,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (77,1)-(77,3) = "::"
+ │ ├── name: :break
+ │ ├── message_loc: (77,3)-(77,8) = "break"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (79,0)-(79,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (79,0)-(79,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (79,1)-(79,3) = "::"
+ │ ├── name: :class
+ │ ├── message_loc: (79,3)-(79,8) = "class"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (81,0)-(81,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (81,0)-(81,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (81,1)-(81,3) = "::"
+ │ ├── name: :def
+ │ ├── message_loc: (81,3)-(81,6) = "def"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (83,0)-(83,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (83,0)-(83,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (83,1)-(83,3) = "::"
+ │ ├── name: :defined
+ │ ├── message_loc: (83,3)-(83,10) = "defined"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (85,0)-(85,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (85,0)-(85,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (85,1)-(85,3) = "::"
+ │ ├── name: :do
+ │ ├── message_loc: (85,3)-(85,5) = "do"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (87,0)-(87,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (87,0)-(87,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (87,1)-(87,3) = "::"
+ │ ├── name: :else
+ │ ├── message_loc: (87,3)-(87,7) = "else"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (89,0)-(89,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (89,0)-(89,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (89,1)-(89,3) = "::"
+ │ ├── name: :elsif
+ │ ├── message_loc: (89,3)-(89,8) = "elsif"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (91,0)-(91,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (91,0)-(91,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (91,1)-(91,3) = "::"
+ │ ├── name: :end
+ │ ├── message_loc: (91,3)-(91,6) = "end"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ConstantPathNode (location: (93,0)-(93,6))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (93,0)-(93,1))
+ │ │ └── name: :A
+ │ ├── name: :END
+ │ ├── delimiter_loc: (93,1)-(93,3) = "::"
+ │ └── name_loc: (93,3)-(93,6) = "END"
+ ├── @ CallNode (location: (95,0)-(95,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (95,0)-(95,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (95,1)-(95,3) = "::"
+ │ ├── name: :ensure
+ │ ├── message_loc: (95,3)-(95,9) = "ensure"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (97,0)-(97,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (97,0)-(97,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (97,1)-(97,3) = "::"
+ │ ├── name: :false
+ │ ├── message_loc: (97,3)-(97,8) = "false"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (99,0)-(99,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (99,0)-(99,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (99,1)-(99,3) = "::"
+ │ ├── name: :for
+ │ ├── message_loc: (99,3)-(99,6) = "for"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (101,0)-(101,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (101,0)-(101,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (101,1)-(101,3) = "::"
+ │ ├── name: :if
+ │ ├── message_loc: (101,3)-(101,5) = "if"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (103,0)-(103,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (103,0)-(103,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (103,1)-(103,3) = "::"
+ │ ├── name: :in
+ │ ├── message_loc: (103,3)-(103,5) = "in"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (105,0)-(105,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (105,0)-(105,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (105,1)-(105,3) = "::"
+ │ ├── name: :next
+ │ ├── message_loc: (105,3)-(105,7) = "next"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (107,0)-(107,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (107,0)-(107,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (107,1)-(107,3) = "::"
+ │ ├── name: :nil
+ │ ├── message_loc: (107,3)-(107,6) = "nil"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (109,0)-(109,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (109,0)-(109,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (109,1)-(109,3) = "::"
+ │ ├── name: :not
+ │ ├── message_loc: (109,3)-(109,6) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (111,0)-(111,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (111,0)-(111,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (111,1)-(111,3) = "::"
+ │ ├── name: :or
+ │ ├── message_loc: (111,3)-(111,5) = "or"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (113,0)-(113,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (113,0)-(113,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (113,1)-(113,3) = "::"
+ │ ├── name: :redo
+ │ ├── message_loc: (113,3)-(113,7) = "redo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (115,0)-(115,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (115,0)-(115,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (115,1)-(115,3) = "::"
+ │ ├── name: :rescue
+ │ ├── message_loc: (115,3)-(115,9) = "rescue"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (117,0)-(117,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (117,0)-(117,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (117,1)-(117,3) = "::"
+ │ ├── name: :retry
+ │ ├── message_loc: (117,3)-(117,8) = "retry"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (119,0)-(119,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (119,0)-(119,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (119,1)-(119,3) = "::"
+ │ ├── name: :return
+ │ ├── message_loc: (119,3)-(119,9) = "return"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (121,0)-(121,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (121,0)-(121,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (121,1)-(121,3) = "::"
+ │ ├── name: :self
+ │ ├── message_loc: (121,3)-(121,7) = "self"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (123,0)-(123,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (123,0)-(123,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (123,1)-(123,3) = "::"
+ │ ├── name: :super
+ │ ├── message_loc: (123,3)-(123,8) = "super"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (125,0)-(125,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (125,0)-(125,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (125,1)-(125,3) = "::"
+ │ ├── name: :then
+ │ ├── message_loc: (125,3)-(125,7) = "then"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (127,0)-(127,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (127,0)-(127,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (127,1)-(127,3) = "::"
+ │ ├── name: :true
+ │ ├── message_loc: (127,3)-(127,7) = "true"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (129,0)-(129,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (129,0)-(129,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (129,1)-(129,3) = "::"
+ │ ├── name: :undef
+ │ ├── message_loc: (129,3)-(129,8) = "undef"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (131,0)-(131,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (131,0)-(131,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (131,1)-(131,3) = "::"
+ │ ├── name: :unless
+ │ ├── message_loc: (131,3)-(131,9) = "unless"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (133,0)-(133,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (133,0)-(133,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (133,1)-(133,3) = "::"
+ │ ├── name: :until
+ │ ├── message_loc: (133,3)-(133,8) = "until"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (135,0)-(135,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (135,0)-(135,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (135,1)-(135,3) = "::"
+ │ ├── name: :when
+ │ ├── message_loc: (135,3)-(135,7) = "when"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (137,0)-(137,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (137,0)-(137,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (137,1)-(137,3) = "::"
+ │ ├── name: :while
+ │ ├── message_loc: (137,3)-(137,8) = "while"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (139,0)-(139,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (139,0)-(139,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (139,1)-(139,3) = "::"
+ │ ├── name: :yield
+ │ ├── message_loc: (139,3)-(139,8) = "yield"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (141,0)-(141,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (141,0)-(141,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (141,1)-(141,3) = "::"
+ │ ├── name: :__ENCODING__
+ │ ├── message_loc: (141,3)-(141,15) = "__ENCODING__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (143,0)-(143,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (143,0)-(143,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (143,1)-(143,3) = "::"
+ │ ├── name: :__FILE__
+ │ ├── message_loc: (143,3)-(143,11) = "__FILE__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (145,0)-(145,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (145,0)-(145,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (145,1)-(145,3) = "::"
+ │ ├── name: :__LINE__
+ │ ├── message_loc: (145,3)-(145,11) = "__LINE__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (147,0)-(147,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (147,0)-(147,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (147,1)-(147,3) = "::"
+ │ ├── name: :<
+ │ ├── message_loc: (147,3)-(147,4) = "<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (149,0)-(149,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (149,0)-(149,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (149,1)-(149,3) = "::"
+ │ ├── name: :<=>
+ │ ├── message_loc: (149,3)-(149,6) = "<=>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (151,0)-(151,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (151,0)-(151,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (151,1)-(151,3) = "::"
+ │ ├── name: :<<
+ │ ├── message_loc: (151,3)-(151,5) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (153,0)-(153,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (153,0)-(153,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (153,1)-(153,3) = "::"
+ │ ├── name: :-
+ │ ├── message_loc: (153,3)-(153,4) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (155,0)-(155,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (155,0)-(155,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (155,1)-(155,3) = "::"
+ │ ├── name: :%
+ │ ├── message_loc: (155,3)-(155,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (157,0)-(157,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (157,0)-(157,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (157,1)-(157,3) = "::"
+ │ ├── name: :%
+ │ ├── message_loc: (157,3)-(157,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (157,4)-(157,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (157,4)-(157,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :i
+ │ │ ├── message_loc: (157,4)-(157,5) = "i"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (159,0)-(159,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (159,0)-(159,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (159,1)-(159,3) = "::"
+ │ ├── name: :%
+ │ ├── message_loc: (159,3)-(159,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (159,4)-(159,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (159,4)-(159,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :w
+ │ │ ├── message_loc: (159,4)-(159,5) = "w"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (161,0)-(161,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (161,0)-(161,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (161,1)-(161,3) = "::"
+ │ ├── name: :%
+ │ ├── message_loc: (161,3)-(161,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (161,4)-(161,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (161,4)-(161,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :x
+ │ │ ├── message_loc: (161,4)-(161,5) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (163,0)-(163,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (163,0)-(163,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (163,1)-(163,3) = "::"
+ │ ├── name: :%
+ │ ├── message_loc: (163,3)-(163,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (163,4)-(163,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (163,4)-(163,5))
+ │ │ └── name: :I
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (165,0)-(165,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (165,0)-(165,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (165,1)-(165,3) = "::"
+ │ ├── name: :%
+ │ ├── message_loc: (165,3)-(165,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (165,4)-(165,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (165,4)-(165,5))
+ │ │ └── name: :W
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (167,0)-(167,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (167,0)-(167,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (167,1)-(167,3) = "::"
+ │ ├── name: :|
+ │ ├── message_loc: (167,3)-(167,4) = "|"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (169,0)-(169,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (169,0)-(169,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (169,1)-(169,3) = "::"
+ │ ├── name: :+
+ │ ├── message_loc: (169,3)-(169,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (171,0)-(171,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (171,0)-(171,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (171,1)-(171,3) = "::"
+ │ ├── name: :/
+ │ ├── message_loc: (171,3)-(171,4) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (173,0)-(173,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (173,0)-(173,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (173,1)-(173,3) = "::"
+ │ ├── name: :*
+ │ ├── message_loc: (173,3)-(173,4) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (175,0)-(175,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (175,0)-(175,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (175,1)-(175,3) = "::"
+ │ ├── name: :**
+ │ ├── message_loc: (175,3)-(175,5) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (177,0)-(177,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (177,0)-(177,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (177,1)-(177,3) = "::"
+ │ ├── name: :~
+ │ ├── message_loc: (177,3)-(177,4) = "~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ConstantPathNode (location: (179,0)-(180,1))
+ │ ├── parent:
+ │ │ @ CallNode (location: (179,0)-(179,4))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ ConstantReadNode (location: (179,0)-(179,1))
+ │ │ │ └── name: :A
+ │ │ ├── call_operator_loc: (179,1)-(179,3) = "::"
+ │ │ ├── name: :_
+ │ │ ├── message_loc: (179,3)-(179,4) = "_"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── name: :C
+ │ ├── delimiter_loc: (179,4)-(179,6) = "::"
+ │ └── name_loc: (180,0)-(180,1) = "C"
+ └── @ RangeNode (location: (182,0)-(184,10))
+ ├── flags: ∅
+ ├── left:
+ │ @ CallNode (location: (182,0)-(182,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (182,0)-(182,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (182,1)-(182,3) = "::"
+ │ ├── name: :_
+ │ ├── message_loc: (182,3)-(182,4) = "_"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── right:
+ │ @ CallNode (location: (184,0)-(184,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (184,0)-(184,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (184,1)-(184,3) = "::"
+ │ ├── name: :__END__
+ │ ├── message_loc: (184,3)-(184,10) = "__END__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (182,4)-(182,6) = ".."
diff --git a/test/prism/snapshots/dash_heredocs.txt b/test/prism/snapshots/dash_heredocs.txt
new file mode 100644
index 0000000000..bd2b05ea0d
--- /dev/null
+++ b/test/prism/snapshots/dash_heredocs.txt
@@ -0,0 +1,260 @@
+@ 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)-(3,0) = " a\n"
+ │ ├── closing_loc: (3,0)-(4,0) = "EOF\n"
+ │ └── unescaped: " a\n"
+ ├── @ CallNode (location: (5,0)-(5,20))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (5,0)-(5,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (5,0)-(5,8) = "<<-FIRST"
+ │ │ ├── content_loc: (6,0)-(7,0) = " a\n"
+ │ │ ├── closing_loc: (7,0)-(8,0) = "FIRST\n"
+ │ │ └── unescaped: " a\n"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (5,9)-(5,10) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,11)-(5,20))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (5,11)-(5,20))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (5,11)-(5,20) = "<<-SECOND"
+ │ │ ├── content_loc: (8,0)-(9,0) = " b\n"
+ │ │ ├── closing_loc: (9,0)-(10,0) = "SECOND\n"
+ │ │ └── unescaped: " b\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ InterpolatedXStringNode (location: (11,0)-(11,8))
+ │ ├── opening_loc: (11,0)-(11,8) = "<<-`EOF`"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (12,0)-(13,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (12,0)-(13,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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (13,2)-(13,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (13,3)-(13,4) = "}"
+ │ │ └── @ StringNode (location: (13,4)-(14,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (13,4)-(14,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (14,0)-(15,0) = "EOF\n"
+ ├── @ StringNode (location: (16,0)-(16,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (16,0)-(16,6) = "<<-EOF"
+ │ ├── content_loc: (17,0)-(18,0) = " a\n"
+ │ ├── closing_loc: (18,0)-(19,0) = "EOF\n"
+ │ └── unescaped: " a\n"
+ ├── @ StringNode (location: (20,0)-(20,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (20,0)-(20,6) = "<<-EOF"
+ │ ├── content_loc: (21,0)-(23,0) = " a\n b\n"
+ │ ├── closing_loc: (23,0)-(24,0) = " EOF\n"
+ │ └── unescaped: " a\n b\n"
+ ├── @ InterpolatedStringNode (location: (25,0)-(25,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (25,0)-(25,8) = "<<-\"EOF\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (26,0)-(27,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (26,0)-(27,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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (27,2)-(27,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (27,3)-(27,4) = "}"
+ │ │ └── @ StringNode (location: (27,4)-(28,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (27,4)-(28,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (28,0)-(29,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (30,0)-(30,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (30,0)-(30,6) = "<<-EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (31,0)-(32,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (31,0)-(32,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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (32,2)-(32,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (32,3)-(32,4) = "}"
+ │ │ └── @ StringNode (location: (32,4)-(33,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (32,4)-(33,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (33,0)-(34,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)-(40,0) = " a\n b\n"
+ │ ├── closing_loc: (40,0)-(41,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)-(43,0) = ""
+ │ ├── closing_loc: (43,0)-(44,0) = "\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (45,0)-(45,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (45,0)-(45,8) = "<<-'EOF'"
+ │ ├── content_loc: (46,0)-(47,0) = " a \#{1}\n"
+ │ ├── closing_loc: (47,0)-(48,0) = "EOF\n"
+ │ └── unescaped: " a \#{1}\n"
+ ├── @ CallNode (location: (49,0)-(49,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (49,0)-(49,4))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (49,0)-(49,4) = "<<-A"
+ │ │ ├── content_loc: (50,0)-(51,0) = " a\n"
+ │ │ ├── closing_loc: (51,0)-(52,0) = "A\n"
+ │ │ └── unescaped: " a\n"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (49,5)-(49,6) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (49,7)-(49,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (49,7)-(49,11))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (49,7)-(49,11) = "<<-B"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (52,0)-(53,2))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ └── closing_loc: (54,2)-(54,3) = "}"
+ │ │ │ └── @ StringNode (location: (54,3)-(55,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (54,3)-(55,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (55,0)-(56,0) = "B\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (57,0)-(57,11))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ StringNode (location: (57,0)-(57,4))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (57,0)-(57,4) = "<<-A"
+ │ ├── content_loc: (58,0)-(59,0) = " a\n"
+ │ ├── closing_loc: (59,0)-(60,0) = "A\n"
+ │ └── unescaped: " a\n"
+ ├── call_operator_loc: ∅
+ ├── name: :+
+ ├── message_loc: (57,5)-(57,6) = "+"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (57,7)-(57,11))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (57,7)-(57,11))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (57,7)-(57,11) = "<<-B"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (60,0)-(61,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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
+ │ │ │ │ └── value: 2
+ │ │ │ └── closing_loc: (62,3)-(62,4) = "}"
+ │ │ └── @ StringNode (location: (62,4)-(63,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (62,4)-(63,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (63,0)-(64,0) = "B\n"
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/defined.txt b/test/prism/snapshots/defined.txt
new file mode 100644
index 0000000000..c60173ff37
--- /dev/null
+++ b/test/prism/snapshots/defined.txt
@@ -0,0 +1,88 @@
+@ ProgramNode (location: (1,0)-(10,1))
+├── locals: [:x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(10,1))
+ └── body: (length: 5)
+ ├── @ AndNode (location: (1,0)-(1,25))
+ │ ├── left:
+ │ │ @ DefinedNode (location: (1,0)-(1,10))
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ ├── 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"
+ │ │ ├── binary_operator_loc: (3,11)-(3,13) = "%="
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,14)-(3,15))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── name: :x
+ │ │ ├── binary_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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (5,17)-(5,20))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (5,17)-(5,20) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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
+ │ │ └── value: 1
+ │ ├── rparen_loc: ∅
+ │ └── keyword_loc: (7,0)-(7,8) = "defined?"
+ └── @ DefinedNode (location: (9,0)-(10,1))
+ ├── lparen_loc: (9,8)-(9,9) = "("
+ ├── value:
+ │ @ StringNode (location: (9,9)-(9,14))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (9,9)-(9,10) = "\""
+ │ ├── content_loc: (9,10)-(9,13) = "foo"
+ │ ├── closing_loc: (9,13)-(9,14) = "\""
+ │ └── unescaped: "foo"
+ ├── rparen_loc: (10,0)-(10,1) = ")"
+ └── keyword_loc: (9,0)-(9,8) = "defined?"
diff --git a/test/prism/snapshots/dos_endings.txt b/test/prism/snapshots/dos_endings.txt
new file mode 100644
index 0000000000..1ae15e1e87
--- /dev/null
+++ b/test/prism/snapshots/dos_endings.txt
@@ -0,0 +1,110 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :puts
+ │ ├── message_loc: (1,0)-(1,4) = "puts"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(2,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (1,5)-(2,12))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (1,5)-(1,9))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "\""
+ │ │ │ │ ├── content_loc: (1,6)-(1,8) = "hi"
+ │ │ │ │ ├── closing_loc: (1,8)-(1,9) = "\""
+ │ │ │ │ └── unescaped: "hi"
+ │ │ │ └── @ StringNode (location: (2,5)-(2,12))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (2,5)-(2,6) = "\""
+ │ │ │ ├── content_loc: (2,6)-(2,11) = "there"
+ │ │ │ ├── closing_loc: (2,11)-(2,12) = "\""
+ │ │ │ └── unescaped: "there"
+ │ │ └── closing_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ArrayNode (location: (4,0)-(5,2))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (4,3)-(5,1))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (4,3)-(5,1) = "a\\\r\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\nb"
+ │ ├── 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)-(11,0) = " 1 \\\r\n 2\r\n 3\r\n"
+ │ ├── closing_loc: (11,0)-(12,0) = "E\r\n"
+ │ └── unescaped: " 1 2\n 3\n"
+ ├── @ LocalVariableWriteNode (location: (13,0)-(15,0))
+ │ ├── name: :x
+ │ ├── depth: 0
+ │ ├── name_loc: (13,0)-(13,1) = "x"
+ │ ├── value:
+ │ │ @ StringNode (location: (13,4)-(15,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (13,4)-(14,0) = "%\r\n"
+ │ │ ├── content_loc: (14,0)-(14,0) = ""
+ │ │ ├── closing_loc: (14,0)-(15,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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (17,4)-(17,7) = "foo"
+ │ ├── opening_loc: (17,7)-(17,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,8)-(17,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (17,8)-(17,19))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ InterpolatedStringNode (location: (17,8)-(17,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (17,8)-(17,14) = "<<~EOF"
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (18,0)-(19,0))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (18,0)-(19,0) = "\r\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ └── @ StringNode (location: (19,0)-(20,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (19,0)-(20,0) = " baz\r\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "baz\n"
+ │ │ │ └── closing_loc: (20,0)-(21,0) = " EOF\r\n"
+ │ │ ├── call_operator_loc: (17,14)-(17,15) = "."
+ │ │ ├── name: :chop
+ │ │ ├── message_loc: (17,15)-(17,19) = "chop"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (17,19)-(17,20) = ")"
+ │ └── block: ∅
+ └── operator_loc: (17,2)-(17,3) = "="
diff --git a/test/prism/snapshots/dstring.txt b/test/prism/snapshots/dstring.txt
new file mode 100644
index 0000000000..3978a2f087
--- /dev/null
+++ b/test/prism/snapshots/dstring.txt
@@ -0,0 +1,85 @@
+@ ProgramNode (location: (1,0)-(29,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(29,1))
+ └── body: (length: 8)
+ ├── @ StringNode (location: (1,0)-(2,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(2,5) = "foo\n bar"
+ │ ├── closing_loc: (2,5)-(2,6) = "\""
+ │ └── unescaped: "foo\n bar"
+ ├── @ InterpolatedStringNode (location: (4,0)-(5,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (4,0)-(4,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (4,1)-(5,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (4,1)-(5,2) = "foo\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo\n "
+ │ │ └── @ EmbeddedStatementsNode (location: (5,2)-(5,8))
+ │ │ ├── opening_loc: (5,2)-(5,4) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (5,4)-(5,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,4)-(5,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (5,4)-(5,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (5,7)-(5,8) = "}"
+ │ └── closing_loc: (5,8)-(5,9) = "\""
+ ├── @ InterpolatedStringNode (location: (7,0)-(9,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (7,0)-(8,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (7,0)-(7,1) = "\""
+ │ │ │ ├── content_loc: (7,1)-(8,1) = "fo\no"
+ │ │ │ ├── closing_loc: (8,1)-(8,2) = "\""
+ │ │ │ └── unescaped: "fo\no"
+ │ │ └── @ StringNode (location: (8,3)-(9,2))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (8,3)-(8,4) = "\""
+ │ │ ├── content_loc: (8,4)-(9,1) = "ba\nr"
+ │ │ ├── closing_loc: (9,1)-(9,2) = "\""
+ │ │ └── unescaped: "ba\nr"
+ │ └── closing_loc: ∅
+ ├── @ StringNode (location: (11,0)-(13,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,0)-(11,1) = "\""
+ │ ├── content_loc: (11,1)-(13,0) = "\nfoo\\\n"
+ │ ├── closing_loc: (13,0)-(13,1) = "\""
+ │ └── unescaped: "\nfoo"
+ ├── @ StringNode (location: (15,0)-(17,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (15,0)-(15,1) = "\""
+ │ ├── content_loc: (15,1)-(17,0) = "\nfoo\\\\\n"
+ │ ├── closing_loc: (17,0)-(17,1) = "\""
+ │ └── unescaped: "\nfoo\\\n"
+ ├── @ StringNode (location: (19,0)-(21,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (19,0)-(19,1) = "\""
+ │ ├── content_loc: (19,1)-(21,0) = "\nfoo\\\\\\\n"
+ │ ├── closing_loc: (21,0)-(21,1) = "\""
+ │ └── unescaped: "\nfoo\\"
+ ├── @ StringNode (location: (23,0)-(25,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (23,0)-(23,1) = "\""
+ │ ├── content_loc: (23,1)-(25,0) = "\nfoo\\\\\\\\\n"
+ │ ├── closing_loc: (25,0)-(25,1) = "\""
+ │ └── unescaped: "\nfoo\\\\\n"
+ └── @ StringNode (location: (27,0)-(29,1))
+ ├── flags: ∅
+ ├── opening_loc: (27,0)-(27,1) = "\""
+ ├── content_loc: (27,1)-(29,0) = "\nfoo\\\\\\\\\\\n"
+ ├── closing_loc: (29,0)-(29,1) = "\""
+ └── unescaped: "\nfoo\\\\"
diff --git a/test/prism/snapshots/dsym_str.txt b/test/prism/snapshots/dsym_str.txt
new file mode 100644
index 0000000000..33a5e2da21
--- /dev/null
+++ b/test/prism/snapshots/dsym_str.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(2,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,6))
+ └── body: (length: 1)
+ └── @ SymbolNode (location: (1,0)-(2,6))
+ ├── flags: forced_us_ascii_encoding
+ ├── opening_loc: (1,0)-(1,2) = ":\""
+ ├── value_loc: (1,2)-(2,5) = "foo\n bar"
+ ├── closing_loc: (2,5)-(2,6) = "\""
+ └── unescaped: "foo\n bar"
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..3a21ce5559
--- /dev/null
+++ b/test/prism/snapshots/embdoc_no_newline_at_end.txt
@@ -0,0 +1,5 @@
+@ ProgramNode (location: (1,0)-(1,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,0))
+ └── body: (length: 0)
diff --git a/test/prism/snapshots/emoji_method_calls.txt b/test/prism/snapshots/emoji_method_calls.txt
new file mode 100644
index 0000000000..8f71181ac1
--- /dev/null
+++ b/test/prism/snapshots/emoji_method_calls.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,3)-(1,4) = "."
+ ├── name: :🌊=
+ ├── message_loc: (1,4)-(1,8) = "🌊"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,11)-(1,12))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,11)-(1,12))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/endless_methods.txt b/test/prism/snapshots/endless_methods.txt
new file mode 100644
index 0000000000..6e20c0deec
--- /dev/null
+++ b/test/prism/snapshots/endless_methods.txt
@@ -0,0 +1,107 @@
+@ 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
+ │ │ └── value: 1
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :A
+ │ │ ├── message_loc: (3,10)-(3,11) = "A"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,12)-(3,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,13)-(5,18))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (5,13)-(5,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+
+ │ │ ├── message_loc: (5,15)-(5,16) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,17)-(5,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,17)-(5,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (5,19)-(5,20) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,21)-(5,22))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,21)-(5,22))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..1802c4faed
--- /dev/null
+++ b/test/prism/snapshots/endless_range_in_conditional.txt
@@ -0,0 +1,53 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (1,3)-(1,4))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (1,4)-(1,6) = ".."
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (2,5)-(2,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (2,3)-(2,5) = ".."
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (3,3)-(3,4))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right: ∅
+ │ └── operator_loc: (3,4)-(3,6) = ".."
+ ├── then_keyword_loc: ∅
+ ├── 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..cc4bbc1166
--- /dev/null
+++ b/test/prism/snapshots/for.txt
@@ -0,0 +1,188 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 10
+ │ │ └── operator_loc: (1,10)-(1,12) = ".."
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (5,9)-(5,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (5,12)-(5,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 10
+ │ │ └── operator_loc: (5,10)-(5,12) = ".."
+ │ ├── 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))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (7,4)-(7,5))
+ │ │ │ │ ├── name: :i
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (7,6)-(7,7))
+ │ │ │ ├── name: :j
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── collection:
+ │ │ @ RangeNode (location: (7,11)-(7,16))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (7,11)-(7,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (7,14)-(7,16))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 10
+ │ │ └── operator_loc: (7,12)-(7,14) = ".."
+ │ ├── 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))
+ │ │ ├── lefts: (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
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── collection:
+ │ │ @ RangeNode (location: (11,13)-(11,18))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (11,13)-(11,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (11,16)-(11,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 10
+ │ │ └── operator_loc: (11,14)-(11,16) = ".."
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (15,9)-(15,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (15,12)-(15,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 10
+ │ │ └── operator_loc: (15,10)-(15,12) = ".."
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (19,9)-(19,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (19,12)-(19,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ └── operator_loc: (19,10)-(19,12) = ".."
+ ├── 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..9f775ed80d
--- /dev/null
+++ b/test/prism/snapshots/global_variables.txt
@@ -0,0 +1,191 @@
+@ 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))
+ │ └── name: :$&
+ ├── @ BackReferenceReadNode (location: (23,0)-(23,2))
+ │ └── name: :$`
+ ├── @ BackReferenceReadNode (location: (25,0)-(25,2))
+ │ └── name: :$'
+ ├── @ BackReferenceReadNode (location: (27,0)-(27,2))
+ │ └── name: :$+
+ ├── @ 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (51,0)-(51,1) = ":"
+ │ ├── value_loc: (51,1)-(51,3) = "$_"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$_"
+ ├── @ SymbolNode (location: (53,0)-(53,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (53,0)-(53,1) = ":"
+ │ ├── value_loc: (53,1)-(53,4) = "$-w"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$-w"
+ ├── @ SymbolNode (location: (55,0)-(55,11))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (57,0)-(57,1) = ":"
+ │ ├── value_loc: (57,1)-(57,7) = "$stdin"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$stdin"
+ ├── @ SymbolNode (location: (59,0)-(59,8))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (59,0)-(59,1) = ":"
+ │ ├── value_loc: (59,1)-(59,8) = "$stdout"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$stdout"
+ ├── @ SymbolNode (location: (61,0)-(61,8))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (61,0)-(61,1) = ":"
+ │ ├── value_loc: (61,1)-(61,8) = "$stderr"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$stderr"
+ ├── @ SymbolNode (location: (63,0)-(63,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (63,0)-(63,1) = ":"
+ │ ├── value_loc: (63,1)-(63,3) = "$!"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$!"
+ ├── @ SymbolNode (location: (65,0)-(65,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (65,0)-(65,1) = ":"
+ │ ├── value_loc: (65,1)-(65,3) = "$?"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$?"
+ ├── @ SymbolNode (location: (67,0)-(67,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (67,0)-(67,1) = ":"
+ │ ├── value_loc: (67,1)-(67,3) = "$~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$~"
+ ├── @ SymbolNode (location: (69,0)-(69,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (69,0)-(69,1) = ":"
+ │ ├── value_loc: (69,1)-(69,3) = "$&"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$&"
+ ├── @ SymbolNode (location: (71,0)-(71,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (71,0)-(71,1) = ":"
+ │ ├── value_loc: (71,1)-(71,3) = "$`"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$`"
+ ├── @ SymbolNode (location: (73,0)-(73,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (73,0)-(73,1) = ":"
+ │ ├── value_loc: (73,1)-(73,3) = "$'"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$'"
+ ├── @ SymbolNode (location: (75,0)-(75,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (75,0)-(75,1) = ":"
+ │ ├── value_loc: (75,1)-(75,3) = "$+"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$+"
+ ├── @ SymbolNode (location: (77,0)-(77,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (77,0)-(77,1) = ":"
+ │ ├── value_loc: (77,1)-(77,3) = "$:"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$:"
+ ├── @ SymbolNode (location: (79,0)-(79,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (79,0)-(79,1) = ":"
+ │ ├── value_loc: (79,1)-(79,3) = "$;"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$;"
+ ├── @ SymbolNode (location: (81,0)-(81,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (81,0)-(81,1) = ":"
+ │ ├── value_loc: (81,1)-(81,7) = "$DEBUG"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$DEBUG"
+ ├── @ SymbolNode (location: (83,0)-(83,10))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (83,0)-(83,1) = ":"
+ │ ├── value_loc: (83,1)-(83,10) = "$FILENAME"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$FILENAME"
+ ├── @ SymbolNode (location: (85,0)-(85,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (85,0)-(85,1) = ":"
+ │ ├── value_loc: (85,1)-(85,3) = "$0"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$0"
+ ├── @ SymbolNode (location: (87,0)-(87,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (87,0)-(87,1) = ":"
+ │ ├── value_loc: (87,1)-(87,4) = "$-0"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$-0"
+ ├── @ SymbolNode (location: (89,0)-(89,17))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (91,0)-(91,1) = ":"
+ │ ├── value_loc: (91,1)-(91,9) = "$VERBOSE"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$VERBOSE"
+ └── @ SymbolNode (location: (93,0)-(93,4))
+ ├── flags: forced_us_ascii_encoding
+ ├── 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..7a3ac4b0ea
--- /dev/null
+++ b/test/prism/snapshots/hashes.txt
@@ -0,0 +1,384 @@
+@ ProgramNode (location: (1,0)-(28,9))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(28,9))
+ └── body: (length: 10)
+ ├── @ 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (6,2)-(6,3) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (6,7)-(6,8))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (6,7)-(6,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (6,4)-(6,6) = "=>"
+ │ │ └── @ AssocNode (location: (6,10)-(6,16))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (6,10)-(6,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (6,10)-(6,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (6,15)-(6,16))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (6,15)-(6,16) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (8,2)-(8,3) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (8,7)-(8,8))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (8,7)-(8,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (8,4)-(8,6) = "=>"
+ │ │ └── @ AssocSplatNode (location: (8,10)-(8,13))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (8,12)-(8,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (8,12)-(8,13) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (11,6)-(11,7) = "a"
+ │ │ │ │ ├── closing_loc: (11,7)-(11,8) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (11,9)-(11,10))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (11,9)-(11,10) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (12,6)-(12,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (12,6)-(12,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (12,6)-(12,7) = "c"
+ │ │ │ ├── closing_loc: (12,7)-(12,8) = ":"
+ │ │ │ └── unescaped: "c"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (12,9)-(12,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (12,9)-(12,10) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (18,2)-(18,3) = "a"
+ │ │ │ │ ├── closing_loc: (18,3)-(18,4) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (18,5)-(18,6))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (18,5)-(18,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── @ AssocNode (location: (18,8)-(18,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (18,8)-(18,10))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (18,8)-(18,9) = "c"
+ │ │ │ │ ├── closing_loc: (18,9)-(18,10) = ":"
+ │ │ │ │ └── unescaped: "c"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (18,11)-(18,12))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── message_loc: (18,11)-(18,12) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── @ AssocSplatNode (location: (18,14)-(18,17))
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (18,16)-(18,17))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :e
+ │ │ │ │ ├── message_loc: (18,16)-(18,17) = "e"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (18,14)-(18,16) = "**"
+ │ │ └── @ AssocNode (location: (18,19)-(18,23))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (18,19)-(18,21))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (18,19)-(18,20) = "f"
+ │ │ │ ├── closing_loc: (18,20)-(18,21) = ":"
+ │ │ │ └── unescaped: "f"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (18,22)-(18,23))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :g
+ │ │ │ ├── message_loc: (18,22)-(18,23) = "g"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (20,8)-(20,10))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b?
+ │ │ │ │ ├── message_loc: (20,8)-(20,10) = "b?"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :!
+ │ │ │ ├── message_loc: (20,7)-(20,8) = "!"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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
+ │ │ └── value: 1
+ │ └── operator_loc: (22,2)-(22,3) = "="
+ ├── @ CallNode (location: (23,0)-(26,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ ├── message_loc: (25,12)-(25,13) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (25,16)-(25,18))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (25,16)-(25,18))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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"
+ └── @ HashNode (location: (28,0)-(28,9))
+ ├── opening_loc: (28,0)-(28,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (28,2)-(28,7))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (28,2)-(28,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (28,2)-(28,3) = "a"
+ │ │ ├── closing_loc: (28,3)-(28,4) = ":"
+ │ │ └── unescaped: "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (28,5)-(28,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: -1
+ │ └── operator_loc: ∅
+ └── closing_loc: (28,8)-(28,9) = "}"
diff --git a/test/prism/snapshots/heredoc.txt b/test/prism/snapshots/heredoc.txt
new file mode 100644
index 0000000000..3ca66dd989
--- /dev/null
+++ b/test/prism/snapshots/heredoc.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) = "<<TEXT"
+ ├── content_loc: (2,0)-(2,0) = ""
+ ├── closing_loc: (2,0)-(3,0) = "TEXT\n"
+ └── unescaped: ""
diff --git a/test/prism/snapshots/heredoc_with_carriage_returns.txt b/test/prism/snapshots/heredoc_with_carriage_returns.txt
new file mode 100644
index 0000000000..134f863234
--- /dev/null
+++ b/test/prism/snapshots/heredoc_with_carriage_returns.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) = "<<TEXT"
+ ├── content_loc: (2,0)-(2,0) = ""
+ ├── closing_loc: (2,0)-(3,0) = "TEXT\r\n"
+ └── unescaped: ""
diff --git a/test/prism/snapshots/heredoc_with_comment.txt b/test/prism/snapshots/heredoc_with_comment.txt
new file mode 100644
index 0000000000..f2225ca981
--- /dev/null
+++ b/test/prism/snapshots/heredoc_with_comment.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ StringNode (location: (1,0)-(1,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,9) = "<<-TARGET"
+ │ ├── content_loc: (2,0)-(3,0) = " content makes for an obvious error\r\n"
+ │ ├── closing_loc: (3,0)-(3,6) = "TARGET"
+ │ └── unescaped: " content makes for an obvious error\n"
+ ├── call_operator_loc: (1,9)-(1,10) = "."
+ ├── name: :chomp
+ ├── message_loc: (1,10)-(1,15) = "chomp"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..acc6b082fc
--- /dev/null
+++ b/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt
@@ -0,0 +1,67 @@
+@ ProgramNode (location: (1,0)-(5,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,25))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,25))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (1,0)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,0)-(1,9) = "<<-TARGET"
+ │ │ ├── content_loc: (2,0)-(2,0) = ""
+ │ │ ├── closing_loc: (2,0)-(3,0) = "TARGET\n"
+ │ │ └── unescaped: ""
+ │ ├── call_operator_loc: (1,9)-(1,10) = "."
+ │ ├── name: :gsub
+ │ ├── message_loc: (1,10)-(1,14) = "gsub"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,15)-(1,25))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ RegularExpressionNode (location: (1,15)-(1,21))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,15)-(1,16) = "/"
+ │ │ │ ├── content_loc: (1,16)-(1,20) = "^\\s{"
+ │ │ │ ├── closing_loc: (1,20)-(1,21) = "/"
+ │ │ │ └── unescaped: "^\\s{"
+ │ │ └── @ 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: ∅
+ └── @ CallNode (location: (5,0)-(5,25))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ StringNode (location: (5,0)-(5,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,0)-(5,9) = "<<-TARGET"
+ │ ├── content_loc: (6,0)-(6,0) = ""
+ │ ├── closing_loc: (6,0)-(7,0) = "TARGET\r\n"
+ │ └── unescaped: ""
+ ├── call_operator_loc: (5,9)-(5,10) = "."
+ ├── name: :gsub
+ ├── message_loc: (5,10)-(5,14) = "gsub"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,15)-(5,25))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ RegularExpressionNode (location: (5,15)-(5,21))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (5,15)-(5,16) = "/"
+ │ │ ├── content_loc: (5,16)-(5,20) = "^\\s{"
+ │ │ ├── closing_loc: (5,20)-(5,21) = "/"
+ │ │ └── unescaped: "^\\s{"
+ │ └── @ 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: ∅
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..b064931aa8
--- /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)-(2,0) = ""
+ ├── closing_loc: (2,0)-(2,3) = "END"
+ └── unescaped: ""
diff --git a/test/prism/snapshots/heredocs_leading_whitespace.txt b/test/prism/snapshots/heredocs_leading_whitespace.txt
new file mode 100644
index 0000000000..dbcb0d5a19
--- /dev/null
+++ b/test/prism/snapshots/heredocs_leading_whitespace.txt
@@ -0,0 +1,63 @@
+@ ProgramNode (location: (1,0)-(26,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(26,10))
+ └── body: (length: 6)
+ ├── @ StringNode (location: (1,0)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,10) = "<<-' FOO'"
+ │ ├── content_loc: (2,0)-(4,0) = "a\nb\n"
+ │ ├── closing_loc: (4,0)-(5,0) = " FOO\n"
+ │ └── unescaped: "a\nb\n"
+ ├── @ StringNode (location: (6,0)-(6,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (6,0)-(6,10) = "<<-\" FOO\""
+ │ ├── content_loc: (7,0)-(9,0) = "a\nb\n"
+ │ ├── closing_loc: (9,0)-(10,0) = " FOO\n"
+ │ └── unescaped: "a\nb\n"
+ ├── @ XStringNode (location: (11,0)-(11,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,0)-(11,10) = "<<-` FOO`"
+ │ ├── content_loc: (12,0)-(14,0) = "a\nb\n"
+ │ ├── closing_loc: (14,0)-(15,0) = " FOO\n"
+ │ └── unescaped: "a\nb\n"
+ ├── @ StringNode (location: (16,0)-(16,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (16,0)-(16,10) = "<<-' FOO'"
+ │ ├── content_loc: (17,0)-(19,0) = "a\nb\n"
+ │ ├── closing_loc: (19,0)-(20,0) = " FOO\n"
+ │ └── unescaped: "a\nb\n"
+ ├── @ InterpolatedStringNode (location: (21,0)-(21,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (21,0)-(21,10) = "<<~' FOO'"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (22,0)-(23,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (22,0)-(23,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ StringNode (location: (23,0)-(24,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (23,0)-(24,0) = "b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (24,0)-(25,0) = " FOO\n"
+ └── @ InterpolatedStringNode (location: (26,0)-(26,10))
+ ├── flags: ∅
+ ├── opening_loc: (26,0)-(26,10) = "<<~' FOO'"
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (27,0)-(28,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (27,0)-(28,0) = "a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\n"
+ │ └── @ StringNode (location: (28,0)-(29,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (28,0)-(29,0) = "b\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "b\n"
+ └── closing_loc: (29,0)-(30,0) = " FOO\n"
diff --git a/test/prism/snapshots/heredocs_nested.txt b/test/prism/snapshots/heredocs_nested.txt
new file mode 100644
index 0000000000..da13e48c51
--- /dev/null
+++ b/test/prism/snapshots/heredocs_nested.txt
@@ -0,0 +1,94 @@
+@ ProgramNode (location: (1,0)-(12,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(12,4))
+ └── body: (length: 2)
+ ├── @ InterpolatedStringNode (location: (1,0)-(1,7))
+ │ ├── flags: mutable
+ │ ├── opening_loc: (1,0)-(1,7) = "<<~RUBY"
+ │ ├── parts: (length: 4)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,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: frozen
+ │ │ │ │ ├── opening_loc: (4,0)-(4,6) = "<<RUBY"
+ │ │ │ │ ├── content_loc: (5,0)-(6,0) = " hello\n"
+ │ │ │ │ ├── closing_loc: (6,0)-(7,0) = "RUBY\n"
+ │ │ │ │ └── unescaped: " hello\n"
+ │ │ │ └── closing_loc: (7,0)-(7,1) = "}"
+ │ │ ├── @ StringNode (location: (7,1)-(8,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (7,1)-(8,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (8,0)-(9,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (8,0)-(9,0) = "post\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "post\n"
+ │ └── closing_loc: (9,0)-(10,0) = "RUBY\n"
+ └── @ InterpolatedStringNode (location: (12,0)-(12,4))
+ ├── flags: ∅
+ ├── opening_loc: (12,0)-(12,4) = "<<-A"
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (13,0)-(21,1))
+ │ │ ├── opening_loc: (13,0)-(13,2) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (14,0)-(14,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (14,0)-(14,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (14,0)-(14,4) = "<<-B"
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (15,0)-(19,1))
+ │ │ │ │ │ ├── opening_loc: (15,0)-(15,2) = "\#{"
+ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ @ StatementsNode (location: (16,0)-(16,4))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ InterpolatedStringNode (location: (16,0)-(16,4))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ ├── opening_loc: (16,0)-(16,4) = "<<-C"
+ │ │ │ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (17,0)-(17,4))
+ │ │ │ │ │ │ │ │ ├── opening_loc: (17,0)-(17,2) = "\#{"
+ │ │ │ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ │ │ │ @ StatementsNode (location: (17,2)-(17,3))
+ │ │ │ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ │ │ │ └── @ IntegerNode (location: (17,2)-(17,3))
+ │ │ │ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ │ │ │ └── value: 3
+ │ │ │ │ │ │ │ │ └── closing_loc: (17,3)-(17,4) = "}"
+ │ │ │ │ │ │ │ └── @ StringNode (location: (17,4)-(18,0))
+ │ │ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ │ ├── content_loc: (17,4)-(18,0) = "\n"
+ │ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ │ │ └── closing_loc: (18,0)-(19,0) = "C\n"
+ │ │ │ │ │ └── closing_loc: (19,0)-(19,1) = "}"
+ │ │ │ │ └── @ StringNode (location: (19,1)-(20,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (19,1)-(20,0) = "\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\n"
+ │ │ │ └── closing_loc: (20,0)-(21,0) = "B\n"
+ │ │ └── closing_loc: (21,0)-(21,1) = "}"
+ │ └── @ StringNode (location: (21,1)-(22,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (21,1)-(22,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (22,0)-(23,0) = "A\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..0f964ec294
--- /dev/null
+++ b/test/prism/snapshots/heredocs_with_ignored_newlines.txt
@@ -0,0 +1,70 @@
+@ 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)-(2,0) = ""
+ │ ├── closing_loc: (2,0)-(3,0) = "HERE\n"
+ │ └── unescaped: ""
+ └── @ InterpolatedStringNode (location: (4,0)-(4,8))
+ ├── flags: ∅
+ ├── opening_loc: (4,0)-(4,8) = "<<~THERE"
+ ├── parts: (length: 9)
+ │ ├── @ StringNode (location: (5,0)-(6,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (5,0)-(6,0) = " way over\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "way over\n"
+ │ ├── @ StringNode (location: (6,0)-(7,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (6,0)-(7,0) = " <<HERE\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "<<HERE\n"
+ │ ├── @ StringNode (location: (7,0)-(8,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (7,0)-(8,0) = " not here\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " not here\n"
+ │ ├── @ StringNode (location: (8,0)-(9,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (8,0)-(9,0) = " HERE\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "HERE\n"
+ │ ├── @ StringNode (location: (9,0)-(10,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (9,0)-(10,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ ├── @ StringNode (location: (10,0)-(11,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (10,0)-(11,0) = " <<~BUT\\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "<<~BUT"
+ │ ├── @ StringNode (location: (11,0)-(12,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (11,0)-(12,0) = " but\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " but\n"
+ │ ├── @ StringNode (location: (12,0)-(13,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (12,0)-(13,0) = " BUT\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "BUT\n"
+ │ └── @ StringNode (location: (13,0)-(14,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (13,0)-(14,0) = " there\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: " there\n"
+ └── closing_loc: (14,0)-(15,0) = "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..df422f0c1c
--- /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)-(4,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..4114d22722
--- /dev/null
+++ b/test/prism/snapshots/if.txt
@@ -0,0 +1,531 @@
+@ 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,9)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,9)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (4,0)-(4,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (4,0)-(4,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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))
+ │ ├── then_keyword_loc: (6,8)-(6,12) = "then"
+ │ ├── 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))
+ │ │ ├── then_keyword_loc: (6,30)-(6,34) = "then"
+ │ │ ├── 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))
+ │ │ │ ├── then_keyword_loc: (6,51)-(6,55) = "then"
+ │ │ │ ├── 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,0)-(8,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ CallNode (location: (10,0)-(10,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (10,0)-(10,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (10,4)-(10,21))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (10,6)-(10,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IfNode (location: (10,6)-(10,19))
+ │ │ ├── if_keyword_loc: (10,12)-(10,14) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (10,15)-(10,19))
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (10,6)-(10,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ BreakNode (location: (10,6)-(10,11))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (10,6)-(10,11) = "break"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── opening_loc: (10,4)-(10,5) = "{"
+ │ └── closing_loc: (10,20)-(10,21) = "}"
+ ├── @ CallNode (location: (12,0)-(12,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (12,0)-(12,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (12,4)-(12,20))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (12,6)-(12,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IfNode (location: (12,6)-(12,18))
+ │ │ ├── if_keyword_loc: (12,11)-(12,13) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (12,14)-(12,18))
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (12,6)-(12,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NextNode (location: (12,6)-(12,10))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (12,6)-(12,10) = "next"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── opening_loc: (12,4)-(12,5) = "{"
+ │ └── closing_loc: (12,19)-(12,20) = "}"
+ ├── @ IfNode (location: (14,0)-(14,14))
+ │ ├── if_keyword_loc: (14,7)-(14,9) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (14,10)-(14,14))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (14,0)-(14,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (14,0)-(14,6))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (14,0)-(14,6) = "return"
+ │ │ └── arguments: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ CallNode (location: (16,0)-(16,38))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (16,0)-(16,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (16,4)-(16,38))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (16,6)-(16,36))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IfNode (location: (16,6)-(16,36))
+ │ │ ├── if_keyword_loc: (16,6)-(16,8) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (16,9)-(16,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :exit_loop
+ │ │ │ ├── message_loc: (16,9)-(16,18) = "exit_loop"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: (16,19)-(16,23) = "then"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (16,24)-(16,32))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ BreakNode (location: (16,24)-(16,32))
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (16,30)-(16,32))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (16,30)-(16,32))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 42
+ │ │ │ └── keyword_loc: (16,24)-(16,29) = "break"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: (16,33)-(16,36) = "end"
+ │ ├── opening_loc: (16,4)-(16,5) = "{"
+ │ └── closing_loc: (16,37)-(16,38) = "}"
+ ├── @ IfNode (location: (18,0)-(20,3))
+ │ ├── if_keyword_loc: (18,0)-(18,2) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (18,3)-(18,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (18,3)-(18,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (19,0)-(19,4) = "then"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (19,5)-(19,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (19,5)-(19,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (19,5)-(19,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (22,10)-(22,11) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (22,5)-(22,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (22,0)-(22,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (22,0)-(22,1))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (22,0)-(22,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (25,2)-(25,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (25,2)-(25,6))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (25,2)-(25,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (25,4)-(25,6))
+ │ │ │ ├── flags: contains_keywords
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (25,4)-(25,6))
+ │ │ │ ├── flags: symbol_keys
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (25,4)-(25,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (25,4)-(25,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (25,4)-(25,5) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :type
+ │ │ │ ├── message_loc: (29,3)-(29,7) = "type"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (29,11)-(29,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (29,8)-(29,10) = "in"
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :type
+ │ │ │ │ ├── message_loc: (30,6)-(30,10) = "type"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── pattern:
+ │ │ │ │ @ ConstantReadNode (location: (30,14)-(30,15))
+ │ │ │ │ └── name: :B
+ │ │ │ └── operator_loc: (30,11)-(30,13) = "in"
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── 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:
+ │ @ CallNode (location: (33,3)-(33,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f1
+ │ ├── message_loc: (33,3)-(33,5) = "f1"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (34,2)-(35,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (34,2)-(35,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :lambda
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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"
+ ├── consequent:
+ │ @ IfNode (location: (36,0)-(42,3))
+ │ ├── if_keyword_loc: (36,0)-(36,5) = "elsif"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (36,6)-(36,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :f2
+ │ │ ├── message_loc: (36,6)-(36,8) = "f2"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (37,2)-(38,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (37,2)-(38,5))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :lambda
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── 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"
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :lambda
+ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── 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"
+ │ │ └── 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..4660928ad2
--- /dev/null
+++ b/test/prism/snapshots/integer_operations.txt
@@ -0,0 +1,635 @@
+@ ProgramNode (location: (1,0)-(63,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(63,7))
+ └── body: (length: 32)
+ ├── @ CallNode (location: (1,0)-(1,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (3,1)-(3,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :~
+ │ ├── message_loc: (3,0)-(3,1) = "~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (5,0)-(5,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!=
+ │ ├── message_loc: (5,2)-(5,4) = "!="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,5)-(5,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,5)-(5,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(7,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (7,0)-(7,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!~
+ │ ├── message_loc: (7,2)-(7,4) = "!~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,5)-(7,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,5)-(7,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (9,0)-(9,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (9,0)-(9,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :%
+ │ ├── message_loc: (9,2)-(9,3) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,4)-(9,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (9,4)-(9,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (11,0)-(11,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (11,0)-(11,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :&
+ │ ├── message_loc: (11,2)-(11,3) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (13,0)-(13,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (13,0)-(13,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :*
+ │ ├── message_loc: (13,2)-(13,3) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,4)-(13,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,4)-(13,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (15,0)-(15,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (15,0)-(15,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :**
+ │ ├── message_loc: (15,1)-(15,3) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,3)-(15,4))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (15,3)-(15,4))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (17,0)-(17,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (17,0)-(17,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (17,2)-(17,3) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,4)-(17,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (17,4)-(17,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (19,0)-(19,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (19,0)-(19,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :-
+ │ ├── message_loc: (19,2)-(19,3) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,4)-(19,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (19,4)-(19,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (21,0)-(21,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (21,0)-(21,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :/
+ │ ├── message_loc: (21,2)-(21,3) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,4)-(21,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (21,4)-(21,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (23,0)-(23,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,3))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (23,0)-(23,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :/
+ │ │ ├── message_loc: (23,1)-(23,2) = "/"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (23,2)-(23,3))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (23,2)-(23,3))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :/
+ │ ├── message_loc: (23,3)-(23,4) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,4)-(23,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (23,4)-(23,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (25,0)-(25,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (25,0)-(25,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<
+ │ ├── message_loc: (25,2)-(25,3) = "<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,4)-(25,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (25,4)-(25,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (27,0)-(27,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (27,0)-(27,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<<
+ │ ├── message_loc: (27,2)-(27,4) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,5)-(27,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (27,5)-(27,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (29,0)-(29,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (29,0)-(29,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<=
+ │ ├── message_loc: (29,2)-(29,4) = "<="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,5)-(29,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (29,5)-(29,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(31,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (31,0)-(31,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<=>
+ │ ├── message_loc: (31,2)-(31,5) = "<=>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,6)-(31,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,6)-(31,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (33,0)-(33,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (33,0)-(33,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :==
+ │ ├── message_loc: (33,2)-(33,4) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,5)-(33,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (33,5)-(33,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (35,0)-(35,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (35,0)-(35,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :===
+ │ ├── message_loc: (35,2)-(35,5) = "==="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,6)-(35,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (35,6)-(35,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (37,0)-(37,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (37,0)-(37,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (37,2)-(37,4) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,5)-(37,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (37,5)-(37,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (39,0)-(39,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (39,0)-(39,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>
+ │ ├── message_loc: (39,2)-(39,3) = ">"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,4)-(39,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (39,4)-(39,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (41,0)-(41,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (41,0)-(41,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>=
+ │ ├── message_loc: (41,2)-(41,4) = ">="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,5)-(41,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (41,5)-(41,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (43,0)-(43,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (43,0)-(43,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>>
+ │ ├── message_loc: (43,2)-(43,4) = ">>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (43,5)-(43,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (43,5)-(43,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (45,0)-(45,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :^
+ │ ├── message_loc: (45,2)-(45,3) = "^"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,4)-(45,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (45,4)-(45,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (47,0)-(47,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (47,0)-(47,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :|
+ │ ├── message_loc: (47,2)-(47,3) = "|"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (47,4)-(47,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (47,4)-(47,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ AndNode (location: (49,0)-(49,6))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (49,0)-(49,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (49,5)-(49,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (49,2)-(49,4) = "&&"
+ ├── @ AndNode (location: (51,0)-(51,7))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (51,0)-(51,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (51,6)-(51,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (51,2)-(51,5) = "and"
+ ├── @ CallNode (location: (53,0)-(53,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (53,0)-(53,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :*
+ │ ├── message_loc: (53,2)-(53,3) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (53,4)-(53,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (53,4)-(53,10))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (53,4)-(53,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :**
+ │ │ ├── message_loc: (53,6)-(53,8) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (53,9)-(53,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (53,9)-(53,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (55,0)-(55,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (55,0)-(55,5))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (55,0)-(55,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :*
+ │ │ ├── message_loc: (55,2)-(55,3) = "*"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (55,4)-(55,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (55,4)-(55,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (55,6)-(55,7) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (55,8)-(55,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (55,8)-(55,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ OrNode (location: (57,0)-(57,6))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (57,0)-(57,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (57,5)-(57,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (57,2)-(57,4) = "or"
+ ├── @ OrNode (location: (59,0)-(59,6))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (59,0)-(59,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (59,5)-(59,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (59,2)-(59,4) = "||"
+ ├── @ CallNode (location: (61,0)-(61,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (61,0)-(61,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (61,2)-(61,3) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (61,4)-(61,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (61,4)-(61,9))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (61,4)-(61,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :*
+ │ │ ├── message_loc: (61,6)-(61,7) = "*"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (61,8)-(61,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (61,8)-(61,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ ParenthesesNode (location: (63,0)-(63,7))
+ ├── body:
+ │ @ StatementsNode (location: (63,1)-(63,6))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (63,1)-(63,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (63,1)-(63,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (63,3)-(63,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (63,5)-(63,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (63,5)-(63,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..6d59790b07
--- /dev/null
+++ b/test/prism/snapshots/keyword_method_names.txt
@@ -0,0 +1,173 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :private
+ │ ├── message_loc: (7,0)-(7,7) = "private"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,8)-(10,3))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── 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"
+ │ │ ├── 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: ∅
+ ├── @ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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..b3d5c5e1c3
--- /dev/null
+++ b/test/prism/snapshots/keywords.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(11,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,8))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(1,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (1,0)-(1,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (1,4)-(1,12))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,6)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RedoNode (location: (1,6)-(1,10))
+ │ ├── opening_loc: (1,4)-(1,5) = "{"
+ │ └── closing_loc: (1,11)-(1,12) = "}"
+ ├── @ BeginNode (location: (3,0)-(3,25))
+ │ ├── begin_keyword_loc: (3,0)-(3,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (3,7)-(3,20))
+ │ │ ├── keyword_loc: (3,7)-(3,13) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,15)-(3,20))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ RetryNode (location: (3,15)-(3,20))
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (3,22)-(3,25) = "end"
+ ├── @ SelfNode (location: (5,0)-(5,4))
+ ├── @ SourceEncodingNode (location: (7,0)-(7,12))
+ ├── @ SourceFileNode (location: (9,0)-(9,8))
+ │ ├── flags: ∅
+ │ └── 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..0864b10369
--- /dev/null
+++ b/test/prism/snapshots/lambda.txt
@@ -0,0 +1,202 @@
+@ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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)
+ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (5,3)-(5,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :x
+ │ │ │ │ ├── name_loc: (5,3)-(5,5) = "x:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ InterpolatedStringNode (location: (5,6)-(5,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (5,6)-(5,7) = "\""
+ │ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ │ ├── @ StringNode (location: (5,7)-(5,8))
+ │ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ ├── message_loc: (5,10)-(5,11) = "a"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ └── 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)
+ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (7,3)-(7,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (7,3)-(7,5) = "a:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (7,6)-(7,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── message_loc: (7,6)-(7,7) = "b"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :*
+ │ │ │ │ ├── message_loc: (7,8)-(7,9) = "*"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (7,10)-(7,11))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (7,10)-(7,11))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 3
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── name_loc: (9,3)-(9,6) = "foo"
+ │ │ │ │ ├── operator_loc: (9,7)-(9,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (9,9)-(9,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (11,3)-(11,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (11,3)-(11,7) = "foo:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (11,8)-(11,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (11,8)-(11,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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..6082b567f7
--- /dev/null
+++ b/test/prism/snapshots/method_calls.txt
@@ -0,0 +1,2456 @@
+@ ProgramNode (location: (1,0)-(156,19))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(156,19))
+ └── body: (length: 67)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── @ CallNode (location: (3,0)-(3,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,1)-(3,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (3,4)-(3,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (3,4)-(3,5) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (3,7)-(3,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (3,7)-(3,8) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (3,8)-(3,9) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (5,1)-(5,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (5,2)-(5,3) = "b"
+ │ ├── opening_loc: (5,3)-(5,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (5,4)-(5,5) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(9,7))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(8,6))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (7,0)-(7,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (8,2)-(8,3) = "."
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (8,3)-(8,6) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (9,2)-(9,4) = "&."
+ │ ├── name: :baz
+ │ ├── message_loc: (9,4)-(9,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (11,0)-(11,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a!
+ │ ├── message_loc: (11,0)-(11,2) = "a!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (13,0)-(13,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (13,0)-(13,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (13,1)-(13,2) = "."
+ │ ├── name: :call
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (13,2)-(13,3) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (13,3)-(13,4) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (15,0)-(15,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (15,0)-(15,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (15,0)-(15,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (15,1)-(15,2) = "."
+ │ ├── name: :call
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (15,2)-(15,3) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,3)-(15,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (15,3)-(15,4))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ IntegerNode (location: (15,6)-(15,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── @ IntegerNode (location: (15,9)-(15,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── closing_loc: (15,10)-(15,11) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (17,0)-(17,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (17,0)-(17,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (17,1)-(17,3) = "::"
+ │ ├── name: :b
+ │ ├── message_loc: (17,3)-(17,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (19,0)-(19,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (19,0)-(19,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (19,0)-(19,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (19,1)-(19,3) = "::"
+ │ ├── name: :b
+ │ ├── message_loc: (19,3)-(19,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,5)-(19,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (19,5)-(19,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (19,5)-(19,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (21,0)-(21,11))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (21,0)-(21,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (21,0)-(21,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (21,3)-(21,4) = "."
+ │ ├── name: :bar=
+ │ ├── message_loc: (21,4)-(21,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,10)-(21,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (21,10)-(21,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (23,0)-(23,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a?
+ │ ├── message_loc: (23,0)-(23,2) = "a?"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (25,0)-(25,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :block
+ │ │ ├── message_loc: (25,3)-(25,8) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (25,2)-(25,3) = "&"
+ ├── @ CallNode (location: (27,0)-(27,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (27,0)-(27,1) = "a"
+ │ ├── opening_loc: (27,1)-(27,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,2)-(27,10))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (27,2)-(27,10))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (27,2)-(27,10))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (27,4)-(27,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :kwargs
+ │ │ │ ├── message_loc: (27,4)-(27,10) = "kwargs"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (27,2)-(27,4) = "**"
+ │ ├── closing_loc: (27,10)-(27,11) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (29,0)-(29,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (29,0)-(29,3))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (29,0)-(29,1))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (29,0)-(29,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (29,1)-(29,2) = "."
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (29,2)-(29,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (29,3)-(29,4) = "."
+ │ ├── name: :c
+ │ ├── message_loc: (29,4)-(29,5) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(31,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (31,0)-(31,1) = "a"
+ │ ├── opening_loc: (31,1)-(31,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,2)-(31,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (31,2)-(31,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (31,2)-(31,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (31,5)-(31,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (31,5)-(31,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (31,6)-(31,7) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (33,0)-(33,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (33,0)-(33,1) = "a"
+ │ ├── opening_loc: (33,1)-(33,2) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (33,2)-(33,3) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (35,0)-(35,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (35,0)-(35,1) = "a"
+ │ ├── opening_loc: (35,1)-(35,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,2)-(35,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (35,2)-(35,7))
+ │ │ ├── operator_loc: (35,2)-(35,3) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (35,3)-(35,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :args
+ │ │ ├── message_loc: (35,3)-(35,7) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (35,7)-(35,8) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (37,0)-(37,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (37,0)-(37,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,2)-(37,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (37,2)-(37,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (37,5)-(37,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (37,5)-(37,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (39,0)-(39,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (39,0)-(39,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (39,0)-(39,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (39,1)-(39,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (39,2)-(39,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,4)-(39,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (39,4)-(39,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (39,4)-(39,5) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (39,7)-(39,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (39,7)-(39,8) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (41,0)-(41,23))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ CallTargetNode (location: (41,0)-(41,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: (41,3)-(41,4) = "."
+ │ │ │ ├── name: :foo=
+ │ │ │ └── message_loc: (41,4)-(41,7) = "foo"
+ │ │ └── @ CallTargetNode (location: (41,9)-(41,16))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (41,9)-(41,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (41,9)-(41,12) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (41,12)-(41,13) = "."
+ │ │ ├── name: :bar=
+ │ │ └── message_loc: (41,13)-(41,16) = "bar"
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (41,17)-(41,18) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (41,19)-(41,23))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (41,19)-(41,20))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (41,22)-(41,23))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ CallNode (location: (43,0)-(43,4))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (43,0)-(43,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (43,0)-(43,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (43,1)-(43,3) = "&."
+ │ ├── name: :b
+ │ ├── message_loc: (43,3)-(43,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,5))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (45,0)-(45,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (45,0)-(45,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (45,1)-(45,3) = "&."
+ │ ├── name: :call
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (45,3)-(45,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (45,4)-(45,5) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (47,0)-(47,7))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (47,0)-(47,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (47,0)-(47,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (47,1)-(47,3) = "&."
+ │ ├── name: :b
+ │ ├── message_loc: (47,3)-(47,4) = "b"
+ │ ├── opening_loc: (47,4)-(47,5) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (47,5)-(47,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (47,5)-(47,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (47,5)-(47,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (47,6)-(47,7) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (49,0)-(49,6))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (49,0)-(49,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (49,0)-(49,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (49,1)-(49,3) = "&."
+ │ ├── name: :b
+ │ ├── message_loc: (49,3)-(49,4) = "b"
+ │ ├── opening_loc: (49,4)-(49,5) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (49,5)-(49,6) = ")"
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar?
+ │ │ │ │ ├── message_loc: (51,14)-(51,18) = "bar?"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (51,22)-(51,25))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (51,22)-(51,25) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (51,19)-(51,21) = "or"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (51,30)-(51,33))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :qux
+ │ │ │ ├── message_loc: (51,30)-(51,33) = "qux"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (51,26)-(51,29) = "and"
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (51,0)-(51,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (51,0)-(51,10))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (51,0)-(51,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (51,4)-(51,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (51,4)-(51,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (51,4)-(51,5) = ":"
+ │ │ │ │ ├── value_loc: (51,5)-(51,6) = "a"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ └── @ SymbolNode (location: (51,8)-(51,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (51,8)-(51,9) = ":"
+ │ │ │ ├── value_loc: (51,9)-(51,10) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ CallNode (location: (53,0)-(56,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (53,0)-(53,3) = "foo"
+ │ ├── opening_loc: (53,3)-(53,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (53,4)-(55,4))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (53,4)-(53,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (53,4)-(53,5) = ":"
+ │ │ │ ├── value_loc: (53,5)-(53,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (55,2)-(55,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (55,2)-(55,3) = ":"
+ │ │ ├── value_loc: (55,3)-(55,4) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: (56,0)-(56,1) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (58,0)-(58,10))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (58,0)-(58,3) = "foo"
+ │ ├── opening_loc: (58,3)-(58,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (58,4)-(58,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (58,4)-(58,9))
+ │ │ ├── operator_loc: (58,4)-(58,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (58,5)-(58,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :rest
+ │ │ ├── message_loc: (58,5)-(58,9) = "rest"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (58,9)-(58,10) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (60,0)-(60,39))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (60,0)-(60,3) = "foo"
+ │ ├── opening_loc: (60,3)-(60,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (60,4)-(60,32))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (60,4)-(60,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (60,4)-(60,5) = ":"
+ │ │ │ ├── value_loc: (60,5)-(60,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ KeywordHashNode (location: (60,8)-(60,32))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (60,8)-(60,22))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (60,8)-(60,10))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (60,8)-(60,9) = ":"
+ │ │ │ │ ├── value_loc: (60,9)-(60,10) = "h"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "h"
+ │ │ │ ├── value:
+ │ │ │ │ @ ArrayNode (location: (60,14)-(60,22))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ │ ├── @ SymbolNode (location: (60,15)-(60,17))
+ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ ├── opening_loc: (60,15)-(60,16) = ":"
+ │ │ │ │ │ │ ├── value_loc: (60,16)-(60,17) = "x"
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: "x"
+ │ │ │ │ │ └── @ SymbolNode (location: (60,19)-(60,21))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (60,24)-(60,25) = ":"
+ │ │ │ ├── value_loc: (60,25)-(60,26) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (60,30)-(60,32))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (60,35)-(60,36) = ":"
+ │ │ ├── value_loc: (60,36)-(60,39) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── operator_loc: (60,34)-(60,35) = "&"
+ ├── @ CallNode (location: (62,0)-(62,49))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :hi
+ │ ├── message_loc: (62,0)-(62,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (62,3)-(62,49))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (62,3)-(62,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 123
+ │ │ └── @ 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (62,10)-(62,11) = ":"
+ │ │ │ │ │ ├── value_loc: (62,11)-(62,16) = "there"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "there"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ SymbolNode (location: (62,20)-(62,27))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (62,35)-(62,41) = "whatup"
+ │ │ │ │ ├── closing_loc: (62,41)-(62,42) = ":"
+ │ │ │ │ └── unescaped: "whatup"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (62,43)-(62,47))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (64,0)-(64,36))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (64,0)-(64,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (64,4)-(64,15))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (64,4)-(64,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (64,4)-(64,5) = ":"
+ │ │ │ ├── value_loc: (64,5)-(64,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ KeywordHashNode (location: (64,8)-(64,15))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (64,8)-(64,15))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (64,8)-(64,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (64,23)-(64,24))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (64,26)-(64,30) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (64,31)-(64,32))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (64,31)-(64,32))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (64,16)-(64,18) = "do"
+ │ └── closing_loc: (64,33)-(64,36) = "end"
+ ├── @ CallNode (location: (66,0)-(66,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :hi
+ │ ├── message_loc: (66,0)-(66,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (66,3)-(66,17))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (66,3)-(66,17))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (66,3)-(66,17))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (66,3)-(66,9))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (66,3)-(66,8) = "there"
+ │ │ │ ├── closing_loc: (66,8)-(66,9) = ":"
+ │ │ │ └── unescaped: "there"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (66,10)-(66,17))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (66,10)-(66,11) = ":"
+ │ │ │ ├── value_loc: (66,11)-(66,17) = "friend"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "friend"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (68,0)-(68,40))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :hi
+ │ ├── message_loc: (68,0)-(68,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (68,3)-(68,40))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (68,3)-(68,40))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 3)
+ │ │ ├── @ AssocNode (location: (68,3)-(68,20))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (68,3)-(68,9))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (68,3)-(68,4) = ":"
+ │ │ │ │ ├── value_loc: (68,4)-(68,9) = "there"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "there"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (68,13)-(68,20))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (68,28)-(68,34) = "whatup"
+ │ │ │ ├── closing_loc: (68,34)-(68,35) = ":"
+ │ │ │ └── unescaped: "whatup"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (68,36)-(68,40))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (68,36)-(68,37) = ":"
+ │ │ │ ├── value_loc: (68,37)-(68,40) = "dog"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "dog"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (70,0)-(70,41))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :hi
+ │ ├── message_loc: (70,0)-(70,2) = "hi"
+ │ ├── opening_loc: (70,2)-(70,3) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (70,3)-(70,40))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (70,3)-(70,40))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 3)
+ │ │ ├── @ AssocNode (location: (70,3)-(70,20))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (70,3)-(70,9))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (70,3)-(70,4) = ":"
+ │ │ │ │ ├── value_loc: (70,4)-(70,9) = "there"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "there"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (70,13)-(70,20))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (70,28)-(70,34) = "whatup"
+ │ │ │ ├── closing_loc: (70,34)-(70,35) = ":"
+ │ │ │ └── unescaped: "whatup"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (70,36)-(70,40))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (72,0)-(72,35))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (72,0)-(72,3) = "foo"
+ │ ├── opening_loc: (72,3)-(72,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (72,4)-(72,26))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (72,29)-(72,30) = ":"
+ │ │ ├── value_loc: (72,30)-(72,35) = "block"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "block"
+ │ └── operator_loc: (72,28)-(72,29) = "&"
+ ├── @ CallNode (location: (74,0)-(74,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :hi
+ │ ├── message_loc: (74,0)-(74,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (74,3)-(74,20))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (74,3)-(74,20))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (74,3)-(74,20))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (74,3)-(74,9))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (74,3)-(74,4) = ":"
+ │ │ │ ├── value_loc: (74,4)-(74,9) = "there"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "there"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (74,13)-(74,20))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (76,0)-(78,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (76,0)-(76,3) = "foo"
+ │ ├── opening_loc: (76,3)-(76,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (76,4)-(77,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (76,4)-(76,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (76,4)-(76,5) = ":"
+ │ │ │ ├── value_loc: (76,5)-(76,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (77,0)-(77,2))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (77,0)-(77,1) = ":"
+ │ │ ├── value_loc: (77,1)-(77,2) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: (78,0)-(78,1) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (80,0)-(83,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (80,0)-(80,3) = "foo"
+ │ ├── opening_loc: (80,3)-(80,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (81,0)-(82,5))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (81,0)-(81,2))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (81,0)-(81,1) = ":"
+ │ │ │ ├── value_loc: (81,1)-(81,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ KeywordHashNode (location: (82,0)-(82,5))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (82,0)-(82,5))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (82,0)-(82,2))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (82,0)-(82,1) = "b"
+ │ │ │ ├── closing_loc: (82,1)-(82,2) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (82,3)-(82,5))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (85,0)-(85,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (85,5)-(85,6) = ":"
+ │ │ ├── value_loc: (85,6)-(85,11) = "block"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "block"
+ │ └── operator_loc: (85,4)-(85,5) = "&"
+ ├── @ CallNode (location: (87,0)-(87,30))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (87,0)-(87,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (87,4)-(87,21))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (87,4)-(87,21))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (87,4)-(87,11))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (87,4)-(87,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (87,24)-(87,25) = ":"
+ │ │ ├── value_loc: (87,25)-(87,30) = "block"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "block"
+ │ └── operator_loc: (87,23)-(87,24) = "&"
+ ├── @ CallNode (location: (89,0)-(89,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :some_func
+ │ ├── message_loc: (89,0)-(89,9) = "some_func"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (89,10)-(89,21))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (89,10)-(89,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ KeywordHashNode (location: (89,13)-(89,21))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (89,13)-(89,21))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (89,13)-(89,19))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (91,0)-(91,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (91,0)-(91,6))
+ │ │ └── name: :Kernel
+ │ ├── call_operator_loc: (91,6)-(91,7) = "."
+ │ ├── name: :Integer
+ │ ├── message_loc: (91,7)-(91,14) = "Integer"
+ │ ├── opening_loc: (91,14)-(91,15) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (91,15)-(91,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (91,15)-(91,17))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ ├── closing_loc: (91,17)-(91,18) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (93,0)-(93,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (93,0)-(93,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :x
+ │ │ ├── message_loc: (93,0)-(93,1) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (93,1)-(93,2) = "."
+ │ ├── name: :each
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (95,0)-(95,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (95,0)-(95,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (95,0)-(95,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (95,3)-(95,4) = "."
+ │ ├── name: :map
+ │ ├── 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))
+ │ │ └── name: :$&
+ │ ├── opening_loc: (95,8)-(95,9) = "{"
+ │ └── closing_loc: (95,13)-(95,14) = "}"
+ ├── @ CallNode (location: (97,0)-(97,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (97,0)-(97,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (97,0)-(97,1))
+ │ │ │ └── name: :A
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (97,1)-(97,3) = "::"
+ │ │ └── name_loc: (97,3)-(97,4) = "B"
+ │ ├── call_operator_loc: (97,4)-(97,6) = "::"
+ │ ├── name: :C
+ │ ├── message_loc: (97,6)-(97,7) = "C"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (97,8)-(97,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (97,8)-(97,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (97,8)-(97,9) = ":"
+ │ │ ├── value_loc: (97,9)-(97,12) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (99,0)-(99,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (99,0)-(99,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (99,0)-(99,1))
+ │ │ │ └── name: :A
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (99,1)-(99,3) = "::"
+ │ │ └── name_loc: (99,3)-(99,4) = "B"
+ │ ├── call_operator_loc: (99,4)-(99,6) = "::"
+ │ ├── name: :C
+ │ ├── message_loc: (99,6)-(99,7) = "C"
+ │ ├── opening_loc: (99,7)-(99,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (99,8)-(99,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (99,8)-(99,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (99,8)-(99,9) = ":"
+ │ │ ├── value_loc: (99,9)-(99,12) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── closing_loc: (99,12)-(99,13) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (101,0)-(101,17))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (101,0)-(101,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (101,0)-(101,1))
+ │ │ │ └── name: :A
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (101,1)-(101,3) = "::"
+ │ │ └── name_loc: (101,3)-(101,4) = "B"
+ │ ├── call_operator_loc: (101,4)-(101,6) = "::"
+ │ ├── name: :C
+ │ ├── message_loc: (101,6)-(101,7) = "C"
+ │ ├── opening_loc: (101,7)-(101,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (101,8)-(101,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (101,8)-(101,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (103,0)-(103,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (103,0)-(103,3) = "foo"
+ │ ├── opening_loc: (103,3)-(103,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (103,4)-(103,11))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (103,4)-(103,11))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (103,4)-(103,11))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (103,4)-(103,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: -1
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (103,11)-(103,12) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (105,0)-(105,28))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (105,0)-(105,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (105,4)-(105,28))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (105,4)-(105,28))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (105,4)-(105,28))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (105,4)-(105,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (105,11)-(105,14) = "baz"
+ │ │ │ │ │ ├── closing_loc: (105,14)-(105,15) = ":"
+ │ │ │ │ │ └── unescaped: "baz"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (105,16)-(105,26))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :qux
+ │ │ │ │ │ ├── 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"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── closing_loc: (105,27)-(105,28) = "}"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (107,0)-(107,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (107,0)-(107,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (107,4)-(107,24))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (107,4)-(107,24))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (107,4)-(107,24))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (107,4)-(107,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :kw
+ │ │ │ │ │ ├── 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"
+ │ │ │ │ └── operator_loc: (107,11)-(107,13) = "**"
+ │ │ │ └── closing_loc: (107,23)-(107,24) = "}"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (109,0)-(109,36))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (109,0)-(109,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (109,4)-(109,29))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (109,4)-(109,29))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (109,7)-(109,10))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ ├── message_loc: (109,7)-(109,10) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── call_operator_loc: (109,10)-(109,11) = "."
+ │ │ │ │ ├── name: :map
+ │ │ │ │ ├── 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"
+ │ │ │ └── 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"
+ ├── @ CallNode (location: (111,0)-(111,28))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (111,0)-(111,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (111,4)-(111,28))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── 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"
+ │ │ ├── end_keyword_loc: (111,25)-(111,28) = "end"
+ │ │ └── name: :Bar
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (113,0)-(113,29))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (113,0)-(113,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (113,4)-(113,29))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── 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"
+ │ │ ├── end_keyword_loc: (113,26)-(113,29) = "end"
+ │ │ └── name: :Bar
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (115,0)-(115,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (115,0)-(115,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (115,4)-(115,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ArrayNode (location: (115,4)-(115,16))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ CallNode (location: (115,5)-(115,15))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── 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"
+ │ │ ├── opening_loc: (115,4)-(115,5) = "["
+ │ │ └── closing_loc: (115,15)-(115,16) = "]"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (117,0)-(117,28))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (117,0)-(117,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (117,2)-(117,28))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ IntegerNode (location: (117,8)-(117,9))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── call_operator_loc: (117,9)-(117,10) = "."
+ │ │ │ ├── name: :times
+ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ ├── opening_loc: (117,16)-(117,18) = "do"
+ │ │ │ └── closing_loc: (117,21)-(117,24) = "end"
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (117,25)-(117,28) = "end"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (119,0)-(124,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (119,0)-(119,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (119,4)-(124,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (119,4)-(119,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── message_loc: (120,5)-(120,6) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (121,4)-(123,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (121,4)-(123,7))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── 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"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: (124,2)-(124,5) = "end"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (126,0)-(135,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (126,0)-(126,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (126,4)-(135,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ SymbolNode (location: (126,4)-(126,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (126,4)-(126,5) = ":"
+ │ │ │ ├── value_loc: (126,5)-(126,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ WhileNode (location: (127,2)-(131,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── keyword_loc: (127,2)-(127,7) = "while"
+ │ │ │ ├── closing_loc: (131,2)-(131,5) = "end"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ CallNode (location: (127,8)-(127,9))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :x
+ │ │ │ │ ├── message_loc: (127,8)-(127,9) = "x"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── statements:
+ │ │ │ @ StatementsNode (location: (128,4)-(130,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (128,4)-(130,7))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── 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"
+ │ │ └── @ UntilNode (location: (132,2)-(135,5))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (132,2)-(132,7) = "until"
+ │ │ ├── closing_loc: (135,2)-(135,5) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (132,8)-(132,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── message_loc: (132,8)-(132,9) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (133,4)-(134,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (133,4)-(134,7))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── 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"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (137,0)-(137,9))
+ │ ├── flags: ∅
+ │ ├── 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: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (137,3)-(137,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (137,5)-(137,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (137,5)-(137,9))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :A
+ │ │ ├── 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) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (139,0)-(139,16))
+ │ ├── flags: ∅
+ │ ├── 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: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (139,3)-(139,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (139,5)-(139,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (139,5)-(139,16))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :A
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── 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) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (141,0)-(141,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (141,0)-(141,4))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :A
+ │ │ ├── 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) = "}"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (141,5)-(141,6) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (141,7)-(141,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (141,7)-(141,11))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :A
+ │ │ ├── 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) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (143,0)-(143,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (143,0)-(143,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :lst
+ │ │ ├── message_loc: (143,0)-(143,3) = "lst"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<<
+ │ ├── message_loc: (143,4)-(143,6) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (143,7)-(143,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (143,7)-(143,11))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :A
+ │ │ ├── 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) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ InterpolatedStringNode (location: (145,0)-(145,17))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :join
+ │ │ │ ├── message_loc: (145,4)-(145,8) = "join"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (145,9)-(145,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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: ∅
+ │ │ └── closing_loc: (145,15)-(145,16) = "}"
+ │ └── closing_loc: (145,16)-(145,17) = "\""
+ ├── @ InterpolatedStringNode (location: (147,0)-(147,8))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :v
+ │ │ │ │ ├── message_loc: (147,4)-(147,5) = "v"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (147,3)-(147,4) = "("
+ │ │ │ └── closing_loc: (147,5)-(147,6) = ")"
+ │ │ └── closing_loc: (147,6)-(147,7) = "}"
+ │ └── closing_loc: (147,7)-(147,8) = "\""
+ ├── @ DefNode (location: (149,0)-(149,18))
+ │ ├── name: :f
+ │ ├── name_loc: (149,4)-(149,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (149,6)-(149,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (149,6)-(149,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (149,6)-(149,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (149,10)-(149,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (149,10)-(149,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── message_loc: (149,10)-(149,11) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (149,12)-(149,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SplatNode (location: (149,12)-(149,13))
+ │ │ │ ├── operator_loc: (149,12)-(149,13) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (149,0)-(149,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (149,5)-(149,6) = "("
+ │ ├── rparen_loc: (149,7)-(149,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (149,15)-(149,18) = "end"
+ ├── @ CallNode (location: (151,0)-(151,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (151,0)-(151,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (151,4)-(151,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (151,4)-(151,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ CallNode (location: (151,7)-(151,16))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :Bar
+ │ │ ├── message_loc: (151,7)-(151,10) = "Bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block:
+ │ │ @ BlockNode (location: (151,11)-(151,16))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (151,13)-(151,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (151,13)-(151,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── opening_loc: (151,11)-(151,12) = "{"
+ │ │ └── closing_loc: (151,15)-(151,16) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ LocalVariableWriteNode (location: (153,0)-(153,7))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (153,0)-(153,3) = "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (153,6)-(153,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (153,4)-(153,5) = "="
+ ├── @ CallNode (location: (154,0)-(154,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (154,0)-(154,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (154,4)-(154,6))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (154,4)-(154,5) = "{"
+ │ └── closing_loc: (154,5)-(154,6) = "}"
+ └── @ CallNode (location: (156,0)-(156,19))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ InstanceVariableReadNode (location: (156,0)-(156,2))
+ │ └── name: :@a
+ ├── call_operator_loc: (156,2)-(156,3) = "."
+ ├── name: :b
+ ├── message_loc: (156,3)-(156,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (156,5)-(156,19))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (156,5)-(156,19))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (156,5)-(156,19))
+ │ ├── key:
+ │ │ @ InterpolatedSymbolNode (location: (156,5)-(156,16))
+ │ │ ├── opening_loc: (156,5)-(156,6) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (156,6)-(156,7))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (156,6)-(156,7) = "c"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "c"
+ │ │ │ └── @ EmbeddedStatementsNode (location: (156,7)-(156,14))
+ │ │ │ ├── opening_loc: (156,7)-(156,9) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (156,9)-(156,13))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (156,9)-(156,13))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :name
+ │ │ │ │ ├── message_loc: (156,9)-(156,13) = "name"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (156,13)-(156,14) = "}"
+ │ │ └── closing_loc: (156,14)-(156,16) = "\":"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (156,17)-(156,19))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/methods.txt b/test/prism/snapshots/methods.txt
new file mode 100644
index 0000000000..b38640399b
--- /dev/null
+++ b/test/prism/snapshots/methods.txt
@@ -0,0 +1,2054 @@
+@ ProgramNode (location: (1,0)-(183,37))
+├── locals: [:a, :c, :foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(183,37))
+ └── body: (length: 69)
+ ├── @ 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,18))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,12))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :bar
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :baz
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (4,8)-(4,18))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (4,9)-(4,12))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :bar
+ │ │ │ │ └── @ RequiredParameterNode (location: (4,14)-(4,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :baz
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (4,8)-(4,9) = "("
+ │ │ │ └── rparen_loc: (4,17)-(4,18) = ")"
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (4,20)-(4,32))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :optional
+ │ │ │ ├── name_loc: (4,20)-(4,28) = "optional"
+ │ │ │ ├── operator_loc: (4,29)-(4,30) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (4,31)-(4,32))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ MultiTargetNode (location: (4,34)-(4,44))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (4,35)-(4,38))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :bin
+ │ │ │ │ └── @ RequiredParameterNode (location: (4,40)-(4,43))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :bag
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (4,34)-(4,35) = "("
+ │ │ │ └── rparen_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,0)-(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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (10,5)-(10,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (13,5)-(13,6) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (25,4)-(25,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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)
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (31,6)-(31,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ └── name_loc: (31,6)-(31,8) = "b:"
+ │ │ ├── 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)
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (35,6)-(35,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ └── name_loc: (35,6)-(35,8) = "b:"
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── @ RequiredParameterNode (location: (47,9)-(47,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ └── @ RequiredParameterNode (location: (47,12)-(47,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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)
+ │ │ │ ├── @ RequiredKeywordParameterNode (location: (53,6)-(53,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── name_loc: (53,6)-(53,8) = "b:"
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (53,10)-(53,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (53,10)-(53,12) = "c:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (53,13)-(53,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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)
+ │ │ │ ├── @ RequiredKeywordParameterNode (location: (56,6)-(56,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── name_loc: (56,6)-(56,8) = "b:"
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (56,10)-(56,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (56,10)-(56,12) = "c:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (56,13)-(56,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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)
+ │ │ │ ├── @ OptionalKeywordParameterNode (location: (59,6)-(60,3))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (59,6)-(59,8) = "b:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (60,2)-(60,3))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (60,5)-(60,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ └── name_loc: (60,5)-(60,7) = "c:"
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (65,6)-(65,7) = "b"
+ │ │ │ │ ├── operator_loc: (65,8)-(65,9) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (65,10)-(65,11))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ OptionalParameterNode (location: (65,13)-(65,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (65,13)-(65,14) = "c"
+ │ │ │ ├── operator_loc: (65,15)-(65,16) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (65,17)-(65,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (71,9)-(71,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (71,9)-(71,10) = "c"
+ │ │ │ ├── operator_loc: (71,11)-(71,12) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (71,13)-(71,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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,0)-(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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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))
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (99,0)-(99,10))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ReturnNode (location: (99,0)-(99,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── keyword_loc: (99,0)-(99,6) = "return"
+ │ │ │ │ └── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (99,7)-(99,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (99,7)-(99,10))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ └── value: 2
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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
+ │ │ └── value: 123
+ │ ├── 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
+ │ │ └── value: 123
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (110,10)-(110,11) = "b"
+ │ │ ├── opening_loc: (110,11)-(110,12) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (110,12)-(110,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SplatNode (location: (110,12)-(110,13))
+ │ │ │ ├── operator_loc: (110,12)-(110,13) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── closing_loc: (110,13)-(110,14) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (112,12)-(112,13) = "b"
+ │ │ ├── opening_loc: (112,13)-(112,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (112,14)-(112,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (112,14)-(112,17))
+ │ │ ├── closing_loc: (112,17)-(112,18) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (114,12)-(114,13) = "b"
+ │ │ ├── opening_loc: (114,13)-(114,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (114,14)-(114,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (114,14)-(114,15))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (114,17)-(114,18))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ ForwardingArgumentsNode (location: (114,20)-(114,23))
+ │ │ ├── closing_loc: (114,23)-(114,24) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (116,9)-(116,10) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (128,9)-(128,10) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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
+ │ │ └── value: 1
+ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (136,12)-(136,13) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (136,13)-(136,16))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (136,18)-(136,19) = "b"
+ │ │ │ │ ├── opening_loc: (136,19)-(136,20) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (136,20)-(136,23))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ ForwardingArgumentsNode (location: (136,20)-(136,23))
+ │ │ │ │ ├── closing_loc: (136,23)-(136,24) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "."
+ │ │ ├── name: :merge
+ │ │ ├── message_loc: (139,5)-(139,10) = "merge"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (139,11)-(139,30))
+ │ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (139,11)-(139,30))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── elements: (length: 3)
+ │ │ │ ├── @ AssocSplatNode (location: (139,11)-(139,16))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (139,13)-(139,16))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ ├── message_loc: (139,13)-(139,16) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── operator_loc: (139,11)-(139,13) = "**"
+ │ │ │ ├── @ AssocSplatNode (location: (139,18)-(139,23))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (139,20)-(139,23))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :baz
+ │ │ │ │ │ ├── message_loc: (139,20)-(139,23) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── operator_loc: (139,18)-(139,20) = "**"
+ │ │ │ └── @ AssocSplatNode (location: (139,25)-(139,30))
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (139,27)-(139,30))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :qux
+ │ │ │ │ ├── message_loc: (139,27)-(139,30) = "qux"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (139,25)-(139,27) = "**"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (142,8)-(142,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (142,12)-(142,13))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (142,16)-(142,18))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 10
+ │ │ │ │ └── operator_loc: (142,13)-(142,16) = "..."
+ │ │ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (145,8)-(145,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left: ∅
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (145,15)-(145,17))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 10
+ │ │ │ │ └── operator_loc: (145,12)-(145,15) = "..."
+ │ │ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (148,8)-(148,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (148,12)-(148,13))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── right: ∅
+ │ │ │ │ └── operator_loc: (148,13)-(148,16) = "..."
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (151,13)-(151,14))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (151,17)-(151,19))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 10
+ │ │ │ │ └── operator_loc: (151,14)-(151,17) = "..."
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left: ∅
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (154,16)-(154,18))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 10
+ │ │ │ │ └── operator_loc: (154,13)-(154,16) = "..."
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (157,13)-(157,14))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── right: ∅
+ │ │ │ │ └── operator_loc: (157,14)-(157,17) = "..."
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (161,2)-(161,6))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :item
+ │ │ │ ├── message_loc: (161,2)-(161,6) = "item"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :>>
+ │ │ ├── message_loc: (161,7)-(161,9) = ">>"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (161,10)-(161,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (161,10)-(161,14))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── 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) = "}"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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"
+ ├── @ LocalVariableWriteNode (location: (164,0)-(164,7))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (164,0)-(164,3) = "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (164,6)-(164,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (164,4)-(164,5) = "="
+ ├── @ DefNode (location: (165,0)-(165,16))
+ │ ├── name: :bar
+ │ ├── name_loc: (165,8)-(165,11) = "bar"
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (165,4)-(165,7))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (165,0)-(165,3) = "def"
+ │ ├── operator_loc: (165,7)-(165,8) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (165,13)-(165,16) = "end"
+ ├── @ DefNode (location: (167,0)-(167,18))
+ │ ├── name: :f
+ │ ├── name_loc: (167,4)-(167,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (167,6)-(167,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (167,6)-(167,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (167,6)-(167,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (167,10)-(167,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ArrayNode (location: (167,10)-(167,13))
+ │ │ ├── flags: contains_splat
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SplatNode (location: (167,11)-(167,12))
+ │ │ │ ├── operator_loc: (167,11)-(167,12) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── opening_loc: (167,10)-(167,11) = "["
+ │ │ └── closing_loc: (167,12)-(167,13) = "]"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (167,0)-(167,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (167,5)-(167,6) = "("
+ │ ├── rparen_loc: (167,7)-(167,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (167,15)-(167,18) = "end"
+ ├── @ DefNode (location: (169,0)-(169,15))
+ │ ├── name: :f
+ │ ├── name_loc: (169,4)-(169,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (169,6)-(169,10))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (169,6)-(169,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── name_loc: (169,6)-(169,8) = "x:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (169,8)-(169,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (169,9)-(169,10))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (169,9)-(169,10) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :-@
+ │ │ │ ├── message_loc: (169,8)-(169,9) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (169,0)-(169,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (169,12)-(169,15) = "end"
+ ├── @ DefNode (location: (171,0)-(171,15))
+ │ ├── name: :f
+ │ ├── name_loc: (171,4)-(171,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (171,6)-(171,10))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (171,6)-(171,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── name_loc: (171,6)-(171,8) = "x:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (171,8)-(171,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (171,9)-(171,10))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (171,9)-(171,10) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+@
+ │ │ │ ├── message_loc: (171,8)-(171,9) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (171,0)-(171,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (171,12)-(171,15) = "end"
+ ├── @ DefNode (location: (173,0)-(173,15))
+ │ ├── name: :f
+ │ ├── name_loc: (173,4)-(173,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (173,6)-(173,10))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (173,6)-(173,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── name_loc: (173,6)-(173,8) = "x:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (173,8)-(173,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (173,9)-(173,10))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (173,9)-(173,10) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :!
+ │ │ │ ├── message_loc: (173,8)-(173,9) = "!"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (173,0)-(173,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (173,12)-(173,15) = "end"
+ ├── @ DefNode (location: (175,0)-(175,20))
+ │ ├── name: :foo
+ │ ├── name_loc: (175,4)-(175,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (175,8)-(175,15))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (175,8)-(175,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── name_loc: (175,8)-(175,10) = "x:"
+ │ │ │ └── value:
+ │ │ │ @ StringNode (location: (175,10)-(175,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (175,10)-(175,12) = "%("
+ │ │ │ ├── content_loc: (175,12)-(175,14) = "xx"
+ │ │ │ ├── closing_loc: (175,14)-(175,15) = ")"
+ │ │ │ └── unescaped: "xx"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (175,0)-(175,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (175,17)-(175,20) = "end"
+ ├── @ DefNode (location: (177,0)-(179,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (177,4)-(177,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (177,8)-(177,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (177,8)-(177,11))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (178,2)-(178,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (178,2)-(178,10))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (178,2)-(178,5) = "bar"
+ │ │ ├── opening_loc: (178,5)-(178,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (178,6)-(178,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (178,6)-(178,9))
+ │ │ ├── closing_loc: (178,9)-(178,10) = ")"
+ │ │ └── block: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (177,0)-(177,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (177,7)-(177,8) = "("
+ │ ├── rparen_loc: (177,11)-(177,12) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (179,0)-(179,3) = "end"
+ ├── @ DefNode (location: (181,0)-(181,42))
+ │ ├── name: :foo
+ │ ├── name_loc: (181,4)-(181,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (181,8)-(181,37))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (181,8)-(181,37))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (181,8)-(181,11) = "bar"
+ │ │ │ ├── operator_loc: (181,12)-(181,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (181,14)-(181,37))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (181,15)-(181,36))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ DefNode (location: (181,15)-(181,33))
+ │ │ │ │ │ ├── name: :baz
+ │ │ │ │ │ ├── name_loc: (181,19)-(181,22) = "baz"
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ @ ParametersNode (location: (181,23)-(181,26))
+ │ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (181,23)-(181,26))
+ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ └── name: :bar
+ │ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── body:
+ │ │ │ │ │ │ @ StatementsNode (location: (181,30)-(181,33))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ LocalVariableReadNode (location: (181,30)-(181,33))
+ │ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ ├── locals: [:bar]
+ │ │ │ │ │ ├── def_keyword_loc: (181,15)-(181,18) = "def"
+ │ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ │ ├── lparen_loc: (181,22)-(181,23) = "("
+ │ │ │ │ │ ├── rparen_loc: (181,26)-(181,27) = ")"
+ │ │ │ │ │ ├── equal_loc: (181,28)-(181,29) = "="
+ │ │ │ │ │ └── end_keyword_loc: ∅
+ │ │ │ │ └── @ IntegerNode (location: (181,35)-(181,36))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── opening_loc: (181,14)-(181,15) = "("
+ │ │ │ └── closing_loc: (181,36)-(181,37) = ")"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (181,41)-(181,42))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (181,41)-(181,42))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (181,0)-(181,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (181,7)-(181,8) = "("
+ │ ├── rparen_loc: (181,37)-(181,38) = ")"
+ │ ├── equal_loc: (181,39)-(181,40) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (183,0)-(183,37))
+ ├── name: :foo
+ ├── name_loc: (183,21)-(183,24) = "foo"
+ ├── receiver:
+ │ @ ParenthesesNode (location: (183,4)-(183,20))
+ │ ├── body:
+ │ │ @ ClassNode (location: (183,5)-(183,19))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (183,5)-(183,10) = "class"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (183,11)-(183,14))
+ │ │ │ └── name: :Foo
+ │ │ ├── inheritance_operator_loc: ∅
+ │ │ ├── superclass: ∅
+ │ │ ├── body: ∅
+ │ │ ├── end_keyword_loc: (183,16)-(183,19) = "end"
+ │ │ └── name: :Foo
+ │ ├── opening_loc: (183,4)-(183,5) = "("
+ │ └── closing_loc: (183,19)-(183,20) = ")"
+ ├── parameters:
+ │ @ ParametersNode (location: (183,25)-(183,32))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 1)
+ │ │ └── @ OptionalParameterNode (location: (183,25)-(183,32))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :bar
+ │ │ ├── name_loc: (183,25)-(183,28) = "bar"
+ │ │ ├── operator_loc: (183,29)-(183,30) = "="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (183,31)-(183,32))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (183,36)-(183,37))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (183,36)-(183,37))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── locals: [:bar]
+ ├── def_keyword_loc: (183,0)-(183,3) = "def"
+ ├── operator_loc: (183,20)-(183,21) = "."
+ ├── lparen_loc: (183,24)-(183,25) = "("
+ ├── rparen_loc: (183,32)-(183,33) = ")"
+ ├── equal_loc: (183,34)-(183,35) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/modules.txt b/test/prism/snapshots/modules.txt
new file mode 100644
index 0000000000..de1ea8feeb
--- /dev/null
+++ b/test/prism/snapshots/modules.txt
@@ -0,0 +1,180 @@
+@ 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (1,11)-(1,12) = "="
+ │ ├── end_keyword_loc: (1,15)-(1,18) = "end"
+ │ └── name: :A
+ ├── @ InterpolatedStringNode (location: (3,0)-(3,18))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (3,0)-(3,3) = "%Q{"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (3,3)-(3,7))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bbb
+ │ │ │ │ ├── message_loc: (3,9)-(3,12) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (3,12)-(3,13) = "}"
+ │ │ └── @ StringNode (location: (3,13)-(3,17))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :m
+ │ │ │ ├── message_loc: (5,7)-(5,8) = "m"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── name: :M
+ │ │ ├── delimiter_loc: (5,8)-(5,10) = "::"
+ │ │ └── name_loc: (5,10)-(5,11) = "M"
+ │ ├── 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: (8,0)-(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
+ │ │ │ │ └── value: 1
+ │ │ │ └── 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: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (11,7)-(11,9) = "::"
+ │ │ └── name_loc: (11,9)-(11,10) = "A"
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ConstantReadNode (location: (14,7)-(14,8))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :[]
+ │ │ │ ├── message_loc: (14,8)-(14,10) = "[]"
+ │ │ │ ├── opening_loc: (14,8)-(14,9) = "["
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: (14,9)-(14,10) = "]"
+ │ │ │ └── block: ∅
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (14,10)-(14,12) = "::"
+ │ │ └── name_loc: (14,12)-(14,13) = "B"
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ ConstantReadNode (location: (17,7)-(17,8))
+ │ │ │ └── name: :A
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :[]
+ │ │ ├── message_loc: (17,8)-(17,11) = "[1]"
+ │ │ ├── opening_loc: (17,8)-(17,9) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (17,9)-(17,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (17,9)-(17,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: (17,10)-(17,11) = "]"
+ │ │ └── block: ∅
+ │ ├── name: :B
+ │ ├── delimiter_loc: (17,11)-(17,13) = "::"
+ │ └── name_loc: (17,13)-(17,14) = "B"
+ ├── body: ∅
+ ├── end_keyword_loc: (18,0)-(18,3) = "end"
+ └── name: :B
diff --git a/test/prism/snapshots/multi_write.txt b/test/prism/snapshots/multi_write.txt
new file mode 100644
index 0000000000..d313801fdb
--- /dev/null
+++ b/test/prism/snapshots/multi_write.txt
@@ -0,0 +1,93 @@
+@ ProgramNode (location: (1,0)-(4,26))
+├── locals: [:foo, :bar]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,26))
+ └── body: (length: 4)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,18))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,3) = "foo"
+ │ ├── value:
+ │ │ @ RescueModifierNode (location: (1,6)-(1,18))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── keyword_loc: (1,8)-(1,14) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (1,15)-(1,18))
+ │ └── operator_loc: (1,4)-(1,5) = "="
+ ├── @ MultiWriteNode (location: (2,0)-(2,23))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (2,0)-(2,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (2,5)-(2,8))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (2,9)-(2,10) = "="
+ │ └── value:
+ │ @ RescueModifierNode (location: (2,11)-(2,23))
+ │ ├── expression:
+ │ │ @ IntegerNode (location: (2,11)-(2,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── keyword_loc: (2,13)-(2,19) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (2,20)-(2,23))
+ ├── @ RescueModifierNode (location: (3,0)-(3,21))
+ │ ├── expression:
+ │ │ @ LocalVariableWriteNode (location: (3,0)-(3,10))
+ │ │ ├── name: :foo
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── value:
+ │ │ │ @ ArrayNode (location: (3,6)-(3,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (3,6)-(3,7))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ IntegerNode (location: (3,9)-(3,10))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ └── operator_loc: (3,4)-(3,5) = "="
+ │ ├── keyword_loc: (3,11)-(3,17) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (3,18)-(3,21))
+ └── @ MultiWriteNode (location: (4,0)-(4,26))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (4,0)-(4,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (4,5)-(4,8))
+ │ ├── name: :bar
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (4,9)-(4,10) = "="
+ └── value:
+ @ RescueModifierNode (location: (4,11)-(4,26))
+ ├── expression:
+ │ @ ArrayNode (location: (4,11)-(4,15))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (4,11)-(4,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (4,14)-(4,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── keyword_loc: (4,16)-(4,22) = "rescue"
+ └── rescue_expression:
+ @ NilNode (location: (4,23)-(4,26))
diff --git a/test/prism/snapshots/newline_terminated.txt b/test/prism/snapshots/newline_terminated.txt
new file mode 100644
index 0000000000..6a3b28dba9
--- /dev/null
+++ b/test/prism/snapshots/newline_terminated.txt
@@ -0,0 +1,107 @@
+@ ProgramNode (location: (3,0)-(41,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (3,0)-(41,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)-(9,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(8,0) = "%\n"
+ │ ├── content_loc: (8,0)-(8,3) = "abc"
+ │ ├── closing_loc: (8,3)-(9,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)-(13,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,0)-(12,0) = "%\n"
+ │ ├── content_loc: (12,0)-(12,3) = "abc"
+ │ ├── closing_loc: (12,3)-(13,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (14,0)-(16,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (14,0)-(15,0) = "%\n"
+ │ ├── content_loc: (15,0)-(15,4) = "\rabc"
+ │ ├── closing_loc: (15,4)-(16,0) = "\n"
+ │ └── unescaped: "\rabc"
+ ├── @ StringNode (location: (17,0)-(19,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (17,0)-(18,0) = "%\n"
+ │ ├── content_loc: (18,0)-(18,4) = "\rabc"
+ │ ├── closing_loc: (18,4)-(19,0) = "\n"
+ │ └── unescaped: "\rabc"
+ ├── @ StringNode (location: (20,0)-(22,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (20,0)-(21,0) = "%\n"
+ │ ├── content_loc: (21,0)-(21,3) = "abc"
+ │ ├── closing_loc: (21,3)-(22,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)-(26,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (24,0)-(25,0) = "%\n"
+ │ ├── content_loc: (25,0)-(25,3) = "abc"
+ │ ├── closing_loc: (25,3)-(26,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (27,0)-(29,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (27,0)-(28,0) = "%\n"
+ │ ├── content_loc: (28,0)-(28,3) = "abc"
+ │ ├── closing_loc: (28,3)-(29,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (30,0)-(32,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (30,0)-(31,0) = "%\n"
+ │ ├── content_loc: (31,0)-(31,3) = "foo"
+ │ ├── closing_loc: (31,3)-(32,0) = "\n"
+ │ └── unescaped: "foo"
+ ├── @ StringNode (location: (33,0)-(35,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (33,0)-(34,0) = "%q\n"
+ │ ├── content_loc: (34,0)-(34,3) = "foo"
+ │ ├── closing_loc: (34,3)-(35,0) = "\n"
+ │ └── unescaped: "foo"
+ ├── @ StringNode (location: (36,0)-(38,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (36,0)-(37,0) = "%Q\n"
+ │ ├── content_loc: (37,0)-(37,3) = "foo"
+ │ ├── closing_loc: (37,3)-(38,0) = "\n"
+ │ └── unescaped: "foo"
+ └── @ RegularExpressionNode (location: (39,0)-(41,0))
+ ├── flags: forced_us_ascii_encoding
+ ├── opening_loc: (39,0)-(40,0) = "%r\n"
+ ├── content_loc: (40,0)-(40,3) = "foo"
+ ├── closing_loc: (40,3)-(41,0) = "\n"
+ └── unescaped: "foo"
diff --git a/test/prism/snapshots/next.txt b/test/prism/snapshots/next.txt
new file mode 100644
index 0000000000..ce2e497de9
--- /dev/null
+++ b/test/prism/snapshots/next.txt
@@ -0,0 +1,329 @@
+@ ProgramNode (location: (1,0)-(24,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(24,15))
+ └── body: (length: 10)
+ ├── @ CallNode (location: (1,0)-(1,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (1,0)-(1,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (1,4)-(1,12))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,6)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (1,6)-(1,10))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (1,6)-(1,10) = "next"
+ │ ├── opening_loc: (1,4)-(1,5) = "{"
+ │ └── closing_loc: (1,11)-(1,12) = "}"
+ ├── @ CallNode (location: (3,0)-(3,26))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (3,0)-(3,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (3,4)-(3,26))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,6)-(3,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (3,6)-(3,24))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,11)-(3,24))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ ParenthesesNode (location: (3,11)-(3,14))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (3,12)-(3,13))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (3,12)-(3,13))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ ├── opening_loc: (3,16)-(3,17) = "("
+ │ │ │ │ └── closing_loc: (3,18)-(3,19) = ")"
+ │ │ │ └── @ ParenthesesNode (location: (3,21)-(3,24))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (3,22)-(3,23))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (3,22)-(3,23))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 3
+ │ │ │ ├── opening_loc: (3,21)-(3,22) = "("
+ │ │ │ └── closing_loc: (3,23)-(3,24) = ")"
+ │ │ └── keyword_loc: (3,6)-(3,10) = "next"
+ │ ├── opening_loc: (3,4)-(3,5) = "{"
+ │ └── closing_loc: (3,25)-(3,26) = "}"
+ ├── @ CallNode (location: (5,0)-(5,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (5,0)-(5,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (5,4)-(5,14))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,6)-(5,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (5,6)-(5,12))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,11)-(5,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,11)-(5,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── keyword_loc: (5,6)-(5,10) = "next"
+ │ ├── opening_loc: (5,4)-(5,5) = "{"
+ │ └── closing_loc: (5,13)-(5,14) = "}"
+ ├── @ CallNode (location: (7,0)-(8,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (7,0)-(7,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (7,4)-(8,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,6)-(8,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (7,6)-(8,1))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,11)-(8,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (7,11)-(7,12))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (7,14)-(7,15))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ └── keyword_loc: (7,6)-(7,10) = "next"
+ │ ├── opening_loc: (7,4)-(7,5) = "{"
+ │ └── closing_loc: (8,2)-(8,3) = "}"
+ ├── @ CallNode (location: (10,0)-(10,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (10,0)-(10,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (10,4)-(10,20))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (10,6)-(10,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (10,6)-(10,18))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (10,11)-(10,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (10,11)-(10,12))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (10,14)-(10,15))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (10,17)-(10,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ └── keyword_loc: (10,6)-(10,10) = "next"
+ │ ├── opening_loc: (10,4)-(10,5) = "{"
+ │ └── closing_loc: (10,19)-(10,20) = "}"
+ ├── @ CallNode (location: (12,0)-(12,22))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (12,0)-(12,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (12,4)-(12,22))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (12,6)-(12,20))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (12,6)-(12,20))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (12,11)-(12,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ArrayNode (location: (12,11)-(12,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 3)
+ │ │ │ │ ├── @ IntegerNode (location: (12,12)-(12,13))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── @ IntegerNode (location: (12,15)-(12,16))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ └── @ IntegerNode (location: (12,18)-(12,19))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 3
+ │ │ │ ├── opening_loc: (12,11)-(12,12) = "["
+ │ │ │ └── closing_loc: (12,19)-(12,20) = "]"
+ │ │ └── keyword_loc: (12,6)-(12,10) = "next"
+ │ ├── opening_loc: (12,4)-(12,5) = "{"
+ │ └── closing_loc: (12,21)-(12,22) = "}"
+ ├── @ CallNode (location: (14,0)-(17,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (14,0)-(14,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (14,4)-(17,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (14,6)-(17,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (14,6)-(17,1))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (14,10)-(17,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ParenthesesNode (location: (14,10)-(17,1))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (15,2)-(16,3))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (15,2)-(15,3))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── opening_loc: (14,10)-(14,11) = "("
+ │ │ │ └── closing_loc: (17,0)-(17,1) = ")"
+ │ │ └── keyword_loc: (14,6)-(14,10) = "next"
+ │ ├── opening_loc: (14,4)-(14,5) = "{"
+ │ └── closing_loc: (17,2)-(17,3) = "}"
+ ├── @ CallNode (location: (19,0)-(20,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (19,0)-(19,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (19,4)-(20,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (19,6)-(20,1))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ NextNode (location: (19,6)-(19,10))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (19,6)-(19,10) = "next"
+ │ │ └── @ IntegerNode (location: (20,0)-(20,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── opening_loc: (19,4)-(19,5) = "{"
+ │ └── closing_loc: (20,2)-(20,3) = "}"
+ ├── @ CallNode (location: (22,0)-(22,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (22,0)-(22,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (22,4)-(22,14))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (22,6)-(22,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (22,6)-(22,12))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (22,10)-(22,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ParenthesesNode (location: (22,10)-(22,12))
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (22,10)-(22,11) = "("
+ │ │ │ └── closing_loc: (22,11)-(22,12) = ")"
+ │ │ └── keyword_loc: (22,6)-(22,10) = "next"
+ │ ├── opening_loc: (22,4)-(22,5) = "{"
+ │ └── closing_loc: (22,13)-(22,14) = "}"
+ └── @ CallNode (location: (24,0)-(24,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :tap
+ ├── message_loc: (24,0)-(24,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (24,4)-(24,15))
+ ├── locals: []
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (24,6)-(24,13))
+ │ └── body: (length: 1)
+ │ └── @ NextNode (location: (24,6)-(24,13))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (24,10)-(24,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (24,10)-(24,13))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (24,11)-(24,12))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (24,11)-(24,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── opening_loc: (24,10)-(24,11) = "("
+ │ │ └── closing_loc: (24,12)-(24,13) = ")"
+ │ └── keyword_loc: (24,6)-(24,10) = "next"
+ ├── opening_loc: (24,4)-(24,5) = "{"
+ └── closing_loc: (24,14)-(24,15) = "}"
diff --git a/test/prism/snapshots/nils.txt b/test/prism/snapshots/nils.txt
new file mode 100644
index 0000000000..f72745560f
--- /dev/null
+++ b/test/prism/snapshots/nils.txt
@@ -0,0 +1,34 @@
+@ 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
+ │ │ └── value: 1
+ │ ├── 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
+ │ └── value: 1
+ ├── 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..2ed66fe0e2
--- /dev/null
+++ b/test/prism/snapshots/non_alphanumeric_methods.txt
@@ -0,0 +1,503 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (48,4)-(48,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..fda61bb4b5
--- /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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,4)-(1,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (1,0)-(1,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (1,12)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,16)-(1,19))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,16)-(1,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (1,12)-(1,15) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (1,8)-(1,11) = "and"
+ ├── @ CallNode (location: (3,0)-(3,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ AndNode (location: (3,4)-(3,15))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (3,4)-(3,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (3,12)-(3,15))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (3,12)-(3,15) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (3,8)-(3,11) = "and"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (3,0)-(3,3) = "not"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (3,15)-(3,16) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,4)-(5,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (5,4)-(5,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (5,0)-(5,3) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ AndNode (location: (7,0)-(8,5))
+ │ ├── left:
+ │ │ @ CallNode (location: (7,0)-(7,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (7,4)-(7,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (7,4)-(7,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (7,0)-(7,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (7,12)-(8,5))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (8,2)-(8,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (8,2)-(8,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (7,12)-(7,15) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (7,8)-(7,11) = "and"
+ ├── @ AndNode (location: (11,0)-(13,5))
+ │ ├── left:
+ │ │ @ CallNode (location: (11,0)-(11,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (11,4)-(11,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (11,4)-(11,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (11,0)-(11,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (12,4)-(13,5))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (13,2)-(13,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (13,2)-(13,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (12,4)-(12,7) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (11,8)-(11,11) = "and"
+ ├── @ AndNode (location: (16,0)-(20,5))
+ │ ├── left:
+ │ │ @ CallNode (location: (16,0)-(16,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (16,4)-(16,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (16,4)-(16,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (16,0)-(16,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (17,2)-(20,5))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (20,2)-(20,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (20,2)-(20,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (17,2)-(17,5) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (16,8)-(16,11) = "and"
+ ├── @ CallNode (location: (22,0)-(25,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (22,4)-(22,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (22,4)-(22,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (22,0)-(22,3) = "not"
+ │ ├── opening_loc: (22,3)-(22,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (25,0)-(25,1) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (27,0)-(33,3))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (27,0)-(27,3) = "not"
+ │ ├── opening_loc: (27,3)-(27,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (33,2)-(33,3) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (35,0)-(35,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ FlipFlopNode (location: (35,4)-(35,14))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (35,4)-(35,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (35,4)-(35,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (35,11)-(35,14))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (35,11)-(35,14) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (35,8)-(35,10) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (35,0)-(35,3) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (37,0)-(37,16))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ ParenthesesNode (location: (37,4)-(37,16))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (37,5)-(37,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ FlipFlopNode (location: (37,5)-(37,15))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (37,5)-(37,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (37,5)-(37,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (37,12)-(37,15))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (37,12)-(37,15) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (37,9)-(37,11) = ".."
+ │ ├── opening_loc: (37,4)-(37,5) = "("
+ │ └── closing_loc: (37,15)-(37,16) = ")"
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (37,0)-(37,3) = "not"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/numbers.txt b/test/prism/snapshots/numbers.txt
new file mode 100644
index 0000000000..740f3f5a2a
--- /dev/null
+++ b/test/prism/snapshots/numbers.txt
@@ -0,0 +1,142 @@
+@ ProgramNode (location: (1,0)-(67,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(67,5))
+ └── body: (length: 34)
+ ├── @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 0
+ ├── @ IntegerNode (location: (3,0)-(3,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ FloatNode (location: (5,0)-(5,3))
+ │ └── value: 1.0
+ ├── @ IntegerNode (location: (7,0)-(7,1))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IntegerNode (location: (9,0)-(9,3))
+ │ ├── flags: binary
+ │ └── value: 0
+ ├── @ IntegerNode (location: (11,0)-(11,3))
+ │ ├── flags: binary
+ │ └── value: 1
+ ├── @ IntegerNode (location: (13,0)-(13,4))
+ │ ├── flags: binary
+ │ └── value: 2
+ ├── @ IntegerNode (location: (15,0)-(15,3))
+ │ ├── flags: decimal
+ │ └── value: 0
+ ├── @ IntegerNode (location: (17,0)-(17,3))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IntegerNode (location: (19,0)-(19,3))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IntegerNode (location: (21,0)-(21,2))
+ │ ├── flags: octal
+ │ └── value: 0
+ ├── @ IntegerNode (location: (23,0)-(23,2))
+ │ ├── flags: octal
+ │ └── value: 1
+ ├── @ IntegerNode (location: (25,0)-(25,2))
+ │ ├── flags: octal
+ │ └── value: 2
+ ├── @ IntegerNode (location: (27,0)-(27,3))
+ │ ├── flags: octal
+ │ └── value: 0
+ ├── @ IntegerNode (location: (29,0)-(29,3))
+ │ ├── flags: octal
+ │ └── value: 1
+ ├── @ IntegerNode (location: (31,0)-(31,3))
+ │ ├── flags: octal
+ │ └── value: 2
+ ├── @ IntegerNode (location: (33,0)-(33,3))
+ │ ├── flags: hexadecimal
+ │ └── value: 0
+ ├── @ IntegerNode (location: (35,0)-(35,3))
+ │ ├── flags: hexadecimal
+ │ └── value: 1
+ ├── @ IntegerNode (location: (37,0)-(37,3))
+ │ ├── flags: hexadecimal
+ │ └── value: 2
+ ├── @ ImaginaryNode (location: (39,0)-(39,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (39,0)-(39,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ RationalNode (location: (41,0)-(41,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (41,0)-(41,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IntegerNode (location: (43,0)-(43,2))
+ │ ├── flags: decimal
+ │ └── value: -1
+ ├── @ ImaginaryNode (location: (45,0)-(45,3))
+ │ └── numeric:
+ │ @ RationalNode (location: (45,0)-(45,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (45,0)-(45,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ RationalNode (location: (47,0)-(47,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (47,0)-(47,3))
+ │ └── value: 1.2
+ ├── @ ImaginaryNode (location: (49,0)-(49,5))
+ │ └── numeric:
+ │ @ RationalNode (location: (49,0)-(49,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (49,0)-(49,3))
+ │ └── value: 1.2
+ ├── @ ImaginaryNode (location: (51,0)-(51,4))
+ │ └── numeric:
+ │ @ RationalNode (location: (51,0)-(51,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (51,0)-(51,2))
+ │ ├── flags: decimal
+ │ └── value: -1
+ ├── @ RationalNode (location: (53,0)-(53,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (53,0)-(53,4))
+ │ └── value: -1.2
+ ├── @ ImaginaryNode (location: (55,0)-(55,6))
+ │ └── numeric:
+ │ @ RationalNode (location: (55,0)-(55,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (55,0)-(55,4))
+ │ └── value: -1.2
+ ├── @ RationalNode (location: (57,0)-(57,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (57,0)-(57,3))
+ │ ├── flags: octal
+ │ └── value: 1
+ ├── @ ImaginaryNode (location: (59,0)-(59,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (59,0)-(59,3))
+ │ ├── flags: octal
+ │ └── value: 1
+ ├── @ ImaginaryNode (location: (61,0)-(61,5))
+ │ └── numeric:
+ │ @ RationalNode (location: (61,0)-(61,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (61,0)-(61,3))
+ │ ├── flags: octal
+ │ └── value: 1
+ ├── @ RationalNode (location: (63,0)-(63,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (63,0)-(63,3))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ ImaginaryNode (location: (65,0)-(65,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (65,0)-(65,3))
+ │ ├── flags: decimal
+ │ └── value: 1
+ └── @ ImaginaryNode (location: (67,0)-(67,5))
+ └── numeric:
+ @ RationalNode (location: (67,0)-(67,4))
+ └── numeric:
+ @ IntegerNode (location: (67,0)-(67,3))
+ ├── flags: binary
+ └── value: 1
diff --git a/test/prism/snapshots/patterns.txt b/test/prism/snapshots/patterns.txt
new file mode 100644
index 0000000000..16298e7984
--- /dev/null
+++ b/test/prism/snapshots/patterns.txt
@@ -0,0 +1,4915 @@
+@ ProgramNode (location: (1,0)-(217,5))
+├── locals: [:bar, :baz, :qux, :b, :a, :foo, :x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(217,5))
+ └── body: (length: 180)
+ ├── @ MatchRequiredNode (location: (1,0)-(1,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (2,7)-(2,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (2,4)-(2,6) = "=>"
+ ├── @ MatchRequiredNode (location: (3,0)-(3,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ FloatNode (location: (3,7)-(3,10))
+ │ │ └── value: 1.0
+ │ └── operator_loc: (3,4)-(3,6) = "=>"
+ ├── @ MatchRequiredNode (location: (4,0)-(4,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (4,0)-(4,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (4,0)-(4,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ImaginaryNode (location: (4,7)-(4,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (4,7)-(4,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (4,4)-(4,6) = "=>"
+ ├── @ MatchRequiredNode (location: (5,0)-(5,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RationalNode (location: (5,7)-(5,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (5,7)-(5,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (5,4)-(5,6) = "=>"
+ ├── @ MatchRequiredNode (location: (6,0)-(6,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (6,0)-(6,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (6,0)-(6,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (6,7)-(6,11))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (7,7)-(7,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (8,0)-(8,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (8,7)-(8,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RegularExpressionNode (location: (9,7)-(9,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (9,7)-(9,8) = "/"
+ │ │ ├── content_loc: (9,8)-(9,11) = "foo"
+ │ │ ├── closing_loc: (9,11)-(9,12) = "/"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (9,4)-(9,6) = "=>"
+ ├── @ MatchRequiredNode (location: (10,0)-(10,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (10,0)-(10,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (10,0)-(10,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (10,7)-(10,12))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (11,7)-(11,14))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (12,0)-(12,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (12,7)-(12,14))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (12,10)-(12,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (13,7)-(13,14))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (13,10)-(13,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (14,0)-(14,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (14,7)-(14,14))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (15,0)-(15,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (15,7)-(15,14))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (16,0)-(16,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (17,0)-(17,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (18,0)-(18,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (19,0)-(19,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (20,0)-(20,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (21,0)-(21,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (22,0)-(22,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (23,0)-(23,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SourceFileNode (location: (23,7)-(23,15))
+ │ │ ├── flags: ∅
+ │ │ └── filepath: "patterns.txt"
+ │ └── operator_loc: (23,4)-(23,6) = "=>"
+ ├── @ MatchRequiredNode (location: (24,0)-(24,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (24,0)-(24,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (24,0)-(24,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (25,0)-(25,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (26,0)-(26,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (28,0)-(28,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (28,7)-(28,13))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (28,7)-(28,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (28,12)-(28,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (28,9)-(28,11) = ".."
+ │ └── operator_loc: (28,4)-(28,6) = "=>"
+ ├── @ MatchRequiredNode (location: (29,0)-(29,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (29,0)-(29,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (29,0)-(29,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (29,7)-(29,17))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ FloatNode (location: (29,7)-(29,10))
+ │ │ │ └── value: 1.0
+ │ │ ├── right:
+ │ │ │ @ FloatNode (location: (29,14)-(29,17))
+ │ │ │ └── value: 1.0
+ │ │ └── operator_loc: (29,11)-(29,13) = ".."
+ │ └── operator_loc: (29,4)-(29,6) = "=>"
+ ├── @ MatchRequiredNode (location: (30,0)-(30,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (30,7)-(30,15))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ ImaginaryNode (location: (30,7)-(30,9))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (30,7)-(30,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ ImaginaryNode (location: (30,13)-(30,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (30,13)-(30,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (30,10)-(30,12) = ".."
+ │ └── operator_loc: (30,4)-(30,6) = "=>"
+ ├── @ MatchRequiredNode (location: (31,0)-(31,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (31,0)-(31,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (31,7)-(31,15))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ RationalNode (location: (31,7)-(31,9))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (31,7)-(31,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right:
+ │ │ │ @ RationalNode (location: (31,13)-(31,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (31,13)-(31,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (31,10)-(31,12) = ".."
+ │ └── operator_loc: (31,4)-(31,6) = "=>"
+ ├── @ MatchRequiredNode (location: (32,0)-(32,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (32,0)-(32,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (32,0)-(32,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (32,7)-(32,19))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ SymbolNode (location: (32,7)-(32,11))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (32,7)-(32,8) = ":"
+ │ │ │ ├── value_loc: (32,8)-(32,11) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ SymbolNode (location: (32,15)-(32,19))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (32,15)-(32,16) = ":"
+ │ │ │ ├── value_loc: (32,16)-(32,19) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── operator_loc: (32,12)-(32,14) = ".."
+ │ └── operator_loc: (32,4)-(32,6) = "=>"
+ ├── @ MatchRequiredNode (location: (33,0)-(33,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (33,0)-(33,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (33,0)-(33,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (33,7)-(33,25))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ SymbolNode (location: (33,7)-(33,14))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (33,4)-(33,6) = "=>"
+ ├── @ MatchRequiredNode (location: (34,0)-(34,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (34,0)-(34,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (34,0)-(34,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (34,7)-(34,23))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ SymbolNode (location: (34,7)-(34,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (34,4)-(34,6) = "=>"
+ ├── @ MatchRequiredNode (location: (35,0)-(35,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (35,0)-(35,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (35,0)-(35,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (35,7)-(35,21))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ RegularExpressionNode (location: (35,7)-(35,12))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (35,7)-(35,8) = "/"
+ │ │ │ ├── content_loc: (35,8)-(35,11) = "foo"
+ │ │ │ ├── closing_loc: (35,11)-(35,12) = "/"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ RegularExpressionNode (location: (35,16)-(35,21))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (35,16)-(35,17) = "/"
+ │ │ │ ├── content_loc: (35,17)-(35,20) = "foo"
+ │ │ │ ├── closing_loc: (35,20)-(35,21) = "/"
+ │ │ │ └── unescaped: "foo"
+ │ │ └── operator_loc: (35,13)-(35,15) = ".."
+ │ └── operator_loc: (35,4)-(35,6) = "=>"
+ ├── @ MatchRequiredNode (location: (36,0)-(36,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (36,0)-(36,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (36,0)-(36,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (36,7)-(36,21))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ XStringNode (location: (36,7)-(36,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (36,4)-(36,6) = "=>"
+ ├── @ MatchRequiredNode (location: (37,0)-(37,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (37,0)-(37,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (37,0)-(37,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (37,7)-(37,25))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ XStringNode (location: (37,7)-(37,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (37,4)-(37,6) = "=>"
+ ├── @ MatchRequiredNode (location: (38,0)-(38,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (38,0)-(38,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (38,0)-(38,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (38,7)-(38,25))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (38,7)-(38,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (38,10)-(38,13))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (38,21)-(38,24))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (38,4)-(38,6) = "=>"
+ ├── @ MatchRequiredNode (location: (39,0)-(39,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (39,0)-(39,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (39,0)-(39,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (39,7)-(39,25))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (39,7)-(39,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (39,10)-(39,13))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (39,21)-(39,24))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (39,4)-(39,6) = "=>"
+ ├── @ MatchRequiredNode (location: (40,0)-(40,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (40,0)-(40,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (40,0)-(40,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (40,7)-(40,25))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (40,7)-(40,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (40,4)-(40,6) = "=>"
+ ├── @ MatchRequiredNode (location: (41,0)-(41,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (41,7)-(41,25))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (41,7)-(41,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = ".."
+ │ └── operator_loc: (41,4)-(41,6) = "=>"
+ ├── @ MatchRequiredNode (location: (42,0)-(42,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (42,0)-(42,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (42,0)-(42,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (42,7)-(42,25))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = ".."
+ │ └── operator_loc: (42,4)-(42,6) = "=>"
+ ├── @ MatchRequiredNode (location: (43,0)-(43,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (43,0)-(43,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (43,0)-(43,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (43,7)-(43,25))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = ".."
+ │ └── operator_loc: (43,4)-(43,6) = "=>"
+ ├── @ MatchRequiredNode (location: (44,0)-(44,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (44,0)-(44,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (44,0)-(44,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (44,7)-(44,21))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = ".."
+ │ └── operator_loc: (44,4)-(44,6) = "=>"
+ ├── @ MatchRequiredNode (location: (45,0)-(45,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (45,0)-(45,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (45,0)-(45,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (45,7)-(45,17))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ NilNode (location: (45,7)-(45,10))
+ │ │ ├── right:
+ │ │ │ @ NilNode (location: (45,14)-(45,17))
+ │ │ └── operator_loc: (45,11)-(45,13) = ".."
+ │ └── operator_loc: (45,4)-(45,6) = "=>"
+ ├── @ MatchRequiredNode (location: (46,0)-(46,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (46,0)-(46,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (46,0)-(46,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (46,7)-(46,19))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ SelfNode (location: (46,7)-(46,11))
+ │ │ ├── right:
+ │ │ │ @ SelfNode (location: (46,15)-(46,19))
+ │ │ └── operator_loc: (46,12)-(46,14) = ".."
+ │ └── operator_loc: (46,4)-(46,6) = "=>"
+ ├── @ MatchRequiredNode (location: (47,0)-(47,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (47,0)-(47,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (47,7)-(47,19))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ TrueNode (location: (47,7)-(47,11))
+ │ │ ├── right:
+ │ │ │ @ TrueNode (location: (47,15)-(47,19))
+ │ │ └── operator_loc: (47,12)-(47,14) = ".."
+ │ └── operator_loc: (47,4)-(47,6) = "=>"
+ ├── @ MatchRequiredNode (location: (48,0)-(48,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (48,0)-(48,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (48,0)-(48,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (48,7)-(48,21))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ FalseNode (location: (48,7)-(48,12))
+ │ │ ├── right:
+ │ │ │ @ FalseNode (location: (48,16)-(48,21))
+ │ │ └── operator_loc: (48,13)-(48,15) = ".."
+ │ └── operator_loc: (48,4)-(48,6) = "=>"
+ ├── @ MatchRequiredNode (location: (49,0)-(49,27))
+ │ ├── value:
+ │ │ @ CallNode (location: (49,0)-(49,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (49,0)-(49,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (49,7)-(49,27))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ SourceFileNode (location: (49,7)-(49,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── filepath: "patterns.txt"
+ │ │ ├── right:
+ │ │ │ @ SourceFileNode (location: (49,19)-(49,27))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── filepath: "patterns.txt"
+ │ │ └── operator_loc: (49,16)-(49,18) = ".."
+ │ └── operator_loc: (49,4)-(49,6) = "=>"
+ ├── @ MatchRequiredNode (location: (50,0)-(50,27))
+ │ ├── value:
+ │ │ @ CallNode (location: (50,0)-(50,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (50,0)-(50,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (50,7)-(50,27))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ SourceLineNode (location: (50,7)-(50,15))
+ │ │ ├── right:
+ │ │ │ @ SourceLineNode (location: (50,19)-(50,27))
+ │ │ └── operator_loc: (50,16)-(50,18) = ".."
+ │ └── operator_loc: (50,4)-(50,6) = "=>"
+ ├── @ MatchRequiredNode (location: (51,0)-(51,35))
+ │ ├── value:
+ │ │ @ CallNode (location: (51,0)-(51,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (51,0)-(51,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (51,7)-(51,35))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ SourceEncodingNode (location: (51,7)-(51,19))
+ │ │ ├── right:
+ │ │ │ @ SourceEncodingNode (location: (51,23)-(51,35))
+ │ │ └── operator_loc: (51,20)-(51,22) = ".."
+ │ └── operator_loc: (51,4)-(51,6) = "=>"
+ ├── @ MatchRequiredNode (location: (52,0)-(52,31))
+ │ ├── value:
+ │ │ @ CallNode (location: (52,0)-(52,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (52,0)-(52,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (52,7)-(52,31))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = ".."
+ │ └── operator_loc: (52,4)-(52,6) = "=>"
+ ├── @ LocalVariableWriteNode (location: (54,0)-(54,7))
+ │ ├── name: :bar
+ │ ├── depth: 0
+ │ ├── name_loc: (54,0)-(54,3) = "bar"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (54,6)-(54,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (54,4)-(54,5) = "="
+ ├── @ MatchRequiredNode (location: (54,9)-(54,20))
+ │ ├── value:
+ │ │ @ CallNode (location: (54,9)-(54,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (54,9)-(54,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ PinnedVariableNode (location: (54,16)-(54,20))
+ │ │ ├── variable:
+ │ │ │ @ LocalVariableReadNode (location: (54,17)-(54,20))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ └── operator_loc: (54,16)-(54,17) = "^"
+ │ └── operator_loc: (54,13)-(54,15) = "=>"
+ ├── @ MatchRequiredNode (location: (55,0)-(55,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (55,0)-(55,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (55,0)-(55,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (56,0)-(56,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (57,0)-(57,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (59,0)-(59,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ PinnedExpressionNode (location: (59,7)-(59,11))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (59,9)-(59,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (60,0)-(60,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (61,0)-(61,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ PinnedExpressionNode (location: (61,7)-(61,23))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (61,9)-(61,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (61,15)-(61,16) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (61,17)-(61,22))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (63,0)-(63,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (64,0)-(64,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ConstantPathNode (location: (64,7)-(64,20))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (64,7)-(64,15))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (64,7)-(64,10))
+ │ │ │ │ └── name: :Foo
+ │ │ │ ├── name: :Bar
+ │ │ │ ├── delimiter_loc: (64,10)-(64,12) = "::"
+ │ │ │ └── name_loc: (64,12)-(64,15) = "Bar"
+ │ │ ├── name: :Baz
+ │ │ ├── delimiter_loc: (64,15)-(64,17) = "::"
+ │ │ └── name_loc: (64,17)-(64,20) = "Baz"
+ │ └── operator_loc: (64,4)-(64,6) = "=>"
+ ├── @ MatchRequiredNode (location: (65,0)-(65,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (65,0)-(65,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (65,0)-(65,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ConstantPathNode (location: (65,7)-(65,12))
+ │ │ ├── parent: ∅
+ │ │ ├── name: :Foo
+ │ │ ├── delimiter_loc: (65,7)-(65,9) = "::"
+ │ │ └── name_loc: (65,9)-(65,12) = "Foo"
+ │ └── operator_loc: (65,4)-(65,6) = "=>"
+ ├── @ MatchRequiredNode (location: (66,0)-(66,22))
+ │ ├── value:
+ │ │ @ CallNode (location: (66,0)-(66,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (66,0)-(66,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ConstantPathNode (location: (66,7)-(66,22))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (66,7)-(66,17))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantPathNode (location: (66,7)-(66,12))
+ │ │ │ │ ├── parent: ∅
+ │ │ │ │ ├── name: :Foo
+ │ │ │ │ ├── delimiter_loc: (66,7)-(66,9) = "::"
+ │ │ │ │ └── name_loc: (66,9)-(66,12) = "Foo"
+ │ │ │ ├── name: :Bar
+ │ │ │ ├── delimiter_loc: (66,12)-(66,14) = "::"
+ │ │ │ └── name_loc: (66,14)-(66,17) = "Bar"
+ │ │ ├── name: :Baz
+ │ │ ├── delimiter_loc: (66,17)-(66,19) = "::"
+ │ │ └── name_loc: (66,19)-(66,22) = "Baz"
+ │ └── operator_loc: (66,4)-(66,6) = "=>"
+ ├── @ MatchRequiredNode (location: (68,0)-(68,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (68,0)-(68,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (68,0)-(68,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (69,0)-(69,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (70,0)-(70,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (70,14)-(70,15))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (70,17)-(70,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (71,0)-(71,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (72,0)-(72,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (73,0)-(73,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (74,0)-(74,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (76,0)-(76,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (77,0)-(77,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (78,0)-(78,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ ├── @ IntegerNode (location: (78,14)-(78,15))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (78,17)-(78,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (79,0)-(79,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (80,0)-(80,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (81,0)-(81,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (82,0)-(82,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (83,0)-(83,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (85,0)-(85,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (86,0)-(86,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (87,0)-(87,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (88,0)-(88,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (89,0)-(89,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (91,0)-(91,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (91,0)-(91,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (91,7)-(91,11))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (91,7)-(91,10))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ ImplicitRestNode (location: (91,10)-(91,11))
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (91,4)-(91,6) = "=>"
+ ├── @ MatchRequiredNode (location: (95,0)-(95,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (95,0)-(95,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (95,0)-(95,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (95,7)-(95,9))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (95,7)-(95,8) = "["
+ │ │ └── closing_loc: (95,8)-(95,9) = "]"
+ │ └── operator_loc: (95,4)-(95,6) = "=>"
+ ├── @ MatchRequiredNode (location: (96,0)-(96,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (96,0)-(96,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (96,0)-(96,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (96,7)-(96,17))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ ArrayPatternNode (location: (96,8)-(96,16))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ ArrayPatternNode (location: (96,9)-(96,15))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ ArrayPatternNode (location: (96,10)-(96,14))
+ │ │ │ │ │ ├── constant: ∅
+ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ └── @ ArrayPatternNode (location: (96,11)-(96,13))
+ │ │ │ │ │ │ ├── constant: ∅
+ │ │ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ ├── opening_loc: (96,11)-(96,12) = "["
+ │ │ │ │ │ │ └── closing_loc: (96,12)-(96,13) = "]"
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── opening_loc: (96,10)-(96,11) = "["
+ │ │ │ │ │ └── closing_loc: (96,13)-(96,14) = "]"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (96,9)-(96,10) = "["
+ │ │ │ │ └── closing_loc: (96,14)-(96,15) = "]"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (96,8)-(96,9) = "["
+ │ │ │ └── closing_loc: (96,15)-(96,16) = "]"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (96,7)-(96,8) = "["
+ │ │ └── closing_loc: (96,16)-(96,17) = "]"
+ │ └── operator_loc: (96,4)-(96,6) = "=>"
+ ├── @ MatchRequiredNode (location: (98,0)-(98,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (98,0)-(98,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (98,0)-(98,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (98,7)-(98,13))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (98,8)-(98,12))
+ │ │ │ ├── operator_loc: (98,8)-(98,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (98,9)-(98,12))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (98,7)-(98,8) = "["
+ │ │ └── closing_loc: (98,12)-(98,13) = "]"
+ │ └── operator_loc: (98,4)-(98,6) = "=>"
+ ├── @ MatchRequiredNode (location: (99,0)-(99,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (99,0)-(99,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (99,0)-(99,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (99,7)-(99,23))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (99,8)-(99,12))
+ │ │ │ ├── operator_loc: (99,8)-(99,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (99,9)-(99,12))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (99,14)-(99,17))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (99,19)-(99,22))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (99,7)-(99,8) = "["
+ │ │ └── closing_loc: (99,22)-(99,23) = "]"
+ │ └── operator_loc: (99,4)-(99,6) = "=>"
+ ├── @ MatchRequiredNode (location: (100,0)-(100,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (100,0)-(100,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (100,0)-(100,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (100,7)-(100,23))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (100,8)-(100,11))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (100,13)-(100,17))
+ │ │ │ ├── operator_loc: (100,13)-(100,14) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (100,14)-(100,17))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (100,19)-(100,22))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (100,7)-(100,8) = "["
+ │ │ └── closing_loc: (100,22)-(100,23) = "]"
+ │ └── operator_loc: (100,4)-(100,6) = "=>"
+ ├── @ MatchRequiredNode (location: (101,0)-(101,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (101,0)-(101,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (101,0)-(101,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (101,7)-(101,23))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (101,8)-(101,11))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (101,13)-(101,16))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (101,18)-(101,22))
+ │ │ │ ├── operator_loc: (101,18)-(101,19) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (101,19)-(101,22))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (101,7)-(101,8) = "["
+ │ │ └── closing_loc: (101,22)-(101,23) = "]"
+ │ └── operator_loc: (101,4)-(101,6) = "=>"
+ ├── @ MatchRequiredNode (location: (102,0)-(102,24))
+ │ ├── value:
+ │ │ @ CallNode (location: (102,0)-(102,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (102,0)-(102,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (102,7)-(102,24))
+ │ │ ├── constant: ∅
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (102,8)-(102,12))
+ │ │ │ ├── operator_loc: (102,8)-(102,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (102,9)-(102,12))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (102,14)-(102,17))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (102,19)-(102,23))
+ │ │ │ ├── operator_loc: (102,19)-(102,20) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (102,20)-(102,23))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (102,7)-(102,8) = "["
+ │ │ └── closing_loc: (102,23)-(102,24) = "]"
+ │ └── operator_loc: (102,4)-(102,6) = "=>"
+ ├── @ MatchPredicateNode (location: (104,0)-(104,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (104,0)-(104,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (104,0)-(104,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ LocalVariableTargetNode (location: (104,7)-(104,10))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ └── operator_loc: (104,4)-(104,6) = "in"
+ ├── @ MatchPredicateNode (location: (105,0)-(105,8))
+ │ ├── value:
+ │ │ @ CallNode (location: (105,0)-(105,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (105,0)-(105,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (105,7)-(105,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (105,4)-(105,6) = "in"
+ ├── @ MatchPredicateNode (location: (106,0)-(106,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (106,0)-(106,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (106,0)-(106,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ FloatNode (location: (106,7)-(106,10))
+ │ │ └── value: 1.0
+ │ └── operator_loc: (106,4)-(106,6) = "in"
+ ├── @ MatchPredicateNode (location: (107,0)-(107,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (107,0)-(107,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (107,0)-(107,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ImaginaryNode (location: (107,7)-(107,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (107,7)-(107,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (107,4)-(107,6) = "in"
+ ├── @ MatchPredicateNode (location: (108,0)-(108,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (108,0)-(108,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (108,0)-(108,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RationalNode (location: (108,7)-(108,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (108,7)-(108,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (108,4)-(108,6) = "in"
+ ├── @ MatchPredicateNode (location: (109,0)-(109,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (109,0)-(109,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (109,0)-(109,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (109,7)-(109,11))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (109,7)-(109,8) = ":"
+ │ │ ├── value_loc: (109,8)-(109,11) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (109,4)-(109,6) = "in"
+ ├── @ MatchPredicateNode (location: (110,0)-(110,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (110,0)-(110,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (110,0)-(110,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (110,7)-(110,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (110,7)-(110,10) = "%s["
+ │ │ ├── value_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,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (111,0)-(111,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (111,0)-(111,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (111,7)-(111,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (111,7)-(111,9) = ":\""
+ │ │ ├── value_loc: (111,9)-(111,12) = "foo"
+ │ │ ├── closing_loc: (111,12)-(111,13) = "\""
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (111,4)-(111,6) = "in"
+ ├── @ MatchPredicateNode (location: (112,0)-(112,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (112,0)-(112,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (112,0)-(112,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ RegularExpressionNode (location: (112,7)-(112,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (112,7)-(112,8) = "/"
+ │ │ ├── content_loc: (112,8)-(112,11) = "foo"
+ │ │ ├── closing_loc: (112,11)-(112,12) = "/"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (112,4)-(112,6) = "in"
+ ├── @ MatchPredicateNode (location: (113,0)-(113,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (113,0)-(113,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (113,0)-(113,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (113,7)-(113,12))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (113,7)-(113,8) = "`"
+ │ │ ├── content_loc: (113,8)-(113,11) = "foo"
+ │ │ ├── closing_loc: (113,11)-(113,12) = "`"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (113,4)-(113,6) = "in"
+ ├── @ MatchPredicateNode (location: (114,0)-(114,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (114,0)-(114,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (114,0)-(114,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (114,7)-(114,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (114,7)-(114,10) = "%x["
+ │ │ ├── content_loc: (114,10)-(114,13) = "foo"
+ │ │ ├── closing_loc: (114,13)-(114,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (114,4)-(114,6) = "in"
+ ├── @ MatchPredicateNode (location: (115,0)-(115,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (115,0)-(115,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (115,0)-(115,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (115,7)-(115,14))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (115,10)-(115,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (115,10)-(115,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (115,7)-(115,10) = "%i["
+ │ │ └── closing_loc: (115,13)-(115,14) = "]"
+ │ └── operator_loc: (115,4)-(115,6) = "in"
+ ├── @ MatchPredicateNode (location: (116,0)-(116,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (116,0)-(116,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (116,0)-(116,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (116,7)-(116,14))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (116,10)-(116,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (116,10)-(116,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (116,7)-(116,10) = "%I["
+ │ │ └── closing_loc: (116,13)-(116,14) = "]"
+ │ └── operator_loc: (116,4)-(116,6) = "in"
+ ├── @ MatchPredicateNode (location: (117,0)-(117,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (117,0)-(117,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (117,0)-(117,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (117,7)-(117,14))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ StringNode (location: (117,10)-(117,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (117,10)-(117,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (117,7)-(117,10) = "%w["
+ │ │ └── closing_loc: (117,13)-(117,14) = "]"
+ │ └── operator_loc: (117,4)-(117,6) = "in"
+ ├── @ MatchPredicateNode (location: (118,0)-(118,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (118,0)-(118,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (118,0)-(118,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (118,7)-(118,14))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ StringNode (location: (118,10)-(118,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (118,10)-(118,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (118,7)-(118,10) = "%W["
+ │ │ └── closing_loc: (118,13)-(118,14) = "]"
+ │ └── operator_loc: (118,4)-(118,6) = "in"
+ ├── @ MatchPredicateNode (location: (119,0)-(119,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (119,0)-(119,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (119,0)-(119,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ StringNode (location: (119,7)-(119,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (119,7)-(119,10) = "%q["
+ │ │ ├── content_loc: (119,10)-(119,13) = "foo"
+ │ │ ├── closing_loc: (119,13)-(119,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (119,4)-(119,6) = "in"
+ ├── @ MatchPredicateNode (location: (120,0)-(120,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (120,0)-(120,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (120,0)-(120,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ StringNode (location: (120,7)-(120,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (120,7)-(120,10) = "%Q["
+ │ │ ├── content_loc: (120,10)-(120,13) = "foo"
+ │ │ ├── closing_loc: (120,13)-(120,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (120,4)-(120,6) = "in"
+ ├── @ MatchPredicateNode (location: (121,0)-(121,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (121,0)-(121,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (121,0)-(121,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ StringNode (location: (121,7)-(121,12))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (121,7)-(121,8) = "\""
+ │ │ ├── content_loc: (121,8)-(121,11) = "foo"
+ │ │ ├── closing_loc: (121,11)-(121,12) = "\""
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (121,4)-(121,6) = "in"
+ ├── @ MatchPredicateNode (location: (122,0)-(122,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (122,0)-(122,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (122,0)-(122,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ NilNode (location: (122,7)-(122,10))
+ │ └── operator_loc: (122,4)-(122,6) = "in"
+ ├── @ MatchPredicateNode (location: (123,0)-(123,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (123,0)-(123,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (123,0)-(123,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SelfNode (location: (123,7)-(123,11))
+ │ └── operator_loc: (123,4)-(123,6) = "in"
+ ├── @ MatchPredicateNode (location: (124,0)-(124,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (124,0)-(124,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (124,0)-(124,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ TrueNode (location: (124,7)-(124,11))
+ │ └── operator_loc: (124,4)-(124,6) = "in"
+ ├── @ MatchPredicateNode (location: (125,0)-(125,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (125,0)-(125,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (125,0)-(125,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ FalseNode (location: (125,7)-(125,12))
+ │ └── operator_loc: (125,4)-(125,6) = "in"
+ ├── @ MatchPredicateNode (location: (126,0)-(126,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (126,0)-(126,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (126,0)-(126,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SourceFileNode (location: (126,7)-(126,15))
+ │ │ ├── flags: ∅
+ │ │ └── filepath: "patterns.txt"
+ │ └── operator_loc: (126,4)-(126,6) = "in"
+ ├── @ MatchPredicateNode (location: (127,0)-(127,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (127,0)-(127,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (127,0)-(127,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SourceLineNode (location: (127,7)-(127,15))
+ │ └── operator_loc: (127,4)-(127,6) = "in"
+ ├── @ MatchPredicateNode (location: (128,0)-(128,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (128,0)-(128,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (128,0)-(128,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ SourceEncodingNode (location: (128,7)-(128,19))
+ │ └── operator_loc: (128,4)-(128,6) = "in"
+ ├── @ MatchPredicateNode (location: (129,0)-(129,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (129,0)-(129,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (129,0)-(129,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ LambdaNode (location: (129,7)-(129,17))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (129,7)-(129,9) = "->"
+ │ │ ├── opening_loc: (129,10)-(129,11) = "{"
+ │ │ ├── closing_loc: (129,16)-(129,17) = "}"
+ │ │ ├── parameters: ∅
+ │ │ └── body:
+ │ │ @ StatementsNode (location: (129,12)-(129,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (129,12)-(129,15))
+ │ │ ├── name: :bar
+ │ │ └── depth: 1
+ │ └── operator_loc: (129,4)-(129,6) = "in"
+ ├── @ MatchPredicateNode (location: (131,0)-(131,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (131,0)-(131,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (131,0)-(131,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (131,7)-(131,11))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (131,7)-(131,10))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ ImplicitRestNode (location: (131,10)-(131,11))
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (131,4)-(131,6) = "in"
+ ├── @ CaseMatchNode (location: (135,0)-(135,25))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (135,5)-(135,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (135,5)-(135,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (135,10)-(135,21))
+ │ │ ├── pattern:
+ │ │ │ @ LocalVariableTargetNode (location: (135,13)-(135,16))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (135,10)-(135,12) = "in"
+ │ │ └── then_loc: (135,17)-(135,21) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (135,0)-(135,4) = "case"
+ │ └── end_keyword_loc: (135,22)-(135,25) = "end"
+ ├── @ CaseMatchNode (location: (136,0)-(136,23))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (136,5)-(136,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (136,5)-(136,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (136,10)-(136,19))
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (136,13)-(136,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (136,10)-(136,12) = "in"
+ │ │ └── then_loc: (136,15)-(136,19) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (136,0)-(136,4) = "case"
+ │ └── end_keyword_loc: (136,20)-(136,23) = "end"
+ ├── @ CaseMatchNode (location: (137,0)-(137,25))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (137,5)-(137,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (137,5)-(137,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (137,10)-(137,21))
+ │ │ ├── pattern:
+ │ │ │ @ FloatNode (location: (137,13)-(137,16))
+ │ │ │ └── value: 1.0
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (137,10)-(137,12) = "in"
+ │ │ └── then_loc: (137,17)-(137,21) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (137,0)-(137,4) = "case"
+ │ └── end_keyword_loc: (137,22)-(137,25) = "end"
+ ├── @ CaseMatchNode (location: (138,0)-(138,24))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (138,5)-(138,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (138,5)-(138,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (138,10)-(138,20))
+ │ │ ├── pattern:
+ │ │ │ @ ImaginaryNode (location: (138,13)-(138,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (138,13)-(138,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (138,10)-(138,12) = "in"
+ │ │ └── then_loc: (138,16)-(138,20) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (138,0)-(138,4) = "case"
+ │ └── end_keyword_loc: (138,21)-(138,24) = "end"
+ ├── @ CaseMatchNode (location: (139,0)-(139,24))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (139,5)-(139,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (139,5)-(139,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (139,10)-(139,20))
+ │ │ ├── pattern:
+ │ │ │ @ RationalNode (location: (139,13)-(139,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (139,13)-(139,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (139,10)-(139,12) = "in"
+ │ │ └── then_loc: (139,16)-(139,20) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (139,0)-(139,4) = "case"
+ │ └── end_keyword_loc: (139,21)-(139,24) = "end"
+ ├── @ CaseMatchNode (location: (140,0)-(140,26))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (140,5)-(140,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (140,5)-(140,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (140,10)-(140,22))
+ │ │ ├── pattern:
+ │ │ │ @ SymbolNode (location: (140,13)-(140,17))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (140,13)-(140,14) = ":"
+ │ │ │ ├── value_loc: (140,14)-(140,17) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (140,10)-(140,12) = "in"
+ │ │ └── then_loc: (140,18)-(140,22) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (140,0)-(140,4) = "case"
+ │ └── end_keyword_loc: (140,23)-(140,26) = "end"
+ ├── @ CaseMatchNode (location: (141,0)-(141,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (141,5)-(141,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (141,5)-(141,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (141,10)-(141,25))
+ │ │ ├── pattern:
+ │ │ │ @ SymbolNode (location: (141,13)-(141,20))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (141,13)-(141,16) = "%s["
+ │ │ │ ├── value_loc: (141,16)-(141,19) = "foo"
+ │ │ │ ├── closing_loc: (141,19)-(141,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (142,0)-(142,28))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (142,5)-(142,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (142,5)-(142,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (142,10)-(142,24))
+ │ │ ├── pattern:
+ │ │ │ @ SymbolNode (location: (142,13)-(142,19))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (142,13)-(142,15) = ":\""
+ │ │ │ ├── value_loc: (142,15)-(142,18) = "foo"
+ │ │ │ ├── closing_loc: (142,18)-(142,19) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (142,10)-(142,12) = "in"
+ │ │ └── then_loc: (142,20)-(142,24) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (142,0)-(142,4) = "case"
+ │ └── end_keyword_loc: (142,25)-(142,28) = "end"
+ ├── @ CaseMatchNode (location: (143,0)-(143,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (143,5)-(143,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (143,5)-(143,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (143,10)-(143,23))
+ │ │ ├── pattern:
+ │ │ │ @ RegularExpressionNode (location: (143,13)-(143,18))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (143,13)-(143,14) = "/"
+ │ │ │ ├── content_loc: (143,14)-(143,17) = "foo"
+ │ │ │ ├── closing_loc: (143,17)-(143,18) = "/"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (143,10)-(143,12) = "in"
+ │ │ └── then_loc: (143,19)-(143,23) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (143,0)-(143,4) = "case"
+ │ └── end_keyword_loc: (143,24)-(143,27) = "end"
+ ├── @ CaseMatchNode (location: (144,0)-(144,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (144,5)-(144,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (144,5)-(144,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (144,10)-(144,23))
+ │ │ ├── pattern:
+ │ │ │ @ XStringNode (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"
+ ├── @ CaseMatchNode (location: (145,0)-(145,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (145,5)-(145,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (145,5)-(145,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (145,10)-(145,25))
+ │ │ ├── pattern:
+ │ │ │ @ XStringNode (location: (145,13)-(145,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (145,13)-(145,16) = "%x["
+ │ │ │ ├── content_loc: (145,16)-(145,19) = "foo"
+ │ │ │ ├── closing_loc: (145,19)-(145,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (145,10)-(145,12) = "in"
+ │ │ └── then_loc: (145,21)-(145,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (145,0)-(145,4) = "case"
+ │ └── end_keyword_loc: (145,26)-(145,29) = "end"
+ ├── @ CaseMatchNode (location: (146,0)-(146,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (146,5)-(146,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (146,5)-(146,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (146,10)-(146,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (146,13)-(146,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (146,16)-(146,19))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (146,16)-(146,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (146,13)-(146,16) = "%i["
+ │ │ │ └── closing_loc: (146,19)-(146,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (146,10)-(146,12) = "in"
+ │ │ └── then_loc: (146,21)-(146,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (146,0)-(146,4) = "case"
+ │ └── end_keyword_loc: (146,26)-(146,29) = "end"
+ ├── @ CaseMatchNode (location: (147,0)-(147,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (147,5)-(147,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (147,5)-(147,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (147,10)-(147,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (147,13)-(147,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (147,16)-(147,19))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (147,16)-(147,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (147,13)-(147,16) = "%I["
+ │ │ │ └── closing_loc: (147,19)-(147,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (147,10)-(147,12) = "in"
+ │ │ └── then_loc: (147,21)-(147,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (147,0)-(147,4) = "case"
+ │ └── end_keyword_loc: (147,26)-(147,29) = "end"
+ ├── @ CaseMatchNode (location: (148,0)-(148,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (148,5)-(148,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (148,5)-(148,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (148,10)-(148,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (148,13)-(148,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (148,16)-(148,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (148,16)-(148,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (148,13)-(148,16) = "%w["
+ │ │ │ └── closing_loc: (148,19)-(148,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (148,10)-(148,12) = "in"
+ │ │ └── then_loc: (148,21)-(148,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (148,0)-(148,4) = "case"
+ │ └── end_keyword_loc: (148,26)-(148,29) = "end"
+ ├── @ CaseMatchNode (location: (149,0)-(149,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (149,5)-(149,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (149,5)-(149,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (149,10)-(149,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (149,13)-(149,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (149,16)-(149,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (149,16)-(149,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (149,13)-(149,16) = "%W["
+ │ │ │ └── closing_loc: (149,19)-(149,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (149,10)-(149,12) = "in"
+ │ │ └── then_loc: (149,21)-(149,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (149,0)-(149,4) = "case"
+ │ └── end_keyword_loc: (149,26)-(149,29) = "end"
+ ├── @ CaseMatchNode (location: (150,0)-(150,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (150,5)-(150,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (150,5)-(150,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (150,10)-(150,25))
+ │ │ ├── pattern:
+ │ │ │ @ StringNode (location: (150,13)-(150,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (150,13)-(150,16) = "%q["
+ │ │ │ ├── content_loc: (150,16)-(150,19) = "foo"
+ │ │ │ ├── closing_loc: (150,19)-(150,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (150,10)-(150,12) = "in"
+ │ │ └── then_loc: (150,21)-(150,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (150,0)-(150,4) = "case"
+ │ └── end_keyword_loc: (150,26)-(150,29) = "end"
+ ├── @ CaseMatchNode (location: (151,0)-(151,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (151,5)-(151,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (151,5)-(151,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (151,10)-(151,25))
+ │ │ ├── pattern:
+ │ │ │ @ StringNode (location: (151,13)-(151,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (151,13)-(151,16) = "%Q["
+ │ │ │ ├── content_loc: (151,16)-(151,19) = "foo"
+ │ │ │ ├── closing_loc: (151,19)-(151,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (151,10)-(151,12) = "in"
+ │ │ └── then_loc: (151,21)-(151,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (151,0)-(151,4) = "case"
+ │ └── end_keyword_loc: (151,26)-(151,29) = "end"
+ ├── @ CaseMatchNode (location: (152,0)-(152,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (152,5)-(152,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (152,5)-(152,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (152,10)-(152,23))
+ │ │ ├── pattern:
+ │ │ │ @ StringNode (location: (152,13)-(152,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (152,13)-(152,14) = "\""
+ │ │ │ ├── content_loc: (152,14)-(152,17) = "foo"
+ │ │ │ ├── closing_loc: (152,17)-(152,18) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (152,10)-(152,12) = "in"
+ │ │ └── then_loc: (152,19)-(152,23) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (152,0)-(152,4) = "case"
+ │ └── end_keyword_loc: (152,24)-(152,27) = "end"
+ ├── @ CaseMatchNode (location: (153,0)-(153,25))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (153,5)-(153,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (153,5)-(153,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (153,10)-(153,21))
+ │ │ ├── pattern:
+ │ │ │ @ NilNode (location: (153,13)-(153,16))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (153,10)-(153,12) = "in"
+ │ │ └── then_loc: (153,17)-(153,21) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (153,0)-(153,4) = "case"
+ │ └── end_keyword_loc: (153,22)-(153,25) = "end"
+ ├── @ CaseMatchNode (location: (154,0)-(154,26))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (154,5)-(154,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (154,5)-(154,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (154,10)-(154,22))
+ │ │ ├── pattern:
+ │ │ │ @ SelfNode (location: (154,13)-(154,17))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (154,10)-(154,12) = "in"
+ │ │ └── then_loc: (154,18)-(154,22) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (154,0)-(154,4) = "case"
+ │ └── end_keyword_loc: (154,23)-(154,26) = "end"
+ ├── @ CaseMatchNode (location: (155,0)-(155,26))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (155,5)-(155,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (155,5)-(155,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (155,10)-(155,22))
+ │ │ ├── pattern:
+ │ │ │ @ TrueNode (location: (155,13)-(155,17))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (155,10)-(155,12) = "in"
+ │ │ └── then_loc: (155,18)-(155,22) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (155,0)-(155,4) = "case"
+ │ └── end_keyword_loc: (155,23)-(155,26) = "end"
+ ├── @ CaseMatchNode (location: (156,0)-(156,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (156,5)-(156,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (156,5)-(156,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (156,10)-(156,23))
+ │ │ ├── pattern:
+ │ │ │ @ FalseNode (location: (156,13)-(156,18))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (156,10)-(156,12) = "in"
+ │ │ └── then_loc: (156,19)-(156,23) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (156,0)-(156,4) = "case"
+ │ └── end_keyword_loc: (156,24)-(156,27) = "end"
+ ├── @ CaseMatchNode (location: (157,0)-(157,30))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (157,5)-(157,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (157,5)-(157,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (157,10)-(157,26))
+ │ │ ├── pattern:
+ │ │ │ @ SourceFileNode (location: (157,13)-(157,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── filepath: "patterns.txt"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (157,10)-(157,12) = "in"
+ │ │ └── then_loc: (157,22)-(157,26) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (157,0)-(157,4) = "case"
+ │ └── end_keyword_loc: (157,27)-(157,30) = "end"
+ ├── @ CaseMatchNode (location: (158,0)-(158,30))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (158,5)-(158,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (158,5)-(158,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (158,10)-(158,26))
+ │ │ ├── pattern:
+ │ │ │ @ SourceLineNode (location: (158,13)-(158,21))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (158,10)-(158,12) = "in"
+ │ │ └── then_loc: (158,22)-(158,26) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (158,0)-(158,4) = "case"
+ │ └── end_keyword_loc: (158,27)-(158,30) = "end"
+ ├── @ CaseMatchNode (location: (159,0)-(159,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (159,5)-(159,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (159,5)-(159,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (159,10)-(159,30))
+ │ │ ├── pattern:
+ │ │ │ @ SourceEncodingNode (location: (159,13)-(159,25))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (159,10)-(159,12) = "in"
+ │ │ └── then_loc: (159,26)-(159,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (159,0)-(159,4) = "case"
+ │ └── end_keyword_loc: (159,31)-(159,34) = "end"
+ ├── @ CaseMatchNode (location: (160,0)-(160,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (160,5)-(160,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (160,5)-(160,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (160,10)-(160,28))
+ │ │ ├── pattern:
+ │ │ │ @ LambdaNode (location: (160,13)-(160,23))
+ │ │ │ ├── locals: []
+ │ │ │ ├── operator_loc: (160,13)-(160,15) = "->"
+ │ │ │ ├── opening_loc: (160,16)-(160,17) = "{"
+ │ │ │ ├── closing_loc: (160,22)-(160,23) = "}"
+ │ │ │ ├── parameters: ∅
+ │ │ │ └── body:
+ │ │ │ @ StatementsNode (location: (160,18)-(160,21))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (160,18)-(160,21))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 1
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (160,10)-(160,12) = "in"
+ │ │ └── then_loc: (160,24)-(160,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (160,0)-(160,4) = "case"
+ │ └── end_keyword_loc: (160,29)-(160,32) = "end"
+ ├── @ CaseMatchNode (location: (162,0)-(162,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (162,5)-(162,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (162,5)-(162,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (162,10)-(162,28))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (162,13)-(162,23))
+ │ │ │ ├── if_keyword_loc: (162,17)-(162,19) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (162,20)-(162,23))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (162,13)-(162,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (162,13)-(162,16))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (162,10)-(162,12) = "in"
+ │ │ └── then_loc: (162,24)-(162,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (162,0)-(162,4) = "case"
+ │ └── end_keyword_loc: (162,29)-(162,32) = "end"
+ ├── @ CaseMatchNode (location: (163,0)-(163,30))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (163,5)-(163,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (163,5)-(163,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (163,10)-(163,26))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (163,13)-(163,21))
+ │ │ │ ├── if_keyword_loc: (163,15)-(163,17) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (163,18)-(163,21))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (163,13)-(163,14))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (163,13)-(163,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (163,10)-(163,12) = "in"
+ │ │ └── then_loc: (163,22)-(163,26) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (163,0)-(163,4) = "case"
+ │ └── end_keyword_loc: (163,27)-(163,30) = "end"
+ ├── @ CaseMatchNode (location: (164,0)-(164,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (164,5)-(164,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (164,5)-(164,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (164,10)-(164,28))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (164,13)-(164,23))
+ │ │ │ ├── if_keyword_loc: (164,17)-(164,19) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (164,20)-(164,23))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (164,13)-(164,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (164,13)-(164,16))
+ │ │ │ │ └── value: 1.0
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (164,10)-(164,12) = "in"
+ │ │ └── then_loc: (164,24)-(164,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (164,0)-(164,4) = "case"
+ │ └── end_keyword_loc: (164,29)-(164,32) = "end"
+ ├── @ CaseMatchNode (location: (165,0)-(165,31))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (165,5)-(165,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (165,5)-(165,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (165,10)-(165,27))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (165,13)-(165,22))
+ │ │ │ ├── if_keyword_loc: (165,16)-(165,18) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (165,19)-(165,22))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (165,13)-(165,15))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ImaginaryNode (location: (165,13)-(165,15))
+ │ │ │ │ └── numeric:
+ │ │ │ │ @ IntegerNode (location: (165,13)-(165,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (165,10)-(165,12) = "in"
+ │ │ └── then_loc: (165,23)-(165,27) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (165,0)-(165,4) = "case"
+ │ └── end_keyword_loc: (165,28)-(165,31) = "end"
+ ├── @ CaseMatchNode (location: (166,0)-(166,31))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (166,5)-(166,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (166,5)-(166,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (166,10)-(166,27))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (166,13)-(166,22))
+ │ │ │ ├── if_keyword_loc: (166,16)-(166,18) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (166,19)-(166,22))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (166,13)-(166,15))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RationalNode (location: (166,13)-(166,15))
+ │ │ │ │ └── numeric:
+ │ │ │ │ @ IntegerNode (location: (166,13)-(166,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (166,10)-(166,12) = "in"
+ │ │ └── then_loc: (166,23)-(166,27) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (166,0)-(166,4) = "case"
+ │ └── end_keyword_loc: (166,28)-(166,31) = "end"
+ ├── @ CaseMatchNode (location: (167,0)-(167,33))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (167,5)-(167,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (167,5)-(167,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (167,10)-(167,29))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (167,13)-(167,24))
+ │ │ │ ├── if_keyword_loc: (167,18)-(167,20) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (167,21)-(167,24))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (167,13)-(167,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (167,13)-(167,17))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (167,13)-(167,14) = ":"
+ │ │ │ │ ├── value_loc: (167,14)-(167,17) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (167,10)-(167,12) = "in"
+ │ │ └── then_loc: (167,25)-(167,29) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (167,0)-(167,4) = "case"
+ │ └── end_keyword_loc: (167,30)-(167,33) = "end"
+ ├── @ CaseMatchNode (location: (168,0)-(168,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (168,5)-(168,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (168,5)-(168,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (168,13)-(168,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (168,13)-(168,20))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (168,13)-(168,16) = "%s["
+ │ │ │ │ ├── value_loc: (168,16)-(168,19) = "foo"
+ │ │ │ │ ├── closing_loc: (168,19)-(168,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (169,0)-(169,35))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (169,5)-(169,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (169,5)-(169,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (169,10)-(169,31))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (169,13)-(169,26))
+ │ │ │ ├── if_keyword_loc: (169,20)-(169,22) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (169,23)-(169,26))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (169,13)-(169,19))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (169,13)-(169,19))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (169,13)-(169,15) = ":\""
+ │ │ │ │ ├── value_loc: (169,15)-(169,18) = "foo"
+ │ │ │ │ ├── closing_loc: (169,18)-(169,19) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (169,10)-(169,12) = "in"
+ │ │ └── then_loc: (169,27)-(169,31) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (169,0)-(169,4) = "case"
+ │ └── end_keyword_loc: (169,32)-(169,35) = "end"
+ ├── @ CaseMatchNode (location: (170,0)-(170,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (170,5)-(170,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (170,5)-(170,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (170,10)-(170,30))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (170,13)-(170,25))
+ │ │ │ ├── if_keyword_loc: (170,19)-(170,21) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (170,22)-(170,25))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (170,13)-(170,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RegularExpressionNode (location: (170,13)-(170,18))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (170,13)-(170,14) = "/"
+ │ │ │ │ ├── content_loc: (170,14)-(170,17) = "foo"
+ │ │ │ │ ├── closing_loc: (170,17)-(170,18) = "/"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (170,10)-(170,12) = "in"
+ │ │ └── then_loc: (170,26)-(170,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (170,0)-(170,4) = "case"
+ │ └── end_keyword_loc: (170,31)-(170,34) = "end"
+ ├── @ CaseMatchNode (location: (171,0)-(171,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (171,5)-(171,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (171,5)-(171,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (171,13)-(171,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ XStringNode (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"
+ ├── @ CaseMatchNode (location: (172,0)-(172,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (172,5)-(172,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (172,5)-(172,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (172,10)-(172,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (172,13)-(172,27))
+ │ │ │ ├── if_keyword_loc: (172,21)-(172,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (172,24)-(172,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (172,13)-(172,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ XStringNode (location: (172,13)-(172,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (172,13)-(172,16) = "%x["
+ │ │ │ │ ├── content_loc: (172,16)-(172,19) = "foo"
+ │ │ │ │ ├── closing_loc: (172,19)-(172,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (172,10)-(172,12) = "in"
+ │ │ └── then_loc: (172,28)-(172,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (172,0)-(172,4) = "case"
+ │ └── end_keyword_loc: (172,33)-(172,36) = "end"
+ ├── @ CaseMatchNode (location: (173,0)-(173,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (173,5)-(173,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (173,5)-(173,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (173,10)-(173,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (173,13)-(173,27))
+ │ │ │ ├── if_keyword_loc: (173,21)-(173,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (173,24)-(173,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (173,13)-(173,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (173,13)-(173,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ SymbolNode (location: (173,16)-(173,19))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (173,16)-(173,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (173,13)-(173,16) = "%i["
+ │ │ │ │ └── closing_loc: (173,19)-(173,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (173,10)-(173,12) = "in"
+ │ │ └── then_loc: (173,28)-(173,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (173,0)-(173,4) = "case"
+ │ └── end_keyword_loc: (173,33)-(173,36) = "end"
+ ├── @ CaseMatchNode (location: (174,0)-(174,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (174,5)-(174,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (174,5)-(174,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (174,10)-(174,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (174,13)-(174,27))
+ │ │ │ ├── if_keyword_loc: (174,21)-(174,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (174,24)-(174,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (174,13)-(174,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (174,13)-(174,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ SymbolNode (location: (174,16)-(174,19))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (174,16)-(174,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (174,13)-(174,16) = "%I["
+ │ │ │ │ └── closing_loc: (174,19)-(174,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (174,10)-(174,12) = "in"
+ │ │ └── then_loc: (174,28)-(174,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (174,0)-(174,4) = "case"
+ │ └── end_keyword_loc: (174,33)-(174,36) = "end"
+ ├── @ CaseMatchNode (location: (175,0)-(175,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (175,5)-(175,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (175,5)-(175,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (175,10)-(175,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (175,13)-(175,27))
+ │ │ │ ├── if_keyword_loc: (175,21)-(175,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (175,24)-(175,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (175,13)-(175,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (175,13)-(175,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (175,16)-(175,19))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (175,16)-(175,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (175,13)-(175,16) = "%w["
+ │ │ │ │ └── closing_loc: (175,19)-(175,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (175,10)-(175,12) = "in"
+ │ │ └── then_loc: (175,28)-(175,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (175,0)-(175,4) = "case"
+ │ └── end_keyword_loc: (175,33)-(175,36) = "end"
+ ├── @ CaseMatchNode (location: (176,0)-(176,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (176,5)-(176,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (176,5)-(176,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (176,10)-(176,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (176,13)-(176,27))
+ │ │ │ ├── if_keyword_loc: (176,21)-(176,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (176,24)-(176,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (176,13)-(176,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (176,13)-(176,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (176,16)-(176,19))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (176,16)-(176,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (176,13)-(176,16) = "%W["
+ │ │ │ │ └── closing_loc: (176,19)-(176,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (176,10)-(176,12) = "in"
+ │ │ └── then_loc: (176,28)-(176,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (176,0)-(176,4) = "case"
+ │ └── end_keyword_loc: (176,33)-(176,36) = "end"
+ ├── @ CaseMatchNode (location: (177,0)-(177,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (177,5)-(177,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (177,5)-(177,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (177,10)-(177,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (177,13)-(177,27))
+ │ │ │ ├── if_keyword_loc: (177,21)-(177,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (177,24)-(177,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (177,13)-(177,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (177,13)-(177,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (177,13)-(177,16) = "%q["
+ │ │ │ │ ├── content_loc: (177,16)-(177,19) = "foo"
+ │ │ │ │ ├── closing_loc: (177,19)-(177,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (177,10)-(177,12) = "in"
+ │ │ └── then_loc: (177,28)-(177,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (177,0)-(177,4) = "case"
+ │ └── end_keyword_loc: (177,33)-(177,36) = "end"
+ ├── @ CaseMatchNode (location: (178,0)-(178,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (178,5)-(178,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (178,5)-(178,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (178,10)-(178,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (178,13)-(178,27))
+ │ │ │ ├── if_keyword_loc: (178,21)-(178,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (178,24)-(178,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (178,13)-(178,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (178,13)-(178,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (178,13)-(178,16) = "%Q["
+ │ │ │ │ ├── content_loc: (178,16)-(178,19) = "foo"
+ │ │ │ │ ├── closing_loc: (178,19)-(178,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (178,10)-(178,12) = "in"
+ │ │ └── then_loc: (178,28)-(178,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (178,0)-(178,4) = "case"
+ │ └── end_keyword_loc: (178,33)-(178,36) = "end"
+ ├── @ CaseMatchNode (location: (179,0)-(179,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (179,5)-(179,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (179,5)-(179,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (179,10)-(179,30))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (179,13)-(179,25))
+ │ │ │ ├── if_keyword_loc: (179,19)-(179,21) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (179,22)-(179,25))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (179,13)-(179,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (179,13)-(179,18))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (179,13)-(179,14) = "\""
+ │ │ │ │ ├── content_loc: (179,14)-(179,17) = "foo"
+ │ │ │ │ ├── closing_loc: (179,17)-(179,18) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (179,10)-(179,12) = "in"
+ │ │ └── then_loc: (179,26)-(179,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (179,0)-(179,4) = "case"
+ │ └── end_keyword_loc: (179,31)-(179,34) = "end"
+ ├── @ CaseMatchNode (location: (180,0)-(180,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (180,5)-(180,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (180,5)-(180,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (180,10)-(180,28))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (180,13)-(180,23))
+ │ │ │ ├── if_keyword_loc: (180,17)-(180,19) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (180,20)-(180,23))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (180,13)-(180,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ NilNode (location: (180,13)-(180,16))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (180,10)-(180,12) = "in"
+ │ │ └── then_loc: (180,24)-(180,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (180,0)-(180,4) = "case"
+ │ └── end_keyword_loc: (180,29)-(180,32) = "end"
+ ├── @ CaseMatchNode (location: (181,0)-(181,33))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (181,5)-(181,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (181,5)-(181,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (181,10)-(181,29))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (181,13)-(181,24))
+ │ │ │ ├── if_keyword_loc: (181,18)-(181,20) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (181,21)-(181,24))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (181,13)-(181,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SelfNode (location: (181,13)-(181,17))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (181,10)-(181,12) = "in"
+ │ │ └── then_loc: (181,25)-(181,29) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (181,0)-(181,4) = "case"
+ │ └── end_keyword_loc: (181,30)-(181,33) = "end"
+ ├── @ CaseMatchNode (location: (182,0)-(182,33))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (182,5)-(182,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (182,5)-(182,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (182,10)-(182,29))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (182,13)-(182,24))
+ │ │ │ ├── if_keyword_loc: (182,18)-(182,20) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (182,21)-(182,24))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (182,13)-(182,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (182,13)-(182,17))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (182,10)-(182,12) = "in"
+ │ │ └── then_loc: (182,25)-(182,29) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (182,0)-(182,4) = "case"
+ │ └── end_keyword_loc: (182,30)-(182,33) = "end"
+ ├── @ CaseMatchNode (location: (183,0)-(183,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (183,5)-(183,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (183,5)-(183,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (183,10)-(183,30))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (183,13)-(183,25))
+ │ │ │ ├── if_keyword_loc: (183,19)-(183,21) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (183,22)-(183,25))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (183,13)-(183,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ FalseNode (location: (183,13)-(183,18))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (183,10)-(183,12) = "in"
+ │ │ └── then_loc: (183,26)-(183,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (183,0)-(183,4) = "case"
+ │ └── end_keyword_loc: (183,31)-(183,34) = "end"
+ ├── @ CaseMatchNode (location: (184,0)-(184,37))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (184,5)-(184,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (184,5)-(184,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (184,10)-(184,33))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (184,13)-(184,28))
+ │ │ │ ├── if_keyword_loc: (184,22)-(184,24) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (184,25)-(184,28))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (184,13)-(184,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SourceFileNode (location: (184,13)-(184,21))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── filepath: "patterns.txt"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (184,10)-(184,12) = "in"
+ │ │ └── then_loc: (184,29)-(184,33) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (184,0)-(184,4) = "case"
+ │ └── end_keyword_loc: (184,34)-(184,37) = "end"
+ ├── @ CaseMatchNode (location: (185,0)-(185,37))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (185,5)-(185,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (185,5)-(185,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (185,10)-(185,33))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (185,13)-(185,28))
+ │ │ │ ├── if_keyword_loc: (185,22)-(185,24) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (185,25)-(185,28))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (185,13)-(185,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SourceLineNode (location: (185,13)-(185,21))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (185,10)-(185,12) = "in"
+ │ │ └── then_loc: (185,29)-(185,33) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (185,0)-(185,4) = "case"
+ │ └── end_keyword_loc: (185,34)-(185,37) = "end"
+ ├── @ CaseMatchNode (location: (186,0)-(186,41))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (186,5)-(186,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (186,5)-(186,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (186,10)-(186,37))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (186,13)-(186,32))
+ │ │ │ ├── if_keyword_loc: (186,26)-(186,28) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (186,29)-(186,32))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (186,13)-(186,25))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SourceEncodingNode (location: (186,13)-(186,25))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (186,10)-(186,12) = "in"
+ │ │ └── then_loc: (186,33)-(186,37) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (186,0)-(186,4) = "case"
+ │ └── end_keyword_loc: (186,38)-(186,41) = "end"
+ ├── @ CaseMatchNode (location: (187,0)-(187,39))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (187,5)-(187,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (187,5)-(187,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (187,10)-(187,35))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (187,13)-(187,30))
+ │ │ │ ├── if_keyword_loc: (187,24)-(187,26) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (187,27)-(187,30))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (187,13)-(187,23))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LambdaNode (location: (187,13)-(187,23))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── operator_loc: (187,13)-(187,15) = "->"
+ │ │ │ │ ├── opening_loc: (187,16)-(187,17) = "{"
+ │ │ │ │ ├── closing_loc: (187,22)-(187,23) = "}"
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ └── body:
+ │ │ │ │ @ StatementsNode (location: (187,18)-(187,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (187,18)-(187,21))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 1
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (187,10)-(187,12) = "in"
+ │ │ └── then_loc: (187,31)-(187,35) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (187,0)-(187,4) = "case"
+ │ └── end_keyword_loc: (187,36)-(187,39) = "end"
+ ├── @ IfNode (location: (189,0)-(190,3))
+ │ ├── if_keyword_loc: (189,0)-(189,2) = "if"
+ │ ├── predicate:
+ │ │ @ MatchPredicateNode (location: (189,3)-(189,10))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (189,3)-(189,4))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (189,3)-(189,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (189,8)-(189,10))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (189,8)-(189,9) = "["
+ │ │ │ └── closing_loc: (189,9)-(189,10) = "]"
+ │ │ └── operator_loc: (189,5)-(189,7) = "in"
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (190,0)-(190,3) = "end"
+ ├── @ MatchRequiredNode (location: (192,0)-(194,1))
+ │ ├── value:
+ │ │ @ CallNode (location: (192,0)-(192,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (192,0)-(192,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (192,5)-(194,1))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (193,2)-(193,3))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (192,5)-(192,6) = "["
+ │ │ └── closing_loc: (194,0)-(194,1) = "]"
+ │ └── operator_loc: (192,2)-(192,4) = "=>"
+ ├── @ MatchPredicateNode (location: (196,0)-(200,1))
+ │ ├── value:
+ │ │ @ CallNode (location: (196,0)-(196,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (196,0)-(196,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (196,7)-(200,1))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (196,7)-(196,8))
+ │ │ │ └── name: :A
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (197,2)-(199,3))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (197,2)-(197,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (197,2)-(197,5) = "bar"
+ │ │ │ │ ├── closing_loc: (197,5)-(197,6) = ":"
+ │ │ │ │ └── unescaped: "bar"
+ │ │ │ ├── value:
+ │ │ │ │ @ HashPatternNode (location: (197,7)-(199,3))
+ │ │ │ │ ├── constant:
+ │ │ │ │ │ @ ConstantReadNode (location: (197,7)-(197,8))
+ │ │ │ │ │ └── name: :B
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (198,4)-(198,12))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (198,4)-(198,10))
+ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── value_loc: (198,4)-(198,9) = "value"
+ │ │ │ │ │ │ ├── closing_loc: (198,9)-(198,10) = ":"
+ │ │ │ │ │ │ └── unescaped: "value"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ LocalVariableTargetNode (location: (198,11)-(198,12))
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── opening_loc: (197,8)-(197,9) = "["
+ │ │ │ │ └── closing_loc: (199,2)-(199,3) = "]"
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── opening_loc: (196,8)-(196,9) = "["
+ │ │ └── closing_loc: (200,0)-(200,1) = "]"
+ │ └── operator_loc: (196,4)-(196,6) = "in"
+ ├── @ MatchPredicateNode (location: (202,0)-(202,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (202,0)-(202,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (202,0)-(202,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ CapturePatternNode (location: (202,7)-(202,17))
+ │ │ ├── value:
+ │ │ │ @ LocalVariableTargetNode (location: (202,7)-(202,10))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── target:
+ │ │ │ @ LocalVariableTargetNode (location: (202,14)-(202,17))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ └── operator_loc: (202,11)-(202,13) = "=>"
+ │ └── operator_loc: (202,4)-(202,6) = "in"
+ ├── @ MatchRequiredNode (location: (203,0)-(203,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (203,0)-(203,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (203,0)-(203,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ CapturePatternNode (location: (203,7)-(203,17))
+ │ │ ├── value:
+ │ │ │ @ LocalVariableTargetNode (location: (203,7)-(203,10))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── target:
+ │ │ │ @ LocalVariableTargetNode (location: (203,14)-(203,17))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ └── operator_loc: (203,11)-(203,13) = "=>"
+ │ └── operator_loc: (203,4)-(203,6) = "=>"
+ ├── @ MultiWriteNode (location: (205,0)-(205,20))
+ │ ├── lefts: (length: 3)
+ │ │ ├── @ LocalVariableTargetNode (location: (205,0)-(205,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── @ LocalVariableTargetNode (location: (205,5)-(205,8))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (205,10)-(205,13))
+ │ │ ├── name: :baz
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (205,14)-(205,15) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (205,16)-(205,20))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (205,16)-(205,17))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (205,19)-(205,20))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ CallNode (location: (206,0)-(208,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (206,0)-(206,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (206,4)-(208,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (207,2)-(207,29))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MatchRequiredNode (location: (207,2)-(207,29))
+ │ │ ├── value:
+ │ │ │ @ ArrayNode (location: (207,2)-(207,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (207,3)-(207,4))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ IntegerNode (location: (207,6)-(207,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── opening_loc: (207,2)-(207,3) = "["
+ │ │ │ └── closing_loc: (207,7)-(207,8) = "]"
+ │ │ ├── pattern:
+ │ │ │ @ CapturePatternNode (location: (207,12)-(207,29))
+ │ │ │ ├── value:
+ │ │ │ │ @ ArrayPatternNode (location: (207,12)-(207,22))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ LocalVariableTargetNode (location: (207,13)-(207,16))
+ │ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ │ └── depth: 1
+ │ │ │ │ │ └── @ LocalVariableTargetNode (location: (207,18)-(207,21))
+ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ └── depth: 1
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (207,12)-(207,13) = "["
+ │ │ │ │ └── closing_loc: (207,21)-(207,22) = "]"
+ │ │ │ ├── target:
+ │ │ │ │ @ LocalVariableTargetNode (location: (207,26)-(207,29))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 1
+ │ │ │ └── operator_loc: (207,23)-(207,25) = "=>"
+ │ │ └── operator_loc: (207,9)-(207,11) = "=>"
+ │ ├── opening_loc: (206,4)-(206,6) = "do"
+ │ └── closing_loc: (208,0)-(208,3) = "end"
+ ├── @ MatchRequiredNode (location: (210,0)-(210,19))
+ │ ├── value:
+ │ │ @ LocalVariableReadNode (location: (210,0)-(210,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (210,7)-(210,19))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (210,7)-(210,13))
+ │ │ │ └── name: :Object
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ HashPatternNode (location: (210,14)-(210,18))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (210,15)-(210,17))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (210,15)-(210,17))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (210,15)-(210,16) = "x"
+ │ │ │ │ │ ├── closing_loc: (210,16)-(210,17) = ":"
+ │ │ │ │ │ └── unescaped: "x"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ ImplicitNode (location: (210,15)-(210,16))
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (210,15)-(210,16))
+ │ │ │ │ │ ├── name: :x
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── opening_loc: (210,14)-(210,15) = "{"
+ │ │ │ └── closing_loc: (210,17)-(210,18) = "}"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (210,13)-(210,14) = "["
+ │ │ └── closing_loc: (210,18)-(210,19) = "]"
+ │ └── operator_loc: (210,4)-(210,6) = "=>"
+ ├── @ CallNode (location: (212,0)-(212,19))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (212,0)-(212,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: (212,1)-(212,2) = "."
+ │ ├── name: :then
+ │ ├── message_loc: (212,2)-(212,6) = "then"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (212,7)-(212,19))
+ │ ├── locals: [:_1]
+ │ ├── parameters:
+ │ │ @ NumberedParametersNode (location: (212,7)-(212,19))
+ │ │ └── maximum: 1
+ │ ├── body:
+ │ │ @ StatementsNode (location: (212,9)-(212,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MatchPredicateNode (location: (212,9)-(212,17))
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (212,9)-(212,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── pattern:
+ │ │ │ @ PinnedVariableNode (location: (212,14)-(212,17))
+ │ │ │ ├── variable:
+ │ │ │ │ @ LocalVariableReadNode (location: (212,15)-(212,17))
+ │ │ │ │ ├── name: :_1
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (212,14)-(212,15) = "^"
+ │ │ └── operator_loc: (212,11)-(212,13) = "in"
+ │ ├── opening_loc: (212,7)-(212,8) = "{"
+ │ └── closing_loc: (212,18)-(212,19) = "}"
+ └── @ MultiWriteNode (location: (214,0)-(217,5))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (215,2)-(215,3))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (216,2)-(216,3))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: (214,0)-(214,1) = "("
+ ├── rparen_loc: (217,0)-(217,1) = ")"
+ ├── operator_loc: (217,2)-(217,3) = "="
+ └── value:
+ @ CallNode (location: (217,4)-(217,5))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (217,4)-(217,5) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/procs.txt b/test/prism/snapshots/procs.txt
new file mode 100644
index 0000000000..1329ae6a5f
--- /dev/null
+++ b/test/prism/snapshots/procs.txt
@@ -0,0 +1,403 @@
+@ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 3)
+ │ │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── @ BlockLocalVariableNode (location: (1,10)-(1,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ └── @ BlockLocalVariableNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: (3,3)-(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: (7,3)-(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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (13,5)-(13,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (15,7)-(15,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (17,6)-(17,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (17,6)-(17,7) = "b"
+ │ │ │ │ ├── operator_loc: (17,8)-(17,9) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (17,10)-(17,11))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (17,13)-(17,15))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ └── name_loc: (17,13)-(17,15) = "c:"
+ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (17,17)-(17,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ └── name_loc: (17,17)-(17,19) = "d:"
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (17,21)-(17,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (19,7)-(19,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (19,7)-(19,8) = "b"
+ │ │ │ │ ├── operator_loc: (19,9)-(19,10) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (19,11)-(19,12))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (19,14)-(19,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (19,15)-(19,16) = "c"
+ │ │ │ │ └── operator_loc: (19,14)-(19,15) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (19,18)-(19,20))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ └── name_loc: (19,18)-(19,20) = "d:"
+ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (19,22)-(19,24))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :e
+ │ │ │ │ └── name_loc: (19,22)-(19,24) = "e:"
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (19,26)-(19,29))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :f
+ │ │ │ │ ├── name_loc: (19,28)-(19,29) = "f"
+ │ │ │ │ └── operator_loc: (19,26)-(19,28) = "**"
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (19,31)-(19,33))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (21,7)-(21,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (21,7)-(21,8) = "b"
+ │ │ │ │ ├── operator_loc: (21,9)-(21,10) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (21,11)-(21,12))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (21,14)-(21,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (21,15)-(21,16) = "c"
+ │ │ │ │ └── operator_loc: (21,14)-(21,15) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (21,18)-(21,20))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ └── name_loc: (21,18)-(21,20) = "d:"
+ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (21,22)-(21,24))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :e
+ │ │ │ │ └── name_loc: (21,22)-(21,24) = "e:"
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (21,26)-(21,29))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :f
+ │ │ │ │ ├── name_loc: (21,28)-(21,29) = "f"
+ │ │ │ │ └── operator_loc: (21,26)-(21,28) = "**"
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (21,31)-(21,33))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (25,16)-(25,17))
+ │ │ ├── name: :a
+ │ │ └── depth: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :*
+ │ ├── message_loc: (25,18)-(25,19) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,20)-(25,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (25,20)-(25,21))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ 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)
+ │ │ │ └── @ MultiTargetNode (location: (27,4)-(27,10))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (27,5)-(27,6))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (27,8)-(27,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (27,4)-(27,5) = "("
+ │ │ │ └── rparen_loc: (27,9)-(27,10) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (27,12)-(27,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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..a630b01ef1
--- /dev/null
+++ b/test/prism/snapshots/range_begin_open_exclusive.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,4))
+ ├── flags: exclude_end
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (1,3)-(1,4))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── operator_loc: (1,0)-(1,3) = "..."
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..dc8ef0d2db
--- /dev/null
+++ b/test/prism/snapshots/range_begin_open_inclusive.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,3))
+ ├── flags: ∅
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── operator_loc: (1,0)-(1,2) = ".."
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..17a75f8945
--- /dev/null
+++ b/test/prism/snapshots/range_end_open_exclusive.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,4))
+ ├── flags: exclude_end
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── right: ∅
+ └── operator_loc: (1,1)-(1,4) = "..."
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..b49272d8cd
--- /dev/null
+++ b/test/prism/snapshots/range_end_open_inclusive.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,3))
+ ├── flags: ∅
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── right: ∅
+ └── operator_loc: (1,1)-(1,3) = ".."
diff --git a/test/prism/snapshots/ranges.txt b/test/prism/snapshots/ranges.txt
new file mode 100644
index 0000000000..2fffe80537
--- /dev/null
+++ b/test/prism/snapshots/ranges.txt
@@ -0,0 +1,533 @@
+@ ProgramNode (location: (1,0)-(49,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(49,7))
+ └── body: (length: 25)
+ ├── @ ParenthesesNode (location: (1,0)-(1,6))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,1)-(1,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RangeNode (location: (1,1)-(1,5))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (1,1)-(1,4) = "..."
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (3,3)-(3,4))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (3,1)-(3,3) = ".."
+ │ ├── opening_loc: (3,0)-(3,1) = "("
+ │ └── closing_loc: (3,4)-(3,5) = ")"
+ ├── @ RangeNode (location: (5,0)-(5,5))
+ │ ├── flags: exclude_end
+ │ ├── left:
+ │ │ @ IntegerNode (location: (5,0)-(5,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (5,4)-(5,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (5,1)-(5,4) = "..."
+ ├── @ CallNode (location: (7,0)-(7,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (7,3)-(7,9) = "[...2]"
+ │ ├── opening_loc: (7,3)-(7,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,4)-(7,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RangeNode (location: (7,4)-(7,8))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (7,7)-(7,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (7,4)-(7,7) = "..."
+ │ ├── closing_loc: (7,8)-(7,9) = "]"
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (9,2)-(9,5) = "foo"
+ │ │ │ ├── closing_loc: (9,5)-(9,6) = ":"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ RangeNode (location: (9,7)-(9,13))
+ │ │ │ ├── flags: exclude_end
+ │ │ │ ├── left: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (9,10)-(9,13))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (9,10)-(9,13) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (9,7)-(9,10) = "..."
+ │ │ └── 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))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (11,1)-(11,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (11,2)-(11,5) = "..."
+ │ ├── opening_loc: (11,0)-(11,1) = "("
+ │ └── closing_loc: (11,5)-(11,6) = ")"
+ ├── @ RangeNode (location: (13,0)-(13,4))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (13,0)-(13,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (13,3)-(13,4))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (13,1)-(13,3) = ".."
+ ├── @ 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (15,2)-(15,5) = "foo"
+ │ │ │ ├── closing_loc: (15,5)-(15,6) = ":"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ RangeNode (location: (15,7)-(15,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── left: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (15,9)-(15,12))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (15,9)-(15,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (15,7)-(15,9) = ".."
+ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (17,1)-(17,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (17,2)-(17,4) = ".."
+ │ ├── opening_loc: (17,0)-(17,1) = "("
+ │ └── closing_loc: (17,4)-(17,5) = ")"
+ ├── @ RangeNode (location: (19,0)-(19,8))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (19,0)-(19,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ RangeNode (location: (19,5)-(19,8))
+ │ │ ├── flags: ∅
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (19,7)-(19,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (19,5)-(19,7) = ".."
+ │ └── operator_loc: (19,2)-(19,4) = ".."
+ ├── @ AndNode (location: (21,0)-(21,8))
+ │ ├── left:
+ │ │ @ RangeNode (location: (21,0)-(21,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (21,0)-(21,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (21,1)-(21,3) = ".."
+ │ ├── right:
+ │ │ @ IntegerNode (location: (21,7)-(21,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (21,4)-(21,6) = "&&"
+ ├── @ CallNode (location: (23,0)-(23,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (23,0)-(23,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (23,0)-(23,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (23,1)-(23,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :==
+ │ ├── message_loc: (23,4)-(23,6) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,7)-(23,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (23,7)-(23,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (25,0)-(25,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (25,0)-(25,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (25,0)-(25,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (25,1)-(25,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!=
+ │ ├── message_loc: (25,4)-(25,6) = "!="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,7)-(25,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (25,7)-(25,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (27,0)-(27,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (27,0)-(27,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (27,0)-(27,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (27,1)-(27,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :===
+ │ ├── message_loc: (27,4)-(27,7) = "==="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,8)-(27,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (27,8)-(27,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (29,0)-(29,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (29,0)-(29,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (29,0)-(29,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (29,1)-(29,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<=>
+ │ ├── message_loc: (29,4)-(29,7) = "<=>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,8)-(29,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (29,8)-(29,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(31,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (31,0)-(31,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (31,0)-(31,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (31,1)-(31,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (31,4)-(31,6) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,7)-(31,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,7)-(31,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (33,0)-(33,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (33,0)-(33,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (33,0)-(33,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (33,1)-(33,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!~
+ │ ├── message_loc: (33,4)-(33,6) = "!~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,7)-(33,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (33,7)-(33,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (35,0)-(35,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (35,0)-(35,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (35,0)-(35,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (35,1)-(35,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<
+ │ ├── message_loc: (35,4)-(35,5) = "<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,6)-(35,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (35,6)-(35,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (37,0)-(37,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (37,0)-(37,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (37,0)-(37,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (37,1)-(37,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>
+ │ ├── message_loc: (37,4)-(37,5) = ">"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,6)-(37,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (37,6)-(37,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (39,0)-(39,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (39,0)-(39,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (39,0)-(39,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (39,1)-(39,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<=
+ │ ├── message_loc: (39,4)-(39,6) = "<="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,7)-(39,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (39,7)-(39,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (41,0)-(41,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (41,0)-(41,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (41,0)-(41,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (41,1)-(41,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>=
+ │ ├── message_loc: (41,4)-(41,6) = ">="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,7)-(41,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (41,7)-(41,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (43,0)-(43,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (43,0)-(43,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (43,0)-(43,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (43,1)-(43,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<<
+ │ ├── message_loc: (43,4)-(43,6) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (43,7)-(43,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (43,7)-(43,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RangeNode (location: (45,0)-(45,3))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (45,0)-(45,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (45,1)-(45,3) = ".."
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>>
+ │ ├── message_loc: (45,4)-(45,6) = ">>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,7)-(45,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (45,7)-(45,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ RangeNode (location: (47,0)-(47,7))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (47,0)-(47,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ CallNode (location: (47,4)-(47,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (47,6)-(47,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+@
+ │ │ ├── message_loc: (47,4)-(47,5) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (47,1)-(47,3) = ".."
+ └── @ RangeNode (location: (49,0)-(49,7))
+ ├── flags: ∅
+ ├── left:
+ │ @ IntegerNode (location: (49,0)-(49,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── right:
+ │ @ CallNode (location: (49,4)-(49,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (49,6)-(49,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :-@
+ │ ├── message_loc: (49,4)-(49,5) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (49,1)-(49,3) = ".."
diff --git a/test/prism/snapshots/regex.txt b/test/prism/snapshots/regex.txt
new file mode 100644
index 0000000000..d4d153e8d5
--- /dev/null
+++ b/test/prism/snapshots/regex.txt
@@ -0,0 +1,510 @@
+@ ProgramNode (location: (1,0)-(46,32))
+├── locals: [:foo, :ab, :abc, :a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(46,32))
+ └── body: (length: 25)
+ ├── @ CallNode (location: (1,0)-(1,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (1,4)-(1,9))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,4)-(1,5) = "/"
+ │ │ ├── content_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── closing_loc: (1,8)-(1,9) = "/"
+ │ │ └── unescaped: "bar"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ RegularExpressionNode (location: (3,0)-(3,8))
+ │ ├── flags: ignore_case, forced_us_ascii_encoding
+ │ ├── opening_loc: (3,0)-(3,3) = "%r{"
+ │ ├── content_loc: (3,3)-(3,6) = "abc"
+ │ ├── closing_loc: (3,6)-(3,8) = "}i"
+ │ └── unescaped: "abc"
+ ├── @ RegularExpressionNode (location: (5,0)-(5,5))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (5,0)-(5,1) = "/"
+ │ ├── content_loc: (5,1)-(5,4) = "a\\b"
+ │ ├── closing_loc: (5,4)-(5,5) = "/"
+ │ └── unescaped: "a\\b"
+ ├── @ InterpolatedRegularExpressionNode (location: (7,0)-(7,11))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (7,1)-(7,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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) = "/"
+ ├── @ InterpolatedRegularExpressionNode (location: (9,0)-(9,16))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (9,0)-(9,1) = "/"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (9,1)-(9,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bbb
+ │ │ │ │ ├── message_loc: (9,7)-(9,10) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (9,10)-(9,11) = "}"
+ │ │ └── @ StringNode (location: (9,11)-(9,15))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (9,11)-(9,15) = " ccc"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " ccc"
+ │ └── closing_loc: (9,15)-(9,16) = "/"
+ ├── @ ArrayNode (location: (11,0)-(11,27))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ MatchWriteNode (location: (11,1)-(11,21))
+ │ │ │ ├── call:
+ │ │ │ │ @ CallNode (location: (11,1)-(11,21))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ RegularExpressionNode (location: (11,1)-(11,14))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (11,1)-(11,2) = "/"
+ │ │ │ │ │ ├── content_loc: (11,2)-(11,13) = "(?<foo>bar)"
+ │ │ │ │ │ ├── closing_loc: (11,13)-(11,14) = "/"
+ │ │ │ │ │ └── unescaped: "(?<foo>bar)"
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :=~
+ │ │ │ │ ├── message_loc: (11,15)-(11,17) = "=~"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (11,18)-(11,21))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (11,18)-(11,21))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :baz
+ │ │ │ │ │ ├── message_loc: (11,18)-(11,21) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── targets: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (11,5)-(11,8))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ 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))
+ │ ├── flags: ignore_case, forced_us_ascii_encoding
+ │ ├── opening_loc: (13,0)-(13,1) = "/"
+ │ ├── content_loc: (13,1)-(13,4) = "abc"
+ │ ├── closing_loc: (13,4)-(13,6) = "/i"
+ │ └── unescaped: "abc"
+ ├── @ RegularExpressionNode (location: (15,0)-(15,26))
+ │ ├── flags: ignore_case, forced_us_ascii_encoding
+ │ ├── 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$.?\#@~]*:"
+ ├── @ RegularExpressionNode (location: (17,0)-(17,37))
+ │ ├── flags: ignore_case, forced_us_ascii_encoding
+ │ ├── 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$.?\#@~]*)(\\s+)(equ)"
+ ├── @ RegularExpressionNode (location: (19,0)-(19,25))
+ │ ├── flags: ignore_case, forced_us_ascii_encoding
+ │ ├── 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$.?\#@~]*"
+ ├── @ RegularExpressionNode (location: (21,0)-(24,1))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (21,0)-(21,3) = "%r("
+ │ ├── content_loc: (21,3)-(24,0) = "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n"
+ │ ├── closing_loc: (24,0)-(24,1) = ")"
+ │ └── unescaped: "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n"
+ ├── @ CallNode (location: (26,0)-(26,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (26,0)-(26,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (26,0)-(26,1) = "/"
+ │ │ ├── content_loc: (26,1)-(26,7) = "(?#\\))"
+ │ │ ├── closing_loc: (26,7)-(26,8) = "/"
+ │ │ └── unescaped: "(?#\\))"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (26,9)-(26,11) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (26,12)-(26,16))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── @ RegularExpressionNode (location: (28,0)-(28,9))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (28,0)-(28,3) = "%r#"
+ │ ├── content_loc: (28,3)-(28,8) = "pound"
+ │ ├── closing_loc: (28,8)-(28,9) = "#"
+ │ └── unescaped: "pound"
+ ├── @ InterpolatedRegularExpressionNode (location: (30,0)-(30,13))
+ │ ├── flags: once
+ │ ├── opening_loc: (30,0)-(30,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (30,1)-(30,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bbb
+ │ │ │ ├── message_loc: (30,7)-(30,10) = "bbb"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (30,10)-(30,11) = "}"
+ │ └── closing_loc: (30,11)-(30,13) = "/o"
+ ├── @ MatchWriteNode (location: (32,0)-(33,10))
+ │ ├── call:
+ │ │ @ CallNode (location: (32,0)-(33,10))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ RegularExpressionNode (location: (32,0)-(33,4))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (32,0)-(32,1) = "/"
+ │ │ │ ├── content_loc: (32,1)-(33,3) = "(?<a\\\nb>)"
+ │ │ │ ├── closing_loc: (33,3)-(33,4) = "/"
+ │ │ │ └── unescaped: "(?<ab>)"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (33,5)-(33,7) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (33,8)-(33,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (33,8)-(33,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (33,8)-(33,9) = "\""
+ │ │ │ ├── content_loc: (33,9)-(33,9) = ""
+ │ │ │ ├── closing_loc: (33,9)-(33,10) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── targets: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (32,0)-(33,4))
+ │ ├── name: :ab
+ │ └── depth: 0
+ ├── @ LocalVariableReadNode (location: (33,12)-(33,14))
+ │ ├── name: :ab
+ │ └── depth: 0
+ ├── @ MatchWriteNode (location: (35,0)-(35,24))
+ │ ├── call:
+ │ │ @ CallNode (location: (35,0)-(35,24))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ RegularExpressionNode (location: (35,0)-(35,18))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (35,0)-(35,1) = "/"
+ │ │ │ ├── content_loc: (35,1)-(35,17) = "(?<abc>)(?<abc>)"
+ │ │ │ ├── closing_loc: (35,17)-(35,18) = "/"
+ │ │ │ └── unescaped: "(?<abc>)(?<abc>)"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (35,19)-(35,21) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (35,22)-(35,24))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (35,22)-(35,24))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (35,22)-(35,23) = "\""
+ │ │ │ ├── content_loc: (35,23)-(35,23) = ""
+ │ │ │ ├── closing_loc: (35,23)-(35,24) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── targets: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (35,4)-(35,7))
+ │ ├── name: :abc
+ │ └── depth: 0
+ ├── @ LocalVariableReadNode (location: (35,26)-(35,29))
+ │ ├── name: :abc
+ │ └── depth: 0
+ ├── @ CallNode (location: (37,0)-(37,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (37,0)-(37,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (37,0)-(37,1) = "/"
+ │ │ ├── content_loc: (37,1)-(37,9) = "(?<a b>)"
+ │ │ ├── closing_loc: (37,9)-(37,10) = "/"
+ │ │ └── unescaped: "(?<a b>)"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (37,11)-(37,13) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,14)-(37,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (37,14)-(37,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (37,14)-(37,15) = "\""
+ │ │ ├── content_loc: (37,15)-(37,15) = ""
+ │ │ ├── closing_loc: (37,15)-(37,16) = "\""
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ LocalVariableWriteNode (location: (39,0)-(39,5))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (39,0)-(39,1) = "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (39,4)-(39,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (39,2)-(39,3) = "="
+ ├── @ CallNode (location: (40,0)-(40,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (40,0)-(40,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (40,4)-(40,24))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (40,6)-(40,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MatchWriteNode (location: (40,6)-(40,22))
+ │ │ ├── call:
+ │ │ │ @ CallNode (location: (40,6)-(40,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ RegularExpressionNode (location: (40,6)-(40,14))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (40,6)-(40,7) = "/"
+ │ │ │ │ ├── content_loc: (40,7)-(40,13) = "(?<a>)"
+ │ │ │ │ ├── closing_loc: (40,13)-(40,14) = "/"
+ │ │ │ │ └── unescaped: "(?<a>)"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :=~
+ │ │ │ ├── message_loc: (40,15)-(40,17) = "=~"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (40,18)-(40,22))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (40,18)-(40,22))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :to_s
+ │ │ │ │ ├── message_loc: (40,18)-(40,22) = "to_s"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── targets: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (40,10)-(40,11))
+ │ │ ├── name: :a
+ │ │ └── depth: 1
+ │ ├── opening_loc: (40,4)-(40,5) = "{"
+ │ └── closing_loc: (40,23)-(40,24) = "}"
+ ├── @ MatchWriteNode (location: (42,0)-(42,16))
+ │ ├── call:
+ │ │ @ CallNode (location: (42,0)-(42,16))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ RegularExpressionNode (location: (42,0)-(42,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (42,0)-(42,1) = "/"
+ │ │ │ ├── content_loc: (42,1)-(42,9) = "(?<foo>)"
+ │ │ │ ├── closing_loc: (42,9)-(42,10) = "/"
+ │ │ │ └── unescaped: "(?<foo>)"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (42,11)-(42,13) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (42,14)-(42,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (42,14)-(42,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (42,14)-(42,15) = "\""
+ │ │ │ ├── content_loc: (42,15)-(42,15) = ""
+ │ │ │ ├── closing_loc: (42,15)-(42,16) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── targets: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (42,4)-(42,7))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── @ CallNode (location: (43,0)-(43,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (43,0)-(43,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (43,0)-(43,1) = "/"
+ │ │ ├── content_loc: (43,1)-(43,9) = "(?<Foo>)"
+ │ │ ├── closing_loc: (43,9)-(43,10) = "/"
+ │ │ └── unescaped: "(?<Foo>)"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (43,11)-(43,13) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (43,14)-(43,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (43,14)-(43,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (43,14)-(43,15) = "\""
+ │ │ ├── content_loc: (43,15)-(43,15) = ""
+ │ │ ├── closing_loc: (43,15)-(43,16) = "\""
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (45,0)-(45,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (45,0)-(45,1) = "/"
+ │ │ ├── content_loc: (45,1)-(45,9) = "(?<nil>)"
+ │ │ ├── closing_loc: (45,9)-(45,10) = "/"
+ │ │ └── unescaped: "(?<nil>)"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (45,11)-(45,13) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,14)-(45,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (45,14)-(45,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (45,14)-(45,15) = "\""
+ │ │ ├── content_loc: (45,15)-(45,15) = ""
+ │ │ ├── closing_loc: (45,15)-(45,16) = "\""
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ DefNode (location: (46,0)-(46,32))
+ ├── name: :foo
+ ├── name_loc: (46,4)-(46,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (46,8)-(46,12))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ RequiredKeywordParameterNode (location: (46,8)-(46,12))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :nil
+ │ │ └── name_loc: (46,8)-(46,12) = "nil:"
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (46,16)-(46,32))
+ │ └── body: (length: 1)
+ │ └── @ MatchWriteNode (location: (46,16)-(46,32))
+ │ ├── call:
+ │ │ @ CallNode (location: (46,16)-(46,32))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ RegularExpressionNode (location: (46,16)-(46,26))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (46,16)-(46,17) = "/"
+ │ │ │ ├── content_loc: (46,17)-(46,25) = "(?<nil>)"
+ │ │ │ ├── closing_loc: (46,25)-(46,26) = "/"
+ │ │ │ └── unescaped: "(?<nil>)"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (46,27)-(46,29) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (46,30)-(46,32))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (46,30)-(46,32))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (46,30)-(46,31) = "\""
+ │ │ │ ├── content_loc: (46,31)-(46,31) = ""
+ │ │ │ ├── closing_loc: (46,31)-(46,32) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── targets: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (46,20)-(46,23))
+ │ ├── name: :nil
+ │ └── depth: 0
+ ├── locals: [:nil]
+ ├── def_keyword_loc: (46,0)-(46,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (46,7)-(46,8) = "("
+ ├── rparen_loc: (46,12)-(46,13) = ")"
+ ├── equal_loc: (46,14)-(46,15) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/regex_char_width.txt b/test/prism/snapshots/regex_char_width.txt
new file mode 100644
index 0000000000..6bf2169b2f
--- /dev/null
+++ b/test/prism/snapshots/regex_char_width.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (2,0)-(3,6))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (2,0)-(3,6))
+ └── body: (length: 2)
+ ├── @ MatchWriteNode (location: (2,0)-(2,36))
+ │ ├── call:
+ │ │ @ CallNode (location: (2,0)-(2,36))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ RegularExpressionNode (location: (2,0)-(2,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (2,0)-(2,1) = "/"
+ │ │ │ ├── content_loc: (2,1)-(2,21) = "\x{E285}\xA7(?<a>.)\x{E285}\xA9(?<b>.)"
+ │ │ │ ├── closing_loc: (2,21)-(2,22) = "/"
+ │ │ │ └── unescaped: "\x{E285}\xA7(?<a>.)\x{E285}\xA9(?<b>.)"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (2,23)-(2,25) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,26)-(2,36))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (2,26)-(2,36))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (2,26)-(2,27) = "'"
+ │ │ │ ├── content_loc: (2,27)-(2,35) = "\x{E285}\xA7a\x{E285}\xA9b"
+ │ │ │ ├── closing_loc: (2,35)-(2,36) = "'"
+ │ │ │ └── unescaped: "\x{E285}\xA7a\x{E285}\xA9b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (2,7)-(2,8))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (2,17)-(2,18))
+ │ ├── name: :b
+ │ └── depth: 0
+ └── @ ArrayNode (location: (3,0)-(3,6))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ LocalVariableReadNode (location: (3,1)-(3,2))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableReadNode (location: (3,4)-(3,5))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── opening_loc: (3,0)-(3,1) = "["
+ └── closing_loc: (3,5)-(3,6) = "]"
diff --git a/test/prism/snapshots/repeat_parameters.txt b/test/prism/snapshots/repeat_parameters.txt
new file mode 100644
index 0000000000..fd98294ce6
--- /dev/null
+++ b/test/prism/snapshots/repeat_parameters.txt
@@ -0,0 +1,473 @@
+@ ProgramNode (location: (1,0)-(38,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(38,3))
+ └── body: (length: 13)
+ ├── @ DefNode (location: (1,0)-(2,3))
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :_
+ │ │ ├── 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: (1,7)-(1,8) = "("
+ │ ├── rparen_loc: (1,12)-(1,13) = ")"
+ │ ├── 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,15))
+ │ │ ├── requireds: (length: 3)
+ │ │ │ ├── @ RequiredParameterNode (location: (4,8)-(4,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── @ RequiredParameterNode (location: (4,11)-(4,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :_
+ │ │ │ └── @ RequiredParameterNode (location: (4,14)-(4,15))
+ │ │ │ ├── flags: repeated_parameter
+ │ │ │ └── name: :_
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :_]
+ │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (4,7)-(4,8) = "("
+ │ ├── rparen_loc: (4,15)-(4,16) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ DefNode (location: (7,0)-(8,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (7,4)-(7,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (7,8)-(7,19))
+ │ │ ├── requireds: (length: 4)
+ │ │ │ ├── @ RequiredParameterNode (location: (7,8)-(7,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── @ RequiredParameterNode (location: (7,11)-(7,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :_
+ │ │ │ ├── @ RequiredParameterNode (location: (7,14)-(7,15))
+ │ │ │ │ ├── flags: repeated_parameter
+ │ │ │ │ └── name: :_
+ │ │ │ └── @ RequiredParameterNode (location: (7,17)-(7,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :_b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :_, :_b]
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (7,7)-(7,8) = "("
+ │ ├── rparen_loc: (7,19)-(7,20) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
+ ├── @ DefNode (location: (10,0)-(11,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (10,4)-(10,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (10,8)-(10,23))
+ │ │ ├── requireds: (length: 5)
+ │ │ │ ├── @ RequiredParameterNode (location: (10,8)-(10,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── @ RequiredParameterNode (location: (10,11)-(10,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :_
+ │ │ │ ├── @ RequiredParameterNode (location: (10,14)-(10,15))
+ │ │ │ │ ├── flags: repeated_parameter
+ │ │ │ │ └── name: :_
+ │ │ │ ├── @ RequiredParameterNode (location: (10,17)-(10,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :_b
+ │ │ │ └── @ RequiredParameterNode (location: (10,21)-(10,23))
+ │ │ │ ├── flags: repeated_parameter
+ │ │ │ └── name: :_b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :_, :_b]
+ │ ├── def_keyword_loc: (10,0)-(10,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (10,7)-(10,8) = "("
+ │ ├── rparen_loc: (10,23)-(10,24) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ DefNode (location: (13,0)-(14,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (13,4)-(13,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (13,8)-(13,35))
+ │ │ ├── requireds: (length: 3)
+ │ │ │ ├── @ RequiredParameterNode (location: (13,8)-(13,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── @ MultiTargetNode (location: (13,11)-(13,22))
+ │ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (13,12)-(13,13))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ SplatNode (location: (13,15)-(13,18))
+ │ │ │ │ │ ├── operator_loc: (13,15)-(13,16) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (13,16)-(13,18))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :_c
+ │ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (13,20)-(13,21))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :d
+ │ │ │ │ ├── lparen_loc: (13,11)-(13,12) = "("
+ │ │ │ │ └── rparen_loc: (13,21)-(13,22) = ")"
+ │ │ │ └── @ MultiTargetNode (location: (13,24)-(13,35))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (13,25)-(13,26))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :e
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (13,28)-(13,31))
+ │ │ │ │ ├── operator_loc: (13,28)-(13,29) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (13,29)-(13,31))
+ │ │ │ │ ├── flags: repeated_parameter
+ │ │ │ │ └── name: :_c
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (13,33)-(13,34))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :f
+ │ │ │ ├── lparen_loc: (13,24)-(13,25) = "("
+ │ │ │ └── rparen_loc: (13,34)-(13,35) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :b, :_c, :d, :e, :f]
+ │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (13,7)-(13,8) = "("
+ │ ├── rparen_loc: (13,35)-(13,36) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (14,0)-(14,3) = "end"
+ ├── @ DefNode (location: (16,0)-(17,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (16,4)-(16,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (16,8)-(16,20))
+ │ │ ├── requireds: (length: 4)
+ │ │ │ ├── @ RequiredParameterNode (location: (16,8)-(16,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :_a
+ │ │ │ ├── @ RequiredParameterNode (location: (16,12)-(16,14))
+ │ │ │ │ ├── flags: repeated_parameter
+ │ │ │ │ └── name: :_a
+ │ │ │ ├── @ RequiredParameterNode (location: (16,16)-(16,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ └── @ RequiredParameterNode (location: (16,19)-(16,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :c
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:_a, :b, :c]
+ │ ├── def_keyword_loc: (16,0)-(16,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (16,7)-(16,8) = "("
+ │ ├── rparen_loc: (16,20)-(16,21) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ ├── @ DefNode (location: (19,0)-(20,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (19,4)-(19,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (19,8)-(19,32))
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ MultiTargetNode (location: (19,8)-(19,19))
+ │ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (19,9)-(19,10))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ SplatNode (location: (19,12)-(19,15))
+ │ │ │ │ │ ├── operator_loc: (19,12)-(19,13) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (19,13)-(19,15))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :_b
+ │ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (19,17)-(19,18))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── lparen_loc: (19,8)-(19,9) = "("
+ │ │ │ │ └── rparen_loc: (19,18)-(19,19) = ")"
+ │ │ │ └── @ MultiTargetNode (location: (19,21)-(19,32))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (19,22)-(19,23))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :d
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (19,25)-(19,28))
+ │ │ │ │ ├── operator_loc: (19,25)-(19,26) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (19,26)-(19,28))
+ │ │ │ │ ├── flags: repeated_parameter
+ │ │ │ │ └── name: :_b
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (19,30)-(19,31))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :e
+ │ │ │ ├── lparen_loc: (19,21)-(19,22) = "("
+ │ │ │ └── rparen_loc: (19,31)-(19,32) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :_b, :c, :d, :e]
+ │ ├── def_keyword_loc: (19,0)-(19,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (19,7)-(19,8) = "("
+ │ ├── rparen_loc: (19,32)-(19,33) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (20,0)-(20,3) = "end"
+ ├── @ DefNode (location: (22,0)-(23,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (22,4)-(22,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (22,8)-(22,22))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 2)
+ │ │ │ ├── @ OptionalParameterNode (location: (22,8)-(22,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :_a
+ │ │ │ │ ├── name_loc: (22,8)-(22,10) = "_a"
+ │ │ │ │ ├── operator_loc: (22,11)-(22,12) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (22,13)-(22,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ OptionalParameterNode (location: (22,16)-(22,22))
+ │ │ │ ├── flags: repeated_parameter
+ │ │ │ ├── name: :_a
+ │ │ │ ├── name_loc: (22,16)-(22,18) = "_a"
+ │ │ │ ├── operator_loc: (22,19)-(22,20) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (22,21)-(22,22))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:_a]
+ │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (22,7)-(22,8) = "("
+ │ ├── rparen_loc: (22,22)-(22,23) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (23,0)-(23,3) = "end"
+ ├── @ DefNode (location: (25,0)-(26,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (25,4)-(25,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (25,8)-(25,16))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ RequiredKeywordParameterNode (location: (25,8)-(25,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :_a
+ │ │ │ │ └── name_loc: (25,8)-(25,11) = "_a:"
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (25,13)-(25,16))
+ │ │ │ ├── flags: repeated_parameter
+ │ │ │ ├── name: :_a
+ │ │ │ └── name_loc: (25,13)-(25,16) = "_a:"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:_a]
+ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (25,7)-(25,8) = "("
+ │ ├── rparen_loc: (25,16)-(25,17) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (26,0)-(26,3) = "end"
+ ├── @ DefNode (location: (28,0)-(29,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (28,4)-(28,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (28,8)-(28,20))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ OptionalKeywordParameterNode (location: (28,8)-(28,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :_a
+ │ │ │ │ ├── name_loc: (28,8)-(28,11) = "_a:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (28,12)-(28,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (28,15)-(28,20))
+ │ │ │ ├── flags: repeated_parameter
+ │ │ │ ├── name: :_a
+ │ │ │ ├── name_loc: (28,15)-(28,18) = "_a:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (28,19)-(28,20))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:_a]
+ │ ├── def_keyword_loc: (28,0)-(28,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (28,7)-(28,8) = "("
+ │ ├── rparen_loc: (28,20)-(28,21) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (29,0)-(29,3) = "end"
+ ├── @ DefNode (location: (31,0)-(32,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (31,4)-(31,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (31,8)-(31,16))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (31,8)-(31,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :_a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (31,12)-(31,16))
+ │ │ │ ├── flags: repeated_parameter
+ │ │ │ ├── name: :_a
+ │ │ │ ├── name_loc: (31,14)-(31,16) = "_a"
+ │ │ │ └── operator_loc: (31,12)-(31,14) = "**"
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:_a]
+ │ ├── def_keyword_loc: (31,0)-(31,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (31,7)-(31,8) = "("
+ │ ├── rparen_loc: (31,16)-(31,17) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (32,0)-(32,3) = "end"
+ ├── @ DefNode (location: (34,0)-(35,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (34,4)-(34,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (34,8)-(34,15))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (34,8)-(34,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :_a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (34,12)-(34,15))
+ │ │ ├── flags: repeated_parameter
+ │ │ ├── name: :_a
+ │ │ ├── name_loc: (34,13)-(34,15) = "_a"
+ │ │ └── operator_loc: (34,12)-(34,13) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:_a]
+ │ ├── def_keyword_loc: (34,0)-(34,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (34,7)-(34,8) = "("
+ │ ├── rparen_loc: (34,15)-(34,16) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (35,0)-(35,3) = "end"
+ └── @ DefNode (location: (37,0)-(38,3))
+ ├── name: :foo
+ ├── name_loc: (37,4)-(37,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (37,8)-(37,15))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (37,8)-(37,10))
+ │ │ ├── flags: ∅
+ │ │ └── name: :_a
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (37,12)-(37,15))
+ │ │ ├── flags: repeated_parameter
+ │ │ ├── name: :_a
+ │ │ ├── name_loc: (37,13)-(37,15) = "_a"
+ │ │ └── operator_loc: (37,12)-(37,13) = "*"
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:_a]
+ ├── def_keyword_loc: (37,0)-(37,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (37,7)-(37,8) = "("
+ ├── rparen_loc: (37,15)-(37,16) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (38,0)-(38,3) = "end"
diff --git a/test/prism/snapshots/rescue.txt b/test/prism/snapshots/rescue.txt
new file mode 100644
index 0000000000..390b08ae0e
--- /dev/null
+++ b/test/prism/snapshots/rescue.txt
@@ -0,0 +1,528 @@
+@ ProgramNode (location: (1,0)-(35,18))
+├── locals: [:a, :z]
+└── statements:
+ @ StatementsNode (location: (1,0)-(35,18))
+ └── body: (length: 14)
+ ├── @ RescueModifierNode (location: (1,0)-(1,14))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (3,4)-(3,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (4,0)-(4,3))
+ ├── @ CallNode (location: (6,0)-(6,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (6,0)-(6,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (6,4)-(6,24))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (6,6)-(6,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (6,6)-(6,22))
+ │ │ ├── expression:
+ │ │ │ @ BreakNode (location: (6,6)-(6,11))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (6,6)-(6,11) = "break"
+ │ │ ├── keyword_loc: (6,12)-(6,18) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (6,19)-(6,22))
+ │ ├── opening_loc: (6,4)-(6,5) = "{"
+ │ └── closing_loc: (6,23)-(6,24) = "}"
+ ├── @ CallNode (location: (8,0)-(8,23))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (8,0)-(8,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (8,4)-(8,23))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (8,6)-(8,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (8,6)-(8,21))
+ │ │ ├── expression:
+ │ │ │ @ NextNode (location: (8,6)-(8,10))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (8,6)-(8,10) = "next"
+ │ │ ├── keyword_loc: (8,11)-(8,17) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (8,18)-(8,21))
+ │ ├── opening_loc: (8,4)-(8,5) = "{"
+ │ └── closing_loc: (8,22)-(8,23) = "}"
+ ├── @ RescueModifierNode (location: (10,0)-(10,17))
+ │ ├── expression:
+ │ │ @ ReturnNode (location: (10,0)-(10,6))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (12,0)-(12,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ └── value: 1
+ │ └── operator_loc: (12,15)-(12,17) = "||"
+ ├── @ RescueModifierNode (location: (14,0)-(14,22))
+ │ ├── expression:
+ │ │ @ CallNode (location: (14,0)-(14,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (14,0)-(14,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── then_keyword_loc: (14,15)-(14,16) = "?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (14,17)-(14,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (14,17)-(14,18))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (16,7)-(16,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (16,18)-(16,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (16,21)-(16,24) = "end"
+ ├── @ CallNode (location: (18,0)-(20,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (19,2)-(19,5) = "bar"
+ │ │ │ ├── opening_loc: (19,5)-(19,6) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (19,6)-(19,7))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :y
+ │ │ │ │ ├── message_loc: (19,6)-(19,7) = "y"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (19,7)-(19,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (19,9)-(19,15) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ CallNode (location: (19,16)-(19,40))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :ArgumentError
+ │ │ ├── message_loc: (19,16)-(19,29) = "ArgumentError"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (19,30)-(19,40))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (19,30)-(19,40))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :fail
+ │ │ │ ├── message_loc: (19,30)-(19,34) = "fail"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (19,35)-(19,40))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (18,4)-(18,6) = "do"
+ │ └── closing_loc: (20,0)-(20,3) = "end"
+ ├── @ 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (22,7)-(22,10) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── keyword_loc: (22,11)-(22,17) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ NilNode (location: (22,18)-(22,21))
+ │ │ └── operator_loc: (22,5)-(22,6) = "="
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (23,2)-(23,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (23,2)-(23,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (23,2)-(23,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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)
+ │ │ └── @ RescueModifierNode (location: (26,18)-(26,44))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (26,18)-(26,33))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :other_method
+ │ │ │ ├── message_loc: (26,18)-(26,30) = "other_method"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (26,31)-(26,33))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (26,31)-(26,33))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 42
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (26,34)-(26,40) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (26,41)-(26,44))
+ │ ├── 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: (28,0)-(31,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (29,2)-(29,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (29,2)-(29,6))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (29,2)-(29,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (29,4)-(29,6))
+ │ │ │ │ ├── flags: contains_keywords
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ KeywordHashNode (location: (29,4)-(29,6))
+ │ │ │ │ ├── flags: symbol_keys
+ │ │ │ │ └── elements: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (29,4)-(29,6))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (29,4)-(29,6))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── message_loc: (29,4)-(29,5) = "b"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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"
+ ├── @ RescueModifierNode (location: (33,0)-(33,21))
+ │ ├── expression:
+ │ │ @ IfNode (location: (33,0)-(33,10))
+ │ │ ├── if_keyword_loc: (33,4)-(33,6) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (33,7)-(33,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (33,7)-(33,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (33,0)-(33,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (33,0)-(33,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (33,0)-(33,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── keyword_loc: (33,11)-(33,17) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (33,18)-(33,21))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (33,18)-(33,21) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ LocalVariableWriteNode (location: (35,0)-(35,18))
+ ├── name: :z
+ ├── depth: 0
+ ├── name_loc: (35,0)-(35,1) = "z"
+ ├── value:
+ │ @ RescueModifierNode (location: (35,4)-(35,18))
+ │ ├── expression:
+ │ │ @ CallNode (location: (35,4)-(35,7))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :x
+ │ │ ├── message_loc: (35,4)-(35,5) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (35,6)-(35,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (35,6)-(35,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :y
+ │ │ │ ├── message_loc: (35,6)-(35,7) = "y"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (35,8)-(35,14) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (35,15)-(35,18))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (35,15)-(35,16) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,17)-(35,18))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (35,17)-(35,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (35,17)-(35,18) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (35,2)-(35,3) = "="
diff --git a/test/prism/snapshots/return.txt b/test/prism/snapshots/return.txt
new file mode 100644
index 0000000000..0dd26281c1
--- /dev/null
+++ b/test/prism/snapshots/return.txt
@@ -0,0 +1,165 @@
+@ ProgramNode (location: (1,0)-(23,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(23,9))
+ └── body: (length: 10)
+ ├── @ ReturnNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (1,0)-(1,6) = "return"
+ │ └── arguments: ∅
+ ├── @ ReturnNode (location: (3,0)-(3,20))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (3,0)-(3,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (3,7)-(3,20))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ │ └── value: 1
+ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ ├── 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
+ │ │ └── value: 3
+ │ ├── opening_loc: (3,17)-(3,18) = "("
+ │ └── closing_loc: (3,19)-(3,20) = ")"
+ ├── @ ReturnNode (location: (5,0)-(5,9))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (5,0)-(5,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (5,7)-(5,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ SplatNode (location: (5,7)-(5,9))
+ │ ├── operator_loc: (5,7)-(5,8) = "*"
+ │ └── expression:
+ │ @ IntegerNode (location: (5,8)-(5,9))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ ReturnNode (location: (7,0)-(7,8))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (7,0)-(7,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (7,7)-(7,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (7,7)-(7,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ ReturnNode (location: (9,0)-(10,1))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (9,7)-(10,1))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (9,7)-(9,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── @ IntegerNode (location: (9,10)-(9,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── @ IntegerNode (location: (10,0)-(10,1))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── @ ReturnNode (location: (12,0)-(12,14))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (12,0)-(12,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (12,7)-(12,14))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (12,7)-(12,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── @ IntegerNode (location: (12,10)-(12,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── @ IntegerNode (location: (12,13)-(12,14))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── @ ReturnNode (location: (14,0)-(14,16))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (14,0)-(14,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (14,7)-(14,16))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (14,7)-(14,16))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (14,8)-(14,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ IntegerNode (location: (14,11)-(14,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── @ IntegerNode (location: (14,14)-(14,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── opening_loc: (14,7)-(14,8) = "["
+ │ └── closing_loc: (14,15)-(14,16) = "]"
+ ├── @ ReturnNode (location: (16,0)-(19,1))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (16,0)-(16,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (16,6)-(19,1))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (18,2)-(18,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (16,6)-(16,7) = "("
+ │ └── closing_loc: (19,0)-(19,1) = ")"
+ ├── @ ReturnNode (location: (21,0)-(21,8))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (21,0)-(21,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (21,6)-(21,8))
+ │ ├── flags: ∅
+ │ └── 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))
+ ├── flags: ∅
+ ├── keyword_loc: (23,0)-(23,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (23,6)-(23,9))
+ ├── flags: ∅
+ └── 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
+ │ └── value: 1
+ ├── 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..246f39cbba
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/BEGIN.txt
@@ -0,0 +1,15 @@
+@ 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
+ │ └── value: 42
+ ├── 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..fabc92e477
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
@@ -0,0 +1,361 @@
+@ ProgramNode (location: (1,0)-(92,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(92,1))
+ └── body: (length: 16)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (1,0)-(1,3) = "%I["
+ │ └── closing_loc: (4,0)-(4,1) = "]"
+ ├── @ ArrayNode (location: (6,0)-(9,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (7,0)-(7,5))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (7,0)-(7,5) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ SymbolNode (location: (8,0)-(8,5))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (11,0)-(11,3) = "%W["
+ │ └── closing_loc: (14,0)-(14,1) = "]"
+ ├── @ ArrayNode (location: (16,0)-(19,1))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (21,0)-(21,3) = "%i["
+ │ └── closing_loc: (24,0)-(24,1) = "]"
+ ├── @ ArrayNode (location: (26,0)-(29,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (27,0)-(27,5))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (27,0)-(27,5) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ SymbolNode (location: (28,0)-(28,5))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (31,0)-(31,3) = "%r["
+ │ ├── content_loc: (31,3)-(34,0) = "\n\n\n"
+ │ ├── closing_loc: (34,0)-(34,1) = "]"
+ │ └── unescaped: "\n\n\n"
+ ├── @ ArrayNode (location: (36,0)-(39,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (36,0)-(36,3) = "%w["
+ │ └── closing_loc: (39,0)-(39,1) = "]"
+ ├── @ ArrayNode (location: (41,0)-(44,1))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (47,0)-(47,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (47,0)-(47,1) = ":"
+ │ │ │ ├── value_loc: (47,1)-(47,6) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ SymbolNode (location: (48,0)-(48,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (53,8)-(53,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (54,4)-(54,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (54,6)-(54,7) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (54,8)-(54,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (54,8)-(54,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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
+ │ │ │ │ └── value: 42
+ │ │ │ └── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (68,8)-(68,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (69,4)-(69,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (69,6)-(69,7) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (69,8)-(69,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (69,8)-(69,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (76,4)-(76,10))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (76,4)-(76,5) = ":"
+ │ │ │ │ │ ├── value_loc: (76,5)-(76,10) = "line3"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "line3"
+ │ │ │ │ └── @ SymbolNode (location: (77,4)-(77,10))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 42
+ │ │ │ └── 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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (89,0)-(89,1) = "x"
+ ├── opening_loc: (89,1)-(89,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (90,0)-(91,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (90,0)-(90,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (90,0)-(90,1) = ":"
+ │ │ ├── value_loc: (90,1)-(90,6) = "line2"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "line2"
+ │ └── @ SymbolNode (location: (91,0)-(91,6))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (91,0)-(91,1) = ":"
+ │ ├── value_loc: (91,1)-(91,6) = "line3"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "line3"
+ ├── closing_loc: (92,0)-(92,1) = ")"
+ └── block: ∅
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..a2586423d7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/alias_gvar_backref.txt
@@ -0,0 +1,13 @@
+@ 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))
+ │ └── name: :$&
+ └── 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..99ed696c68
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/alias_resword.txt
@@ -0,0 +1,21 @@
+@ 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,6)-(1,8) = "in"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "in"
+ ├── old_name:
+ │ @ SymbolNode (location: (1,9)-(1,12))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..b60b131fd2
--- /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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ FalseNode (location: (2,4)-(2,9))
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :!
+ │ │ ├── message_loc: (2,0)-(2,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..b729186dc5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/aref_args_assocs.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── elements: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,1)-(1,7))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,1)-(1,7))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── 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..0e9454d780
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,11))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ KeywordHashNode (location: (1,4)-(1,10))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,4)-(1,10))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── 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..1ad933c74e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/args_kw_block.txt
@@ -0,0 +1,39 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,6)-(1,8) = "a:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (1,12)-(1,14))
+ │ ├── flags: ∅
+ │ ├── 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..880fedf933
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/array_line_breaks.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(4,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(3,4))
+ │ ├── flags: ∅
+ │ ├── 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
+ └── value: 1
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..d46a181fc7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ArrayNode (location: (1,0)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 0)
+ │ │ ├── opening_loc: (1,0)-(1,3) = "%w["
+ │ │ └── closing_loc: (1,3)-(1,4) = "]"
+ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,4))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ ArrayNode (location: (3,0)-(3,2))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (3,0)-(3,1) = "["
+ │ └── closing_loc: (3,1)-(3,2) = "]"
+ ├── call_operator_loc: (3,2)-(3,3) = "."
+ ├── name: :b
+ ├── message_loc: (3,3)-(3,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/assoc__bare.txt b/test/prism/snapshots/seattlerb/assoc__bare.txt
new file mode 100644
index 0000000000..28e4f713c5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/assoc__bare.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :y
+ │ │ ├── message_loc: (1,2)-(1,3) = "y"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..70490c0da4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/assoc_label.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,5))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,5))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ └── block: ∅
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..589433eda8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attr_asgn_colon_id.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))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── name: :b=
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..9b04ae9656
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]=
+ ├── message_loc: (1,1)-(1,9) = "[[1, 2]]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ ArrayNode (location: (1,2)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (1,3)-(1,4))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── opening_loc: (1,2)-(1,3) = "["
+ │ │ └── closing_loc: (1,7)-(1,8) = "]"
+ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ └── block: ∅
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..39544e98da
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt
@@ -0,0 +1,83 @@
+@ ProgramNode (location: (1,0)-(1,42))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,42))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,42))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ ArrayNode (location: (1,0)-(1,12))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 4)
+ │ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 4
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,11)-(1,12) = "]"
+ ├── call_operator_loc: ∅
+ ├── name: :[]=
+ ├── message_loc: (1,12)-(1,24) = "[from .. to]"
+ ├── opening_loc: (1,12)-(1,13) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,13)-(1,42))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ RangeNode (location: (1,13)-(1,23))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (1,13)-(1,17))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :from
+ │ │ │ ├── message_loc: (1,13)-(1,17) = "from"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (1,21)-(1,23))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :to
+ │ │ │ ├── message_loc: (1,21)-(1,23) = "to"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (1,18)-(1,20) = ".."
+ │ └── @ ArrayNode (location: (1,27)-(1,42))
+ │ ├── flags: ∅
+ │ ├── 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: ∅
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..d4c4fe1070
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :B=
+ ├── message_loc: (1,2)-(1,3) = "B"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..67c8be034e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :y
+ │ │ │ ├── message_loc: (1,5)-(1,6) = "y"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ └── closing_loc: (1,7)-(1,8) = "`"
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bang_eq.txt b/test/prism/snapshots/seattlerb/bang_eq.txt
new file mode 100644
index 0000000000..ec3dd888b2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bang_eq.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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :!=
+ ├── message_loc: (1,2)-(1,4) = "!="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bdot2.txt b/test/prism/snapshots/seattlerb/bdot2.txt
new file mode 100644
index 0000000000..d4fb86fbe6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bdot2.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,4))
+ │ ├── flags: ∅
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (1,2)-(1,4))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ └── operator_loc: (1,0)-(1,2) = ".."
+ ├── @ RangeNode (location: (2,2)-(2,5))
+ │ ├── flags: ∅
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (2,4)-(2,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,4)-(2,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (2,2)-(2,4) = ".."
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bdot3.txt b/test/prism/snapshots/seattlerb/bdot3.txt
new file mode 100644
index 0000000000..0c960f0458
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bdot3.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,5))
+ │ ├── flags: exclude_end
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (1,3)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ └── operator_loc: (1,0)-(1,3) = "..."
+ ├── @ RangeNode (location: (2,2)-(2,6))
+ │ ├── flags: exclude_end
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (2,5)-(2,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,5)-(2,6) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (2,2)-(2,5) = "..."
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..6603e5c894
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt
@@ -0,0 +1,47 @@
+@ 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
+ │ └── value: 1
+ ├── 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
+ │ │ └── value: 2
+ │ └── 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
+ │ │ └── value: 3
+ │ └── 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
+ │ │ └── value: 4
+ │ └── 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..165c2980be
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg__bare.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── name: ∅
+ │ ├── 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..392de8559b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
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..ee9644d59d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :d
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,16)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
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..799bd21057
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,15)-(1,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
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..b5df136a62
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── name_loc: (1,14)-(1,15) = "d"
+ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :e
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,20)-(1,22))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
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..8a850e9a21
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_optional.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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) = "}"
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..b99cc5e45c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_scope.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 1)
+ │ │ └── @ BlockLocalVariableNode (location: (1,8)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── 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) = "}"
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..98b3a7da3a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_scope2.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 2)
+ │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :c
+ │ │ └── @ BlockLocalVariableNode (location: (1,10)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── 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) = "}"
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..fd5813c983
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_splat_arg.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,8)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,9)-(1,10) = "c"
+ │ │ │ └── operator_loc: (1,8)-(1,9) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..0975ce3367
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_kwargs.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,23))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
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..d47349defb
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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) = "}"
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..1f21c0a477
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt1.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,24))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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) = "}"
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..a8d736dde7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt2.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ OptionalParameterNode (location: (1,11)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,11)-(1,12) = "c"
+ │ │ │ ├── operator_loc: (1,12)-(1,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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) = "}"
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..0403851ed7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
@@ -0,0 +1,71 @@
+@ ProgramNode (location: (1,0)-(1,35))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,35))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,35))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 2)
+ │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 42
+ │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,16)-(1,17) = "c"
+ │ │ │ ├── operator_loc: (1,18)-(1,19) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,20)-(1,22))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 24
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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) = "}"
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..ff4495019c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt3.txt
@@ -0,0 +1,79 @@
+@ ProgramNode (location: (1,0)-(1,42))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,42))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,42))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 2)
+ │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 42
+ │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,16)-(1,17) = "c"
+ │ │ │ ├── operator_loc: (1,18)-(1,19) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,20)-(1,22))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 24
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,24)-(1,26))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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) = "}"
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..2e634dc937
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt
@@ -0,0 +1,80 @@
+@ ProgramNode (location: (1,0)-(4,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,11))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(3,4))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(3,4))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (2,1)-(2,2) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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: ∅
+ └── @ CallNode (location: (4,1)-(4,11))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (4,1)-(4,2))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :e
+ │ ├── message_loc: (4,1)-(4,2) = "e"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (4,2)-(4,3) = "."
+ ├── name: :f
+ ├── 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"
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..e46104b868
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt
@@ -0,0 +1,100 @@
+@ ProgramNode (location: (1,0)-(1,31))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,31))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,31))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (1,6)-(1,7) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,8)-(1,10) = "do"
+ │ └── closing_loc: (1,13)-(1,16) = "end"
+ ├── call_operator_loc: (1,16)-(1,17) = "."
+ ├── name: :e
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :g
+ │ ├── message_loc: (1,26)-(1,27) = "g"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,19)-(1,21) = "do"
+ └── closing_loc: (1,28)-(1,31) = "end"
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..05d076f8d6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
@@ -0,0 +1,113 @@
+@ ProgramNode (location: (1,0)-(1,33))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,33))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,33))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (1,6)-(1,7) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,8)-(1,10) = "do"
+ │ └── closing_loc: (1,13)-(1,16) = "end"
+ ├── call_operator_loc: (1,16)-(1,17) = "."
+ ├── name: :e
+ ├── message_loc: (1,17)-(1,18) = "e"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,19)-(1,20))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,19)-(1,20))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (1,19)-(1,20) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :h
+ │ ├── message_loc: (1,28)-(1,29) = "h"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,21)-(1,23) = "do"
+ └── closing_loc: (1,30)-(1,33) = "end"
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..9fd13b0dfc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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"
+ ├── call_operator_loc: (1,12)-(1,14) = "::"
+ ├── name: :d
+ ├── message_loc: (1,14)-(1,15) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..43c19d3318
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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"
+ ├── call_operator_loc: (1,12)-(1,13) = "."
+ ├── name: :d
+ ├── message_loc: (1,13)-(1,14) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..10c1780d37
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt
@@ -0,0 +1,60 @@
+@ ProgramNode (location: (1,0)-(2,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,10))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ │ └── closing_loc: (1,4)-(1,5) = ")"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (2,0)-(2,10))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (2,0)-(2,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (2,0)-(2,1) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (2,1)-(2,2) = "."
+ ├── name: :d
+ ├── 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"
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..30fd6dafa0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── call_operator_loc: (1,11)-(1,13) = "::"
+ ├── name: :c
+ ├── message_loc: (1,13)-(1,14) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,15)-(1,17))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ SymbolNode (location: (1,15)-(1,17))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (1,15)-(1,16) = ":"
+ │ ├── value_loc: (1,16)-(1,17) = "d"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "d"
+ ├── closing_loc: ∅
+ └── block: ∅
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..e4f69d3604
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── call_operator_loc: (1,11)-(1,12) = "."
+ ├── name: :c
+ ├── message_loc: (1,12)-(1,13) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,14)-(1,16))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ SymbolNode (location: (1,14)-(1,16))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (1,14)-(1,15) = ":"
+ │ ├── value_loc: (1,15)-(1,16) = "d"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "d"
+ ├── closing_loc: ∅
+ └── block: ∅
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..e309ec1f98
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,6)-(1,7))
+ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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) = "}"
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..8d28fa7e02
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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) = "}"
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..4f4a82acf5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,15))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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) = "}"
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..09d3440126
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_splat.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,9))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,6)-(1,8))
+ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_kw.txt b/test/prism/snapshots/seattlerb/block_kw.txt
new file mode 100644
index 0000000000..f022637dae
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_kw.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :blah
+ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :k
+ │ │ │ ├── name_loc: (1,8)-(1,10) = "k:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,10)-(1,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── 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) = "}"
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..8a49c8bec7
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :blah
+ ├── 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)
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :k
+ │ │ │ └── name_loc: (1,9)-(1,11) = "k:"
+ │ │ ├── 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"
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..e77bf90a27
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :bl
+ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :kw
+ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:"
+ │ │ │ └── value:
+ │ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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) = "}"
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..a527c8c993
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(1,33))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,33))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,33))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :bl
+ ├── 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)
+ │ │ │ ├── @ OptionalKeywordParameterNode (location: (1,6)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :kw
+ │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
+ │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "val"
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,16)-(1,26))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :kw2
+ │ │ │ ├── name_loc: (1,16)-(1,20) = "kw2:"
+ │ │ │ └── value:
+ │ │ │ @ SymbolNode (location: (1,21)-(1,26))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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) = "}"
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..64dc928f14
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_opt_arg.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ ├── operator_loc: (1,6)-(1,7) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..c18df9c27d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_opt_splat.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
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..3806809d2b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ ├── operator_loc: (1,6)-(1,7) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,10)-(1,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,11)-(1,12) = "c"
+ │ │ │ └── operator_loc: (1,10)-(1,11) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :d
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,17)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_optarg.txt b/test/prism/snapshots/seattlerb/block_optarg.txt
new file mode 100644
index 0000000000..5da99aec79
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_optarg.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ SymbolNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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) = "}"
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..ebd937904c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_paren_splat.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,12))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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) = "}"
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..53c43603a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_reg_optarg.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ SymbolNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_return.txt b/test/prism/snapshots/seattlerb/block_return.txt
new file mode 100644
index 0000000000..c863b28a22
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_return.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(1,27))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,27))
+ └── body: (length: 1)
+ └── @ ReturnNode (location: (1,0)-(1,27))
+ ├── flags: ∅
+ ├── keyword_loc: (1,0)-(1,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (1,7)-(1,27))
+ ├── flags: ∅
+ └── arguments: (length: 1)
+ └── @ CallNode (location: (1,7)-(1,27))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (1,7)-(1,10) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,11)-(1,14))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :arg
+ │ ├── message_loc: (1,11)-(1,14) = "arg"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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"
diff --git a/test/prism/snapshots/seattlerb/block_scope.txt b/test/prism/snapshots/seattlerb/block_scope.txt
new file mode 100644
index 0000000000..a21a28b993
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_scope.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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) = "}"
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..617ff88622
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_splat_reg.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
+ │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug169.txt b/test/prism/snapshots/seattlerb/bug169.txt
new file mode 100644
index 0000000000..e4fb47a6de
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug169.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ ├── flags: ∅
+ │ └── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug179.txt b/test/prism/snapshots/seattlerb/bug179.txt
new file mode 100644
index 0000000000..d7695bc7a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug179.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ RangeNode (location: (1,2)-(1,9))
+ │ ├── flags: ∅
+ │ ├── 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) = ".."
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug190.txt b/test/prism/snapshots/seattlerb/bug190.txt
new file mode 100644
index 0000000000..b261a166cf
--- /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))
+ ├── flags: forced_us_ascii_encoding
+ ├── opening_loc: (1,0)-(1,3) = "%r'"
+ ├── content_loc: (1,3)-(1,5) = "\\'"
+ ├── closing_loc: (1,5)-(1,6) = "'"
+ └── unescaped: "'"
diff --git a/test/prism/snapshots/seattlerb/bug191.txt b/test/prism/snapshots/seattlerb/bug191.txt
new file mode 100644
index 0000000000..69835ab1d0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug191.txt
@@ -0,0 +1,87 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,2)-(1,3) = "?"
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ IfNode (location: (3,0)-(3,9))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (3,0)-(3,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (3,2)-(3,3) = "?"
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (3,8)-(3,9) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..377b53727e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug202.txt
@@ -0,0 +1,22 @@
+@ 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
+ │ │ └── value: 1
+ │ └── 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
+ │ └── value: 1
+ └── 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..203a39a793
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug236.txt
@@ -0,0 +1,70 @@
+@ ProgramNode (location: (1,0)-(3,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,6))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :x
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ ImplicitRestNode (location: (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) = "}"
+ └── @ CallNode (location: (3,0)-(3,6))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug290.txt b/test/prism/snapshots/seattlerb/bug290.txt
new file mode 100644
index 0000000000..4f1e673c4b
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (2,2)-(2,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..ae72675e5c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_187.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :private
+ ├── message_loc: (1,0)-(1,7) = "private"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,8)-(3,3))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (2,1)-(2,2) = "."
+ │ │ ├── name: :b
+ │ │ ├── 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"
+ │ ├── 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: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_215.txt b/test/prism/snapshots/seattlerb/bug_215.txt
new file mode 100644
index 0000000000..de7716335e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_215.txt
@@ -0,0 +1,14 @@
+@ 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..ad61501a07
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_249.txt
@@ -0,0 +1,86 @@
+@ ProgramNode (location: (1,0)-(4,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,28))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :mount
+ ├── message_loc: (1,0)-(1,5) = "mount"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(4,28))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,6)-(4,9))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ ParenthesesNode (location: (1,6)-(4,5))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (1,7)-(4,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,7)-(4,4))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ ConstantReadNode (location: (1,7)-(1,12))
+ │ │ │ │ │ └── name: :Class
+ │ │ │ │ ├── call_operator_loc: (1,12)-(1,13) = "."
+ │ │ │ │ ├── name: :new
+ │ │ │ │ ├── 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"
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = "("
+ │ │ │ └── closing_loc: (4,4)-(4,5) = ")"
+ │ │ ├── call_operator_loc: (4,5)-(4,6) = "."
+ │ │ ├── name: :new
+ │ │ ├── message_loc: (4,6)-(4,9) = "new"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ KeywordHashNode (location: (4,11)-(4,28))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (4,11)-(4,28))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (4,11)-(4,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_and.txt b/test/prism/snapshots/seattlerb/bug_and.txt
new file mode 100644
index 0000000000..3daf505e5f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_and.txt
@@ -0,0 +1,21 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── 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..f451bd0172
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args__19.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :d
+ │ ├── message_loc: (1,13)-(1,14) = "d"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,2)-(1,3) = "{"
+ └── closing_loc: (1,15)-(1,16) = "}"
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..297979c182
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")"
+ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..6bec9187b3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,16))
+ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12))
+ │ │ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "("
+ │ │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")"
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── rparen_loc: (1,15)-(1,16) = ")"
+ │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..42a060d02a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,16))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12))
+ │ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ └── name: :k
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: :v
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "("
+ │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")"
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :i
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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) = "}"
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..53d6f9220b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
@@ -0,0 +1,110 @@
+@ 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :g
+ │ │ ├── message_loc: (2,8)-(2,9) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,10)-(2,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── opening_loc: (2,10)-(2,11) = "("
+ │ │ │ │ └── closing_loc: (2,13)-(2,14) = ")"
+ │ │ │ └── @ IntegerNode (location: (2,16)-(2,17))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :g
+ │ │ ├── message_loc: (7,8)-(7,9) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,10)-(7,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── opening_loc: (7,10)-(7,11) = "("
+ │ │ │ │ └── closing_loc: (7,12)-(7,13) = ")"
+ │ │ │ └── @ IntegerNode (location: (7,15)-(7,16))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :g
+ ├── message_loc: (11,0)-(11,1) = "g"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,2)-(11,9))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ │ └── value: 1
+ │ │ ├── opening_loc: (11,2)-(11,3) = "("
+ │ │ └── closing_loc: (11,5)-(11,6) = ")"
+ │ └── @ IntegerNode (location: (11,8)-(11,9))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..0cc1ca05e1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_case_when_regexp.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:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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,22))
+ │ ├── keyword_loc: (1,9)-(1,13) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (1,14)-(1,17))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,14)-(1,15) = "/"
+ │ │ ├── content_loc: (1,15)-(1,16) = "x"
+ │ │ ├── closing_loc: (1,16)-(1,17) = "/"
+ │ │ └── unescaped: "x"
+ │ ├── then_keyword_loc: (1,18)-(1,22) = "then"
+ │ └── 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..af886999b5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_comma.txt
@@ -0,0 +1,41 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :test
+ │ ├── message_loc: (1,3)-(1,7) = "test"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,15))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :dir
+ │ │ ├── message_loc: (1,12)-(1,15) = "dir"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (1,16)-(1,20) = "then"
+ ├── 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..cbf3bc3ef0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_cond_pct.txt
@@ -0,0 +1,22 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,11)-(1,14) = "%r%"
+ │ │ ├── content_loc: (1,14)-(1,22) = "blahblah"
+ │ │ ├── closing_loc: (1,22)-(1,23) = "%"
+ │ │ └── unescaped: "blahblah"
+ │ ├── then_keyword_loc: ∅
+ │ └── 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..e138db4d49
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_hash_args.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (1,4)-(1,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ ├── value_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── @ KeywordHashNode (location: (1,10)-(1,18))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,10)-(1,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
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..fe2d7f73c9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (1,4)-(1,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ ├── value_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── @ KeywordHashNode (location: (1,10)-(1,18))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,10)-(1,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
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..433fb02411
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt
@@ -0,0 +1,26 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..b4c75c4607
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_masgn_right.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
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..9e4a416d4a
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,4)-(1,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,3) = "not"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ └── block: ∅
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..33016f32f8
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..d3e88b3f9e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_and.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :&
+ ├── message_loc: (1,2)-(1,3) = "&"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..f489bc7f19
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_arg_assoc.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ KeywordHashNode (location: (1,5)-(1,9))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,5)-(1,9))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── operator_loc: (1,6)-(1,8) = "=>"
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ └── block: ∅
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..5b191396de
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,15))
+ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ KeywordHashNode (location: (1,5)-(1,15))
+ │ ├── flags: ∅
+ │ └── elements: (length: 2)
+ │ ├── @ AssocNode (location: (1,5)-(1,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,5)-(1,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocSplatNode (location: (1,12)-(1,15))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,14)-(1,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── operator_loc: (1,12)-(1,14) = "**"
+ ├── closing_loc: (1,15)-(1,16) = ")"
+ └── block: ∅
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..f95b80cf7d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_arg_kwsplat.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ KeywordHashNode (location: (1,5)-(1,8))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocSplatNode (location: (1,5)-(1,8))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (1,5)-(1,7) = "**"
+ ├── closing_loc: (1,8)-(1,9) = ")"
+ └── block: ∅
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..8946206a3f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
@@ -0,0 +1,106 @@
+@ ProgramNode (location: (1,0)-(5,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,8))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :x
+ │ ├── message_loc: (1,0)-(1,1) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,2)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :k
+ │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "k"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ │ │ └── closing_loc: (1,7)-(1,9) = "\":"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :x
+ │ ├── message_loc: (3,0)-(3,1) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,8))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (3,2)-(3,8))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (3,2)-(3,8))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,2)-(3,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 42
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,8))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (5,0)-(5,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,2)-(5,8))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (5,2)-(5,8))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (5,2)-(5,8))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (5,2)-(5,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 42
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..0ba5891cf6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ KeywordHashNode (location: (1,5)-(1,9))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,5)-(1,9))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── operator_loc: (1,6)-(1,8) = "=>"
+ ├── closing_loc: (1,10)-(1,11) = ")"
+ └── block: ∅
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..f4a55ff58c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_args_command.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :b
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,5)-(1,6) = "."
+ │ ├── name: :d
+ │ ├── message_loc: (1,6)-(1,7) = "d"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..95d2f4859d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_arg.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :==
+ ├── message_loc: (1,2)-(1,4) = "=="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,5)-(1,13))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ │ ├── value_loc: (1,7)-(1,8) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
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..e02740e7f5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_block_call.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,19))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,2)-(1,19))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ NilNode (location: (1,4)-(1,7))
+ │ │ └── @ CallNode (location: (1,9)-(1,17))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── 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"
+ │ ├── opening_loc: (1,2)-(1,3) = "["
+ │ └── closing_loc: (1,18)-(1,19) = "]"
+ ├── closing_loc: ∅
+ └── block: ∅
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..c6aa722812
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,2)-(1,11))
+ │ ├── flags: ∅
+ │ ├── 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"
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..091e21c00a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,15))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,2)-(1,15))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,3)-(1,5))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = ":"
+ │ │ │ ├── value_loc: (1,4)-(1,5) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ KeywordHashNode (location: (1,7)-(1,14))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,7)-(1,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,7)-(1,9))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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: ∅
diff --git a/test/prism/snapshots/seattlerb/call_assoc.txt b/test/prism/snapshots/seattlerb/call_assoc.txt
new file mode 100644
index 0000000000..60784e6095
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,6))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,6))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── operator_loc: (1,3)-(1,5) = "=>"
+ ├── closing_loc: (1,6)-(1,7) = ")"
+ └── block: ∅
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..dc25fb2493
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc_new.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,5))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,5))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 3
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ └── block: ∅
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..b3d652e879
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(5,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(5,4))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(5,3))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(5,3))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(5,3))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,8)-(1,9) = ":"
+ │ │ │ ├── value_loc: (1,9)-(1,10) = "c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "c"
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,0)-(2,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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
+ │ │ │ │ └── value: 2
+ │ │ │ └── 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: ∅
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..b2012f0f75
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,6))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,6))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (1,3)-(1,5) = "=>"
+ ├── closing_loc: (1,7)-(1,8) = ")"
+ └── block: ∅
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..5e4e10d953
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_bang_command_call.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,2)-(1,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..bf11bc0136
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_bang_squiggle.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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :!~
+ ├── message_loc: (1,2)-(1,4) = "!~"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..1aa994c8e6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(3,3))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (2,1)-(2,2) = "."
+ │ │ ├── name: :c
+ │ │ ├── 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"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── closing_loc: ∅
+ └── block: ∅
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..f87c29cf2e
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :blk
+ │ ├── message_loc: (1,3)-(1,6) = "blk"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (1,2)-(1,3) = "&"
diff --git a/test/prism/snapshots/seattlerb/call_carat.txt b/test/prism/snapshots/seattlerb/call_carat.txt
new file mode 100644
index 0000000000..856e9a7847
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_carat.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :^
+ ├── message_loc: (1,2)-(1,3) = "^"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_colon2.txt b/test/prism/snapshots/seattlerb/call_colon2.txt
new file mode 100644
index 0000000000..98bfc63126
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── name: :b
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..6d10171a2b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_colon_parens.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── name: :call
+ ├── message_loc: ∅
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,4)-(1,5) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_div.txt b/test/prism/snapshots/seattlerb/call_div.txt
new file mode 100644
index 0000000000..ba62fb87bd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_div.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :/
+ ├── message_loc: (1,2)-(1,3) = "/"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..c9b7084699
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_dot_parens.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :call
+ ├── message_loc: ∅
+ ├── opening_loc: (1,2)-(1,3) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,3)-(1,4) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_env.txt b/test/prism/snapshots/seattlerb/call_env.txt
new file mode 100644
index 0000000000..fd1f95388e
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :happy
+ ├── message_loc: (1,2)-(1,7) = "happy"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_eq3.txt b/test/prism/snapshots/seattlerb/call_eq3.txt
new file mode 100644
index 0000000000..e636e15725
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_eq3.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :===
+ ├── message_loc: (1,2)-(1,5) = "==="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_gt.txt b/test/prism/snapshots/seattlerb/call_gt.txt
new file mode 100644
index 0000000000..a6f19e5adf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_gt.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :>
+ ├── message_loc: (1,2)-(1,3) = ">"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_kwsplat.txt b/test/prism/snapshots/seattlerb/call_kwsplat.txt
new file mode 100644
index 0000000000..e0620dc5f0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_kwsplat.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,5))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocSplatNode (location: (1,2)-(1,5))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (1,2)-(1,4) = "**"
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ └── block: ∅
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..e8435d7e7a
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(2,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (2,0)-(2,1) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (2,1)-(2,2) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (3,0)-(3,1) = "."
+ ├── name: :c
+ ├── message_loc: (3,1)-(3,2) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..e5dfb72372
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(2,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (2,0)-(2,1) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (2,1)-(2,2) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (4,0)-(4,1) = "."
+ ├── name: :d
+ ├── message_loc: (4,1)-(4,2) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_lt.txt b/test/prism/snapshots/seattlerb/call_lt.txt
new file mode 100644
index 0000000000..14f50585d9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_lt.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :<
+ ├── message_loc: (1,2)-(1,3) = "<"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_lte.txt b/test/prism/snapshots/seattlerb/call_lte.txt
new file mode 100644
index 0000000000..665a99d60a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_lte.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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :<=
+ ├── message_loc: (1,2)-(1,4) = "<="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_not.txt b/test/prism/snapshots/seattlerb/call_not.txt
new file mode 100644
index 0000000000..86c6892303
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_not.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,4)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 42
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,3) = "not"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_pipe.txt b/test/prism/snapshots/seattlerb/call_pipe.txt
new file mode 100644
index 0000000000..855e986ef6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_pipe.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :|
+ ├── message_loc: (1,2)-(1,3) = "|"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_rshift.txt b/test/prism/snapshots/seattlerb/call_rshift.txt
new file mode 100644
index 0000000000..26e593db18
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_rshift.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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :>>
+ ├── message_loc: (1,2)-(1,4) = ">>"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..16ca69b5c2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_self_brackets.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: ignore_visibility
+ ├── receiver:
+ │ @ SelfNode (location: (1,0)-(1,4))
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,4)-(1,7) = "[1]"
+ ├── opening_loc: (1,4)-(1,5) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (1,6)-(1,7) = "]"
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_spaceship.txt b/test/prism/snapshots/seattlerb/call_spaceship.txt
new file mode 100644
index 0000000000..8d43c3f971
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_spaceship.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :<=>
+ ├── message_loc: (1,2)-(1,5) = "<=>"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..242db9e9cb
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,13))
+ │ ├── flags: ∅
+ │ └── 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
+ │ └── value: 1
+ ├── 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
+ │ └── value: 2
+ ├── opening_loc: (1,14)-(1,16) = "do"
+ └── closing_loc: (1,19)-(1,22) = "end"
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..7c3ab8dad8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,10))
+ │ ├── flags: ∅
+ │ └── 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
+ │ └── value: 1
+ ├── 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
+ │ └── value: 2
+ ├── opening_loc: (1,11)-(1,13) = "do"
+ └── closing_loc: (1,16)-(1,19) = "end"
diff --git a/test/prism/snapshots/seattlerb/call_star.txt b/test/prism/snapshots/seattlerb/call_star.txt
new file mode 100644
index 0000000000..49aee1672c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_star.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :*
+ ├── message_loc: (1,2)-(1,3) = "*"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_star2.txt b/test/prism/snapshots/seattlerb/call_star2.txt
new file mode 100644
index 0000000000..cc2532cc7c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_star2.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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :**
+ ├── message_loc: (1,2)-(1,4) = "**"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..fe28a3ad3e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_trailing_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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,2)-(1,3))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (1,4)-(1,5) = ")"
+ └── block: ∅
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..b0e23eb27b
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(2,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── name: :b
+ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (2,1)-(2,2) = "."
+ ├── name: :c
+ ├── message_loc: (3,0)-(3,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..782cc83b10
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_unary_bang.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,2))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/case_in.txt b/test/prism/snapshots/seattlerb/case_in.txt
new file mode 100644
index 0000000000..950d66647e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in.txt
@@ -0,0 +1,976 @@
+@ ProgramNode (location: (1,0)-(111,3))
+├── locals: [:b, :_, :lhs, :x, :rhs, :c, :e]
+└── statements:
+ @ StatementsNode (location: (1,0)-(111,3))
+ └── body: (length: 28)
+ ├── @ CaseMatchNode (location: (1,0)-(3,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (2,4)-(2,8))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,8))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\""
+ │ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
+ │ │ │ │ │ ├── closing_loc: (2,6)-(2,8) = "\":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ ImplicitNode (location: (2,5)-(2,6))
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (2,5)-(2,6))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (5,0)-(7,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (5,5)-(5,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (6,6)-(6,7))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (6,6)-(6,7) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ └── @ SymbolNode (location: (6,8)-(6,9))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (9,0)-(11,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (9,5)-(9,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (13,0)-(15,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (13,5)-(13,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (14,6)-(14,7))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (14,6)-(14,7) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ └── @ SymbolNode (location: (14,8)-(14,9))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (17,0)-(19,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (17,5)-(17,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (21,0)-(23,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (21,5)-(21,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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,10))
+ │ │ ├── pattern:
+ │ │ │ @ ParenthesesNode (location: (22,3)-(22,10))
+ │ │ │ ├── body:
+ │ │ │ │ @ RangeNode (location: (22,4)-(22,9))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left: ∅
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (22,7)-(22,9))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 10
+ │ │ │ │ └── operator_loc: (22,4)-(22,7) = "..."
+ │ │ │ ├── opening_loc: (22,3)-(22,4) = "("
+ │ │ │ └── closing_loc: (22,9)-(22,10) = ")"
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (25,0)-(27,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (25,5)-(25,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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,9))
+ │ │ ├── pattern:
+ │ │ │ @ ParenthesesNode (location: (26,3)-(26,9))
+ │ │ │ ├── body:
+ │ │ │ │ @ RangeNode (location: (26,4)-(26,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── left: ∅
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (26,6)-(26,8))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 10
+ │ │ │ │ └── operator_loc: (26,4)-(26,6) = ".."
+ │ │ │ ├── opening_loc: (26,3)-(26,4) = "("
+ │ │ │ └── closing_loc: (26,8)-(26,9) = ")"
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (29,0)-(31,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (29,5)-(29,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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,9))
+ │ │ ├── pattern:
+ │ │ │ @ ParenthesesNode (location: (30,3)-(30,9))
+ │ │ │ ├── body:
+ │ │ │ │ @ RangeNode (location: (30,4)-(30,8))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (30,4)-(30,5))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── right: ∅
+ │ │ │ │ └── operator_loc: (30,5)-(30,8) = "..."
+ │ │ │ ├── opening_loc: (30,3)-(30,4) = "("
+ │ │ │ └── closing_loc: (30,8)-(30,9) = ")"
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (33,0)-(35,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (33,5)-(33,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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,10))
+ │ │ ├── pattern:
+ │ │ │ @ ParenthesesNode (location: (34,3)-(34,10))
+ │ │ │ ├── body:
+ │ │ │ │ @ RangeNode (location: (34,4)-(34,9))
+ │ │ │ │ ├── flags: exclude_end
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (34,4)-(34,5))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (34,8)-(34,9))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 3
+ │ │ │ │ └── operator_loc: (34,5)-(34,8) = "..."
+ │ │ │ ├── opening_loc: (34,3)-(34,4) = "("
+ │ │ │ └── closing_loc: (34,9)-(34,10) = ")"
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (37,0)-(39,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (37,5)-(37,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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,7))
+ │ │ ├── pattern:
+ │ │ │ @ ParenthesesNode (location: (38,3)-(38,7))
+ │ │ │ ├── body:
+ │ │ │ │ @ IntegerNode (location: (38,4)-(38,6))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 42
+ │ │ │ ├── opening_loc: (38,3)-(38,4) = "("
+ │ │ │ └── closing_loc: (38,6)-(38,7) = ")"
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (41,0)-(43,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (41,5)-(41,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
+ │ │ │ ├── elements: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ NoKeywordsParameterNode (location: (42,3)-(42,8))
+ │ │ │ │ ├── operator_loc: (42,3)-(42,5) = "**"
+ │ │ │ │ └── keyword_loc: (42,5)-(42,8) = "nil"
+ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (45,0)-(47,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (45,5)-(45,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (46,3)-(46,4) = "/"
+ │ │ │ ├── content_loc: (46,4)-(46,10) = "regexp"
+ │ │ │ ├── closing_loc: (46,10)-(46,11) = "/"
+ │ │ │ └── unescaped: "regexp"
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (49,0)-(51,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (49,5)-(49,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (53,0)-(55,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (53,5)-(53,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (57,0)-(59,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (57,5)-(57,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (61,0)-(63,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (61,5)-(61,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (65,0)-(67,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (65,5)-(65,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (69,0)-(71,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (69,5)-(69,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ │ └── 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"
+ ├── @ CaseMatchNode (location: (73,0)-(75,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (73,5)-(73,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (77,0)-(79,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (77,5)-(77,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (81,0)-(83,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (81,5)-(81,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (85,0)-(87,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (85,5)-(85,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (89,0)-(91,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (89,5)-(89,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ ├── message_loc: (90,6)-(90,7) = "a"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (93,0)-(95,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (93,5)-(93,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (97,0)-(99,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (97,5)-(97,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (101,0)-(103,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (101,5)-(101,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (105,0)-(107,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (105,5)-(105,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (106,5)-(106,9))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (106,5)-(106,9))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (106,5)-(106,6) = "\""
+ │ │ │ │ │ ├── value_loc: (106,6)-(106,7) = "b"
+ │ │ │ │ │ ├── closing_loc: (106,7)-(106,9) = "\":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ ImplicitNode (location: (106,6)-(106,7))
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (106,6)-(106,7))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── 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"
+ └── @ CaseMatchNode (location: (109,0)-(111,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (109,5)-(109,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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: ∅
+ │ │ ├── elements: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── 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..fdf5ce2a29
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_31.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..1a1d887b4f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_37.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,5)-(2,17))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..f985d6bc8d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_42.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:_]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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..c399ba1bfa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_42_2.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:list]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..99baebce05
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_47.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (2,7)-(2,8) = ":"
+ │ │ │ │ ├── value_loc: (2,8)-(2,9) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ └── @ SymbolNode (location: (2,11)-(2,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..4bab417d57
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_67.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (2,3)-(2,4))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (2,4)-(2,6) = ".."
+ │ ├── 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..082aa74eca
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_86.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,5)-(1,13))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ │ ├── value_loc: (1,7)-(1,8) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
+ │ │ │ ├── name: :NilClass
+ │ │ │ ├── delimiter_loc: (2,3)-(2,5) = "::"
+ │ │ │ └── name_loc: (2,5)-(2,13) = "NilClass"
+ │ │ ├── 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..346264f907
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_86_2.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,5)-(1,13))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ │ ├── value_loc: (1,7)-(1,8) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
+ │ │ │ ├── name: :NilClass
+ │ │ │ ├── delimiter_loc: (2,6)-(2,8) = "::"
+ │ │ │ └── name_loc: (2,8)-(2,16) = "NilClass"
+ │ │ ├── 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..f361e8d458
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_array_pat_const.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..d6fb80ef90
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:d]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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
+ │ │ │ ├── name: :C
+ │ │ │ ├── delimiter_loc: (2,4)-(2,6) = "::"
+ │ │ │ └── name_loc: (2,6)-(2,7) = "C"
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..8d185b250a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:d]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..c4b838aa1d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_const.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..5eae7fc1ea
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_else.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..f84c4c30d0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_find.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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..a757f80346
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_find_array.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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..e813efa9ee
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat.txt
@@ -0,0 +1,68 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (2,5)-(2,11))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..790d9d63ff
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt
@@ -0,0 +1,86 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:x, :f]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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: ∅
+ │ │ ├── elements: (length: 3)
+ │ │ │ ├── @ AssocNode (location: (2,5)-(2,20))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,30)-(2,31) = "f"
+ │ │ │ │ ├── closing_loc: (2,31)-(2,32) = ":"
+ │ │ │ │ └── unescaped: "f"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (2,30)-(2,31))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,30)-(2,31))
+ │ │ │ │ ├── name: :f
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..4c8cfd0e54
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,5)-(2,10))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 42
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..8ff95a161f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,3)-(2,10))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..b93b889ec5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:c, :rest]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,3)-(2,7))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── rest:
+ │ │ │ @ AssocSplatNode (location: (2,9)-(2,15))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,11)-(2,15))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,9)-(2,11) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,21)-(2,23))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (2,21)-(2,23))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..956e93faa0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:rest]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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: ∅
+ │ │ ├── elements: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ AssocSplatNode (location: (2,3)-(2,9))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,5)-(2,9))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,3)-(2,5) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,15)-(2,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (2,15)-(2,17))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..a21d3e15dd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt
@@ -0,0 +1,67 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(6,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..eba0084f96
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_multiple.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(6,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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
+ │ │ │ ├── name: :B
+ │ │ │ ├── delimiter_loc: (2,4)-(2,6) = "::"
+ │ │ │ └── name_loc: (2,6)-(2,7) = "B"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ ├── name: :E
+ │ │ ├── delimiter_loc: (4,4)-(4,6) = "::"
+ │ │ └── name_loc: (4,6)-(4,7) = "E"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (5,2)-(5,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..7ac6617608
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_or.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..b6e12dfb15
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/cond_unary_minus.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,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ IntegerNode (location: (1,3)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: -1
+ ├── then_keyword_loc: ∅
+ ├── 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..e09eed7d2f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt
@@ -0,0 +1,22 @@
+@ 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: ∅
+ │ │ ├── name: :X
+ │ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ │ └── name_loc: (1,2)-(1,3) = "X"
+ │ ├── name: :Y
+ │ ├── delimiter_loc: (1,3)-(1,5) = "::"
+ │ └── name_loc: (1,5)-(1,6) = "Y"
+ ├── operator_loc: (1,7)-(1,10) = "||="
+ └── value:
+ @ IntegerNode (location: (1,11)-(1,12))
+ ├── flags: decimal
+ └── value: 1
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..398af888a8
--- /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: ∅
+ │ ├── name: :X
+ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ └── name_loc: (1,2)-(1,3) = "X"
+ ├── operator_loc: (1,4)-(1,7) = "||="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,9))
+ ├── flags: decimal
+ └── value: 1
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..f9792aebb3
--- /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: ∅
+ │ ├── name: :X
+ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ └── name_loc: (1,2)-(1,3) = "X"
+ ├── binary_operator_loc: (1,4)-(1,6) = "&="
+ ├── value:
+ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ └── binary_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..146455d327
--- /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: ∅
+ │ ├── name: :X
+ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ └── name_loc: (1,2)-(1,3) = "X"
+ ├── operator_loc: (1,4)-(1,7) = "&&="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,9))
+ ├── flags: decimal
+ └── value: 1
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..5e9dd39604
--- /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
+ │ ├── name: :Y
+ │ ├── delimiter_loc: (1,1)-(1,3) = "::"
+ │ └── name_loc: (1,3)-(1,4) = "Y"
+ ├── operator_loc: (1,5)-(1,8) = "||="
+ └── value:
+ @ IntegerNode (location: (1,9)-(1,10))
+ ├── flags: decimal
+ └── value: 1
diff --git a/test/prism/snapshots/seattlerb/dasgn_icky2.txt b/test/prism/snapshots/seattlerb/dasgn_icky2.txt
new file mode 100644
index 0000000000..e118362f87
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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"
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..49b577fcd1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defined_eh_parens.txt
@@ -0,0 +1,13 @@
+@ 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
+ │ └── value: 42
+ ├── 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..3f2bdf44a4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
@@ -0,0 +1,37 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── name: :interp
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,17)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,17)-(1,18) = "*"
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,24))
+ │ │ ├── flags: ∅
+ │ │ └── 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..4121770c5c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
@@ -0,0 +1,49 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (1,15)-(1,16) = "b"
+ │ ├── opening_loc: (1,16)-(1,17) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,17)-(1,23))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── 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..178b6ccde7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
@@ -0,0 +1,61 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :x
+ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :y
+ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (1,21)-(1,22) = "b"
+ │ ├── opening_loc: (1,22)-(1,23) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,23)-(1,35))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ SymbolNode (location: (1,23)-(1,27))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── 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..c3ea59282a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_endless_command.txt
@@ -0,0 +1,36 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :other_method
+ │ ├── message_loc: (1,18)-(1,30) = "other_method"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,31)-(1,33))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,31)-(1,33))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..dfd1d01ba8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
@@ -0,0 +1,43 @@
+@ 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)
+ │ └── @ RescueModifierNode (location: (1,18)-(1,43))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,18)-(1,33))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :other_method
+ │ │ ├── message_loc: (1,18)-(1,30) = "other_method"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,31)-(1,33))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,31)-(1,33))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (1,34)-(1,40) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (1,41)-(1,43))
+ │ ├── flags: decimal
+ │ └── value: 24
+ ├── 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..71a984c811
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_forward_args.txt
@@ -0,0 +1,43 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (1,12)-(1,13) = "b"
+ │ ├── opening_loc: (1,13)-(1,14) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,14)-(1,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (1,14)-(1,17))
+ │ ├── closing_loc: (1,17)-(1,18) = ")"
+ │ └── block: ∅
+ ├── 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..4a4d69e4d0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
@@ -0,0 +1,43 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (2,2)-(2,3) = "m"
+ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,4)-(2,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (2,4)-(2,7))
+ │ ├── closing_loc: (2,7)-(2,8) = ")"
+ │ └── block: ∅
+ ├── 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..2aadedd964
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
@@ -0,0 +1,55 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :test_splat
+ │ ├── message_loc: (1,20)-(1,30) = "test_splat"
+ │ ├── opening_loc: (1,30)-(1,31) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,31)-(1,40))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,31)-(1,40))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── 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..8a5022ff37
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
@@ -0,0 +1,45 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 2)
+ │ │ ├── @ OptionalKeywordParameterNode (location: (1,9)-(1,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,9)-(1,11) = "b:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,15)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :c
+ │ │ ├── name_loc: (1,15)-(1,17) = "c:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,18)-(1,19))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── 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..4c980bc27f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
@@ -0,0 +1,39 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,6)-(1,8) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,12)-(1,15))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..40afacc2a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
@@ -0,0 +1,39 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,6)-(1,8) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,12)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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..0eae56924c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
@@ -0,0 +1,42 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,16))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :kw
+ │ │ ├── name_loc: (1,8)-(1,11) = "kw:"
+ │ │ └── value:
+ │ │ @ SymbolNode (location: (1,12)-(1,16))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..bc5747ad02
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.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: :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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,6)-(1,8) = "a:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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..82527f7875
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
@@ -0,0 +1,37 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,9)-(1,12))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,9)-(1,11) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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..e700499809
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner.txt
@@ -0,0 +1,47 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :system
+ │ ├── message_loc: (1,16)-(1,22) = "system"
+ │ ├── opening_loc: (1,22)-(1,23) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,23)-(1,26))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,23)-(1,26))
+ │ │ ├── name: :cmd
+ │ │ └── depth: 0
+ │ ├── closing_loc: (1,26)-(1,27) = ")"
+ │ └── block: ∅
+ ├── 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..2708351ede
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
@@ -0,0 +1,47 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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
+ │ │ └── value: 42
+ │ ├── 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..54555b1a23
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :system
+ │ ├── message_loc: (1,11)-(1,17) = "system"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..e0fc4636f1
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :system
+ │ ├── message_loc: (1,13)-(1,19) = "system"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..b5b5dbe6ac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
@@ -0,0 +1,158 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :cmd
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (1,0)-(5,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,13))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :system
+ │ │ │ ├── message_loc: (2,2)-(2,8) = "system"
+ │ │ │ ├── opening_loc: (2,8)-(2,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (2,12)-(2,13) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :system
+ │ │ │ ├── message_loc: (9,2)-(9,8) = "system"
+ │ │ │ ├── opening_loc: (9,8)-(9,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (9,12)-(9,13) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :system
+ │ │ ├── message_loc: (13,16)-(13,22) = "system"
+ │ │ ├── opening_loc: (13,22)-(13,23) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,23)-(13,26))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (13,23)-(13,26))
+ │ │ │ ├── name: :cmd
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: (13,26)-(13,27) = ")"
+ │ │ └── block: ∅
+ │ ├── 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..569bc23078
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_opt_last_arg.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: :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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..f86168513a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_opt_reg.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: :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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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..3019e9b73e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
@@ -0,0 +1,43 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,7)-(1,8) = "a"
+ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,14)-(1,16))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,15)-(1,16) = "b"
+ │ │ └── operator_loc: (1,14)-(1,15) = "*"
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ └── 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..bce131ad18
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_powarg.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..d079e1b5f3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
@@ -0,0 +1,44 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── name: :a
+ │ ├── optionals: (length: 1)
+ │ │ └── @ OptionalParameterNode (location: (1,9)-(1,15))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,9)-(1,10) = "b"
+ │ │ ├── operator_loc: (1,11)-(1,12) = "="
+ │ │ └── value:
+ │ │ @ SymbolNode (location: (1,13)-(1,15))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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..109fac495a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_splat_arg.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,6)-(1,7) = "*"
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ └── 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..231a3c0da9
--- /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..24bb14f8e1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt
@@ -0,0 +1,60 @@
+@ ProgramNode (location: (1,0)-(1,30))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,30))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,30))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,30))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,14)-(1,15))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── message_loc: (1,14)-(1,15) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (1,15)-(1,16) = "."
+ │ │ ├── name: :y
+ │ │ ├── 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"
+ │ ├── 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: ∅
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..f3c4e79417
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_endless_command.txt
@@ -0,0 +1,46 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :x
+ │ ├── message_loc: (1,4)-(1,5) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,20)-(1,35))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,20)-(1,35))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :other_method
+ │ ├── message_loc: (1,20)-(1,32) = "other_method"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,33)-(1,35))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,33)-(1,35))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..b0cd34a9c8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
@@ -0,0 +1,53 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :x
+ │ ├── message_loc: (1,4)-(1,5) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,20)-(1,45))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (1,20)-(1,45))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,20)-(1,35))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :other_method
+ │ │ ├── message_loc: (1,20)-(1,32) = "other_method"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,33)-(1,35))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,33)-(1,35))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (1,36)-(1,42) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (1,43)-(1,45))
+ │ ├── flags: decimal
+ │ └── value: 24
+ ├── 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..53235c9bb8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_kwarg.txt
@@ -0,0 +1,35 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,11)-(1,15))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,11)-(1,13) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,14)-(1,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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..d32975354d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_oneliner.txt
@@ -0,0 +1,48 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :system
+ │ ├── message_loc: (1,21)-(1,27) = "system"
+ │ ├── opening_loc: (1,27)-(1,28) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,28)-(1,31))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,28)-(1,31))
+ │ │ ├── name: :cmd
+ │ │ └── depth: 0
+ │ ├── closing_loc: (1,31)-(1,32) = ")"
+ │ └── block: ∅
+ ├── 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..fcc5c63cf0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
@@ -0,0 +1,48 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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
+ │ │ └── value: 42
+ │ ├── 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..f776210768
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
@@ -0,0 +1,161 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :cmd
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (1,0)-(5,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,13))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :system
+ │ │ │ ├── message_loc: (2,2)-(2,8) = "system"
+ │ │ │ ├── opening_loc: (2,8)-(2,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (2,12)-(2,13) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :system
+ │ │ │ ├── message_loc: (9,2)-(9,8) = "system"
+ │ │ │ ├── opening_loc: (9,8)-(9,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (9,12)-(9,13) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :system
+ │ │ ├── message_loc: (13,21)-(13,27) = "system"
+ │ │ ├── opening_loc: (13,27)-(13,28) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,28)-(13,31))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (13,28)-(13,31))
+ │ │ │ ├── name: :cmd
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: (13,31)-(13,32) = ")"
+ │ │ └── block: ∅
+ │ ├── 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..8ba30ccf85
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult0_.txt
@@ -0,0 +1,73 @@
+@ ProgramNode (location: (1,0)-(4,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,8))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(4,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(4,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,2)-(4,4))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ StringNode (location: (1,2)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<-END"
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n"
+ │ │ │ ├── closing_loc: (3,0)-(4,0) = " END\n"
+ │ │ │ └── unescaped: " a\n"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+
+ │ │ ├── message_loc: (1,8)-(1,9) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,9)-(4,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (1,9)-(4,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,9)-(1,10) = "'"
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (1,10)-(2,0))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (1,10)-(2,0) = "b\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b\n"
+ │ │ │ │ └── @ StringNode (location: (4,0)-(4,3))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (4,0)-(4,3) = " c"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " c"
+ │ │ │ └── closing_loc: (4,3)-(4,4) = "'"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (4,4)-(4,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (4,5)-(4,8))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..da2306312c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt
@@ -0,0 +1,267 @@
+@ 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))
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(11,11))
+ │ └── body: (length: 10)
+ │ ├── @ CallNode (location: (2,2)-(2,5))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── message_loc: (2,2)-(2,3) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (2,4)-(2,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (3,2)-(3,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (3,2)-(3,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (3,4)-(3,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,6)-(3,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (4,2)-(4,10))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (4,2)-(4,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (4,2)-(4,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (4,3)-(4,4) = "."
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (4,4)-(4,5) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (4,6)-(4,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (4,6)-(4,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 3
+ │ │ │ └── @ IntegerNode (location: (4,9)-(4,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 4
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (5,2)-(5,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (5,2)-(5,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :e
+ │ │ │ ├── message_loc: (5,2)-(5,3) = "e"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (5,3)-(5,4) = "."
+ │ │ ├── name: :f
+ │ │ ├── message_loc: (5,4)-(5,5) = "f"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 5
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (6,2)-(6,10))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (6,2)-(6,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :g
+ │ │ │ ├── message_loc: (6,2)-(6,3) = "g"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (6,3)-(6,4) = "."
+ │ │ ├── name: :h
+ │ │ ├── message_loc: (6,4)-(6,5) = "h"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (6,6)-(6,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (6,6)-(6,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 6
+ │ │ │ └── @ IntegerNode (location: (6,9)-(6,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 7
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (7,2)-(7,6))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── message_loc: (7,2)-(7,3) = "p"
+ │ │ ├── opening_loc: (7,3)-(7,4) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,4)-(7,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (7,4)-(7,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: (7,5)-(7,6) = ")"
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (8,2)-(8,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (8,2)-(8,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (8,2)-(8,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (8,3)-(8,4) = "."
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (8,4)-(8,5) = "b"
+ │ │ ├── opening_loc: (8,5)-(8,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (8,6)-(8,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (8,6)-(8,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: (8,7)-(8,8) = ")"
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (9,2)-(9,11))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (9,2)-(9,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (9,2)-(9,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (9,3)-(9,4) = "."
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (9,4)-(9,5) = "d"
+ │ │ ├── opening_loc: (9,5)-(9,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,6)-(9,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (9,6)-(9,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 3
+ │ │ │ └── @ IntegerNode (location: (9,9)-(9,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 4
+ │ │ ├── closing_loc: (9,10)-(9,11) = ")"
+ │ │ └── block: ∅
+ │ ├── @ CallNode (location: (10,2)-(10,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (10,2)-(10,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :e
+ │ │ │ ├── message_loc: (10,2)-(10,3) = "e"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (10,3)-(10,4) = "."
+ │ │ ├── name: :f
+ │ │ ├── message_loc: (10,4)-(10,5) = "f"
+ │ │ ├── opening_loc: (10,5)-(10,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (10,6)-(10,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (10,6)-(10,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 5
+ │ │ ├── closing_loc: (10,7)-(10,8) = ")"
+ │ │ └── block: ∅
+ │ └── @ CallNode (location: (11,2)-(11,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,2)-(11,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :g
+ │ │ ├── message_loc: (11,2)-(11,3) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (11,3)-(11,4) = "."
+ │ ├── name: :h
+ │ ├── message_loc: (11,4)-(11,5) = "h"
+ │ ├── opening_loc: (11,5)-(11,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,6)-(11,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (11,6)-(11,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 6
+ │ │ └── @ IntegerNode (location: (11,9)-(11,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 7
+ │ ├── closing_loc: (11,10)-(11,11) = ")"
+ │ └── block: ∅
+ ├── 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..f586634c59
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt
@@ -0,0 +1,78 @@
+@ 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))
+ │ ├── then_keyword_loc: (1,8)-(1,12) = "then"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(5,6))
+ │ │ └── body: (length: 4)
+ │ │ ├── @ CallNode (location: (2,2)-(2,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :p
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "p"
+ │ │ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,4)-(2,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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: ∅
+ │ │ ├── @ 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: (3,4)-(3,5) = "="
+ │ │ ├── @ CallNode (location: (4,2)-(4,5))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :p
+ │ │ │ ├── message_loc: (4,2)-(4,3) = "p"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (4,4)-(4,5))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (4,4)-(4,5))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (5,4)-(5,5) = "="
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ └── @ CallNode (location: (7,0)-(7,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (7,0)-(7,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult2_.txt b/test/prism/snapshots/seattlerb/difficult2_.txt
new file mode 100644
index 0000000000..b53d4cad3f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult2_.txt
@@ -0,0 +1,74 @@
+@ 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
+ │ │ └── value: 1
+ │ ├── then_keyword_loc: (1,2)-(1,3) = "?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,4)-(1,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ CallNode (location: (2,0)-(2,6))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (2,0)-(2,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (2,2)-(2,6))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (2,2)-(2,6))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (2,2)-(2,6))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (2,2)-(2,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 3
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult3_.txt b/test/prism/snapshots/seattlerb/difficult3_.txt
new file mode 100644
index 0000000000..f074c49a9f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,12)-(1,14))
+ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3_2.txt b/test/prism/snapshots/seattlerb/difficult3_2.txt
new file mode 100644
index 0000000000..af1a649171
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_2.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,6)-(1,7) = "a"
+ │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3_3.txt b/test/prism/snapshots/seattlerb/difficult3_3.txt
new file mode 100644
index 0000000000..e49bbcd55a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_3.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,6)-(1,7) = "a"
+ │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,12)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3_4.txt b/test/prism/snapshots/seattlerb/difficult3_4.txt
new file mode 100644
index 0000000000..73afffb4cb
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_4.txt
@@ -0,0 +1,38 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,4)-(1,5) = "?"
+ │ ├── 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..793c3f1e11
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_5.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,19))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :g
+ │ ├── 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"
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult3__10.txt b/test/prism/snapshots/seattlerb/difficult3__10.txt
new file mode 100644
index 0000000000..0131e44d44
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__10.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__11.txt b/test/prism/snapshots/seattlerb/difficult3__11.txt
new file mode 100644
index 0000000000..a658b091c2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__11.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,11))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__12.txt b/test/prism/snapshots/seattlerb/difficult3__12.txt
new file mode 100644
index 0000000000..5aa252fe6a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__12.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__6.txt b/test/prism/snapshots/seattlerb/difficult3__6.txt
new file mode 100644
index 0000000000..a42a625be7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__6.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,18))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,12)-(1,14))
+ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :d
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__7.txt b/test/prism/snapshots/seattlerb/difficult3__7.txt
new file mode 100644
index 0000000000..b08025804c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__7.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,12)-(1,13))
+ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__8.txt b/test/prism/snapshots/seattlerb/difficult3__8.txt
new file mode 100644
index 0000000000..b2b118faef
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__8.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,17))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,12)-(1,13))
+ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :c
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__9.txt b/test/prism/snapshots/seattlerb/difficult3__9.txt
new file mode 100644
index 0000000000..85c10a4432
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__9.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,12))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ └── rparen_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) = "}"
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..8307c806e6
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (2,0)-(2,1) = "."
+ ├── name: :b
+ ├── message_loc: (2,1)-(2,2) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..ee4370c0f0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt
@@ -0,0 +1,16 @@
+@ 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
+ │ └── value: 1
+ └── @ RangeNode (location: (2,0)-(2,3))
+ ├── flags: ∅
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (2,2)-(2,3))
+ │ ├── flags: decimal
+ │ └── value: 3
+ └── operator_loc: (2,0)-(2,2) = ".."
diff --git a/test/prism/snapshots/seattlerb/difficult6_.txt b/test/prism/snapshots/seattlerb/difficult6_.txt
new file mode 100644
index 0000000000..bf80034fe9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult6_.txt
@@ -0,0 +1,61 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,15)-(1,16) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,17)-(1,23))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,17)-(1,23))
+ │ ├── flags: ∅
+ │ ├── 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: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult6__7.txt b/test/prism/snapshots/seattlerb/difficult6__7.txt
new file mode 100644
index 0000000000..7fe70c7033
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult6__7.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :b
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ └── value: 1
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (1,9)-(1,10) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,8)-(1,9) = "{"
+ └── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult6__8.txt b/test/prism/snapshots/seattlerb/difficult6__8.txt
new file mode 100644
index 0000000000..7f915e283c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult6__8.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── name: :b
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,8))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ └── value: 1
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (1,10)-(1,11) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,9)-(1,10) = "{"
+ └── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult7_.txt b/test/prism/snapshots/seattlerb/difficult7_.txt
new file mode 100644
index 0000000000..40c778cf6c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult7_.txt
@@ -0,0 +1,93 @@
+@ 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (2,8)-(2,9) = "a"
+ │ │ │ ├── closing_loc: (2,9)-(2,10) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (2,11)-(2,33))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :lambda
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── then_keyword_loc: (2,22)-(2,23) = "?"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (2,24)-(2,27))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (2,24)-(2,27))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ ├── message_loc: (2,24)-(2,25) = "c"
+ │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "("
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: (2,26)-(2,27) = ")"
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ │ ├── message_loc: (2,30)-(2,31) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ └── end_keyword_loc: ∅
+ │ │ │ │ └── end_keyword_loc: ∅
+ │ │ │ ├── opening_loc: (2,18)-(2,19) = "{"
+ │ │ │ └── closing_loc: (2,32)-(2,33) = "}"
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocNode (location: (3,8)-(3,14))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,8)-(3,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..5877b18d68
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/do_bug.txt
@@ -0,0 +1,63 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (2,0)-(4,3))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (2,0)-(2,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (2,1)-(2,2) = "."
+ ├── name: :b
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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"
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..104515ac3a
--- /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))
+ ├── flags: ∅
+ ├── left:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── right: ∅
+ └── operator_loc: (1,1)-(1,3) = ".."
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..ec7f57cd96
--- /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))
+ ├── flags: exclude_end
+ ├── left:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── right: ∅
+ └── operator_loc: (1,1)-(1,4) = "..."
diff --git a/test/prism/snapshots/seattlerb/dstr_evstr.txt b/test/prism/snapshots/seattlerb/dstr_evstr.txt
new file mode 100644
index 0000000000..add8ad6f5c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dstr_evstr.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,12))
+ ├── flags: ∅
+ ├── 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: frozen
+ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,9)-(1,10) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..53f97e4b36
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :field
+ │ │ ├── message_loc: (1,4)-(1,9) = "field"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..c4c0ef0437
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dstr_lex_state.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── message_loc: (1,3)-(1,4) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,4)-(1,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (1,4)-(1,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ │ ├── value_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..6fe0781880
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dstr_str.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,10))
+ ├── flags: mutable
+ ├── 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: frozen
+ │ │ │ ├── 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: frozen
+ │ ├── 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..7b1b68131e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ SymbolNode (location: (1,0)-(1,17))
+ ├── flags: forced_utf8_encoding
+ ├── 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..eb7e435c63
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dsym_to_sym.txt
@@ -0,0 +1,37 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (3,6)-(3,7) = ":"
+ │ ├── value_loc: (3,7)-(3,9) = "<<"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<<"
+ ├── old_name:
+ │ @ SymbolNode (location: (3,10)-(3,13))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..a5fc3951d6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt
@@ -0,0 +1,11 @@
+@ 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
+ │ └── value: 1
+ └── @ IntegerNode (location: (6,0)-(6,1))
+ ├── flags: decimal
+ └── value: 2
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..2103bde8cb
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,8))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :h
+ │ ├── message_loc: (1,0)-(1,1) = "h"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]=
+ ├── message_loc: (1,1)-(1,4) = "[k]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(3,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :k
+ │ │ ├── message_loc: (1,2)-(1,3) = "k"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ 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
+ │ │ └── value: 42
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (3,5)-(3,8) = "end"
+ ├── closing_loc: (1,3)-(1,4) = "]"
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/evstr_evstr.txt b/test/prism/snapshots/seattlerb/evstr_evstr.txt
new file mode 100644
index 0000000000..9c801299f8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/evstr_evstr.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,10))
+ ├── flags: ∅
+ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,7)-(1,8) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..54319e613c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/evstr_str.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))
+ ├── flags: ∅
+ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ └── @ StringNode (location: (1,5)-(1,7))
+ │ ├── flags: frozen
+ │ ├── 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..0a289ab7be
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/expr_not_bang.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,2)-(1,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/f_kw.txt b/test/prism/snapshots/seattlerb/f_kw.txt
new file mode 100644
index 0000000000..4226137925
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/f_kw.txt
@@ -0,0 +1,34 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :k
+ │ │ ├── name_loc: (1,6)-(1,8) = "k:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,8)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ ├── 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..f72f43e034
--- /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)
+ │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :k
+ │ │ └── name_loc: (1,6)-(1,8) = "k:"
+ │ ├── 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..5a71ab6cda
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/flip2_env_lvar.txt
@@ -0,0 +1,37 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (1,4)-(1,6) = ".."
+ ├── then_keyword_loc: (1,8)-(1,12) = "then"
+ ├── 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..9c1da70f24
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/float_with_if_modifier.txt
@@ -0,0 +1,17 @@
+@ 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))
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,3))
+ │ └── body: (length: 1)
+ │ └── @ FloatNode (location: (1,0)-(1,3))
+ │ └── value: 1.0
+ ├── 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..353e4c6964
--- /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)-(4,0) = "before\\\r\nafter\r\n"
+ │ ├── closing_loc: (4,0)-(5,0) = "XXX\r\n"
+ │ └── unescaped: "beforeafter\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..fc4c1784fe
--- /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)-(3,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)-(8,0) = " why would someone do this? \\\n blah\n"
+ ├── closing_loc: (8,0)-(9,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..2b1d776404
--- /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: forced_utf8_encoding
+ │ ├── opening_loc: (1,4)-(1,9) = "<<eos"
+ │ ├── content_loc: (2,0)-(3,0) = "a\\xE9b\n"
+ │ ├── closing_loc: (3,0)-(4,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..7a01f8d6d1
--- /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: forced_utf8_encoding
+ │ ├── opening_loc: (1,4)-(1,10) = "<<-EOS"
+ │ ├── content_loc: (2,0)-(4,0) = "a\\247b\ncöd\n"
+ │ ├── closing_loc: (4,0)-(5,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..888ebc809a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(7,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(2,3))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (1,1)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,1)-(1,2) = "\""
+ │ │ ├── content_loc: (1,2)-(2,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))
+ ├── flags: ∅
+ ├── elements: (length: 1)
+ │ └── @ StringNode (location: (4,1)-(4,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (4,1)-(4,8) = "<<-FILE"
+ │ ├── content_loc: (5,0)-(6,0) = " some text\n"
+ │ ├── closing_loc: (6,0)-(7,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..a51ce71afe
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_lineno.txt
@@ -0,0 +1,26 @@
+@ 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)-(5,0) = "line2\nline3\nline4\n"
+ │ │ ├── closing_loc: (5,0)-(6,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
+ │ └── value: 42
+ └── 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..a2322b9632
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_nested.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(7,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,2))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(7,2))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ InterpolatedStringNode (location: (1,1)-(1,4))
+ │ │ ├── flags: mutable
+ │ │ ├── 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: frozen
+ │ │ │ │ │ ├── opening_loc: (2,2)-(2,5) = "<<B"
+ │ │ │ │ │ ├── content_loc: (3,0)-(4,0) = "b\n"
+ │ │ │ │ │ ├── closing_loc: (4,0)-(5,0) = "B\n"
+ │ │ │ │ │ └── unescaped: "b\n"
+ │ │ │ │ └── closing_loc: (2,5)-(2,6) = "}"
+ │ │ │ ├── @ StringNode (location: (2,6)-(3,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (2,6)-(3,0) = "\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\n"
+ │ │ │ └── @ StringNode (location: (5,0)-(6,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (5,0)-(6,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── closing_loc: (6,0)-(7,0) = "A\n"
+ │ └── @ IntegerNode (location: (7,0)-(7,1))
+ │ ├── flags: decimal
+ │ └── value: 0
+ ├── 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..9bab044ace
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly.txt
@@ -0,0 +1,34 @@
+@ 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:
+ │ @ InterpolatedStringNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "x\n"
+ │ │ ├── @ StringNode (location: (3,0)-(4,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,0)-(4,0) = " y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "y\n"
+ │ │ └── @ StringNode (location: (4,0)-(5,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "z\n"
+ │ └── closing_loc: (5,0)-(6,0) = " EOF\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..e12014afa5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt
@@ -0,0 +1,67 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ ├── opening_loc: (1,7)-(1,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,8)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ InterpolatedStringNode (location: (1,8)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,8)-(1,14) = "<<~EOF"
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (2,0)-(3,0) = "\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))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ │ ├── message_loc: (3,6)-(3,9) = "bar"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}"
+ │ │ │ │ └── @ StringNode (location: (3,10)-(4,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (3,10)-(4,0) = "baz\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "baz\n"
+ │ │ │ └── closing_loc: (4,0)-(5,0) = " EOF\n"
+ │ │ ├── call_operator_loc: (1,14)-(1,15) = "."
+ │ │ ├── name: :chop
+ │ │ ├── message_loc: (1,15)-(1,19) = "chop"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (1,19)-(1,20) = ")"
+ │ └── block: ∅
+ └── 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..8596647e72
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "x\n"
+ │ │ ├── @ StringNode (location: (3,0)-(4,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,0)-(4,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (4,0)-(5,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "z\n"
+ │ └── closing_loc: (5,0)-(6,0) = "EOF\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..c998f19984
--- /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)-(2,0) = ""
+ ├── closing_loc: (2,0)-(3,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..d34f89ff9c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt
@@ -0,0 +1,49 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
+ │ ├── parts: (length: 5)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " w\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " w\n"
+ │ │ ├── @ StringNode (location: (3,0)-(3,3))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,0)-(3,3) = " x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "x"
+ │ │ ├── @ 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
+ │ │ │ │ └── value: 42
+ │ │ │ └── closing_loc: (3,7)-(3,8) = "}"
+ │ │ ├── @ StringNode (location: (3,8)-(4,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,8)-(4,0) = " y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " y\n"
+ │ │ └── @ StringNode (location: (4,0)-(5,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " z\n"
+ │ └── closing_loc: (5,0)-(6,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..7c17bc4820
--- /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)-(3,0) = "a\n"
+ ├── closing_loc: (3,0)-(4,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..311d7bc1b7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt
@@ -0,0 +1,28 @@
+@ 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:
+ │ @ InterpolatedStringNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "blah blah\n"
+ │ │ └── @ StringNode (location: (3,0)-(4,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,0)-(4,0) = "\t blah blah\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " blah blah\n"
+ │ └── closing_loc: (4,0)-(5,0) = " EOF\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..3150f807a2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt
@@ -0,0 +1,28 @@
+@ 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:
+ │ @ InterpolatedStringNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "blah blah\n"
+ │ │ └── @ StringNode (location: (3,0)-(4,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,0)-(4,0) = " \tblah blah\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\tblah blah\n"
+ │ └── closing_loc: (4,0)-(5,0) = " EOF\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..85c3d2df6d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "x\n"
+ │ │ ├── @ StringNode (location: (3,0)-(4,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,0)-(4,0) = " \n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (4,0)-(5,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "z\n"
+ │ └── closing_loc: (5,0)-(6,0) = "EOF\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..bc05047b40
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ StringNode (location: (1,0)-(1,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,5) = "<<END"
+ │ ├── content_loc: (2,0)-(3,0) = "blah\n"
+ │ ├── closing_loc: (3,0)-(4,0) = "END\n"
+ │ └── unescaped: "blah\n"
+ ├── call_operator_loc: (4,0)-(4,1) = "."
+ ├── name: :strip
+ ├── message_loc: (4,1)-(4,6) = "strip"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/heredoc_unicode.txt b/test/prism/snapshots/seattlerb/heredoc_unicode.txt
new file mode 100644
index 0000000000..2c72854324
--- /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)-(3,0) = ".\n"
+ ├── closing_loc: (3,0)-(4,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..43bb8d5ea8
--- /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)-(4,0) = "foo\\rbar\nbaz\\r\n"
+ ├── closing_loc: (4,0)-(5,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..2ef6763389
--- /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)-(4,0) = "foo\\rbar\r\nbaz\\r\r\n"
+ ├── closing_loc: (4,0)-(5,0) = "EOS\r\n"
+ └── unescaped: "foo\rbar\nbaz\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..fbee030100
--- /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)-(3,0) = "body\r\n"
+ ├── closing_loc: (3,0)-(4,0) = "eot\n"
+ └── unescaped: "body\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..b59203bc4e
--- /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)-(4,0) = "foo\rbar\r\nbaz\n"
+ ├── closing_loc: (4,0)-(5,0) = "EOS\n"
+ └── unescaped: "foo\rbar\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..36bc4c6560
--- /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)-(4,0) = "foo\rbar\r\r\nbaz\r\n"
+ ├── closing_loc: (4,0)-(5,0) = "EOS\r\n"
+ └── unescaped: "foo\rbar\r\nbaz\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..c4be1244dc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (2,0)-(2,5))
+ │ │ ├── flags: frozen
+ │ │ ├── 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)-(3,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,10)-(3,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (3,0)-(4,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..c2290cec13
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (2,0)-(2,5))
+ │ │ ├── flags: frozen
+ │ │ ├── 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)-(3,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,10)-(3,0) = "\r\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (3,0)-(4,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..6e1648f659
--- /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)-(3,0) = "\#${\n"
+ ├── closing_loc: (3,0)-(4,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..6a535c6472
--- /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)-(5,0) = "\r\n\r\r\n\\r\n"
+ ├── closing_loc: (5,0)-(6,0) = "EOS\n"
+ └── unescaped: "\n\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..6539846ff1
--- /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)-(5,0) = "\r\r\n\r\r\r\n\\r\r\n"
+ ├── closing_loc: (5,0)-(6,0) = "EOS\r\n"
+ └── unescaped: "\r\n\r\r\n\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..034850158c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/if_elsif.txt
@@ -0,0 +1,25 @@
+@ 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
+ │ └── value: 1
+ ├── then_keyword_loc: ∅
+ ├── 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
+ │ │ └── value: 2
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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..85ec52b4c8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/if_symbol.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (1,3)-(1,4) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,5)-(1,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ │ ├── value_loc: (1,6)-(1,7) = "x"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "x"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── 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..9771e9c2bd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/index_0.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]=
+ ├── message_loc: (1,1)-(1,3) = "[]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (1,2)-(1,3) = "]"
+ └── block: ∅
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..322eae9907
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/index_0_opasgn.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ IndexOperatorWriteNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments: ∅
+ ├── closing_loc: (1,2)-(1,3) = "]"
+ ├── block: ∅
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (1,4)-(1,6) = "+="
+ └── value:
+ @ CallNode (location: (1,7)-(1,8))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..2108c1f0a0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/integer_with_if_modifier.txt
@@ -0,0 +1,18 @@
+@ 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))
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,5))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,0)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 1234
+ ├── 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..ab231cf539
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (3,0)-(3,1))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ └── value: 1
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..933e5de627
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── flags: ∅
+ │ ├── 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
+ └── value: 1
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..f76bbfc559
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_1.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..b8aaae800a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_10_1.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
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..833f6429dc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_10_2.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
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..e4d2f79474
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_11_1.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,24))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
+ │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..07a0e5ed9d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_11_2.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
+ │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :d
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,23)-(1,25))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
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..a905286f47
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_2__19.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ └── rparen_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) = "}"
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..66782f0793
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_3.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── @ MultiTargetNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── rparen_loc: (1,13)-(1,14) = ")"
+ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..c4f2b47a03
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_4.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,8)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,9)-(1,10) = "b"
+ │ │ │ └── operator_loc: (1,8)-(1,9) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..44940629b4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_5.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,8)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
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..df3a405dff
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_6.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,10)-(1,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..3f65fb8dc0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_7_1.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
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..112a5a1b6b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_7_2.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
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..5591fcfc69
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_8_1.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
+ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..8cb061d5a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_8_2.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
+ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :c
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,20)-(1,22))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
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..70b2a6cb19
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_9_1.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..cad8b47e7f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_9_2.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,16)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_kwarg.txt b/test/prism/snapshots/seattlerb/iter_kwarg.txt
new file mode 100644
index 0000000000..13b9027661
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_kwarg.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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) = "}"
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..321e15cb2b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (1,11)-(1,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
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..c8d7af8f48
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/label_vs_string.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,1))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,4))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :_buf
+ │ ├── message_loc: (1,0)-(1,4) = "_buf"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :<<
+ ├── message_loc: (1,5)-(1,7) = "<<"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,8)-(2,1))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,8)-(2,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,8)-(1,9) = "'"
+ │ ├── content_loc: (1,9)-(2,0) = ":\n"
+ │ ├── closing_loc: (2,0)-(2,1) = "'"
+ │ └── unescaped: ":\n"
+ ├── closing_loc: ∅
+ └── block: ∅
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..afc0d3d56f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
@@ -0,0 +1,95 @@
+@ ProgramNode (location: (1,0)-(7,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,9))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── @ CallNode (location: (3,0)-(3,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (3,0)-(3,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,7))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── @ CallNode (location: (5,0)-(5,13))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (5,0)-(5,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,13))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ └── @ CallNode (location: (7,0)-(7,9))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (7,0)-(7,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,2)-(7,9))
+ │ ├── flags: ∅
+ │ └── 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: ∅
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..7bbef7055a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt
@@ -0,0 +1,21 @@
+@ 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
+ │ │ └── value: 1
+ │ ├── keyword_loc: (1,6)-(1,12) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (1,13)-(1,14))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── 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..521fceaf1b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (1,9)-(1,15) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (1,16)-(1,17))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── 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..d730fb51cb
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt
@@ -0,0 +1,34 @@
+@ 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:
+ │ @ RescueModifierNode (location: (1,4)-(1,16))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (1,8)-(1,14) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (1,15)-(1,16))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── 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..d6ed787b26
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_command.txt
@@ -0,0 +1,37 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,5)-(1,6) = "."
+ │ ├── name: :c
+ │ ├── message_loc: (1,6)-(1,7) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..a0ada99a9b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_env.txt
@@ -0,0 +1,14 @@
+@ 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
+ │ └── value: 42
+ └── 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..5675730477
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_ivar_env.txt
@@ -0,0 +1,13 @@
+@ 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
+ │ └── value: 42
+ └── 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..bb4b64e88c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt
@@ -0,0 +1,33 @@
+@ 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..c113fef13f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt
@@ -0,0 +1,49 @@
+@ 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))
+ │ ├── flags: contains_splat
+ │ ├── elements: (length: 3)
+ │ │ ├── @ CallNode (location: (1,4)-(1,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── @ SplatNode (location: (1,7)-(1,9))
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (1,8)-(1,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..9c4ca884d2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
@@ -0,0 +1,46 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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..9ebcab3095
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,8))
+ ├── lefts: (length: 0)
+ ├── rest:
+ │ @ SplatNode (location: (1,0)-(1,1))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression: ∅
+ ├── rights: (length: 1)
+ │ └── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..83613c42d1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,11))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ CallTargetNode (location: (1,3)-(1,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,4)-(1,6) = "::"
+ │ ├── name: :c=
+ │ └── message_loc: (1,6)-(1,7) = "c"
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,8)-(1,9) = "="
+ └── value:
+ @ CallNode (location: (1,10)-(1,11))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :d
+ ├── message_loc: (1,10)-(1,11) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..f4c99648f0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_arg_ident.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,10))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ CallTargetNode (location: (1,3)-(1,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ ├── name: :C=
+ │ └── message_loc: (1,5)-(1,6) = "C"
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,7)-(1,8) = "="
+ └── value:
+ @ CallNode (location: (1,9)-(1,10))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :d
+ ├── message_loc: (1,9)-(1,10) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..48e58de076
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt
@@ -0,0 +1,35 @@
+@ 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))
+ ├── lefts: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── rest:
+ │ @ SplatNode (location: (1,3)-(1,5))
+ │ ├── operator_loc: (1,3)-(1,4) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── rights: (length: 1)
+ │ └── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :d
+ ├── message_loc: (1,11)-(1,12) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_colon2.txt b/test/prism/snapshots/seattlerb/masgn_colon2.txt
new file mode 100644
index 0000000000..a0dfe72ffc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_colon2.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,14))
+ ├── lefts: (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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── name: :C
+ │ ├── delimiter_loc: (1,4)-(1,6) = "::"
+ │ └── name_loc: (1,6)-(1,7) = "C"
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,8)-(1,9) = "="
+ └── value:
+ @ ArrayNode (location: (1,10)-(1,14))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (1,13)-(1,14))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── 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..f28ed7ecee
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_colon3.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,15))
+ ├── lefts: (length: 2)
+ │ ├── @ ConstantPathTargetNode (location: (1,0)-(1,3))
+ │ │ ├── parent: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ │ └── name_loc: (1,2)-(1,3) = "A"
+ │ └── @ ConstantPathTargetNode (location: (1,5)-(1,8))
+ │ ├── parent: ∅
+ │ ├── name: :B
+ │ ├── delimiter_loc: (1,5)-(1,7) = "::"
+ │ └── name_loc: (1,7)-(1,8) = "B"
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ ArrayNode (location: (1,11)-(1,15))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,11)-(1,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (1,14)-(1,15))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── 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..687ea38243
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_command_call.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,10))
+ ├── lefts: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── rest:
+ │ @ ImplicitRestNode (location: (1,1)-(1,2))
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,3)-(1,4) = "="
+ └── value:
+ @ CallNode (location: (1,5)-(1,10))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,5)-(1,6))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,6)-(1,7) = "."
+ ├── name: :c
+ ├── message_loc: (1,7)-(1,8) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,9)-(1,10))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,9)-(1,10))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..590df8fa07
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_double_paren.txt
@@ -0,0 +1,35 @@
+@ 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))
+ ├── lefts: (length: 1)
+ │ └── @ MultiTargetNode (location: (1,1)-(1,6))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,2)-(1,3))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: (1,1)-(1,2) = "("
+ │ └── rparen_loc: (1,5)-(1,6) = ")"
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..771dd7c040
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,12))
+ ├── lefts: (length: 0)
+ ├── rest:
+ │ @ SplatNode (location: (1,0)-(1,2))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,3)-(1,4) = "="
+ └── value:
+ @ ArrayNode (location: (1,5)-(1,12))
+ ├── flags: ∅
+ ├── elements: (length: 3)
+ │ ├── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── @ IntegerNode (location: (1,11)-(1,12))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── 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..5d79774d5e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_paren.txt
@@ -0,0 +1,39 @@
+@ 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))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,9)-(1,10))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (1,9)-(1,10) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,10)-(1,11) = "."
+ ├── name: :d
+ ├── message_loc: (1,11)-(1,12) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..b8113b126f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_splat_arg.txt
@@ -0,0 +1,32 @@
+@ 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))
+ ├── lefts: (length: 0)
+ ├── rest:
+ │ @ SplatNode (location: (1,0)-(1,2))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── rights: (length: 1)
+ │ └── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..a832aef1e0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt
@@ -0,0 +1,35 @@
+@ 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))
+ ├── lefts: (length: 0)
+ ├── rest:
+ │ @ SplatNode (location: (1,0)-(1,2))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── rights: (length: 2)
+ │ ├── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :d
+ ├── message_loc: (1,11)-(1,12) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_star.txt b/test/prism/snapshots/seattlerb/masgn_star.txt
new file mode 100644
index 0000000000..3e01eef8a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_star.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,5))
+ ├── lefts: (length: 0)
+ ├── rest:
+ │ @ SplatNode (location: (1,0)-(1,1))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,2)-(1,3) = "="
+ └── value:
+ @ IntegerNode (location: (1,4)-(1,5))
+ ├── flags: decimal
+ └── value: 1
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..37851efd6f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_var_star_var.txt
@@ -0,0 +1,32 @@
+@ 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))
+ ├── lefts: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── rest:
+ │ @ SplatNode (location: (1,3)-(1,4))
+ │ ├── operator_loc: (1,3)-(1,4) = "*"
+ │ └── expression: ∅
+ ├── rights: (length: 1)
+ │ └── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (1,10)-(1,11) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..edef23044a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,15))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ │ ├── name: :C
+ │ │ │ ├── delimiter_loc: (1,4)-(1,6) = "::"
+ │ │ │ └── name_loc: (1,6)-(1,7) = "C"
+ │ │ ├── binary_operator_loc: (1,8)-(1,10) = "*="
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (1,11)-(1,14))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :e
+ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "e"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── binary_operator: :*
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,14)-(1,15) = ")"
+ ├── closing_loc: ∅
+ └── block: ∅
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..1bb8bd0bc1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :f
+ ├── message_loc: (1,2)-(1,3) = "f"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,4)-(1,8))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,4)-(1,8))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (1,5)-(1,7) = "=>"
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ └── block: ∅
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..edf79062cf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :f
+ ├── message_loc: (1,2)-(1,3) = "f"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (1,6)-(1,7) = ")"
+ └── block: ∅
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..600f7f717b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt
@@ -0,0 +1,35 @@
+@ 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))
+ ├── lefts: (length: 3)
+ │ ├── @ 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
+ ├── rest:
+ │ @ SplatNode (location: (1,9)-(1,10))
+ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ └── expression: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,11)-(1,12) = "="
+ └── value:
+ @ CallNode (location: (1,13)-(1,14))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,13)-(1,14) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..f5d3fe5ae9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_back_splat.txt
@@ -0,0 +1,38 @@
+@ 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))
+ ├── lefts: (length: 3)
+ │ ├── @ 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
+ ├── rest:
+ │ @ SplatNode (location: (1,9)-(1,11))
+ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,10)-(1,11))
+ │ ├── name: :s
+ │ └── depth: 0
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,12)-(1,13) = "="
+ └── value:
+ @ CallNode (location: (1,14)-(1,15))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,14)-(1,15) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..d4797031a5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt
@@ -0,0 +1,35 @@
+@ 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))
+ ├── lefts: (length: 0)
+ ├── rest:
+ │ @ SplatNode (location: (1,0)-(1,1))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression: ∅
+ ├── rights: (length: 3)
+ │ ├── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,13)-(1,14) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..47a7b8da7c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_front_splat.txt
@@ -0,0 +1,38 @@
+@ 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))
+ ├── lefts: (length: 0)
+ ├── rest:
+ │ @ SplatNode (location: (1,0)-(1,2))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ ├── name: :s
+ │ └── depth: 0
+ ├── rights: (length: 3)
+ │ ├── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,14)-(1,15) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_keyword.txt b/test/prism/snapshots/seattlerb/mlhs_keyword.txt
new file mode 100644
index 0000000000..6142640b2c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_keyword.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :!=
+ ├── message_loc: (1,2)-(1,4) = "!="
+ ├── opening_loc: (1,4)-(1,5) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,15))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ TrueNode (location: (1,5)-(1,9))
+ │ └── @ TrueNode (location: (1,11)-(1,15))
+ ├── closing_loc: (1,15)-(1,16) = ")"
+ └── block: ∅
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..b6306e1674
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt
@@ -0,0 +1,44 @@
+@ 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))
+ ├── lefts: (length: 3)
+ │ ├── @ 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
+ ├── rest:
+ │ @ SplatNode (location: (1,9)-(1,10))
+ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ └── expression: ∅
+ ├── rights: (length: 3)
+ │ ├── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,22)-(1,23) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..1dae24d911
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt
@@ -0,0 +1,47 @@
+@ 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))
+ ├── lefts: (length: 3)
+ │ ├── @ 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
+ ├── rest:
+ │ @ SplatNode (location: (1,9)-(1,11))
+ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,10)-(1,11))
+ │ ├── name: :s
+ │ └── depth: 0
+ ├── rights: (length: 3)
+ │ ├── @ 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,23)-(1,24) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_rescue.txt b/test/prism/snapshots/seattlerb/mlhs_rescue.txt
new file mode 100644
index 0000000000..bd983cd3f9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_rescue.txt
@@ -0,0 +1,36 @@
+@ 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))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (1,7)-(1,8) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── keyword_loc: (1,9)-(1,15) = "rescue"
+ └── rescue_expression:
+ @ IntegerNode (location: (1,16)-(1,18))
+ ├── flags: decimal
+ └── value: 42
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..ff28a1798b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
@@ -0,0 +1,95 @@
+@ ProgramNode (location: (1,0)-(8,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,12))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(3,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(3,1))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,2)-(3,1))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,2)-(3,1))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,2)-(1,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (5,0)-(6,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (5,0)-(5,1) = "f"
+ │ ├── opening_loc: (5,1)-(5,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(6,1))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (5,2)-(6,1))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,2)-(6,1))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,2)-(5,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ └── @ CallNode (location: (8,0)-(8,12))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (8,0)-(8,1) = "f"
+ ├── opening_loc: (8,1)-(8,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (8,2)-(8,11))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (8,2)-(8,11))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (8,2)-(8,11))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (8,2)-(8,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
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..cbf4ec4a08
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (3,0)-(3,1))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ └── value: 1
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..e82f250098
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── flags: ∅
+ │ ├── 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
+ └── value: 1
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..54aa06214f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_command_call.txt
@@ -0,0 +1,37 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,7)-(1,8) = "."
+ │ ├── name: :c
+ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..324c042b00
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOrWriteNode (location: (1,0)-(1,11))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "B"
+ ├── read_name: :B
+ ├── write_name: :B=
+ ├── operator_loc: (1,4)-(1,7) = "||="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..ddee4cde49
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ IndexOrWriteNode (location: (1,0)-(1,16))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ SymbolNode (location: (1,2)-(1,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (1,2)-(1,3) = ":"
+ │ ├── value_loc: (1,3)-(1,4) = "b"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "b"
+ ├── closing_loc: (1,4)-(1,5) = "]"
+ ├── block: ∅
+ ├── operator_loc: (1,6)-(1,9) = "||="
+ └── value:
+ @ CallNode (location: (1,10)-(1,16))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (1,10)-(1,11) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,12)-(1,16))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,12)-(1,13))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (1,15)-(1,16))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: ∅
+ └── block: ∅
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..523ccde455
--- /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
+ │ ├── name: :B
+ │ ├── delimiter_loc: (1,1)-(1,3) = "::"
+ │ └── name_loc: (1,3)-(1,4) = "B"
+ ├── binary_operator_loc: (1,5)-(1,7) = "*="
+ ├── value:
+ │ @ CallNode (location: (1,8)-(1,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,10)-(1,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (1,10)-(1,11) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── binary_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..b9d00edc30
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── read_name: :b
+ ├── write_name: :b=
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (1,5)-(1,7) = "+="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,9))
+ ├── flags: decimal
+ └── value: 1
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..c12ea3983c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,11))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── read_name: :b
+ ├── write_name: :b=
+ ├── binary_operator: :*
+ ├── binary_operator_loc: (1,5)-(1,7) = "*="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,10)-(1,11))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :d
+ │ ├── message_loc: (1,10)-(1,11) = "d"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..b3b5709193
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOrWriteNode (location: (1,0)-(1,11))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── read_name: :b
+ ├── write_name: :b=
+ ├── operator_loc: (1,4)-(1,7) = "||="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..763bd24efd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt
@@ -0,0 +1,62 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,7)-(1,15))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── name: :nil?
+ │ │ ├── message_loc: (1,11)-(1,15) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,3)-(1,6) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (1,16)-(1,20) = "then"
+ ├── 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..763bd24efd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt
@@ -0,0 +1,62 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,7)-(1,15))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── name: :nil?
+ │ │ ├── message_loc: (1,11)-(1,15) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,3)-(1,6) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (1,16)-(1,20) = "then"
+ ├── 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..623c08d50e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_block.txt
@@ -0,0 +1,30 @@
+@ 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
+ │ │ └── value: 42
+ │ └── operator_loc: (1,2)-(1,3) = "="
+ └── @ CallNode (location: (2,0)-(2,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (2,0)-(2,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (2,2)-(2,3))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ └── block: ∅
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..8495527cf4
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (2,0)-(2,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (3,0)-(3,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..f531a73a58
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (4,0)-(4,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (5,0)-(5,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (7,0)-(7,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (7,0)-(7,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..d4e962b355
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (2,0)-(2,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (4,0)-(4,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (4,0)-(4,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..a08f5419f1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4))
+ │ └── name: :@b
+ ├── closing_loc: ∅
+ └── block: ∅
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..dd58d92d3a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,1))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4))
+ │ └── name: :@b
+ ├── closing_loc: (2,0)-(2,1) = ")"
+ └── block: ∅
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..8a0fcd63af
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :x
+ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (2,4)-(2,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,6)-(2,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
+ │ │ ├── name: :y
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,2)-(1,4) = "do"
+ └── closing_loc: (3,0)-(3,3) = "end"
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..84eef70b25
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
@@ -0,0 +1,67 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── message_loc: (2,2)-(2,3) = "p"
+ │ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (2,4)-(2,5))
+ │ │ │ ├── name: :y
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: (2,5)-(2,6) = ")"
+ │ │ └── block: ∅
+ │ ├── @ LocalVariableOperatorWriteNode (location: (3,2)-(3,8))
+ │ │ ├── name_loc: (3,2)-(3,3) = "y"
+ │ │ ├── binary_operator_loc: (3,4)-(3,6) = "*="
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,7)-(3,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── name: :y
+ │ │ ├── binary_operator: :*
+ │ │ └── depth: 0
+ │ └── @ ReturnNode (location: (4,2)-(4,10))
+ │ ├── flags: redundant
+ │ ├── keyword_loc: (4,2)-(4,8) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (4,9)-(4,10))
+ │ ├── flags: ∅
+ │ └── 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..8445743293
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt
@@ -0,0 +1,29 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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..9ccf5bdc99
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot2.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(2,1))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ ├── right:
+ │ │ @ IntegerNode (location: (2,0)-(2,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 4
+ │ └── operator_loc: (1,1)-(1,3) = ".."
+ ├── @ RangeNode (location: (3,0)-(4,1))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (4,0)-(4,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (4,0)-(4,1) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (3,1)-(3,3) = ".."
+ └── @ CallNode (location: (5,0)-(5,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (5,0)-(5,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..f85fdd6d4b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,3))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ ├── right: ∅
+ │ └── operator_loc: (1,1)-(1,3) = ".."
+ ├── @ RangeNode (location: (2,2)-(2,5))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ CallNode (location: (2,2)-(2,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right: ∅
+ │ └── operator_loc: (2,3)-(2,5) = ".."
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..6364c1f136
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot3.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(2,1))
+ │ ├── flags: exclude_end
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ ├── right:
+ │ │ @ IntegerNode (location: (2,0)-(2,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 4
+ │ └── operator_loc: (1,1)-(1,4) = "..."
+ ├── @ RangeNode (location: (3,0)-(4,1))
+ │ ├── flags: exclude_end
+ │ ├── left:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (4,0)-(4,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (4,0)-(4,1) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (3,1)-(3,4) = "..."
+ └── @ CallNode (location: (5,0)-(5,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (5,0)-(5,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..35759d12e3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,4))
+ │ ├── flags: exclude_end
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ ├── right: ∅
+ │ └── operator_loc: (1,1)-(1,4) = "..."
+ ├── @ RangeNode (location: (2,2)-(2,6))
+ │ ├── flags: exclude_end
+ │ ├── left:
+ │ │ @ CallNode (location: (2,2)-(2,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right: ∅
+ │ └── operator_loc: (2,3)-(2,6) = "..."
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :c
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..aada5a9477
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ InterpolatedStringNode (location: (1,0)-(2,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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..7ef56acb76
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(4,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,4))
+ └── body: (length: 2)
+ ├── @ InterpolatedStringNode (location: (1,0)-(3,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (1,1)-(2,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (1,1)-(2,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..82f461e340
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(2,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,6))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(2,6))
+ ├── flags: ∅
+ ├── opening_loc: ∅
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (1,0)-(1,3))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ │ ├── content_loc: (1,1)-(1,2) = "a"
+ │ │ ├── closing_loc: (1,2)-(1,3) = "\""
+ │ │ └── unescaped: "a"
+ │ └── @ InterpolatedStringNode (location: (2,0)-(2,6))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (2,3)-(2,4) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (2,4)-(2,5) = "}"
+ │ └── closing_loc: (2,5)-(2,6) = "\""
+ └── closing_loc: ∅
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..0f95a607aa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_hash_lit.txt
@@ -0,0 +1,22 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── 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..ba00f01504
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt
@@ -0,0 +1,43 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ StringNode (location: (1,15)-(1,25))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,15)-(1,25) = "<<-HEREDOC"
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " very long string\n"
+ │ │ │ ├── closing_loc: (3,0)-(4,0) = " HEREDOC\n"
+ │ │ │ └── unescaped: " very long string\n"
+ │ │ ├── call_operator_loc: (1,25)-(1,26) = "."
+ │ │ ├── name: :strip
+ │ │ ├── message_loc: (1,26)-(1,31) = "strip"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (1,13)-(1,14) = "="
+ └── @ CallNode (location: (4,6)-(4,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :puts
+ ├── message_loc: (4,6)-(4,10) = "puts"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (4,11)-(4,17))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (4,11)-(4,17))
+ │ ├── name: :string
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ └── block: ∅
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..b251b2b344
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,4) = "<<-A"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(3,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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (3,3)-(3,4) = "}"
+ │ └── @ StringNode (location: (3,4)-(4,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (3,4)-(4,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (4,0)-(5,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..ad0f0dfd99
--- /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)-(3,0) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\n"
+ │ ├── closing_loc: (3,0)-(4,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..fdac30fab7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt
@@ -0,0 +1,33 @@
+@ 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)-(3,0) = " very long string\n"
+ │ │ ├── closing_loc: (3,0)-(4,0) = " ^D\n"
+ │ │ └── unescaped: " very long string\n"
+ │ └── operator_loc: (1,13)-(1,14) = "="
+ └── @ CallNode (location: (4,6)-(4,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :puts
+ ├── message_loc: (4,6)-(4,10) = "puts"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (4,11)-(4,17))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (4,11)-(4,17))
+ │ ├── name: :string
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ └── block: ∅
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..8d9dbf24ab
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt
@@ -0,0 +1,74 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :x
+ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (2,4)-(2,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,6)-(2,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
+ │ │ ├── name: :y
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,4)-(1,6) = "do"
+ └── closing_loc: (3,0)-(3,3) = "end"
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..663d870137
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
@@ -0,0 +1,74 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :x
+ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (2,4)-(2,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,6)-(2,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
+ │ │ ├── name: :y
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (1,5)-(1,7) = "do"
+ └── closing_loc: (3,0)-(3,3) = "end"
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..8d4578eaec
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_multiline_str.txt
@@ -0,0 +1,14 @@
+@ 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
+ └── value: 1
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..49d31f5b1b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt
@@ -0,0 +1,14 @@
+@ 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
+ └── value: 1
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..d113f2af9d
--- /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"
+ │ ├── binary_operator_loc: (1,10)-(1,12) = "+="
+ │ ├── value:
+ │ │ @ CallNode (location: (2,8)-(2,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (2,8)-(2,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── name: :foo
+ │ ├── binary_operator: :+
+ │ └── depth: 0
+ └── @ CallNode (location: (3,6)-(3,9))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :baz
+ ├── message_loc: (3,6)-(3,9) = "baz"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..68b5f02fe0
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..65ea22cf7d
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..cb20d5403b
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (4,2)-(4,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (6,2)-(6,3) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..719a4da5da
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_return.txt
@@ -0,0 +1,40 @@
+@ 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))
+ │ ├── then_keyword_loc: (2,16)-(2,20) = "then"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,10)-(3,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (3,10)-(3,19))
+ │ │ ├── flags: redundant
+ │ │ ├── keyword_loc: (3,10)-(3,16) = "return"
+ │ │ └── arguments:
+ │ │ @ ArgumentsNode (location: (3,17)-(3,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,17)-(3,19))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ ├── 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..4a675d67c4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,12))
+ │ ├── flags: ∅
+ │ └── 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: ∅
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..0485b0d2e3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_to_ary.txt
@@ -0,0 +1,39 @@
+@ 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))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (2,0)-(2,1))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (2,2)-(2,3) = "="
+ │ └── value:
+ │ @ CallNode (location: (2,4)-(2,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :c
+ │ ├── message_loc: (2,4)-(2,5) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :d
+ ├── message_loc: (3,0)-(3,1) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..5cd7702847
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (2,0)-(2,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (2,0)-(2,1) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..dc11e2ca3d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,1)-(1,8) = "[2=>3,]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,6))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,6))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── operator_loc: (1,3)-(1,5) = "=>"
+ ├── closing_loc: (1,7)-(1,8) = "]"
+ └── block: ∅
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..d1d3d9335f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,1)-(1,5) = "[2,]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,2)-(1,3))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: (1,4)-(1,5) = "]"
+ └── block: ∅
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..9e2500fbde
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_019.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 0
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,6))
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (2,3)-(2,8))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (2,3)-(2,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: -1
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (2,7)-(2,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (2,5)-(2,7) = ".."
+ │ ├── 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..951a5100b6
--- /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)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,8))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :obj
+ │ ├── message_loc: (1,5)-(1,8) = "obj"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..6c366e559f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_051.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,5)-(1,14))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 0
+ │ │ ├── @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── 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
+ │ │ │ │ └── value: 0
+ │ │ │ └── @ IntegerNode (location: (2,7)-(2,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ ImplicitRestNode (location: (2,8)-(2,9))
+ │ │ ├── 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..8a4f8f8a68
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_058.txt
@@ -0,0 +1,73 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:a, :rest]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 0
+ │ │ └── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,4)-(2,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (2,4)-(2,5))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,4)-(2,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest:
+ │ │ │ @ AssocSplatNode (location: (2,8)-(2,14))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,14))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..3507d0f2cf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
@@ -0,0 +1,67 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 0
+ │ │ └── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,4)-(2,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (2,4)-(2,5))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,4)-(2,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest:
+ │ │ │ @ AssocSplatNode (location: (2,8)-(2,10))
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..09ac7653c6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_069.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,10)-(2,14))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,10)-(2,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ ├── 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..60e71cd6fe
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_076.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,4)-(2,8))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest:
+ │ │ │ @ NoKeywordsParameterNode (location: (2,10)-(2,15))
+ │ │ │ ├── operator_loc: (2,10)-(2,12) = "**"
+ │ │ │ └── keyword_loc: (2,12)-(2,15) = "nil"
+ │ │ ├── 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..7d5ef19a05
--- /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))
+ ├── flags: ∅
+ ├── keyword_loc: (1,0)-(1,5) = "until"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── name: :nil?
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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"
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..7d5ef19a05
--- /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))
+ ├── flags: ∅
+ ├── keyword_loc: (1,0)-(1,5) = "until"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── name: :nil?
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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"
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..91eb88a70f
--- /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))
+ ├── flags: ∅
+ ├── keyword_loc: (1,0)-(1,5) = "while"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── name: :nil?
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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"
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..91eb88a70f
--- /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))
+ ├── flags: ∅
+ ├── keyword_loc: (1,0)-(1,5) = "while"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── name: :nil?
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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"
diff --git a/test/prism/snapshots/seattlerb/pctW_lineno.txt b/test/prism/snapshots/seattlerb/pctW_lineno.txt
new file mode 100644
index 0000000000..58efa9c59a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pctW_lineno.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(5,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(5,11))
+ ├── flags: ∅
+ ├── 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: "e\nf"
+ │ ├── @ 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..c8a990c672
--- /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)-(2,0) = " \\\n"
+ ├── closing_loc: (2,0)-(2,1) = "}"
+ └── unescaped: " "
diff --git a/test/prism/snapshots/seattlerb/pct_nl.txt b/test/prism/snapshots/seattlerb/pct_nl.txt
new file mode 100644
index 0000000000..1009fcb51d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pct_nl.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(3,0))
+├── locals: [:x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,0))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(3,0))
+ ├── name: :x
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "x"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(3,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(2,0) = "%\n"
+ │ ├── content_loc: (2,0)-(2,0) = ""
+ │ ├── closing_loc: (2,0)-(3,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..1b8ec69b56
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(4,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(4,11))
+ ├── flags: ∅
+ ├── 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))
+ │ │ ├── flags: mutable
+ │ │ ├── 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: frozen
+ │ │ │ │ ├── opening_loc: (1,8)-(1,11) = "<<A"
+ │ │ │ │ ├── content_loc: (2,0)-(3,0) = "2\n"
+ │ │ │ │ ├── closing_loc: (3,0)-(4,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..71fb4fbed5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pipe_semicolon.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :b
+ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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"
diff --git a/test/prism/snapshots/seattlerb/pipe_space.txt b/test/prism/snapshots/seattlerb/pipe_space.txt
new file mode 100644
index 0000000000..302d225337
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── name: :b
+ ├── 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"
diff --git a/test/prism/snapshots/seattlerb/qWords_space.txt b/test/prism/snapshots/seattlerb/qWords_space.txt
new file mode 100644
index 0000000000..95ae6d4075
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qWords_space.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── 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..8ba68638c5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── @ SymbolNode (location: (1,5)-(1,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,5)-(1,6) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── @ SymbolNode (location: (1,7)-(1,8))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..54aa3f77d7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols_empty.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── 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..624b922ce6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── 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..97bc6754ff
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols_interp.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,15))
+ ├── flags: ∅
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: frozen
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :+
+ │ │ │ │ ├── message_loc: (1,9)-(1,10) = "+"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (1,11)-(1,12) = "}"
+ │ │ └── closing_loc: ∅
+ │ └── @ SymbolNode (location: (1,13)-(1,14))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..bbc19d50ef
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :puts
+ ├── message_loc: (1,0)-(1,4) = "puts"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,12))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,5)-(1,12))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,5)-(1,12))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,5)-(1,9))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: ∅
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..96e6af51a4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/quoted_symbol_keys.txt
@@ -0,0 +1,25 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..d92c1da7a6
--- /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..e935b7eb68
--- /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..f9915c97c9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qwords_empty.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── 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..3ea5604b69
--- /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: forced_utf8_encoding
+ ├── 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..1eba1396fd
--- /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: forced_utf8_encoding
+ ├── 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..06cf99264e
--- /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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (1,0)-(1,1) = "/"
+ │ ├── content_loc: (1,1)-(1,4) = "wtf"
+ │ ├── closing_loc: (1,4)-(1,5) = "/"
+ │ └── unescaped: "wtf"
+ ├── @ RegularExpressionNode (location: (3,0)-(3,6))
+ │ ├── flags: multi_line, forced_us_ascii_encoding
+ │ ├── opening_loc: (3,0)-(3,1) = "/"
+ │ ├── content_loc: (3,1)-(3,4) = "wtf"
+ │ ├── closing_loc: (3,4)-(3,6) = "/m"
+ │ └── unescaped: "wtf"
+ ├── @ RegularExpressionNode (location: (5,0)-(5,6))
+ │ ├── flags: ascii_8bit, forced_us_ascii_encoding
+ │ ├── opening_loc: (5,0)-(5,1) = "/"
+ │ ├── content_loc: (5,1)-(5,4) = "wtf"
+ │ ├── closing_loc: (5,4)-(5,6) = "/n"
+ │ └── unescaped: "wtf"
+ ├── @ RegularExpressionNode (location: (7,0)-(7,7))
+ │ ├── flags: multi_line, ascii_8bit, forced_us_ascii_encoding
+ │ ├── opening_loc: (7,0)-(7,1) = "/"
+ │ ├── content_loc: (7,1)-(7,4) = "wtf"
+ │ ├── closing_loc: (7,4)-(7,7) = "/nm"
+ │ └── unescaped: "wtf"
+ └── @ RegularExpressionNode (location: (9,0)-(9,13))
+ ├── flags: multi_line, ascii_8bit, forced_us_ascii_encoding
+ ├── opening_loc: (9,0)-(9,1) = "/"
+ ├── content_loc: (9,1)-(9,4) = "wtf"
+ ├── closing_loc: (9,4)-(9,13) = "/nmnmnmnm"
+ └── unescaped: "wtf"
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..4dbedc44ca
--- /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))
+ ├── flags: forced_us_ascii_encoding
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,6) = "\\cC\\d"
+ ├── closing_loc: (1,6)-(1,7) = "/"
+ └── unescaped: "\\x03\\d"
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..bca451eb3b
--- /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))
+ ├── flags: forced_us_ascii_encoding
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,16) = "[\\u0021-\\u0027]"
+ ├── closing_loc: (1,16)-(1,17) = "/"
+ └── unescaped: "[\\u0021-\\u0027]"
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..6568d2bd92
--- /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))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,5) = "\\“"
+ ├── closing_loc: (1,5)-(1,6) = "/"
+ └── unescaped: "“"
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..487161b4d0
--- /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))
+ │ ├── flags: forced_utf8_encoding
+ │ ├── opening_loc: (1,0)-(1,1) = "/"
+ │ ├── content_loc: (1,1)-(1,14) = "\\u{c0de babe}"
+ │ ├── closing_loc: (1,14)-(1,15) = "/"
+ │ └── unescaped: "\\u{c0de babe}"
+ └── @ RegularExpressionNode (location: (3,0)-(3,8))
+ ├── flags: forced_utf8_encoding
+ ├── opening_loc: (3,0)-(3,1) = "/"
+ ├── content_loc: (3,1)-(3,7) = "\\u{df}"
+ ├── closing_loc: (3,7)-(3,8) = "/"
+ └── unescaped: "\\u{df}"
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..54595ac5cb
--- /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)
+ │ │ ├── @ RequiredKeywordParameterNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ └── name_loc: (1,6)-(1,8) = "a:"
+ │ │ └── @ RequiredKeywordParameterNode (location: (1,10)-(1,12))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :b
+ │ │ └── name_loc: (1,10)-(1,12) = "b:"
+ │ ├── 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..21f8bb08a5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(5,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(5,8))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(5,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :proc
+ │ ├── message_loc: (1,0)-(1,4) = "proc"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (1,5)-(5,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (1,5)-(5,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,2)-(2,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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"
+ ├── call_operator_loc: (5,3)-(5,4) = "."
+ ├── name: :call
+ ├── message_loc: (5,4)-(5,8) = "call"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..aa4e85c171
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
@@ -0,0 +1,75 @@
+@ ProgramNode (location: (1,0)-(9,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(9,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :tap
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (1,4)-(9,3))
+ ├── locals: []
+ ├── parameters: ∅
+ ├── body:
+ │ @ BeginNode (location: (1,4)-(9,3))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (2,2)-(2,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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"
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..06f67fae69
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(5,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(5,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :tap
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (1,4)-(5,3))
+ ├── locals: []
+ ├── parameters: ∅
+ ├── body:
+ │ @ BeginNode (location: (1,4)-(5,3))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (2,2)-(2,7) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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"
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..b4576c3bb2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
@@ -0,0 +1,79 @@
+@ ProgramNode (location: (1,0)-(9,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(9,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :tap
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (1,4)-(9,3))
+ ├── locals: []
+ ├── parameters: ∅
+ ├── body:
+ │ @ BeginNode (location: (1,4)-(9,3))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (2,2)-(2,7) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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"
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..daac2b6776
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :blah
+ ├── message_loc: (1,0)-(1,4) = "blah"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (1,5)-(4,3))
+ ├── locals: []
+ ├── parameters: ∅
+ ├── body:
+ │ @ BeginNode (location: (1,5)-(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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :stuff
+ │ │ │ ├── message_loc: (3,2)-(3,7) = "stuff"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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"
diff --git a/test/prism/snapshots/seattlerb/rescue_parens.txt b/test/prism/snapshots/seattlerb/rescue_parens.txt
new file mode 100644
index 0000000000..d086095e7a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_parens.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,14))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (1,5)-(1,11) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ CallNode (location: (1,12)-(1,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (1,12)-(1,13) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,13)-(1,14) = ")"
+ ├── closing_loc: ∅
+ └── block: ∅
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..8948f7879b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/return_call_assocs.txt
@@ -0,0 +1,218 @@
+@ ProgramNode (location: (1,0)-(11,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,14))
+ └── body: (length: 6)
+ ├── @ ReturnNode (location: (1,0)-(1,17))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (1,0)-(1,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,17))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ KeywordHashNode (location: (1,10)-(1,17))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,10)-(1,17))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── operator_loc: (1,13)-(1,15) = "=>"
+ ├── @ ReturnNode (location: (3,0)-(3,26))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (3,0)-(3,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (3,7)-(3,26))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (3,7)-(3,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ KeywordHashNode (location: (3,10)-(3,26))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 2)
+ │ ├── @ AssocNode (location: (3,10)-(3,17))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,10)-(3,12))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (3,13)-(3,15) = "=>"
+ │ └── @ AssocNode (location: (3,19)-(3,26))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,19)-(3,21))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 2
+ │ └── operator_loc: (3,22)-(3,24) = "=>"
+ ├── @ ReturnNode (location: (5,0)-(5,14))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (5,0)-(5,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (5,7)-(5,14))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (5,7)-(5,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :y
+ │ ├── message_loc: (5,7)-(5,8) = "y"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,9)-(5,14))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (5,9)-(5,14))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,9)-(5,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,9)-(5,11))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (5,11)-(5,13) = "=>"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ReturnNode (location: (7,0)-(7,12))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (7,0)-(7,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (7,7)-(7,12))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (7,7)-(7,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :y
+ │ ├── message_loc: (7,7)-(7,8) = "y"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,9)-(7,12))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (7,9)-(7,12))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (7,9)-(7,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (7,9)-(7,11))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ReturnNode (location: (9,0)-(9,13))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (9,7)-(9,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (9,7)-(9,13))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :y
+ │ ├── message_loc: (9,7)-(9,8) = "y"
+ │ ├── opening_loc: (9,8)-(9,9) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (9,9)-(9,12))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (9,9)-(9,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,9)-(9,11))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (9,12)-(9,13) = ")"
+ │ └── block: ∅
+ └── @ ReturnNode (location: (11,0)-(11,14))
+ ├── flags: ∅
+ ├── keyword_loc: (11,0)-(11,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (11,7)-(11,14))
+ ├── flags: ∅
+ └── arguments: (length: 1)
+ └── @ CallNode (location: (11,7)-(11,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :y
+ ├── message_loc: (11,7)-(11,8) = "y"
+ ├── opening_loc: (11,8)-(11,9) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,9)-(11,13))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (11,9)-(11,13))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (11,9)-(11,13))
+ │ ├── key:
+ │ │ @ CallNode (location: (11,9)-(11,10))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :z
+ │ │ ├── message_loc: (11,9)-(11,10) = "z"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── value:
+ │ │ @ IntegerNode (location: (11,12)-(11,13))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (11,10)-(11,12) = "=>"
+ ├── closing_loc: (11,13)-(11,14) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/rhs_asgn.txt b/test/prism/snapshots/seattlerb/rhs_asgn.txt
new file mode 100644
index 0000000000..9ee187218b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rhs_asgn.txt
@@ -0,0 +1,15 @@
+@ 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
+ │ └── value: 42
+ ├── 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..34a3452d1b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/ruby21_numbers.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,13))
+ ├── flags: ∅
+ ├── elements: (length: 3)
+ │ ├── @ ImaginaryNode (location: (1,1)-(1,3))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── @ RationalNode (location: (1,5)-(1,7))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── @ ImaginaryNode (location: (1,9)-(1,12))
+ │ └── numeric:
+ │ @ RationalNode (location: (1,9)-(1,11))
+ │ └── numeric:
+ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── 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..3cec95ae7c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_attrasgn.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── flags: safe_navigation, attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :b=
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..baea063186
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── flags: safe_navigation, attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :B=
+ ├── message_loc: (1,3)-(1,4) = "B"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_call.txt b/test/prism/snapshots/seattlerb/safe_call.txt
new file mode 100644
index 0000000000..7b402d9ef2
--- /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))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :b
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..0a69cbc9e5
--- /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))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (2,0)-(2,2) = "&."
+ ├── name: :b
+ ├── message_loc: (2,2)-(2,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..1d6ba9e49e
--- /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))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :call
+ ├── message_loc: ∅
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,4)-(1,5) = ")"
+ └── block: ∅
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..7b402d9ef2
--- /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))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :b
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..d1f9b1ea9e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_call_operator.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :>
+ ├── message_loc: (1,3)-(1,4) = ">"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..34790ebb33
--- /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))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,5)-(1,7) = "&."
+ │ ├── name: :b
+ │ ├── message_loc: (1,7)-(1,8) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..54e591d9c0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_calls.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,4))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ │ ├── name: :b
+ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,4)-(1,6) = "&."
+ ├── name: :c
+ ├── message_loc: (1,6)-(1,7) = "c"
+ ├── opening_loc: (1,7)-(1,8) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ └── block: ∅
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..ebcedd6b5e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_op_asgn.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,11))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── read_name: :b
+ ├── write_name: :b=
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (1,5)-(1,7) = "+="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (1,8)-(1,9) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..bdb0e06156
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_op_asgn2.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallOrWriteNode (location: (1,0)-(2,1))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── read_name: :b
+ ├── write_name: :b=
+ ├── operator_loc: (1,5)-(1,8) = "||="
+ └── value:
+ @ CallNode (location: (2,0)-(2,1))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (2,0)-(2,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..f9be33ffdd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(6,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,5))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(4,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :puts
+ │ ├── message_loc: (1,0)-(1,4) = "puts"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(4,8))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ └── @ CallNode (location: (6,0)-(6,5))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (6,0)-(6,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :+
+ ├── message_loc: (6,2)-(6,3) = "+"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (6,4)-(6,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (6,4)-(6,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (6,4)-(6,5) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..e665565d38
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
@@ -0,0 +1,28 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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..0b0000ef33
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
@@ -0,0 +1,50 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,6)-(1,7) = "c"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,11)-(1,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── name_loc: (1,12)-(1,13) = "d"
+ │ │ │ └── operator_loc: (1,11)-(1,12) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :e
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,18)-(1,20))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..e51c7d97ed
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(4,3))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (2,1)-(2,2) = "."
+ │ ├── name: :b
+ │ ├── 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"
+ ├── closing_loc: ∅
+ └── block: ∅
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..d7a268a5d5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(4,3))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ ├── opening_loc: (2,1)-(2,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,2)-(2,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (2,2)-(2,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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"
+ ├── closing_loc: ∅
+ └── block: ∅
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..7addbb8b28
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_block_kw.txt
@@ -0,0 +1,33 @@
+@ 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,4)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :k
+ │ │ │ ├── name_loc: (1,4)-(1,6) = "k:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── 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..b5040d91db
--- /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)
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,4)-(1,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :k
+ │ │ │ └── name_loc: (1,4)-(1,6) = "k:"
+ │ │ ├── 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..898f823f24
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 1)
+ │ │ └── @ BlockLocalVariableNode (location: (1,6)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── 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..ec41a89c38
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_backslashes.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,204))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,204))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,204))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :x
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,204))
+ │ ├── flags: ∅
+ │ └── 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: ∅
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..620b43f631
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ └── @ CallNode (location: (1,8)-(1,9))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (1,8)-(1,9) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..2aee91b75c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ └── @ CallNode (location: (1,7)-(1,8))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..eb249cde8a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_double_newline.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ ├── content_loc: (1,3)-(2,0) = "\n"
+ │ │ ├── closing_loc: (2,0)-(2,1) = "\""
+ │ │ └── unescaped: "\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (2,2)-(2,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (2,2)-(2,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_evstr.txt b/test/prism/snapshots/seattlerb/str_evstr.txt
new file mode 100644
index 0000000000..7010ad0a68
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_evstr.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))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..3867574c7c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_evstr_escape.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,16))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ └── @ StringNode (location: (1,7)-(1,15))
+ │ ├── flags: forced_utf8_encoding, frozen
+ │ ├── 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..bb7bbba259
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :x
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (2,3)-(2,4) = "}"
+ │ └── @ StringNode (location: (2,4)-(4,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,4)-(4,0) = "\nblah2\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\nblah2\n"
+ └── closing_loc: (4,0)-(5,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..5a2f435e0e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt
@@ -0,0 +1,105 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,23))
+ ├── flags: ∅
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ │ │ ├── name: :b?
+ │ │ │ ├── message_loc: (1,5)-(1,7) = "b?"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: (1,8)-(1,9) = "?"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,10)-(1,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,10)-(1,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (1,10)-(1,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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: ∅
+ │ │ │ │ ├── name: :+
+ │ │ │ │ ├── message_loc: (1,12)-(1,13) = "+"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "a"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (1,14)-(1,15) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,15)-(1,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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: ∅
+ │ │ ├── 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..0066f66e84
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(2,66))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,66))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(2,66))
+ ├── flags: ∅
+ ├── opening_loc: ∅
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (1,0)-(1,62))
+ │ │ ├── flags: forced_utf8_encoding, frozen
+ │ │ ├── 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"
+ │ └── @ StringNode (location: (2,8)-(2,66))
+ │ ├── flags: forced_utf8_encoding, frozen
+ │ ├── 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"
+ └── closing_loc: ∅
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..d55d965068
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt
@@ -0,0 +1,14 @@
+@ 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
+ └── value: 1
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..1db0e76270
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,26))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,3) = "%Q["
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,3)-(1,11))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :nest
+ │ │ │ ├── message_loc: (1,13)-(1,17) = "nest"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,17)-(1,18) = "}"
+ │ └── @ StringNode (location: (1,18)-(1,25))
+ │ ├── flags: frozen
+ │ ├── 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..22c3031832
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_pct_nested_nested.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,20))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,2) = "%{"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,2)-(1,5))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── 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: frozen
+ │ ├── 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..8fa8886029
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ └── @ CallNode (location: (1,8)-(1,9))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (1,8)-(1,9) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..c840c7688b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ └── @ CallNode (location: (1,7)-(1,8))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..15b0f2ff72
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_single_newline.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "'"
+ │ │ ├── content_loc: (1,3)-(2,0) = "\n"
+ │ │ ├── closing_loc: (2,0)-(2,1) = "'"
+ │ │ └── unescaped: "\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (2,2)-(2,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :b
+ ├── message_loc: (2,2)-(2,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_str.txt b/test/prism/snapshots/seattlerb/str_str.txt
new file mode 100644
index 0000000000..97031c8a65
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_str.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,10))
+ ├── flags: mutable
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: frozen
+ │ │ ├── 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: frozen
+ │ │ ├── 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..b592d380ef
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_str_str.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,12))
+ ├── flags: mutable
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: frozen
+ │ │ ├── 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: frozen
+ │ │ │ ├── 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: frozen
+ │ ├── 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..61b5f0b631
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/super_arg.txt
@@ -0,0 +1,17 @@
+@ 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 42
+ ├── 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..e95543e925
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbol_empty.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ SymbolNode (location: (1,0)-(1,3))
+ ├── flags: forced_us_ascii_encoding
+ ├── 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..6750160d50
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbol_list.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,13))
+ ├── flags: ∅
+ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,10)-(1,11) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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..30cf57c528
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── @ SymbolNode (location: (1,5)-(1,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,5)-(1,6) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── @ SymbolNode (location: (1,7)-(1,8))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..dc743e2be5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols_empty.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── 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..ea7ada9446
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols_empty_space.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── 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..2ad3cc502d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols_interp.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,15))
+ ├── flags: ∅
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── @ SymbolNode (location: (1,5)-(1,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,5)-(1,12) = "b\#{1+1}"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\#{1+1}"
+ │ └── @ SymbolNode (location: (1,13)-(1,14))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..4dd2ac44a6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/thingy.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(3,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,7))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :f
+ │ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── name: :call
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,3)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,3)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ ├── closing_loc: (1,5)-(1,6) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,7))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (3,0)-(3,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (3,1)-(3,3) = "::"
+ ├── name: :call
+ ├── message_loc: ∅
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (3,4)-(3,6))
+ │ ├── flags: decimal
+ │ └── value: 42
+ ├── closing_loc: (3,6)-(3,7) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/uminus_float.txt b/test/prism/snapshots/seattlerb/uminus_float.txt
new file mode 100644
index 0000000000..0578dbbd68
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/uminus_float.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ FloatNode (location: (1,0)-(1,4))
+ └── value: -0.0
diff --git a/test/prism/snapshots/seattlerb/unary_minus.txt b/test/prism/snapshots/seattlerb/unary_minus.txt
new file mode 100644
index 0000000000..79889bffb0
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,2))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,1)-(1,2) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :-@
+ ├── message_loc: (1,0)-(1,1) = "-"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/unary_plus.txt b/test/prism/snapshots/seattlerb/unary_plus.txt
new file mode 100644
index 0000000000..b570cbf73b
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,2))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,1)-(1,2) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :+@
+ ├── message_loc: (1,0)-(1,1) = "+"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..4deb857536
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,3))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ SymbolNode (location: (1,1)-(1,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (1,1)-(1,2) = ":"
+ │ ├── value_loc: (1,2)-(1,3) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── call_operator_loc: ∅
+ ├── name: :+@
+ ├── message_loc: (1,0)-(1,1) = "+"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/unary_tilde.txt b/test/prism/snapshots/seattlerb/unary_tilde.txt
new file mode 100644
index 0000000000..5fd1a5d00e
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,2))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,1)-(1,2) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :~
+ ├── message_loc: (1,0)-(1,1) = "~"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/utf8_bom.txt b/test/prism/snapshots/seattlerb/utf8_bom.txt
new file mode 100644
index 0000000000..9f0eb83b05
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/utf8_bom.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (2,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (2,0)-(2,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (2,0)-(2,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (2,0)-(2,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (2,2)-(2,3))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (2,2)-(2,3))
+ │ ├── flags: decimal
+ │ └── value: 0
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/when_splat.txt b/test/prism/snapshots/seattlerb/when_splat.txt
new file mode 100644
index 0000000000..19e70019c0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/when_splat.txt
@@ -0,0 +1,39 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,5)-(1,6) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,8)-(1,20))
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,14)-(1,15) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,16)-(1,20) = "then"
+ │ └── 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..1175a6f476
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/words_interp.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── elements: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,3)-(1,8))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ │ └── @ StringNode (location: (1,7)-(1,8))
+ │ │ ├── flags: frozen
+ │ │ ├── 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..22e0c14f83
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/yield_arg.txt
@@ -0,0 +1,16 @@
+@ 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 42
+ └── 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..c04273f5aa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/yield_call_assocs.txt
@@ -0,0 +1,224 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ KeywordHashNode (location: (1,9)-(1,16))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,9)-(1,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (3,6)-(3,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ KeywordHashNode (location: (3,9)-(3,25))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (3,9)-(3,16))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (3,9)-(3,11))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: (3,12)-(3,14) = "=>"
+ │ │ └── @ AssocNode (location: (3,18)-(3,25))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,18)-(3,20))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (5,6)-(5,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :y
+ │ │ ├── message_loc: (5,6)-(5,7) = "y"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,8)-(5,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (5,8)-(5,13))
+ │ │ │ ├── flags: symbol_keys
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (5,8)-(5,13))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (5,8)-(5,10))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: (5,10)-(5,12) = "=>"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (7,0)-(7,11))
+ │ ├── keyword_loc: (7,0)-(7,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,6)-(7,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,6)-(7,11))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :y
+ │ │ ├── message_loc: (7,6)-(7,7) = "y"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,8)-(7,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (7,8)-(7,11))
+ │ │ │ ├── flags: symbol_keys
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (7,8)-(7,11))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (7,8)-(7,10))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (9,0)-(9,12))
+ │ ├── keyword_loc: (9,0)-(9,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,6)-(9,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (9,6)-(9,12))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :y
+ │ │ ├── message_loc: (9,6)-(9,7) = "y"
+ │ │ ├── opening_loc: (9,7)-(9,8) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,8)-(9,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (9,8)-(9,11))
+ │ │ │ ├── flags: symbol_keys
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (9,8)-(9,11))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (9,8)-(9,10))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── closing_loc: (9,11)-(9,12) = ")"
+ │ │ └── block: ∅
+ │ └── rparen_loc: ∅
+ └── @ YieldNode (location: (11,0)-(11,13))
+ ├── keyword_loc: (11,0)-(11,5) = "yield"
+ ├── lparen_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,6)-(11,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (11,6)-(11,13))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :y
+ │ ├── message_loc: (11,6)-(11,7) = "y"
+ │ ├── opening_loc: (11,7)-(11,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,8)-(11,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (11,8)-(11,12))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (11,8)-(11,12))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (11,8)-(11,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :z
+ │ │ │ ├── message_loc: (11,8)-(11,9) = "z"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (11,11)-(11,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (11,9)-(11,11) = "=>"
+ │ ├── closing_loc: (11,12)-(11,13) = ")"
+ │ └── block: ∅
+ └── 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_method_call_with_bang.txt b/test/prism/snapshots/single_method_call_with_bang.txt
new file mode 100644
index 0000000000..4c68e0adac
--- /dev/null
+++ b/test/prism/snapshots/single_method_call_with_bang.txt
@@ -0,0 +1,15 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo!
+ ├── message_loc: (1,0)-(1,4) = "foo!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/single_quote_heredocs.txt b/test/prism/snapshots/single_quote_heredocs.txt
new file mode 100644
index 0000000000..429c9daf11
--- /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)-(3,0) = " cd L:\\Work\\MG3710IQPro\\Develop\n"
+ ├── closing_loc: (3,0)-(4,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..c89daaed09
--- /dev/null
+++ b/test/prism/snapshots/spanning_heredoc.txt
@@ -0,0 +1,413 @@
+@ ProgramNode (location: (4,0)-(63,2))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (4,0)-(63,2))
+ └── body: (length: 14)
+ ├── @ CallNode (location: (4,0)-(7,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (4,0)-(4,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (4,3)-(7,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (4,3)-(7,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ StringNode (location: (4,3)-(4,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (4,3)-(4,7) = "<<-A"
+ │ │ │ ├── content_loc: (5,0)-(6,0) = "a\n"
+ │ │ │ ├── closing_loc: (6,0)-(7,0) = "A\n"
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── call_operator_loc: (4,7)-(4,8) = "."
+ │ │ ├── name: :gsub
+ │ │ ├── message_loc: (4,8)-(4,12) = "gsub"
+ │ │ ├── opening_loc: (4,12)-(4,13) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (4,13)-(7,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ InterpolatedRegularExpressionNode (location: (4,13)-(7,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (4,13)-(4,14) = "/"
+ │ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ │ ├── @ StringNode (location: (4,14)-(4,16))
+ │ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── content_loc: (4,14)-(4,16) = "b\\"
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ │ └── @ StringNode (location: (7,0)-(7,1))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (7,0)-(7,1) = "b"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ └── closing_loc: (7,1)-(7,2) = "/"
+ │ │ │ └── @ 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: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (10,0)-(13,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (10,0)-(10,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (10,3)-(13,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (10,3)-(10,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (10,3)-(10,7) = "<<-A"
+ │ │ │ ├── content_loc: (11,0)-(12,0) = "c\n"
+ │ │ │ ├── closing_loc: (12,0)-(13,0) = "A\n"
+ │ │ │ └── unescaped: "c\n"
+ │ │ └── @ InterpolatedStringNode (location: (10,9)-(13,2))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (10,9)-(10,10) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (10,10)-(10,12))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (10,10)-(10,12) = "d\\"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "d"
+ │ │ │ └── @ StringNode (location: (13,0)-(13,1))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (13,0)-(13,1) = "d"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "d"
+ │ │ └── closing_loc: (13,1)-(13,2) = "\""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (16,0)-(19,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (16,0)-(16,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (16,3)-(19,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (16,3)-(16,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (16,3)-(16,7) = "<<-A"
+ │ │ │ ├── content_loc: (17,0)-(18,0) = "e\n"
+ │ │ │ ├── closing_loc: (18,0)-(19,0) = "A\n"
+ │ │ │ └── unescaped: "e\n"
+ │ │ └── @ InterpolatedStringNode (location: (16,9)-(19,2))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (16,9)-(16,12) = "%q["
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (16,12)-(16,14))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (16,12)-(16,14) = "f\\"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "f\\\n"
+ │ │ │ └── @ StringNode (location: (19,0)-(19,1))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (19,0)-(19,1) = "f"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "f"
+ │ │ └── closing_loc: (19,1)-(19,2) = "]"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (22,0)-(25,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (22,0)-(22,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (22,3)-(25,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (22,3)-(22,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (22,3)-(22,7) = "<<-A"
+ │ │ │ ├── content_loc: (23,0)-(24,0) = "g\n"
+ │ │ │ ├── closing_loc: (24,0)-(25,0) = "A\n"
+ │ │ │ └── unescaped: "g\n"
+ │ │ └── @ InterpolatedStringNode (location: (22,9)-(25,2))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (22,9)-(22,12) = "%Q["
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (22,12)-(22,14))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (22,12)-(22,14) = "h\\"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "h"
+ │ │ │ └── @ StringNode (location: (25,0)-(25,1))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (25,0)-(25,1) = "h"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "h"
+ │ │ └── closing_loc: (25,1)-(25,2) = "]"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (28,0)-(31,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (28,0)-(28,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (28,3)-(31,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (28,3)-(28,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (28,3)-(28,7) = "<<-A"
+ │ │ │ ├── content_loc: (29,0)-(30,0) = "i\n"
+ │ │ │ ├── closing_loc: (30,0)-(31,0) = "A\n"
+ │ │ │ └── unescaped: "i\n"
+ │ │ └── @ ArrayNode (location: (28,9)-(31,2))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ StringNode (location: (28,12)-(28,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (28,12)-(28,14) = "j\\"
+ │ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (35,0)-(38,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (35,0)-(35,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,3)-(38,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (35,3)-(35,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (35,3)-(35,7) = "<<-A"
+ │ │ │ ├── content_loc: (36,0)-(37,0) = "k\n"
+ │ │ │ ├── closing_loc: (37,0)-(38,0) = "A\n"
+ │ │ │ └── unescaped: "k\n"
+ │ │ └── @ ArrayNode (location: (35,9)-(38,2))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (35,12)-(38,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (35,12)-(35,14))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (35,12)-(35,14) = "l\\"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "l\n"
+ │ │ │ │ └── @ StringNode (location: (38,0)-(38,1))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (41,0)-(44,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (41,0)-(41,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,3)-(44,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (41,3)-(41,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (41,3)-(41,7) = "<<-A"
+ │ │ │ ├── content_loc: (42,0)-(43,0) = "m\n"
+ │ │ │ ├── closing_loc: (43,0)-(44,0) = "A\n"
+ │ │ │ └── unescaped: "m\n"
+ │ │ └── @ ArrayNode (location: (41,9)-(44,2))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (41,12)-(41,14))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (41,12)-(41,14) = "n\\"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "n\n"
+ │ │ │ └── @ SymbolNode (location: (44,0)-(44,1))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (48,0)-(51,2))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :pp
+ │ ├── message_loc: (48,0)-(48,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (48,3)-(51,2))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (48,3)-(48,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (48,3)-(48,7) = "<<-A"
+ │ │ │ ├── content_loc: (49,0)-(50,0) = "o\n"
+ │ │ │ ├── closing_loc: (50,0)-(51,0) = "A\n"
+ │ │ │ └── unescaped: "o\n"
+ │ │ └── @ ArrayNode (location: (48,9)-(51,2))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ InterpolatedSymbolNode (location: (48,12)-(48,14))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (48,12)-(48,14))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (48,12)-(48,14) = "p\\"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "p\n"
+ │ │ │ │ └── @ StringNode (location: (48,12)-(48,14))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (48,12)-(48,14) = "p\\"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "p"
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── opening_loc: (48,9)-(48,12) = "%I["
+ │ │ └── closing_loc: (51,1)-(51,2) = "]"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ StringNode (location: (53,0)-(53,3))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (53,0)-(53,3) = "<<A"
+ │ ├── content_loc: (54,0)-(54,0) = ""
+ │ ├── closing_loc: (54,0)-(55,0) = "A\n"
+ │ └── unescaped: ""
+ ├── @ MatchWriteNode (location: (53,5)-(55,13))
+ │ ├── call:
+ │ │ @ CallNode (location: (53,5)-(55,13))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ InterpolatedRegularExpressionNode (location: (53,5)-(55,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (53,5)-(53,6) = "/"
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (53,6)-(53,7))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (53,6)-(53,7) = "\\"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: ""
+ │ │ │ │ └── @ StringNode (location: (55,0)-(55,6))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (55,0)-(55,6) = "(?<a>)"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "(?<a>)"
+ │ │ │ └── closing_loc: (55,6)-(55,7) = "/"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (55,8)-(55,10) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (55,11)-(55,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (55,11)-(55,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (55,11)-(55,12) = "'"
+ │ │ │ ├── content_loc: (55,12)-(55,12) = ""
+ │ │ │ ├── closing_loc: (55,12)-(55,13) = "'"
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── targets: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (53,5)-(55,7))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ StringNode (location: (57,0)-(57,3))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (57,0)-(57,3) = "<<A"
+ │ ├── content_loc: (58,0)-(58,0) = ""
+ │ ├── closing_loc: (58,0)-(59,0) = "A\n"
+ │ └── unescaped: ""
+ ├── @ InterpolatedSymbolNode (location: (57,5)-(59,2))
+ │ ├── opening_loc: (57,5)-(57,7) = ":'"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (57,7)-(58,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (57,7)-(58,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ StringNode (location: (59,0)-(59,1))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (59,0)-(59,1) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── closing_loc: (59,1)-(59,2) = "'"
+ ├── @ StringNode (location: (61,0)-(61,3))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (61,0)-(61,3) = "<<A"
+ │ ├── content_loc: (62,0)-(62,0) = ""
+ │ ├── closing_loc: (62,0)-(63,0) = "A\n"
+ │ └── unescaped: ""
+ └── @ InterpolatedSymbolNode (location: (61,5)-(63,2))
+ ├── opening_loc: (61,5)-(61,7) = ":\""
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (61,7)-(62,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (61,7)-(62,0) = "a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\n"
+ │ └── @ StringNode (location: (63,0)-(63,1))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (63,0)-(63,1) = "b"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "b"
+ └── closing_loc: (63,1)-(63,2) = "\""
diff --git a/test/prism/snapshots/spanning_heredoc_newlines.txt b/test/prism/snapshots/spanning_heredoc_newlines.txt
new file mode 100644
index 0000000000..e3609ddbba
--- /dev/null
+++ b/test/prism/snapshots/spanning_heredoc_newlines.txt
@@ -0,0 +1,155 @@
+@ ProgramNode (location: (1,0)-(24,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(24,0))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(4,0))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (1,0)-(1,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,0)-(1,3) = "<<A"
+ │ │ ├── content_loc: (2,0)-(2,0) = ""
+ │ │ ├── closing_loc: (2,0)-(3,0) = "A\n"
+ │ │ └── unescaped: ""
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (1,3)-(1,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(4,0))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,4)-(4,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,4)-(2,0) = "%\n"
+ │ │ ├── content_loc: (3,0)-(3,0) = ""
+ │ │ ├── closing_loc: (3,0)-(4,0) = "\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(8,0))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (5,0)-(5,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (5,0)-(5,3) = "<<A"
+ │ │ ├── content_loc: (6,0)-(6,0) = ""
+ │ │ ├── closing_loc: (6,0)-(7,0) = "A\n"
+ │ │ └── unescaped: ""
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (5,3)-(5,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,4)-(8,0))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (5,4)-(8,0))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (5,4)-(6,0) = "%r\n"
+ │ │ ├── content_loc: (6,0)-(6,0) = ""
+ │ │ ├── closing_loc: (7,0)-(8,0) = "\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (9,0)-(12,0))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (9,0)-(9,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (9,0)-(9,3) = "<<A"
+ │ │ ├── content_loc: (10,0)-(10,0) = ""
+ │ │ ├── closing_loc: (10,0)-(11,0) = "A\n"
+ │ │ └── unescaped: ""
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (9,3)-(9,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,4)-(12,0))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (9,4)-(12,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (9,4)-(10,0) = "%q\n"
+ │ │ ├── content_loc: (11,0)-(11,0) = ""
+ │ │ ├── closing_loc: (11,0)-(12,0) = "\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (13,0)-(16,0))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (13,0)-(13,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (13,0)-(13,3) = "<<A"
+ │ │ ├── content_loc: (14,0)-(14,0) = ""
+ │ │ ├── closing_loc: (14,0)-(15,0) = "A\n"
+ │ │ └── unescaped: ""
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (13,3)-(13,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,4)-(16,0))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (13,4)-(16,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (13,4)-(14,0) = "%Q\n"
+ │ │ ├── content_loc: (15,0)-(15,0) = ""
+ │ │ ├── closing_loc: (15,0)-(16,0) = "\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (17,0)-(20,0))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ StringNode (location: (17,0)-(17,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (17,0)-(17,3) = "<<A"
+ │ │ ├── content_loc: (18,0)-(18,0) = ""
+ │ │ ├── closing_loc: (18,0)-(19,0) = "A\n"
+ │ │ └── unescaped: ""
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (17,3)-(17,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,4)-(20,0))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (17,4)-(20,0))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (17,4)-(18,0) = "%s\n"
+ │ │ ├── value_loc: (18,0)-(18,0) = ""
+ │ │ ├── closing_loc: (19,0)-(20,0) = "\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (21,0)-(24,0))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ StringNode (location: (21,0)-(21,3))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (21,0)-(21,3) = "<<A"
+ │ ├── content_loc: (22,0)-(22,0) = ""
+ │ ├── closing_loc: (22,0)-(23,0) = "A\n"
+ │ └── unescaped: ""
+ ├── call_operator_loc: ∅
+ ├── name: :+
+ ├── message_loc: (21,3)-(21,4) = "+"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (21,4)-(24,0))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ XStringNode (location: (21,4)-(24,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (21,4)-(22,0) = "%x\n"
+ │ ├── content_loc: (22,0)-(22,0) = ""
+ │ ├── closing_loc: (23,0)-(24,0) = "\n"
+ │ └── unescaped: ""
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/strings.txt b/test/prism/snapshots/strings.txt
new file mode 100644
index 0000000000..632d2ac3b5
--- /dev/null
+++ b/test/prism/snapshots/strings.txt
@@ -0,0 +1,534 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (35,0)-(35,2) = "%{"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (35,2)-(35,6))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bbb
+ │ │ │ │ ├── message_loc: (35,8)-(35,11) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (35,11)-(35,12) = "}"
+ │ │ └── @ StringNode (location: (35,12)-(35,16))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (39,6)-(39,7) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,0)-(41,5))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── @ 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (55,0)-(55,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (55,1)-(55,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bbb
+ │ │ │ │ ├── message_loc: (55,7)-(55,10) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (55,10)-(55,11) = "}"
+ │ │ └── @ StringNode (location: (55,11)-(55,15))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (67,5)-(67,6))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ │ ├── message_loc: (67,8)-(67,9) = "c"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ └── closing_loc: (67,9)-(67,10) = "}"
+ │ │ │ │ └── @ StringNode (location: (67,10)-(67,11))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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"
+ ├── @ InterpolatedStringNode (location: (99,0)-(99,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (99,0)-(99,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (99,0)-(99,1) = "?"
+ │ │ │ ├── content_loc: (99,1)-(99,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ StringNode (location: (99,3)-(99,6))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (99,3)-(99,4) = "\""
+ │ │ ├── content_loc: (99,4)-(99,5) = "a"
+ │ │ ├── closing_loc: (99,5)-(99,6) = "\""
+ │ │ └── unescaped: "a"
+ │ └── closing_loc: ∅
+ ├── @ 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..79f9a5d5a5
--- /dev/null
+++ b/test/prism/snapshots/super.txt
@@ -0,0 +1,132 @@
+@ ProgramNode (location: (1,0)-(17,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(17,21))
+ └── body: (length: 9)
+ ├── @ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (7,6)-(7,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ IntegerNode (location: (7,9)-(7,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── @ IntegerNode (location: (7,12)-(7,13))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── rparen_loc: (7,13)-(7,14) = ")"
+ │ └── block: ∅
+ ├── @ SuperNode (location: (9,0)-(9,11))
+ │ ├── keyword_loc: (9,0)-(9,5) = "super"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── rparen_loc: ∅
+ │ └── block:
+ │ @ BlockArgumentNode (location: (9,6)-(9,11))
+ │ ├── expression:
+ │ │ @ SymbolNode (location: (9,7)-(9,11))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (9,7)-(9,8) = ":"
+ │ │ ├── value_loc: (9,8)-(9,11) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (9,6)-(9,7) = "&"
+ ├── @ SuperNode (location: (11,0)-(11,12))
+ │ ├── keyword_loc: (11,0)-(11,5) = "super"
+ │ ├── lparen_loc: (11,5)-(11,6) = "("
+ │ ├── arguments: ∅
+ │ ├── rparen_loc: (11,11)-(11,12) = ")"
+ │ └── block:
+ │ @ BlockArgumentNode (location: (11,6)-(11,11))
+ │ ├── expression:
+ │ │ @ SymbolNode (location: (11,7)-(11,11))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (11,7)-(11,8) = ":"
+ │ │ ├── value_loc: (11,8)-(11,11) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (11,6)-(11,7) = "&"
+ ├── @ ForwardingSuperNode (location: (13,0)-(13,8))
+ │ └── block:
+ │ @ BlockNode (location: (13,6)-(13,8))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (13,6)-(13,7) = "{"
+ │ └── closing_loc: (13,7)-(13,8) = "}"
+ ├── @ SuperNode (location: (15,0)-(15,17))
+ │ ├── keyword_loc: (15,0)-(15,5) = "super"
+ │ ├── lparen_loc: (15,5)-(15,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,6)-(15,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (15,6)-(15,7))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ IntegerNode (location: (15,9)-(15,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── @ IntegerNode (location: (15,12)-(15,13))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── rparen_loc: (15,13)-(15,14) = ")"
+ │ └── block:
+ │ @ BlockNode (location: (15,15)-(15,17))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (15,15)-(15,16) = "{"
+ │ └── closing_loc: (15,16)-(15,17) = "}"
+ └── @ SuperNode (location: (17,0)-(17,21))
+ ├── keyword_loc: (17,0)-(17,5) = "super"
+ ├── lparen_loc: (17,5)-(17,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (17,6)-(17,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (17,6)-(17,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── @ IntegerNode (location: (17,9)-(17,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── @ IntegerNode (location: (17,12)-(17,13))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── rparen_loc: (17,20)-(17,21) = ")"
+ └── block:
+ @ BlockArgumentNode (location: (17,15)-(17,20))
+ ├── expression:
+ │ @ SymbolNode (location: (17,16)-(17,20))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (17,16)-(17,17) = ":"
+ │ ├── value_loc: (17,17)-(17,20) = "foo"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "foo"
+ └── operator_loc: (17,15)-(17,16) = "&"
diff --git a/test/prism/snapshots/symbols.txt b/test/prism/snapshots/symbols.txt
new file mode 100644
index 0000000000..dbd3a4d030
--- /dev/null
+++ b/test/prism/snapshots/symbols.txt
@@ -0,0 +1,464 @@
+@ ProgramNode (location: (1,0)-(93,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(93,13))
+ └── body: (length: 47)
+ ├── @ SymbolNode (location: (1,0)-(1,6))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var
+ │ │ │ ├── message_loc: (3,4)-(3,7) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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: frozen
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── closing_loc: (5,8)-(5,9) = "}"
+ │ └── closing_loc: (5,9)-(5,10) = "\""
+ ├── @ ArrayNode (location: (7,0)-(7,20))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 4)
+ │ │ ├── @ SymbolNode (location: (7,1)-(7,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (7,1)-(7,2) = ":"
+ │ │ │ ├── value_loc: (7,2)-(7,4) = "Υ"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "Υ"
+ │ │ ├── @ SymbolNode (location: (7,6)-(7,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (7,6)-(7,7) = ":"
+ │ │ │ ├── value_loc: (7,7)-(7,9) = "ά"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "ά"
+ │ │ ├── @ SymbolNode (location: (7,11)-(7,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (7,11)-(7,12) = ":"
+ │ │ │ ├── value_loc: (7,12)-(7,14) = "ŗ"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "ŗ"
+ │ │ └── @ SymbolNode (location: (7,16)-(7,19))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (9,0)-(9,1) = ":"
+ │ ├── value_loc: (9,1)-(9,3) = "-@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "-@"
+ ├── @ SymbolNode (location: (11,0)-(11,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (11,0)-(11,1) = ":"
+ │ ├── value_loc: (11,1)-(11,2) = "-"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "-"
+ ├── @ SymbolNode (location: (13,0)-(13,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (13,0)-(13,1) = ":"
+ │ ├── value_loc: (13,1)-(13,2) = "%"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "%"
+ ├── @ SymbolNode (location: (15,0)-(15,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (15,0)-(15,1) = ":"
+ │ ├── value_loc: (15,1)-(15,2) = "|"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "|"
+ ├── @ SymbolNode (location: (17,0)-(17,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (17,0)-(17,1) = ":"
+ │ ├── value_loc: (17,1)-(17,3) = "+@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "+@"
+ ├── @ SymbolNode (location: (19,0)-(19,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (19,0)-(19,1) = ":"
+ │ ├── value_loc: (19,1)-(19,2) = "+"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "+"
+ ├── @ SymbolNode (location: (21,0)-(21,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (21,0)-(21,1) = ":"
+ │ ├── value_loc: (21,1)-(21,2) = "/"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "/"
+ ├── @ SymbolNode (location: (23,0)-(23,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (23,0)-(23,1) = ":"
+ │ ├── value_loc: (23,1)-(23,3) = "**"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "**"
+ ├── @ SymbolNode (location: (25,0)-(25,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (25,0)-(25,1) = ":"
+ │ ├── value_loc: (25,1)-(25,2) = "*"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "*"
+ ├── @ SymbolNode (location: (27,0)-(27,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (27,0)-(27,1) = ":"
+ │ ├── value_loc: (27,1)-(27,3) = "~@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "~"
+ ├── @ ArrayNode (location: (29,0)-(29,16))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 4)
+ │ │ ├── @ IntegerNode (location: (29,1)-(29,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ FloatNode (location: (29,4)-(29,7))
+ │ │ │ └── value: 1.0
+ │ │ ├── @ RationalNode (location: (29,9)-(29,11))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (29,9)-(29,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ ImaginaryNode (location: (29,13)-(29,15))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (29,13)-(29,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── opening_loc: (29,0)-(29,1) = "["
+ │ └── closing_loc: (29,15)-(29,16) = "]"
+ ├── @ SymbolNode (location: (31,0)-(31,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (31,0)-(31,1) = ":"
+ │ ├── value_loc: (31,1)-(31,2) = "~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "~"
+ ├── @ SymbolNode (location: (33,0)-(33,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (33,0)-(33,1) = ":"
+ │ ├── value_loc: (33,1)-(33,2) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── @ ArrayNode (location: (35,0)-(35,9))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (35,3)-(35,4))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (35,3)-(35,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (35,5)-(35,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (35,5)-(35,6) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ SymbolNode (location: (35,7)-(35,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 4)
+ │ │ ├── @ SymbolNode (location: (37,3)-(37,4))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (37,3)-(37,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (37,5)-(37,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (37,5)-(37,10) = "b\#{1}"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b\#{1}"
+ │ │ ├── @ SymbolNode (location: (37,11)-(37,16))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (37,11)-(37,16) = "\#{2}c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\#{2}c"
+ │ │ └── @ SymbolNode (location: (37,17)-(37,23))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 4)
+ │ │ ├── @ SymbolNode (location: (39,3)-(39,4))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: frozen
+ │ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── 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
+ │ │ │ │ │ │ └── value: 2
+ │ │ │ │ │ └── closing_loc: (39,14)-(39,15) = "}"
+ │ │ │ │ └── @ StringNode (location: (39,15)-(39,16))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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: frozen
+ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 3
+ │ │ │ │ └── closing_loc: (39,21)-(39,22) = "}"
+ │ │ │ └── @ StringNode (location: (39,22)-(39,23))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (41,0)-(41,1) = ":"
+ │ ├── value_loc: (41,1)-(41,4) = "@@a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "@@a"
+ ├── @ SymbolNode (location: (43,0)-(43,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (43,0)-(43,1) = ":"
+ │ ├── value_loc: (43,1)-(43,5) = "👍"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "👍"
+ ├── @ ArrayNode (location: (45,0)-(45,7))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (45,3)-(45,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (47,0)-(47,1) = ":"
+ │ ├── value_loc: (47,1)-(47,3) = "$a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$a"
+ ├── @ SymbolNode (location: (49,0)-(49,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (49,0)-(49,1) = ":"
+ │ ├── value_loc: (49,1)-(49,3) = "@a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "@a"
+ ├── @ SymbolNode (location: (51,0)-(51,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (51,0)-(51,1) = ":"
+ │ ├── value_loc: (51,1)-(51,3) = "do"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "do"
+ ├── @ SymbolNode (location: (53,0)-(53,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (53,0)-(53,1) = ":"
+ │ ├── value_loc: (53,1)-(53,2) = "&"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "&"
+ ├── @ SymbolNode (location: (55,0)-(55,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (55,0)-(55,1) = ":"
+ │ ├── value_loc: (55,1)-(55,2) = "`"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "`"
+ ├── @ SymbolNode (location: (57,0)-(57,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (57,0)-(57,1) = ":"
+ │ ├── value_loc: (57,1)-(57,3) = "!@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "!"
+ ├── @ SymbolNode (location: (59,0)-(59,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (59,0)-(59,1) = ":"
+ │ ├── value_loc: (59,1)-(59,3) = "!~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "!~"
+ ├── @ SymbolNode (location: (61,0)-(61,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (61,0)-(61,1) = ":"
+ │ ├── value_loc: (61,1)-(61,2) = "!"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "!"
+ ├── @ SymbolNode (location: (63,0)-(63,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (63,0)-(63,1) = ":"
+ │ ├── value_loc: (63,1)-(63,3) = "[]"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "[]"
+ ├── @ SymbolNode (location: (65,0)-(65,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (65,0)-(65,1) = ":"
+ │ ├── value_loc: (65,1)-(65,4) = "[]="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "[]="
+ ├── @ SymbolNode (location: (67,0)-(67,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (67,0)-(67,1) = ":"
+ │ ├── value_loc: (67,1)-(67,2) = "^"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "^"
+ ├── @ SymbolNode (location: (69,0)-(69,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (69,0)-(69,1) = ":"
+ │ ├── value_loc: (69,1)-(69,3) = "=="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "=="
+ ├── @ SymbolNode (location: (71,0)-(71,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (71,0)-(71,1) = ":"
+ │ ├── value_loc: (71,1)-(71,4) = "==="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "==="
+ ├── @ SymbolNode (location: (73,0)-(73,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (73,0)-(73,1) = ":"
+ │ ├── value_loc: (73,1)-(73,3) = "=~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "=~"
+ ├── @ SymbolNode (location: (75,0)-(75,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (75,0)-(75,1) = ":"
+ │ ├── value_loc: (75,1)-(75,3) = ">="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: ">="
+ ├── @ SymbolNode (location: (77,0)-(77,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (77,0)-(77,1) = ":"
+ │ ├── value_loc: (77,1)-(77,3) = ">>"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: ">>"
+ ├── @ SymbolNode (location: (79,0)-(79,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (79,0)-(79,1) = ":"
+ │ ├── value_loc: (79,1)-(79,2) = ">"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: ">"
+ ├── @ SymbolNode (location: (81,0)-(81,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (81,0)-(81,1) = ":"
+ │ ├── value_loc: (81,1)-(81,4) = "<=>"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<=>"
+ ├── @ SymbolNode (location: (83,0)-(83,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (83,0)-(83,1) = ":"
+ │ ├── value_loc: (83,1)-(83,3) = "<="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<="
+ ├── @ SymbolNode (location: (85,0)-(85,3))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (85,0)-(85,1) = ":"
+ │ ├── value_loc: (85,1)-(85,3) = "<<"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<<"
+ ├── @ SymbolNode (location: (87,0)-(87,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (87,0)-(87,1) = ":"
+ │ ├── value_loc: (87,1)-(87,2) = "<"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<"
+ ├── @ SymbolNode (location: (89,0)-(89,9))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (89,0)-(89,1) = ":"
+ │ ├── value_loc: (89,1)-(89,9) = "__LINE__"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "__LINE__"
+ ├── @ SymbolNode (location: (91,0)-(91,9))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (91,0)-(91,1) = ":"
+ │ ├── value_loc: (91,1)-(91,9) = "__FILE__"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "__FILE__"
+ └── @ SymbolNode (location: (93,0)-(93,13))
+ ├── flags: forced_us_ascii_encoding
+ ├── 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..0277ac88f0
--- /dev/null
+++ b/test/prism/snapshots/ternary_operator.txt
@@ -0,0 +1,295 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,2)-(1,3) = "?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,4)-(1,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (3,0)-(3,27))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (3,2)-(3,3) = "?"
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (3,13)-(3,14) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (3,26)-(3,27) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :empty?
+ │ │ ├── message_loc: (5,0)-(5,6) = "empty?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (5,6)-(5,7) = "?"
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :empty?
+ │ │ ├── message_loc: (7,0)-(7,6) = "empty?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (7,6)-(7,7) = "?"
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :empty?
+ │ │ ├── message_loc: (9,0)-(9,6) = "empty?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (9,6)-(9,7) = "?"
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a?
+ │ │ ├── message_loc: (11,0)-(11,2) = "a?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (11,2)-(11,3) = "?"
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (13,2)-(13,3) = "?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (13,3)-(13,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (13,3)-(13,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :var1
+ │ │ ├── message_loc: (13,3)-(13,7) = "var1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :var2
+ │ │ │ ├── message_loc: (13,10)-(13,14) = "var2"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ IfNode (location: (15,0)-(15,12))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (15,0)-(15,4))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :nil?
+ │ ├── message_loc: (15,0)-(15,4) = "nil?"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (15,4)-(15,5) = "?"
+ ├── 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
+ │ │ └── value: 2
+ │ └── 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
+ │ │ └── value: 1
+ │ └── 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..f50f915a64
--- /dev/null
+++ b/test/prism/snapshots/tilde_heredocs.txt
@@ -0,0 +1,405 @@
+@ ProgramNode (location: (1,0)-(94,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(94,6))
+ └── body: (length: 19)
+ ├── @ InterpolatedStringNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,6) = "<<~EOF"
+ │ ├── parts: (length: 4)
+ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,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)
+ │ │ │ │ └── @ IntegerNode (location: (3,2)-(3,3))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (3,3)-(3,4) = "}"
+ │ │ ├── @ StringNode (location: (3,4)-(4,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,4)-(4,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (4,0)-(5,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (4,0)-(5,0) = " a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " a\n"
+ │ └── closing_loc: (5,0)-(6,0) = "EOF\n"
+ ├── @ StringNode (location: (7,0)-(7,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,6) = "<<~EOF"
+ │ ├── content_loc: (8,0)-(9,0) = " a\n"
+ │ ├── closing_loc: (9,0)-(10,0) = "EOF\n"
+ │ └── unescaped: "a\n"
+ ├── @ InterpolatedStringNode (location: (11,0)-(11,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,0)-(11,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (12,0)-(13,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (12,0)-(13,0) = "\ta\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\ta\n"
+ │ │ ├── @ StringNode (location: (13,0)-(14,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (13,0)-(14,0) = " b\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b\n"
+ │ │ └── @ StringNode (location: (14,0)-(15,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (14,0)-(15,0) = "\t\tc\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\t\tc\n"
+ │ └── closing_loc: (15,0)-(16,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (17,0)-(17,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (17,0)-(17,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (18,2)-(18,6))
+ │ │ │ ├── opening_loc: (18,2)-(18,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (18,4)-(18,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (18,4)-(18,5))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (18,5)-(18,6) = "}"
+ │ │ └── @ StringNode (location: (18,6)-(19,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (18,6)-(19,0) = " a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " a\n"
+ │ └── closing_loc: (19,0)-(20,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (21,0)-(21,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (21,0)-(21,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (22,0)-(22,4))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (22,0)-(22,4) = " a "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a "
+ │ │ ├── @ EmbeddedStatementsNode (location: (22,4)-(22,8))
+ │ │ │ ├── opening_loc: (22,4)-(22,6) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (22,6)-(22,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (22,6)-(22,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (22,7)-(22,8) = "}"
+ │ │ └── @ StringNode (location: (22,8)-(23,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (22,8)-(23,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (23,0)-(24,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (25,0)-(25,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (25,0)-(25,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (26,0)-(27,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (26,0)-(27,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (27,1)-(27,5))
+ │ │ │ ├── opening_loc: (27,1)-(27,3) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (27,3)-(27,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (27,3)-(27,4))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (27,4)-(27,5) = "}"
+ │ │ └── @ StringNode (location: (27,5)-(28,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (27,5)-(28,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (28,0)-(29,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (30,0)-(30,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (30,0)-(30,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (31,0)-(32,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (31,0)-(32,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (32,2)-(32,6))
+ │ │ │ ├── opening_loc: (32,2)-(32,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (32,4)-(32,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (32,4)-(32,5))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (32,5)-(32,6) = "}"
+ │ │ └── @ StringNode (location: (32,6)-(33,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (32,6)-(33,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (33,0)-(34,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (35,0)-(35,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (35,0)-(35,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (36,0)-(37,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (36,0)-(37,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ StringNode (location: (37,0)-(38,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (37,0)-(38,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (38,0)-(39,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (40,0)-(40,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (40,0)-(40,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (41,0)-(42,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (41,0)-(42,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ StringNode (location: (42,0)-(43,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (42,0)-(43,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " b\n"
+ │ └── closing_loc: (43,0)-(44,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (45,0)-(45,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (45,0)-(45,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (46,0)-(47,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (46,0)-(47,0) = "\t\t\ta\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\ta\n"
+ │ │ └── @ StringNode (location: (47,0)-(48,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (47,0)-(48,0) = "\t\tb\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (48,0)-(49,0) = "EOF\n"
+ ├── @ StringNode (location: (50,0)-(50,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (50,0)-(50,8) = "<<~'EOF'"
+ │ ├── content_loc: (51,0)-(52,0) = " a \#{1}\n"
+ │ ├── closing_loc: (52,0)-(53,0) = "EOF\n"
+ │ └── unescaped: "a \#{1}\n"
+ ├── @ InterpolatedStringNode (location: (54,0)-(54,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (54,0)-(54,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (55,0)-(56,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (55,0)-(56,0) = "\ta\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ StringNode (location: (56,0)-(57,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (56,0)-(57,0) = "\t b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " b\n"
+ │ └── closing_loc: (57,0)-(58,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (59,0)-(59,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (59,0)-(59,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (60,0)-(61,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (60,0)-(61,0) = "\t a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a\n"
+ │ │ └── @ StringNode (location: (61,0)-(62,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (61,0)-(62,0) = "\tb\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (62,0)-(63,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (64,0)-(64,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (64,0)-(64,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (65,0)-(66,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (65,0)-(66,0) = " \ta\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ StringNode (location: (66,0)-(67,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (66,0)-(67,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (67,0)-(68,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (69,0)-(69,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (69,0)-(69,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (70,0)-(71,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (70,0)-(71,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ StringNode (location: (71,0)-(72,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (71,0)-(72,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (72,0)-(73,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (72,0)-(73,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (73,0)-(74,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (75,0)-(75,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (75,0)-(75,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (76,0)-(77,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (76,0)-(77,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ StringNode (location: (77,0)-(78,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (77,0)-(78,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (78,0)-(79,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (78,0)-(79,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (79,0)-(80,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (81,0)-(81,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (81,0)-(81,6) = "<<~EOF"
+ │ ├── parts: (length: 5)
+ │ │ ├── @ StringNode (location: (82,0)-(83,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (82,0)-(83,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ StringNode (location: (83,0)-(84,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (83,0)-(84,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ ├── @ StringNode (location: (84,0)-(85,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (84,0)-(85,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ ├── @ StringNode (location: (85,0)-(86,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (85,0)-(86,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (86,0)-(87,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (86,0)-(87,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (87,0)-(88,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (89,0)-(89,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (89,0)-(89,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (90,0)-(91,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (90,0)-(91,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (91,2)-(91,6))
+ │ │ │ ├── opening_loc: (91,2)-(91,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (91,4)-(91,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (91,4)-(91,5))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (91,5)-(91,6) = "}"
+ │ │ └── @ StringNode (location: (91,6)-(92,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (91,6)-(92,0) = "a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\n"
+ │ └── closing_loc: (92,0)-(93,0) = " EOF\n"
+ └── @ InterpolatedStringNode (location: (94,0)-(94,6))
+ ├── flags: ∅
+ ├── opening_loc: (94,0)-(94,6) = "<<~EOT"
+ ├── parts: (length: 3)
+ │ ├── @ EmbeddedStatementsNode (location: (95,2)-(95,6))
+ │ │ ├── opening_loc: (95,2)-(95,4) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (95,4)-(95,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (95,4)-(95,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── closing_loc: (95,5)-(95,6) = "}"
+ │ ├── @ StringNode (location: (95,6)-(96,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (95,6)-(96,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── @ StringNode (location: (96,0)-(97,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (96,0)-(97,0) = "\tb\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\tb\n"
+ └── closing_loc: (97,0)-(98,0) = "EOT\n"
diff --git a/test/prism/snapshots/undef.txt b/test/prism/snapshots/undef.txt
new file mode 100644
index 0000000000..e59ace92f5
--- /dev/null
+++ b/test/prism/snapshots/undef.txt
@@ -0,0 +1,117 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (3,6)-(3,7) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (3,9)-(3,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (11,6)-(11,7) = ":"
+ │ │ │ ├── value_loc: (11,7)-(11,8) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (11,10)-(11,12))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (11,10)-(11,11) = ":"
+ │ │ │ ├── value_loc: (11,11)-(11,12) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ SymbolNode (location: (11,14)-(11,16))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: frozen
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..456ef226d0
--- /dev/null
+++ b/test/prism/snapshots/unescaping.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(7,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,7))
+ └── body: (length: 4)
+ ├── @ ArrayNode (location: (1,0)-(1,10))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (3,0)-(3,1) = "/"
+ │ ├── content_loc: (3,1)-(3,7) = "\\c\#{1}"
+ │ ├── closing_loc: (3,7)-(3,8) = "/"
+ │ └── unescaped: "\\x03{1}"
+ ├── @ 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)-(9,0) = " \\c\#{1}\n"
+ ├── closing_loc: (9,0)-(10,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..6c4aaf66a5
--- /dev/null
+++ b/test/prism/snapshots/unless.txt
@@ -0,0 +1,173 @@
+@ 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,13)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,13)-(1,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (4,0)-(4,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (4,0)-(4,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (6,0)-(6,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (6,0)-(6,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ CallNode (location: (8,0)-(8,25))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (8,0)-(8,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (8,4)-(8,25))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (8,6)-(8,23))
+ │ │ └── body: (length: 1)
+ │ │ └── @ UnlessNode (location: (8,6)-(8,23))
+ │ │ ├── keyword_loc: (8,12)-(8,18) = "unless"
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (8,19)-(8,23))
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (8,6)-(8,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ BreakNode (location: (8,6)-(8,11))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (8,6)-(8,11) = "break"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── opening_loc: (8,4)-(8,5) = "{"
+ │ └── closing_loc: (8,24)-(8,25) = "}"
+ ├── @ CallNode (location: (10,0)-(10,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (10,0)-(10,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (10,4)-(10,24))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (10,6)-(10,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ UnlessNode (location: (10,6)-(10,22))
+ │ │ ├── keyword_loc: (10,11)-(10,17) = "unless"
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (10,18)-(10,22))
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (10,6)-(10,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NextNode (location: (10,6)-(10,10))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (10,6)-(10,10) = "next"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── opening_loc: (10,4)-(10,5) = "{"
+ │ └── closing_loc: (10,23)-(10,24) = "}"
+ ├── @ UnlessNode (location: (12,0)-(12,18))
+ │ ├── keyword_loc: (12,7)-(12,13) = "unless"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (12,14)-(12,18))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (12,0)-(12,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (12,0)-(12,6))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar?
+ │ ├── message_loc: (14,18)-(14,22) = "bar?"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (14,0)-(14,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (14,0)-(14,10))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (14,0)-(14,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (14,4)-(14,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (14,4)-(14,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (14,4)-(14,5) = ":"
+ │ │ │ ├── value_loc: (14,5)-(14,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (14,8)-(14,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (14,8)-(14,9) = ":"
+ │ │ ├── value_loc: (14,9)-(14,10) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..18ddc86d4f
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/alias.txt
@@ -0,0 +1,29 @@
+@ 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..7d3cc389c6
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/assignment.txt
@@ -0,0 +1,1076 @@
+@ 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
+ │ │ └── value: 1
+ │ └── operator_loc: (1,3)-(1,4) = "="
+ ├── @ MultiWriteNode (location: (2,0)-(2,17))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ GlobalVariableTargetNode (location: (2,1)-(2,3))
+ │ │ │ └── name: :$a
+ │ │ └── @ GlobalVariableTargetNode (location: (2,5)-(2,7))
+ │ │ └── name: :$b
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (2,12)-(2,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (2,15)-(2,16))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (2,11)-(2,12) = "["
+ │ └── closing_loc: (2,16)-(2,17) = "]"
+ ├── @ MultiWriteNode (location: (3,0)-(3,13))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ MultiTargetNode (location: (3,1)-(3,5))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (3,2)-(3,3))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── rest:
+ │ │ │ │ @ ImplicitRestNode (location: (3,3)-(3,4))
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (3,1)-(3,2) = "("
+ │ │ │ └── rparen_loc: (3,4)-(3,5) = ")"
+ │ │ └── @ LocalVariableTargetNode (location: (3,7)-(3,8))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 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
+ │ └── value: 1
+ ├── @ MultiWriteNode (location: (4,0)-(4,9))
+ │ ├── lefts: (length: 0)
+ │ ├── rest:
+ │ │ @ SplatNode (location: (4,1)-(4,3))
+ │ │ ├── operator_loc: (4,1)-(4,2) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (4,2)-(4,3))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rights: (length: 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (4,7)-(4,8) = "["
+ │ └── closing_loc: (4,8)-(4,9) = "]"
+ ├── @ MultiWriteNode (location: (5,0)-(5,15))
+ │ ├── lefts: (length: 0)
+ │ ├── rest:
+ │ │ @ SplatNode (location: (5,1)-(5,5))
+ │ │ ├── operator_loc: (5,1)-(5,2) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (5,2)-(5,5))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rights: (length: 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (5,10)-(5,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (5,13)-(5,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (5,9)-(5,10) = "["
+ │ └── closing_loc: (5,14)-(5,15) = "]"
+ ├── @ MultiWriteNode (location: (6,0)-(6,19))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ ClassVariableTargetNode (location: (6,1)-(6,4))
+ │ │ │ └── name: :@@a
+ │ │ └── @ ClassVariableTargetNode (location: (6,6)-(6,9))
+ │ │ └── name: :@@b
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (6,14)-(6,15))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (6,17)-(6,18))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (6,13)-(6,14) = "["
+ │ └── closing_loc: (6,18)-(6,19) = "]"
+ ├── @ MultiWriteNode (location: (7,0)-(7,17))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ InstanceVariableTargetNode (location: (7,1)-(7,3))
+ │ │ │ └── name: :@a
+ │ │ └── @ InstanceVariableTargetNode (location: (7,5)-(7,7))
+ │ │ └── name: :@b
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (7,12)-(7,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (7,15)-(7,16))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (7,11)-(7,12) = "["
+ │ └── closing_loc: (7,16)-(7,17) = "]"
+ ├── @ MultiWriteNode (location: (8,0)-(8,25))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (8,1)-(8,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ MultiTargetNode (location: (8,4)-(8,10))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (8,5)-(8,6))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (8,8)-(8,9))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: (8,4)-(8,5) = "("
+ │ │ └── rparen_loc: (8,9)-(8,10) = ")"
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (8,15)-(8,16))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ ArrayNode (location: (8,18)-(8,24))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (8,19)-(8,20))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (8,22)-(8,23))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── 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))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (9,1)-(9,2))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (9,4)-(9,5))
+ │ │ ├── operator_loc: (9,4)-(9,5) = "*"
+ │ │ └── expression: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (9,10)-(9,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (9,13)-(9,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (9,9)-(9,10) = "["
+ │ └── closing_loc: (9,14)-(9,15) = "]"
+ ├── @ MultiWriteNode (location: (10,0)-(10,18))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (10,1)-(10,2))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (10,4)-(10,8))
+ │ │ ├── operator_loc: (10,4)-(10,5) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (10,5)-(10,8))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rights: (length: 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (10,13)-(10,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (10,16)-(10,17))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (10,12)-(10,13) = "["
+ │ └── closing_loc: (10,17)-(10,18) = "]"
+ ├── @ MultiWriteNode (location: (11,0)-(11,15))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (11,1)-(11,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (11,4)-(11,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (11,10)-(11,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (11,13)-(11,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (11,9)-(11,10) = "["
+ │ └── closing_loc: (11,14)-(11,15) = "]"
+ ├── @ MultiWriteNode (location: (12,0)-(12,12))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (12,1)-(12,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (12,4)-(12,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 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))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (13,1)-(13,2))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ ImplicitRestNode (location: (13,2)-(13,3))
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ CallTargetNode (location: (14,1)-(14,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (14,1)-(14,2))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: (14,2)-(14,3) = "."
+ │ │ │ ├── name: :foo=
+ │ │ │ └── message_loc: (14,3)-(14,6) = "foo"
+ │ │ └── @ CallTargetNode (location: (14,8)-(14,13))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (14,8)-(14,9))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: (14,9)-(14,10) = "."
+ │ │ ├── name: :bar=
+ │ │ └── message_loc: (14,10)-(14,13) = "bar"
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (14,18)-(14,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (14,21)-(14,22))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (14,17)-(14,18) = "["
+ │ └── closing_loc: (14,22)-(14,23) = "]"
+ ├── @ MultiWriteNode (location: (15,0)-(15,24))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ IndexTargetNode (location: (15,1)-(15,8))
+ │ │ │ ├── flags: attribute_write
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (15,1)-(15,2))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── opening_loc: (15,2)-(15,3) = "["
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (15,3)-(15,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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: ∅
+ │ │ └── @ IndexTargetNode (location: (15,10)-(15,14))
+ │ │ ├── flags: attribute_write
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (15,10)-(15,11))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (15,11)-(15,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,12)-(15,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (15,12)-(15,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: (15,13)-(15,14) = "]"
+ │ │ └── block: ∅
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (15,19)-(15,20))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (15,22)-(15,23))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (15,18)-(15,19) = "["
+ │ └── closing_loc: (15,23)-(15,24) = "]"
+ ├── @ MultiWriteNode (location: (16,0)-(16,21))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ IndexTargetNode (location: (16,1)-(16,5))
+ │ │ │ ├── flags: attribute_write
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (16,1)-(16,2))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── opening_loc: (16,2)-(16,3) = "["
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (16,3)-(16,4))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (16,3)-(16,4))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 0
+ │ │ │ ├── closing_loc: (16,4)-(16,5) = "]"
+ │ │ │ └── block: ∅
+ │ │ └── @ IndexTargetNode (location: (16,7)-(16,11))
+ │ │ ├── flags: attribute_write
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (16,7)-(16,8))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (16,8)-(16,9) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (16,9)-(16,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (16,9)-(16,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: (16,10)-(16,11) = "]"
+ │ │ └── block: ∅
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (16,16)-(16,17))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (16,19)-(16,20))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (16,15)-(16,16) = "["
+ │ └── closing_loc: (16,20)-(16,21) = "]"
+ ├── @ MultiWriteNode (location: (17,0)-(17,12))
+ │ ├── lefts: (length: 0)
+ │ ├── rest:
+ │ │ @ SplatNode (location: (17,1)-(17,7))
+ │ │ ├── operator_loc: (17,1)-(17,2) = "*"
+ │ │ └── expression:
+ │ │ @ CallTargetNode (location: (17,2)-(17,7))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (17,2)-(17,3))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: (17,3)-(17,4) = "."
+ │ │ ├── name: :foo=
+ │ │ └── message_loc: (17,4)-(17,7) = "foo"
+ │ ├── rights: (length: 0)
+ │ ├── 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
+ │ └── value: 1
+ ├── @ ConstantPathWriteNode (location: (18,0)-(18,13))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (18,0)-(18,5))
+ │ │ ├── parent: ∅
+ │ │ ├── name: :Foo
+ │ │ ├── delimiter_loc: (18,0)-(18,2) = "::"
+ │ │ └── name_loc: (18,2)-(18,5) = "Foo"
+ │ ├── operator_loc: (18,6)-(18,7) = "="
+ │ └── value:
+ │ @ ConstantPathNode (location: (18,8)-(18,13))
+ │ ├── parent: ∅
+ │ ├── name: :Bar
+ │ ├── delimiter_loc: (18,8)-(18,10) = "::"
+ │ └── name_loc: (18,10)-(18,13) = "Bar"
+ ├── @ ClassVariableWriteNode (location: (19,0)-(19,7))
+ │ ├── name: :@@a
+ │ ├── name_loc: (19,0)-(19,3) = "@@a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (19,6)-(19,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── 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
+ │ │ └── value: 1
+ │ └── 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
+ │ │ └── value: 1
+ │ └── 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
+ │ │ │ ├── name: :Spaced
+ │ │ │ ├── delimiter_loc: (22,4)-(22,6) = "::"
+ │ │ │ └── name_loc: (22,6)-(22,12) = "Spaced"
+ │ │ ├── name: :CONST
+ │ │ ├── delimiter_loc: (22,12)-(22,14) = "::"
+ │ │ └── name_loc: (22,14)-(22,19) = "CONST"
+ │ ├── operator_loc: (22,20)-(22,21) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (22,22)-(22,23))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ 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))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ LocalVariableTargetNode (location: (23,6)-(23,7))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (23,9)-(23,10))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 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
+ │ │ │ └── value: 1
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (25,6)-(25,9) = "foo"
+ │ │ ├── opening_loc: (25,9)-(25,10) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (25,10)-(25,11) = ")"
+ │ │ └── block: ∅
+ │ └── operator_loc: (25,4)-(25,5) = "="
+ ├── @ CallNode (location: (26,0)-(26,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (26,0)-(26,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (26,3)-(26,4) = "."
+ │ ├── name: :[]=
+ │ ├── message_loc: (26,4)-(26,7) = "[]="
+ │ ├── opening_loc: (26,7)-(26,8) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (26,8)-(26,9) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (27,0)-(27,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (27,0)-(27,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (27,3)-(27,4) = "."
+ │ ├── name: :[]=
+ │ ├── message_loc: (27,4)-(27,7) = "[]="
+ │ ├── opening_loc: (27,7)-(27,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,8)-(27,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (27,8)-(27,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (27,11)-(27,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: (27,12)-(27,13) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (28,0)-(28,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (28,0)-(28,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (28,3)-(28,4) = "."
+ │ ├── name: :[]=
+ │ ├── message_loc: (28,4)-(28,7) = "[]="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (28,7)-(28,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ TrueNode (location: (28,7)-(28,11))
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (29,0)-(29,19))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (29,0)-(29,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (29,3)-(29,11) = "[*index]"
+ │ ├── opening_loc: (29,3)-(29,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,4)-(29,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SplatNode (location: (29,4)-(29,10))
+ │ │ │ ├── operator_loc: (29,4)-(29,5) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (29,5)-(29,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :index
+ │ │ │ ├── message_loc: (29,5)-(29,10) = "index"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (29,14)-(29,19))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :value
+ │ │ ├── message_loc: (29,14)-(29,19) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (29,10)-(29,11) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (30,0)-(30,17))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (30,0)-(30,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (30,3)-(30,9) = "[1..2]"
+ │ ├── opening_loc: (30,3)-(30,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (30,4)-(30,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ RangeNode (location: (30,4)-(30,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── left:
+ │ │ │ │ @ IntegerNode (location: (30,4)-(30,5))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── right:
+ │ │ │ │ @ IntegerNode (location: (30,7)-(30,8))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── operator_loc: (30,5)-(30,7) = ".."
+ │ │ └── @ CallNode (location: (30,12)-(30,17))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :value
+ │ │ ├── message_loc: (30,12)-(30,17) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (30,8)-(30,9) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(31,9))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (31,0)-(31,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (31,3)-(31,5) = "[]"
+ │ ├── opening_loc: (31,3)-(31,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,8)-(31,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,8)-(31,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: (31,4)-(31,5) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (32,0)-(32,17))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (32,0)-(32,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (32,3)-(32,9) = "[a, b]"
+ │ ├── opening_loc: (32,3)-(32,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (32,4)-(32,17))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :value
+ │ │ ├── message_loc: (32,12)-(32,17) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (32,8)-(32,9) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (33,0)-(33,18))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (33,0)-(33,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (33,3)-(33,10) = "[index]"
+ │ ├── opening_loc: (33,3)-(33,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,4)-(33,18))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (33,4)-(33,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :index
+ │ │ │ ├── message_loc: (33,4)-(33,9) = "index"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (33,13)-(33,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :value
+ │ │ ├── message_loc: (33,13)-(33,18) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (33,9)-(33,10) = "]"
+ │ └── block: ∅
+ ├── @ 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))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (35,0)-(35,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (35,1)-(35,2) = "."
+ │ ├── name: :x=
+ │ ├── message_loc: (35,2)-(35,3) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,4)-(35,7))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── @ CallNode (location: (36,0)-(36,12))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (36,0)-(36,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (36,1)-(36,6) = "[%()]"
+ │ ├── opening_loc: (36,1)-(36,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (36,2)-(36,12))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (36,9)-(36,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (36,5)-(36,6) = "]"
+ │ └── block: ∅
+ ├── @ IndexOrWriteNode (location: (37,0)-(37,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (37,0)-(37,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (37,1)-(37,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,2)-(37,5))
+ │ │ ├── flags: ∅
+ │ │ └── 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) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (37,7)-(37,10) = "||="
+ │ └── value:
+ │ @ CallNode (location: (37,11)-(37,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (37,11)-(37,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (39,4)-(39,14) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (40,0)-(40,2))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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)-(41,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (40,5)-(41,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (41,0)-(42,0) = "HEREDOC\n"
+ │ └── operator_loc: (39,2)-(39,3) = "="
+ ├── @ CallNode (location: (42,0)-(42,14))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (42,0)-(42,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (42,1)-(42,2) = "."
+ │ ├── name: :x=
+ │ ├── message_loc: (42,2)-(42,3) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (42,4)-(42,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (42,4)-(42,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (42,4)-(42,14) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (43,0)-(43,2))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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)-(44,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (43,5)-(44,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (44,0)-(45,0) = "HEREDOC\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,16))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (45,0)-(45,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (45,1)-(45,3) = "[]"
+ │ ├── opening_loc: (45,1)-(45,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,6)-(45,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (45,6)-(45,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (45,6)-(45,16) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (46,0)-(46,2))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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)-(47,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (46,5)-(47,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (47,0)-(48,0) = "HEREDOC\n"
+ │ ├── closing_loc: (45,2)-(45,3) = "]"
+ │ └── block: ∅
+ ├── @ IndexOrWriteNode (location: (48,0)-(48,21))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (48,0)-(48,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (48,1)-(48,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (48,2)-(48,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (48,2)-(48,12))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (48,2)-(48,12) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (49,0)-(49,2))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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)-(50,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (49,5)-(50,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (50,0)-(51,0) = "HEREDOC\n"
+ │ ├── closing_loc: (48,12)-(48,13) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (48,14)-(48,17) = "||="
+ │ └── value:
+ │ @ CallNode (location: (48,18)-(48,21))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (48,18)-(48,21) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ 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))
+ ├── flags: ∅
+ ├── opening_loc: (51,7)-(51,17) = "<<-HEREDOC"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (52,0)-(52,2))
+ │ │ ├── flags: frozen
+ │ │ ├── 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)-(53,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (52,5)-(53,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (53,0)-(54,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..b4c86d0b04
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/block.txt
@@ -0,0 +1,1402 @@
+@ ProgramNode (location: (1,0)-(96,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(96,1))
+ └── body: (length: 30)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (3,0)-(4,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (5,0)-(6,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ ImplicitRestNode (location: (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) = "}"
+ ├── @ CallNode (location: (7,0)-(8,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ ImplicitRestNode (location: (7,8)-(7,9))
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 1)
+ │ │ │ └── @ BlockLocalVariableNode (location: (7,11)-(7,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (9,0)-(10,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (9,10)-(9,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (11,0)-(13,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: (11,3)-(11,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (14,0)-(16,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (14,10)-(14,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (17,0)-(19,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (17,10)-(17,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: ∅
+ │ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (20,0)-(22,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (21,2)-(21,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (20,4)-(20,5) = "{"
+ │ └── closing_loc: (22,0)-(22,1) = "}"
+ ├── @ CallNode (location: (23,0)-(25,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (23,0)-(23,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (23,3)-(23,4) = "."
+ │ ├── name: :bar
+ │ ├── 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)
+ │ │ │ │ ├── @ MultiTargetNode (location: (23,11)-(23,17))
+ │ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (23,12)-(23,13))
+ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (23,15)-(23,16))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ │ ├── lparen_loc: (23,11)-(23,12) = "("
+ │ │ │ │ │ └── rparen_loc: (23,16)-(23,17) = ")"
+ │ │ │ │ └── @ RequiredParameterNode (location: (23,19)-(23,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (24,2)-(24,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (23,8)-(23,9) = "{"
+ │ └── closing_loc: (25,0)-(25,1) = "}"
+ ├── @ CallNode (location: (26,0)-(27,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (26,0)-(26,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (26,0)-(26,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (26,3)-(26,4) = "."
+ │ ├── name: :bar
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (28,0)-(29,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (28,0)-(28,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (28,0)-(28,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (28,3)-(28,4) = "."
+ │ ├── name: :bar
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 1)
+ │ │ │ └── @ BlockLocalVariableNode (location: (28,14)-(28,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (30,0)-(31,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (30,3)-(30,4) = "."
+ │ ├── name: :bar
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ BlockLocalVariableNode (location: (30,16)-(30,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (32,0)-(34,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (32,0)-(32,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (32,0)-(32,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (32,3)-(32,4) = "."
+ │ ├── name: :bar
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: ∅
+ │ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (33,2)-(33,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (32,8)-(32,9) = "{"
+ │ └── closing_loc: (34,0)-(34,1) = "}"
+ ├── @ CallNode (location: (35,0)-(37,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (35,0)-(35,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (35,0)-(35,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (35,3)-(35,4) = "."
+ │ ├── name: :bar
+ │ ├── 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)
+ │ │ │ │ └── @ MultiTargetNode (location: (35,11)-(35,14))
+ │ │ │ │ ├── lefts: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ SplatNode (location: (35,12)-(35,13))
+ │ │ │ │ │ ├── operator_loc: (35,12)-(35,13) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (35,11)-(35,12) = "("
+ │ │ │ │ └── rparen_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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (36,2)-(36,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (35,8)-(35,9) = "{"
+ │ └── closing_loc: (37,0)-(37,1) = "}"
+ ├── @ CallNode (location: (38,0)-(40,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (38,0)-(38,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (38,0)-(38,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (38,3)-(38,4) = "."
+ │ ├── name: :bar
+ │ ├── 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)
+ │ │ │ │ └── @ MultiTargetNode (location: (38,11)-(38,16))
+ │ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ │ └── @ MultiTargetNode (location: (38,12)-(38,15))
+ │ │ │ │ │ ├── lefts: (length: 0)
+ │ │ │ │ │ ├── rest:
+ │ │ │ │ │ │ @ SplatNode (location: (38,13)-(38,14))
+ │ │ │ │ │ │ ├── operator_loc: (38,13)-(38,14) = "*"
+ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ │ ├── lparen_loc: (38,12)-(38,13) = "("
+ │ │ │ │ │ └── rparen_loc: (38,14)-(38,15) = ")"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (38,11)-(38,12) = "("
+ │ │ │ │ └── rparen_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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (39,2)-(39,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (38,8)-(38,9) = "{"
+ │ └── closing_loc: (40,0)-(40,1) = "}"
+ ├── @ CallNode (location: (41,0)-(43,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (41,3)-(41,4) = "."
+ │ ├── name: :bar
+ │ ├── 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)
+ │ │ │ │ └── @ MultiTargetNode (location: (41,11)-(41,19))
+ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (41,12)-(41,13))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ MultiTargetNode (location: (41,15)-(41,18))
+ │ │ │ │ │ ├── lefts: (length: 0)
+ │ │ │ │ │ ├── rest:
+ │ │ │ │ │ │ @ SplatNode (location: (41,16)-(41,17))
+ │ │ │ │ │ │ ├── operator_loc: (41,16)-(41,17) = "*"
+ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ │ ├── lparen_loc: (41,15)-(41,16) = "("
+ │ │ │ │ │ └── rparen_loc: (41,17)-(41,18) = ")"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (41,11)-(41,12) = "("
+ │ │ │ │ └── rparen_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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (42,2)-(42,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (41,8)-(41,9) = "{"
+ │ └── closing_loc: (43,0)-(43,1) = "}"
+ ├── @ CallNode (location: (44,0)-(46,1))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (44,0)-(44,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (44,0)-(44,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (44,3)-(44,4) = "."
+ │ ├── name: :bar
+ │ ├── 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)
+ │ │ │ │ └── @ MultiTargetNode (location: (44,11)-(44,17))
+ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (44,12)-(44,13))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (44,15)-(44,16))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (44,11)-(44,12) = "("
+ │ │ │ │ └── rparen_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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (45,2)-(45,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (44,8)-(44,9) = "{"
+ │ └── closing_loc: (46,0)-(46,1) = "}"
+ ├── @ CallNode (location: (47,0)-(48,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (47,0)-(48,1))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (47,0)-(47,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (47,3)-(47,4) = "."
+ │ │ ├── name: :bar
+ │ │ ├── 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) = "}"
+ │ ├── call_operator_loc: (48,1)-(48,2) = "."
+ │ ├── name: :baz
+ │ ├── message_loc: (48,2)-(48,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (49,0)-(51,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── 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: (49,2)-(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"
+ ├── @ CallNode (location: (52,0)-(56,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── 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: (52,2)-(56,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (53,2)-(53,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (53,2)-(53,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (53,2)-(53,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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"
+ ├── @ CallNode (location: (57,0)-(61,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (57,0)-(57,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (57,2)-(61,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (57,2)-(61,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (58,2)-(58,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (58,2)-(58,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (58,2)-(58,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (59,19)-(59,22) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (60,2)-(60,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (60,2)-(60,5))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (60,2)-(60,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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"
+ ├── @ CallNode (location: (62,0)-(66,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── 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: (62,2)-(66,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (63,2)-(63,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (63,2)-(63,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (63,2)-(63,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (64,19)-(64,22) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (65,2)-(65,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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"
+ ├── @ CallNode (location: (67,0)-(71,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (67,0)-(67,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (67,2)-(71,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (67,2)-(71,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (68,2)-(68,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (68,2)-(68,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (68,2)-(68,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (69,8)-(69,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (70,2)-(70,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (70,2)-(70,5))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (70,2)-(70,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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"
+ ├── @ CallNode (location: (72,0)-(75,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (72,0)-(72,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (72,2)-(75,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (72,2)-(75,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (73,2)-(73,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (73,2)-(73,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (73,2)-(73,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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"
+ ├── @ CallNode (location: (76,0)-(81,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (76,0)-(76,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (76,2)-(81,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (76,2)-(81,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (77,2)-(77,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (77,2)-(77,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (77,2)-(77,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (80,2)-(80,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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"
+ ├── @ CallNode (location: (82,0)-(86,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── 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: (82,2)-(86,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (83,2)-(83,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (83,2)-(83,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (83,2)-(83,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (84,8)-(84,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (85,2)-(85,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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"
+ ├── @ CallNode (location: (87,0)-(89,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (87,0)-(87,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (87,2)-(89,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (87,2)-(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"
+ ├── @ CallNode (location: (90,0)-(93,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (90,0)-(90,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (90,2)-(93,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (90,2)-(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"
+ └── @ CallNode (location: (94,0)-(96,1))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :bar
+ ├── message_loc: (94,0)-(94,3) = "bar"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (94,4)-(96,1))
+ ├── locals: [:_1, :_2]
+ ├── parameters:
+ │ @ NumberedParametersNode (location: (94,4)-(96,1))
+ │ └── maximum: 2
+ ├── body:
+ │ @ StatementsNode (location: (95,2)-(95,9))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (95,2)-(95,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (95,2)-(95,4))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (95,5)-(95,6) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (95,7)-(95,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (95,7)-(95,9))
+ │ │ ├── name: :_2
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (94,4)-(94,5) = "{"
+ └── closing_loc: (96,0)-(96,1) = "}"
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..509caa55c8
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/case.txt
@@ -0,0 +1,446 @@
+@ 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (2,5)-(2,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ └── statements:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,2)-(3,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (3,2)-(3,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ WhenNode (location: (4,0)-(5,5))
+ │ │ ├── keyword_loc: (4,0)-(4,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (4,5)-(4,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (4,5)-(4,8) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (5,2)-(5,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (7,5)-(7,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (8,5)-(8,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ └── statements: ∅
+ │ │ └── @ WhenNode (location: (9,0)-(10,5))
+ │ │ ├── keyword_loc: (9,0)-(9,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (9,5)-(9,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (9,5)-(9,8) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (10,2)-(10,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (10,2)-(10,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (10,2)-(10,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (12,5)-(12,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (13,5)-(13,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ └── statements:
+ │ │ │ @ StatementsNode (location: (14,2)-(14,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (14,2)-(14,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (14,2)-(14,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ WhenNode (location: (15,0)-(16,5))
+ │ │ ├── keyword_loc: (15,0)-(15,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (15,5)-(15,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (15,5)-(15,8) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (16,2)-(16,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (16,2)-(16,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (16,2)-(16,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (18,5)-(18,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (19,5)-(19,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── @ CallNode (location: (19,10)-(19,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (19,10)-(19,13) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (20,2)-(20,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (20,2)-(20,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (22,5)-(22,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (23,6)-(23,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (24,2)-(24,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (24,2)-(24,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (26,5)-(26,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (27,5)-(27,8) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (28,2)-(28,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (28,2)-(28,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (28,2)-(28,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (32,5)-(32,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (33,6)-(33,9))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (33,6)-(33,9) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :|
+ │ │ │ ├── message_loc: (33,10)-(33,11) = "|"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (33,12)-(33,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (33,12)-(33,15))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (33,12)-(33,15) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (35,5)-(35,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: attribute_write
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (36,6)-(36,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (36,6)-(36,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (36,9)-(36,10) = "."
+ │ │ ├── name: :baz=
+ │ │ ├── message_loc: (36,10)-(36,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (36,14)-(36,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (36,14)-(36,15))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ └── 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..5306888398
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/class.txt
@@ -0,0 +1,226 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (4,9)-(4,10) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (7,9)-(7,10) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (8,2)-(8,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (8,2)-(8,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (8,2)-(8,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (11,7)-(11,9) = "::"
+ │ │ └── name_loc: (11,9)-(11,10) = "B"
+ │ ├── 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
+ │ │ │ ├── name: :B
+ │ │ │ ├── delimiter_loc: (14,7)-(14,9) = "::"
+ │ │ │ └── name_loc: (14,9)-(14,10) = "B"
+ │ │ ├── name: :C
+ │ │ ├── delimiter_loc: (14,10)-(14,12) = "::"
+ │ │ └── name_loc: (14,12)-(14,13) = "C"
+ │ ├── 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
+ │ │ ├── name: :C
+ │ │ ├── delimiter_loc: (20,11)-(20,13) = "::"
+ │ │ └── name_loc: (20,13)-(20,14) = "C"
+ │ ├── 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
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (23,7)-(23,9) = "::"
+ │ │ └── name_loc: (23,9)-(23,10) = "B"
+ │ ├── inheritance_operator_loc: (23,11)-(23,12) = "<"
+ │ ├── superclass:
+ │ │ @ ConstantPathNode (location: (23,13)-(23,17))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (23,13)-(23,14))
+ │ │ │ └── name: :C
+ │ │ ├── name: :D
+ │ │ ├── delimiter_loc: (23,14)-(23,16) = "::"
+ │ │ └── name_loc: (23,16)-(23,17) = "D"
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :include
+ │ │ │ ├── message_loc: (27,2)-(27,9) = "include"
+ │ │ │ ├── opening_loc: (27,9)-(27,10) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (27,10)-(27,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (27,10)-(27,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ ConstantReadNode (location: (27,10)-(27,11))
+ │ │ │ │ │ └── name: :B
+ │ │ │ │ ├── call_operator_loc: (27,11)-(27,12) = "."
+ │ │ │ │ ├── name: :new
+ │ │ │ │ ├── message_loc: (27,12)-(27,15) = "new"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (27,15)-(27,16) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ │ ├── name: :A
+ │ ├── delimiter_loc: (34,6)-(34,8) = "::"
+ │ └── name_loc: (34,8)-(34,9) = "A"
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body: ∅
+ ├── end_keyword_loc: (35,0)-(35,3) = "end"
+ └── name: :A
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..f3ef6c388e
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/def.txt
@@ -0,0 +1,1204 @@
+@ 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: (1,0)-(9,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (4,2)-(4,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (6,2)-(6,3) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── message_loc: (8,2)-(8,3) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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: (11,0)-(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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (12,2)-(12,3) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── keyword_loc: (12,4)-(12,10) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ CallNode (location: (12,11)-(12,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (12,11)-(12,12) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (14,2)-(14,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (16,2)-(16,3) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── message_loc: (18,2)-(18,3) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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)
+ │ │ │ ├── @ RequiredKeywordParameterNode (location: (21,8)-(21,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── name_loc: (21,8)-(21,12) = "bar:"
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (21,14)-(21,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ └── name_loc: (21,14)-(21,18) = "baz:"
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (28,2)-(28,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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: (31,0)-(37,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (32,2)-(32,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (32,2)-(32,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (32,2)-(32,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (34,2)-(34,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (36,2)-(36,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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: (39,0)-(43,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (40,2)-(40,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (40,2)-(40,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (40,2)-(40,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (42,2)-(42,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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: (45,0)-(49,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (46,2)-(46,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (46,2)-(46,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (46,2)-(46,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (48,2)-(48,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :bar
+ │ │ │ └── @ RequiredParameterNode (location: (55,13)-(55,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :baz
+ │ │ │ │ │ ├── message_loc: (63,15)-(63,18) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── @ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (70,13)-(70,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (74,8)-(74,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (74,8)-(74,12) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (74,13)-(74,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (77,8)-(77,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (77,8)-(77,12) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (77,13)-(77,16))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (77,13)-(77,16) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (80,8)-(80,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (80,8)-(80,12) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (80,13)-(80,18))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (80,13)-(80,16) = "bar"
+ │ │ │ ├── opening_loc: (80,16)-(80,17) = "("
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: (80,17)-(80,18) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (84,2)-(84,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (91,13)-(91,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (96,2)-(96,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (100,2)-(100,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (103,13)-(103,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (108,2)-(108,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (111,13)-(111,19))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (116,2)-(116,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (117,2)-(117,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (117,2)-(117,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (120,6)-(120,11))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ MultiTargetNode (location: (120,7)-(120,10))
+ │ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (120,8)-(120,9))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (120,7)-(120,8) = "("
+ │ │ │ │ └── rparen_loc: (120,9)-(120,10) = ")"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (120,6)-(120,7) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ ├── @ RequiredKeywordParameterNode (location: (123,8)-(123,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── name_loc: (123,8)-(123,12) = "bar:"
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (123,14)-(123,26))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (127,2)-(127,12) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (128,0)-(128,4))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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)-(129,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (128,7)-(129,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (129,0)-(130,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..89145ddcda
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/defined.txt
@@ -0,0 +1,55 @@
+@ 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))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (3,11)-(3,12))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (3,14)-(3,15))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 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))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (3,20)-(3,21))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (3,23)-(3,24))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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..7858877172
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/defs.txt
@@ -0,0 +1,358 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (5,2)-(5,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (9,2)-(9,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (10,2)-(10,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (10,2)-(10,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (14,2)-(14,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── 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) = "}"
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (19,2)-(19,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (22,5)-(22,8) = "foo"
+ │ │ │ ├── opening_loc: (22,8)-(22,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (22,9)-(22,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (22,9)-(22,10))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── closing_loc: (22,10)-(22,11) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (23,2)-(23,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ConstantPathNode (location: (26,5)-(26,13))
+ │ │ │ │ ├── parent:
+ │ │ │ │ │ @ ConstantReadNode (location: (26,5)-(26,8))
+ │ │ │ │ │ └── name: :Foo
+ │ │ │ │ ├── name: :Bar
+ │ │ │ │ ├── delimiter_loc: (26,8)-(26,10) = "::"
+ │ │ │ │ └── name_loc: (26,10)-(26,13) = "Bar"
+ │ │ │ ├── call_operator_loc: (26,13)-(26,14) = "."
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (26,14)-(26,17) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (27,2)-(27,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ ├── name: :Bar
+ │ │ │ ├── delimiter_loc: (30,8)-(30,10) = "::"
+ │ │ │ └── name_loc: (30,10)-(30,13) = "Bar"
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (31,2)-(31,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (35,2)-(35,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (38,4)-(38,7) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (39,2)-(39,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (39,2)-(39,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (39,2)-(39,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..8893e8b75d
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
@@ -0,0 +1,353 @@
+@ 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (2,2)-(2,8))
+ │ │ ├── flags: ∅
+ │ │ ├── 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: frozen
+ │ │ │ ├── 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(10,3))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ InterpolatedStringNode (location: (5,2)-(5,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (5,2)-(5,12) = "<<-HEREDOC"
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (6,0)-(7,0))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (6,0)-(7,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)-(9,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (7,3)-(9,0) = "a\nb\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a\nb\n"
+ │ │ │ └── closing_loc: (9,0)-(10,0) = " HEREDOC\n"
+ │ │ └── @ CallNode (location: (10,2)-(10,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :x
+ │ │ ├── message_loc: (10,2)-(10,3) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ InterpolatedStringNode (location: (12,0)-(12,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (12,0)-(12,10) = "<<-HEREDOC"
+ │ ├── parts: (length: 7)
+ │ │ ├── @ StringNode (location: (13,0)-(14,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (13,0)-(14,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)-(15,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (14,3)-(15,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)-(16,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (15,3)-(16,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)-(17,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (16,3)-(17,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (17,0)-(18,0) = "HEREDOC\n"
+ ├── @ RescueModifierNode (location: (18,0)-(18,21))
+ │ ├── expression:
+ │ │ @ InterpolatedStringNode (location: (18,0)-(18,10))
+ │ │ ├── flags: ∅
+ │ │ ├── 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)-(21,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (19,3)-(21,0) = "\na\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\na\n"
+ │ │ └── closing_loc: (21,0)-(22,0) = "HEREDOC\n"
+ │ ├── keyword_loc: (18,11)-(18,17) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (18,18)-(18,21))
+ ├── @ InterpolatedStringNode (location: (22,0)-(22,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (22,0)-(22,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (22,1)-(22,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (23,0)-(23,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (23,1)-(23,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (24,0)-(24,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (24,1)-(24,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (25,0)-(25,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (25,1)-(25,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (27,2)-(27,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (27,2)-(27,19))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (27,2)-(27,8) = "return"
+ │ │ └── arguments:
+ │ │ @ ArgumentsNode (location: (27,9)-(27,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (27,9)-(27,19))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (27,9)-(27,19) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (28,0)-(28,4))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 42
+ │ │ │ │ └── closing_loc: (28,8)-(28,9) = "}"
+ │ │ │ └── @ StringNode (location: (28,9)-(29,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (28,9)-(29,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (29,0)-(30,0) = " HEREDOC\n"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (30,0)-(30,3) = "end"
+ ├── @ CallNode (location: (31,0)-(31,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ ├── opening_loc: (31,3)-(31,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,4)-(31,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (31,4)-(31,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (31,4)-(31,14) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (32,0)-(32,2))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ ├── message_loc: (32,4)-(32,7) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── closing_loc: (32,7)-(32,8) = "}"
+ │ │ │ └── @ StringNode (location: (32,8)-(33,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (32,8)-(33,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (33,0)-(34,0) = "HEREDOC\n"
+ │ ├── closing_loc: (31,14)-(31,15) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (34,0)-(37,1))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (34,0)-(34,3) = "foo"
+ ├── opening_loc: (34,3)-(34,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (34,4)-(34,14))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (34,4)-(34,14))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (34,4)-(34,14) = "<<-HEREDOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (35,0)-(35,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (35,4)-(35,7) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (35,7)-(35,8) = "}"
+ │ │ └── @ StringNode (location: (35,8)-(36,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (35,8)-(36,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (36,0)-(37,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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
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..3a21ce5559
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/empty.txt
@@ -0,0 +1,5 @@
+@ ProgramNode (location: (1,0)-(1,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,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..2d9f669e6f
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/flipflop.txt
@@ -0,0 +1,237 @@
+@ ProgramNode (location: (1,0)-(10,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(10,3))
+ └── body: (length: 4)
+ ├── @ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── left:
+ │ │ │ │ @ ParenthesesNode (location: (1,4)-(1,12))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (1,5)-(1,11))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,5)-(1,11))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ CallNode (location: (1,5)-(1,6))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :i
+ │ │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "i"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :==
+ │ │ │ │ │ ├── message_loc: (1,7)-(1,9) = "=="
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ └── value: 4
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ CallNode (location: (1,15)-(1,16))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :i
+ │ │ │ │ │ │ ├── message_loc: (1,15)-(1,16) = "i"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :==
+ │ │ │ │ │ ├── message_loc: (1,17)-(1,19) = "=="
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (1,20)-(1,21))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (1,20)-(1,21))
+ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ └── value: 4
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── opening_loc: (1,14)-(1,15) = "("
+ │ │ │ │ └── closing_loc: (1,21)-(1,22) = ")"
+ │ │ │ └── operator_loc: (1,12)-(1,14) = ".."
+ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ └── closing_loc: (1,22)-(1,23) = ")"
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (2,2)-(2,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: exclude_end
+ │ │ │ ├── left:
+ │ │ │ │ @ ParenthesesNode (location: (4,4)-(4,12))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (4,5)-(4,11))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (4,5)-(4,11))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ CallNode (location: (4,5)-(4,6))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :i
+ │ │ │ │ │ │ ├── message_loc: (4,5)-(4,6) = "i"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :==
+ │ │ │ │ │ ├── message_loc: (4,7)-(4,9) = "=="
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (4,10)-(4,11))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (4,10)-(4,11))
+ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ └── value: 4
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ CallNode (location: (4,16)-(4,17))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :i
+ │ │ │ │ │ │ ├── message_loc: (4,16)-(4,17) = "i"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :==
+ │ │ │ │ │ ├── message_loc: (4,18)-(4,20) = "=="
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (4,21)-(4,22))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (4,21)-(4,22))
+ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ └── value: 4
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── opening_loc: (4,15)-(4,16) = "("
+ │ │ │ │ └── closing_loc: (4,22)-(4,23) = ")"
+ │ │ │ └── operator_loc: (4,12)-(4,15) = "..."
+ │ │ ├── opening_loc: (4,3)-(4,4) = "("
+ │ │ └── closing_loc: (4,23)-(4,24) = ")"
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (5,2)-(5,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ ├── @ IfNode (location: (7,0)-(8,3))
+ │ ├── if_keyword_loc: (7,0)-(7,2) = "if"
+ │ ├── predicate:
+ │ │ @ FlipFlopNode (location: (7,3)-(7,8))
+ │ │ ├── flags: ∅
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (7,5)-(7,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (7,5)-(7,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (7,3)-(7,5) = ".."
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
+ └── @ IfNode (location: (9,0)-(10,3))
+ ├── if_keyword_loc: (9,0)-(9,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (9,3)-(9,8))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ CallNode (location: (9,3)-(9,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (9,3)-(9,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right: ∅
+ │ └── operator_loc: (9,6)-(9,8) = ".."
+ ├── then_keyword_loc: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (10,0)-(10,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..660c6b73f3
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/for.txt
@@ -0,0 +1,171 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,0)-(1,3) = "bar"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(3,3))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (2,2)-(2,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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: ∅
+ ├── @ ForNode (location: (4,0)-(6,3))
+ │ ├── index:
+ │ │ @ LocalVariableTargetNode (location: (4,4)-(4,5))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── collection:
+ │ │ @ CallNode (location: (4,9)-(4,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (4,9)-(4,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (5,2)-(5,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── lefts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (7,5)-(7,6))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (7,8)-(7,10))
+ │ │ │ ├── operator_loc: (7,8)-(7,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (7,9)-(7,10))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: (7,4)-(7,5) = "("
+ │ │ └── rparen_loc: (7,10)-(7,11) = ")"
+ │ ├── collection:
+ │ │ @ CallNode (location: (7,15)-(7,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (7,15)-(7,18) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,2)-(8,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (8,2)-(8,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (8,2)-(8,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (10,5)-(10,6))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (10,8)-(10,9))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: (10,4)-(10,5) = "("
+ │ └── rparen_loc: (10,9)-(10,10) = ")"
+ ├── collection:
+ │ @ CallNode (location: (10,14)-(10,17))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (10,14)-(10,17) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (11,2)-(11,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,2)-(11,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (11,2)-(11,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..dabedbc588
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (2,2)-(2,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (4,0)-(4,3) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ PostExecutionNode (location: (5,0)-(7,1))
+ ├── statements:
+ │ @ StatementsNode (location: (6,2)-(6,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (6,2)-(6,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (6,2)-(6,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..00eeba179c
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/if.txt
@@ -0,0 +1,288 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,3)-(1,4) = "/"
+ │ │ ├── content_loc: (1,4)-(1,7) = "foo"
+ │ │ ├── closing_loc: (1,7)-(1,8) = "/"
+ │ │ └── unescaped: "foo"
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (2,2)-(2,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ └── value: 3
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,2)-(5,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 9
+ │ ├── 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
+ │ │ └── value: 4
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,2)-(8,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (8,2)-(8,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 5
+ │ ├── 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
+ │ │ │ └── value: 6
+ │ │ └── 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
+ │ │ └── value: 3
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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
+ │ │ └── value: 3
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (16,2)-(16,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 9
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (18,3)-(18,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (22,8)-(22,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (26,8)-(26,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (28,7)-(28,10) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (29,8)-(29,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── then_keyword_loc: ∅
+ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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..48e53af00e
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/kwbegin.txt
@@ -0,0 +1,491 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (10,2)-(10,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (14,2)-(14,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (16,2)-(16,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (20,2)-(20,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (21,2)-(21,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (21,2)-(21,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (23,2)-(23,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (35,2)-(35,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (39,2)-(39,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (41,2)-(41,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (47,4)-(47,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (51,2)-(51,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── @ CallNode (location: (52,2)-(52,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (52,2)-(52,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (56,2)-(56,7) = "raise"
+ │ │ │ ├── opening_loc: (56,7)-(56,8) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (56,8)-(56,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (56,8)-(56,17))
+ │ │ │ │ └── name: :Exception
+ │ │ │ ├── closing_loc: (56,17)-(56,18) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (56,32)-(56,35) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (75,2)-(75,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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..3594787bca
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
@@ -0,0 +1,151 @@
+@ ProgramNode (location: (1,0)-(13,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,1))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :lambda
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (3,0)-(5,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :lambda
+ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (3,13)-(3,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (10,6)-(10,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ RequiredParameterNode (location: (12,6)-(12,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 1)
+ │ │ └── @ BlockLocalVariableNode (location: (12,9)-(12,10))
+ │ │ ├── flags: ∅
+ │ │ └── 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..98b88e11ce
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/literal.txt
@@ -0,0 +1,1198 @@
+@ 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: frozen
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (1,11)-(1,21) = "<<-HEREDOC"
+ │ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ │ ├── @ StringNode (location: (2,0)-(2,2))
+ │ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ │ ├── 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)-(3,0))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (2,5)-(3,0) = "\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ └── closing_loc: (3,0)-(4,0) = "HEREDOC\n"
+ │ │ │ └── operator_loc: (1,8)-(1,10) = "=>"
+ │ │ └── @ AssocNode (location: (1,23)-(1,36))
+ │ │ ├── key:
+ │ │ │ @ StringNode (location: (1,23)-(1,28))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: frozen
+ │ │ │ │ ├── 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: frozen
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,0)-(6,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ │ ├── opening_loc: (6,1)-(6,2) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (6,2)-(6,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (6,2)-(6,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (6,2)-(6,12) = "<<-HEREDOC"
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (7,0)-(7,2))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── 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)-(8,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (7,5)-(8,0) = "\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\n"
+ │ │ │ └── closing_loc: (8,0)-(9,0) = "HEREDOC\n"
+ │ │ ├── closing_loc: (6,12)-(6,13) = ")"
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (6,13)-(6,14) = "."
+ │ ├── name: :a
+ │ ├── message_loc: (6,14)-(6,15) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (9,0)-(9,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,6))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ │ ├── opening_loc: (9,1)-(9,2) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,2)-(9,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── call_operator_loc: (9,6)-(9,7) = "."
+ │ ├── name: :a
+ │ ├── message_loc: (9,7)-(9,8) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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: frozen
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (10,11)-(10,21) = "<<-HEREDOC"
+ │ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ │ ├── @ StringNode (location: (11,0)-(11,2))
+ │ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ │ ├── 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)-(12,0))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (11,5)-(12,0) = "\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ └── closing_loc: (12,0)-(13,0) = "HEREDOC\n"
+ │ │ │ └── operator_loc: (10,8)-(10,10) = "=>"
+ │ │ └── @ AssocSplatNode (location: (10,23)-(10,28))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (10,25)-(10,28))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (10,25)-(10,28) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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: frozen
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (13,18)-(13,21) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (13,16)-(13,18) = "**"
+ │ └── closing_loc: (13,22)-(13,23) = "}"
+ ├── @ InterpolatedStringNode (location: (14,0)-(14,14))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ │ ├── 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: frozen
+ │ │ │ ├── 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
+ │ └── value: 0
+ ├── @ CallNode (location: (16,0)-(16,3))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (16,1)-(16,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+@
+ │ ├── message_loc: (16,0)-(16,1) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ IntegerNode (location: (17,0)-(17,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ IntegerNode (location: (18,0)-(18,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ RationalNode (location: (19,0)-(19,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (19,0)-(19,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ RationalNode (location: (20,0)-(20,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (20,0)-(20,3))
+ │ └── value: 1.5
+ ├── @ RationalNode (location: (21,0)-(21,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (21,0)-(21,3))
+ │ └── value: 1.3
+ ├── @ ImaginaryNode (location: (22,0)-(22,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (22,0)-(22,1))
+ │ ├── flags: decimal
+ │ └── value: 5
+ ├── @ ImaginaryNode (location: (23,0)-(23,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (23,0)-(23,2))
+ │ ├── flags: decimal
+ │ └── value: -5
+ ├── @ ImaginaryNode (location: (24,0)-(24,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (24,0)-(24,3))
+ │ └── value: 0.6
+ ├── @ ImaginaryNode (location: (25,0)-(25,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (25,0)-(25,4))
+ │ └── value: -0.6
+ ├── @ ImaginaryNode (location: (26,0)-(26,32))
+ │ └── numeric:
+ │ @ IntegerNode (location: (26,0)-(26,31))
+ │ ├── flags: decimal
+ │ └── value: 1000000000000000000000000000000
+ ├── @ ImaginaryNode (location: (27,0)-(27,3))
+ │ └── numeric:
+ │ @ RationalNode (location: (27,0)-(27,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (27,0)-(27,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ InterpolatedStringNode (location: (28,0)-(28,11))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (28,0)-(28,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (28,0)-(28,1) = "\""
+ │ │ │ ├── content_loc: (28,1)-(28,4) = "foo"
+ │ │ │ ├── closing_loc: (28,4)-(28,5) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ StringNode (location: (28,6)-(28,11))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (28,6)-(28,7) = "\""
+ │ │ ├── content_loc: (28,7)-(28,10) = "bar"
+ │ │ ├── closing_loc: (28,10)-(28,11) = "\""
+ │ │ └── unescaped: "bar"
+ │ └── closing_loc: ∅
+ ├── @ InterpolatedStringNode (location: (29,0)-(29,15))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (29,0)-(29,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (29,1)-(29,8))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (29,10)-(29,13) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (29,13)-(29,14) = "}"
+ │ └── closing_loc: (29,14)-(29,15) = "\""
+ ├── @ InterpolatedStringNode (location: (30,0)-(30,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (30,0)-(30,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (30,1)-(30,4))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (30,7)-(30,8) = "}"
+ │ │ └── @ StringNode (location: (30,8)-(30,11))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (31,0)-(31,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (31,1)-(31,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (32,4)-(32,8) = "\\\#{}"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#{}"
+ │ └── closing_loc: (32,8)-(32,9) = "\""
+ ├── @ InterpolatedStringNode (location: (33,0)-(33,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (33,0)-(33,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (33,1)-(33,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (43,0)-(43,1) = ":"
+ │ ├── value_loc: (43,1)-(43,4) = "foo"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "foo"
+ ├── @ SymbolNode (location: (44,0)-(44,6))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (45,0)-(45,1) = ":"
+ │ ├── value_loc: (45,1)-(45,4) = "foo"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "foo"
+ ├── @ SymbolNode (location: (46,0)-(46,6))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (48,0)-(48,2) = ":\""
+ │ ├── value_loc: (1,0)-(1,0) = ""
+ │ ├── closing_loc: (48,2)-(48,3) = "\""
+ │ └── unescaped: ""
+ ├── @ RegularExpressionNode (location: (49,0)-(49,5))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (49,0)-(49,1) = "/"
+ │ ├── content_loc: (49,1)-(49,4) = "foo"
+ │ ├── closing_loc: (49,4)-(49,5) = "/"
+ │ └── unescaped: "foo"
+ ├── @ RegularExpressionNode (location: (50,0)-(50,28))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (50,0)-(50,1) = "/"
+ │ ├── content_loc: (50,1)-(50,27) = "[^-+',.\\/:@[:alnum:]\\[\\]]+"
+ │ ├── closing_loc: (50,27)-(50,28) = "/"
+ │ └── unescaped: "[^-+',./:@[:alnum:]\\[\\]]+"
+ ├── @ InterpolatedRegularExpressionNode (location: (51,0)-(51,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (51,0)-(51,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (51,1)-(51,4))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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) = "/"
+ ├── @ InterpolatedRegularExpressionNode (location: (52,0)-(52,15))
+ │ ├── flags: ignore_case, extended, multi_line
+ │ ├── opening_loc: (52,0)-(52,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (52,1)-(52,4))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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"
+ ├── @ InterpolatedRegularExpressionNode (location: (53,0)-(53,13))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ │ ├── 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) = "/"
+ ├── @ RegularExpressionNode (location: (54,0)-(54,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (54,0)-(54,1) = "/"
+ │ ├── content_loc: (54,1)-(54,3) = "\\n"
+ │ ├── closing_loc: (54,3)-(54,4) = "/"
+ │ └── unescaped: "\\n"
+ ├── @ RegularExpressionNode (location: (55,0)-(55,4))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (55,0)-(55,1) = "/"
+ │ ├── content_loc: (55,1)-(55,3) = "\\n"
+ │ ├── closing_loc: (55,3)-(55,4) = "/"
+ │ └── unescaped: "\\n"
+ ├── @ RegularExpressionNode (location: (56,0)-(56,5))
+ │ ├── flags: extended, forced_us_ascii_encoding
+ │ ├── opening_loc: (56,0)-(56,1) = "/"
+ │ ├── content_loc: (56,1)-(56,3) = "\\n"
+ │ ├── closing_loc: (56,3)-(56,5) = "/x"
+ │ └── unescaped: "\\n"
+ ├── @ RegularExpressionNode (location: (57,0)-(57,7))
+ │ ├── flags: extended, forced_us_ascii_encoding
+ │ ├── opening_loc: (57,0)-(57,1) = "/"
+ │ ├── content_loc: (57,1)-(57,5) = "\\/\\/"
+ │ ├── closing_loc: (57,5)-(57,7) = "/x"
+ │ └── unescaped: "//"
+ ├── @ InterpolatedSymbolNode (location: (58,0)-(58,15))
+ │ ├── opening_loc: (58,0)-(58,2) = ":\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (58,2)-(58,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (58,7)-(58,10) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (58,10)-(58,11) = "}"
+ │ │ └── @ StringNode (location: (58,11)-(58,14))
+ │ │ ├── flags: frozen
+ │ │ ├── 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: frozen
+ │ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ ParenthesesNode (location: (60,0)-(60,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (60,1)-(60,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (60,1)-(60,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ FloatNode (location: (60,1)-(60,4))
+ │ │ │ │ └── value: 0.0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :/
+ │ │ │ ├── message_loc: (60,5)-(60,6) = "/"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (60,7)-(60,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (60,7)-(60,10))
+ │ │ │ │ └── value: 0.0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (60,0)-(60,1) = "("
+ │ │ └── closing_loc: (60,10)-(60,11) = ")"
+ │ ├── right:
+ │ │ @ IntegerNode (location: (60,13)-(60,14))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (60,11)-(60,13) = ".."
+ ├── @ RangeNode (location: (61,0)-(61,14))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (61,0)-(61,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ ParenthesesNode (location: (61,3)-(61,14))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (61,4)-(61,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (61,4)-(61,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ FloatNode (location: (61,4)-(61,7))
+ │ │ │ │ └── value: 0.0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :/
+ │ │ │ ├── message_loc: (61,8)-(61,9) = "/"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (61,10)-(61,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (61,10)-(61,13))
+ │ │ │ │ └── value: 0.0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (61,3)-(61,4) = "("
+ │ │ └── closing_loc: (61,13)-(61,14) = ")"
+ │ └── operator_loc: (61,1)-(61,3) = ".."
+ ├── @ RangeNode (location: (62,0)-(62,16))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ ParenthesesNode (location: (62,0)-(62,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (62,1)-(62,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (62,1)-(62,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ FloatNode (location: (62,1)-(62,4))
+ │ │ │ │ └── value: 0.0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :/
+ │ │ │ ├── message_loc: (62,5)-(62,6) = "/"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (62,7)-(62,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (62,7)-(62,10))
+ │ │ │ │ └── value: 0.0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (62,0)-(62,1) = "("
+ │ │ └── closing_loc: (62,10)-(62,11) = ")"
+ │ ├── right:
+ │ │ @ IntegerNode (location: (62,13)-(62,16))
+ │ │ ├── flags: decimal
+ │ │ └── value: 100
+ │ └── operator_loc: (62,11)-(62,13) = ".."
+ ├── @ FloatNode (location: (63,0)-(63,4))
+ │ └── value: -0.1
+ ├── @ FloatNode (location: (64,0)-(64,3))
+ │ └── value: 0.1
+ ├── @ ArrayNode (location: (65,0)-(65,6))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (65,1)-(65,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (65,4)-(65,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (65,0)-(65,1) = "["
+ │ └── closing_loc: (65,5)-(65,6) = "]"
+ ├── @ ArrayNode (location: (66,0)-(66,11))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (66,1)-(66,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :n2
+ │ │ ├── message_loc: (66,8)-(66,10) = "n2"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (66,0)-(66,1) = "["
+ │ └── closing_loc: (66,10)-(66,11) = "]"
+ ├── @ ArrayNode (location: (67,0)-(67,3))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ IntegerNode (location: (67,1)-(67,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── opening_loc: (67,0)-(67,1) = "["
+ │ └── closing_loc: (67,2)-(67,3) = "]"
+ ├── @ ArrayNode (location: (68,0)-(68,2))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (68,0)-(68,1) = "["
+ │ └── closing_loc: (68,1)-(68,2) = "]"
+ ├── @ ArrayNode (location: (69,0)-(69,10))
+ │ ├── flags: contains_splat
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (69,1)-(69,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ 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))
+ │ ├── flags: contains_splat
+ │ ├── 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
+ │ │ └── value: 1
+ │ ├── opening_loc: (70,0)-(70,1) = "["
+ │ └── closing_loc: (70,9)-(70,10) = "]"
+ ├── @ ArrayNode (location: (71,0)-(71,14))
+ │ ├── flags: contains_splat
+ │ ├── 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: 1
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (74,7)-(74,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── 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: 1
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (75,7)-(75,8))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── operator_loc: (75,4)-(75,6) = "=>"
+ │ │ └── @ AssocNode (location: (75,10)-(75,16))
+ │ │ ├── key:
+ │ │ │ @ IntegerNode (location: (75,10)-(75,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (75,15)-(75,16))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 4
+ │ │ └── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ ├── keyword_loc: (76,8)-(76,14) = "rescue"
+ │ │ │ │ │ └── rescue_expression:
+ │ │ │ │ │ @ CallNode (location: (76,15)-(76,18))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── message_loc: (76,15)-(76,18) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (77,8)-(77,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (77,8)-(77,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (78,2)-(78,3) = "a"
+ │ │ │ ├── closing_loc: (78,3)-(78,4) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (78,5)-(78,7))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (80,2)-(80,3) = ":"
+ │ │ │ ├── value_loc: (80,3)-(80,5) = "-@"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "-@"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (80,9)-(80,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (80,6)-(80,8) = "=>"
+ │ └── closing_loc: (80,11)-(80,12) = "}"
+ ├── @ InterpolatedStringNode (location: (81,0)-(82,7))
+ │ ├── flags: ∅
+ │ ├── 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)-(82,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (81,4)-(82,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: frozen
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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)-(85,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (84,6)-(85,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: frozen
+ │ │ │ ├── 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) = "}"
+ ├── @ SymbolNode (location: (87,0)-(88,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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)-(90,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (89,1)-(90,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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (90,2)-(90,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (90,5)-(90,6) = "}"
+ │ └── @ StringNode (location: (90,6)-(91,1))
+ │ ├── flags: frozen
+ │ ├── 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..6428aeea82
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/module.txt
@@ -0,0 +1,104 @@
+@ 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
+ │ │ ├── name: :B
+ │ │ ├── delimiter_loc: (4,8)-(4,10) = "::"
+ │ │ └── name_loc: (4,10)-(4,11) = "B"
+ │ ├── 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
+ │ │ │ ├── name: :B
+ │ │ │ ├── delimiter_loc: (7,8)-(7,10) = "::"
+ │ │ │ └── name_loc: (7,10)-(7,11) = "B"
+ │ │ ├── name: :C
+ │ │ ├── delimiter_loc: (7,11)-(7,13) = "::"
+ │ │ └── name_loc: (7,13)-(7,14) = "C"
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :include
+ │ │ ├── message_loc: (11,2)-(11,9) = "include"
+ │ │ ├── opening_loc: (11,9)-(11,10) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,10)-(11,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (11,10)-(11,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ConstantReadNode (location: (11,10)-(11,11))
+ │ │ │ │ └── name: :B
+ │ │ │ ├── call_operator_loc: (11,11)-(11,12) = "."
+ │ │ │ ├── name: :new
+ │ │ │ ├── message_loc: (11,12)-(11,15) = "new"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (11,15)-(11,16) = ")"
+ │ │ └── block: ∅
+ │ └── @ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..0761b47348
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/opasgn.txt
@@ -0,0 +1,509 @@
+@ 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"
+ │ ├── binary_operator_loc: (1,2)-(1,4) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── name: :a
+ │ ├── binary_operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (2,0)-(2,6))
+ │ ├── name_loc: (2,0)-(2,1) = "a"
+ │ ├── binary_operator_loc: (2,2)-(2,4) = "-="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (2,5)-(2,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── name: :a
+ │ ├── binary_operator: :-
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,7))
+ │ ├── name_loc: (3,0)-(3,1) = "a"
+ │ ├── binary_operator_loc: (3,2)-(3,5) = "**="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,6)-(3,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── name: :a
+ │ ├── binary_operator: :**
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (4,0)-(4,6))
+ │ ├── name_loc: (4,0)-(4,1) = "a"
+ │ ├── binary_operator_loc: (4,2)-(4,4) = "*="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (4,5)-(4,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── name: :a
+ │ ├── binary_operator: :*
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (5,0)-(5,6))
+ │ ├── name_loc: (5,0)-(5,1) = "a"
+ │ ├── binary_operator_loc: (5,2)-(5,4) = "/="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (5,5)-(5,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── name: :a
+ │ ├── binary_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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (6,6)-(6,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ └── value: 2
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ CallNode (location: (8,0)-(8,13))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ │ │ │ └── value: 2
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (8,0)-(8,1) = "("
+ │ │ └── closing_loc: (8,8)-(8,9) = ")"
+ │ ├── call_operator_loc: (8,9)-(8,10) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (8,10)-(8,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (9,0)-(9,17))
+ │ ├── flags: attribute_write
+ │ ├── 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: ∅
+ │ ├── name: :[]=
+ │ ├── message_loc: (9,10)-(9,13) = "[k]"
+ │ ├── opening_loc: (9,10)-(9,11) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,11)-(9,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (9,11)-(9,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :k
+ │ │ │ ├── message_loc: (9,11)-(9,12) = "k"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (9,16)-(9,17))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :v
+ │ │ ├── message_loc: (9,16)-(9,17) = "v"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (9,12)-(9,13) = "]"
+ │ └── block: ∅
+ ├── @ CallOperatorWriteNode (location: (10,0)-(10,8))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :b
+ │ ├── write_name: :b=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (10,4)-(10,6) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (10,7)-(10,8))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ CallOperatorWriteNode (location: (11,0)-(11,8))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :b
+ │ ├── write_name: :b=
+ │ ├── binary_operator: :-
+ │ ├── binary_operator_loc: (11,4)-(11,6) = "-="
+ │ └── value:
+ │ @ IntegerNode (location: (11,7)-(11,8))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ CallOperatorWriteNode (location: (12,0)-(12,9))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :b
+ │ ├── write_name: :b=
+ │ ├── binary_operator: :**
+ │ ├── binary_operator_loc: (12,4)-(12,7) = "**="
+ │ └── value:
+ │ @ IntegerNode (location: (12,8)-(12,9))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ CallOperatorWriteNode (location: (13,0)-(13,8))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :b
+ │ ├── write_name: :b=
+ │ ├── binary_operator: :*
+ │ ├── binary_operator_loc: (13,4)-(13,6) = "*="
+ │ └── value:
+ │ @ IntegerNode (location: (13,7)-(13,8))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ CallOperatorWriteNode (location: (14,0)-(14,8))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :b
+ │ ├── write_name: :b=
+ │ ├── binary_operator: :/
+ │ ├── binary_operator_loc: (14,4)-(14,6) = "/="
+ │ └── value:
+ │ @ IntegerNode (location: (14,7)-(14,8))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ CallAndWriteNode (location: (15,0)-(15,9))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :b
+ │ ├── write_name: :b=
+ │ ├── operator_loc: (15,4)-(15,7) = "&&="
+ │ └── value:
+ │ @ CallNode (location: (15,8)-(15,9))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (15,8)-(15,9) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallOrWriteNode (location: (16,0)-(16,9))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :b
+ │ ├── write_name: :b=
+ │ ├── operator_loc: (16,4)-(16,7) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (16,8)-(16,9))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IndexOperatorWriteNode (location: (17,0)-(17,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (17,0)-(17,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (17,1)-(17,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,2)-(17,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (17,2)-(17,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (17,2)-(17,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (17,3)-(17,4) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (17,5)-(17,7) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (17,8)-(17,9))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IndexOperatorWriteNode (location: (18,0)-(18,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (18,0)-(18,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (18,1)-(18,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (18,2)-(18,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (18,2)-(18,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (18,2)-(18,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (18,3)-(18,4) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :-
+ │ ├── binary_operator_loc: (18,5)-(18,7) = "-="
+ │ └── value:
+ │ @ IntegerNode (location: (18,8)-(18,9))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IndexOperatorWriteNode (location: (19,0)-(19,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (19,0)-(19,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (19,1)-(19,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,2)-(19,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (19,2)-(19,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (19,2)-(19,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (19,3)-(19,4) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :**
+ │ ├── binary_operator_loc: (19,5)-(19,8) = "**="
+ │ └── value:
+ │ @ IntegerNode (location: (19,9)-(19,10))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IndexOperatorWriteNode (location: (20,0)-(20,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (20,0)-(20,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (20,1)-(20,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (20,2)-(20,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (20,2)-(20,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (20,2)-(20,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (20,3)-(20,4) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :*
+ │ ├── binary_operator_loc: (20,5)-(20,7) = "*="
+ │ └── value:
+ │ @ IntegerNode (location: (20,8)-(20,9))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IndexOperatorWriteNode (location: (21,0)-(21,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (21,0)-(21,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (21,1)-(21,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (21,2)-(21,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (21,2)-(21,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (21,3)-(21,4) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :/
+ │ ├── binary_operator_loc: (21,5)-(21,7) = "/="
+ │ └── value:
+ │ @ IntegerNode (location: (21,8)-(21,9))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── @ IndexAndWriteNode (location: (22,0)-(22,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (22,0)-(22,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (22,1)-(22,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (22,2)-(22,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (22,2)-(22,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (22,2)-(22,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (22,3)-(22,4) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (22,5)-(22,8) = "&&="
+ │ └── value:
+ │ @ CallNode (location: (22,9)-(22,10))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (22,9)-(22,10) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ IndexOrWriteNode (location: (23,0)-(23,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (23,0)-(23,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (23,1)-(23,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,2)-(23,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (23,2)-(23,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (23,2)-(23,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (23,3)-(23,4) = "]"
+ │ ├── block: ∅
+ │ ├── operator_loc: (23,5)-(23,8) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (23,9)-(23,10))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── @ CallOperatorWriteNode (location: (24,0)-(24,10))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (24,0)-(24,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (24,0)-(24,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (24,3)-(24,4) = "."
+ ├── message_loc: (24,4)-(24,5) = "A"
+ ├── read_name: :A
+ ├── write_name: :A=
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (24,6)-(24,8) = "+="
+ └── value:
+ @ IntegerNode (location: (24,9)-(24,10))
+ ├── flags: decimal
+ └── value: 1
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..5a0b4bb733
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/pattern.txt
@@ -0,0 +1,446 @@
+@ ProgramNode (location: (1,0)-(41,8))
+├── locals: [:a, :x, :y]
+└── statements:
+ @ StatementsNode (location: (1,0)-(41,8))
+ └── body: (length: 4)
+ ├── @ CaseMatchNode (location: (1,0)-(33,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ └── @ IntegerNode (location: (2,8)-(2,9))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 3
+ │ │ │ │ ├── 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
+ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ └── @ IntegerNode (location: (4,7)-(4,8))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ ImplicitRestNode (location: (4,8)-(4,9))
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :y
+ │ │ │ │ ├── message_loc: (5,2)-(5,3) = "y"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (6,5)-(6,7))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (6,5)-(6,7))
+ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── value_loc: (6,5)-(6,6) = "x"
+ │ │ │ │ │ │ ├── closing_loc: (6,6)-(6,7) = ":"
+ │ │ │ │ │ │ └── unescaped: "x"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ ImplicitNode (location: (6,5)-(6,6))
+ │ │ │ │ │ │ └── value:
+ │ │ │ │ │ │ @ LocalVariableTargetNode (location: (6,5)-(6,6))
+ │ │ │ │ │ │ ├── name: :x
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── 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: ∅
+ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ AssocSplatNode (location: (8,4)-(8,7))
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ LocalVariableTargetNode (location: (8,6)-(8,7))
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── operator_loc: (8,4)-(8,6) = "**"
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (10,3)-(10,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ HashPatternNode (location: (10,3)-(10,5))
+ │ │ │ │ │ ├── constant: ∅
+ │ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── 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: ∅
+ │ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ │ ├── @ AssocNode (location: (14,4)-(14,8))
+ │ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ │ @ SymbolNode (location: (14,4)-(14,6))
+ │ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ │ ├── 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
+ │ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ │ └── @ AssocNode (location: (14,10)-(14,15))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (14,10)-(14,13))
+ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ ├── 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
+ │ │ │ │ │ │ └── value: 2
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── 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: ∅
+ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── 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: ∅
+ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ NoKeywordsParameterNode (location: (18,4)-(18,9))
+ │ │ │ │ │ ├── operator_loc: (18,4)-(18,6) = "**"
+ │ │ │ │ │ └── keyword_loc: (18,6)-(18,9) = "nil"
+ │ │ │ │ ├── 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: ∅
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (20,4)-(20,10))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (20,4)-(20,8))
+ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ ├── 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
+ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── 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
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (22,7)-(22,8))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 2
+ │ │ │ │ └── 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
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (34,0)-(36,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (34,5)-(34,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (34,5)-(34,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ IntegerNode (location: (35,8)-(35,9))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── 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
+ │ │ │ │ └── value: 3
+ │ │ │ ├── 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"
+ ├── @ CaseMatchNode (location: (37,0)-(40,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (37,5)-(37,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (37,5)-(37,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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
+ │ └── value: 1
+ ├── 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..08e386b872
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/pragma.txt
@@ -0,0 +1,20 @@
+@ 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))
+ │ ├── flags: ∅
+ │ └── filepath: "unparser/corpus/literal/pragma.txt"
+ ├── @ SourceLineNode (location: (3,0)-(3,8))
+ └── @ CallNode (location: (4,0)-(4,7))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :__dir__
+ ├── message_loc: (4,0)-(4,7) = "__dir__"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..ab015d04fc
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/range.txt
@@ -0,0 +1,55 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (1,2)-(1,4) = ".."
+ │ ├── opening_loc: (1,0)-(1,1) = "("
+ │ └── closing_loc: (1,4)-(1,5) = ")"
+ ├── @ RangeNode (location: (2,0)-(2,4))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (2,0)-(2,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ IntegerNode (location: (2,3)-(2,4))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── operator_loc: (2,1)-(2,3) = ".."
+ ├── @ ParenthesesNode (location: (3,0)-(3,6))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,1)-(3,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RangeNode (location: (3,1)-(3,5))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── right: ∅
+ │ │ └── operator_loc: (3,2)-(3,5) = "..."
+ │ ├── opening_loc: (3,0)-(3,1) = "("
+ │ └── closing_loc: (3,5)-(3,6) = ")"
+ └── @ RangeNode (location: (4,0)-(4,5))
+ ├── flags: exclude_end
+ ├── left:
+ │ @ IntegerNode (location: (4,0)-(4,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── right:
+ │ @ IntegerNode (location: (4,4)-(4,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── operator_loc: (4,1)-(4,4) = "..."
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..d3c9d62166
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/rescue.txt
@@ -0,0 +1,103 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (1,4)-(1,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (1,11)-(1,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,11)-(1,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ RescueModifierNode (location: (2,0)-(2,21))
+ │ ├── expression:
+ │ │ @ CallNode (location: (2,0)-(2,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (2,4)-(2,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ ReturnNode (location: (2,11)-(2,21))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (2,11)-(2,17) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (2,18)-(2,21))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (2,18)-(2,21))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (2,18)-(2,21) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (3,5)-(3,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (3,9)-(3,15) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ ReturnNode (location: (3,16)-(3,26))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (3,16)-(3,22) = "return"
+ │ │ └── arguments:
+ │ │ @ ArgumentsNode (location: (3,23)-(3,26))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,23)-(3,26))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,23)-(3,26) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..3fd7f719a1
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/send.txt
@@ -0,0 +1,2190 @@
+@ 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))
+ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ ├── @ LocalVariableTargetNode (location: (2,12)-(2,13))
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── @ LocalVariableTargetNode (location: (2,15)-(2,16))
+ │ │ │ │ │ ├── name: :_
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: (6,8)-(6,9) = "="
+ │ │ └── @ CallNode (location: (7,2)-(7,11))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (7,2)-(7,7))
+ │ │ │ ├── name: :local
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: (7,7)-(7,8) = "."
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (7,8)-(7,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── end_keyword_loc: (8,0)-(8,3) = "end"
+ │ └── name: :A
+ ├── @ CallNode (location: (9,0)-(10,7))
+ │ ├── flags: ∅
+ │ ├── 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) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (10,4)-(10,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (11,0)-(12,7))
+ │ ├── flags: ∅
+ │ ├── 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) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (12,4)-(12,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (13,0)-(15,7))
+ │ ├── flags: ∅
+ │ ├── 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) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (15,4)-(15,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (16,0)-(19,7))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (18,5)-(18,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ └── 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) = "."
+ │ ├── name: :baz
+ │ ├── message_loc: (19,4)-(19,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (20,0)-(22,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CaseNode (location: (20,0)-(22,3))
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (20,5)-(20,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (20,5)-(20,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (21,5)-(21,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── then_keyword_loc: ∅
+ │ │ │ └── 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) = "."
+ │ ├── name: :baz
+ │ ├── message_loc: (22,4)-(22,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (23,0)-(24,7))
+ │ ├── flags: ∅
+ │ ├── 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) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (24,4)-(24,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (25,0)-(26,7))
+ │ ├── flags: ∅
+ │ ├── 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) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (26,4)-(26,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (27,0)-(28,7))
+ │ ├── flags: ∅
+ │ ├── 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) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (28,4)-(28,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (29,0)-(30,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ UntilNode (location: (29,0)-(30,3))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (29,0)-(29,5) = "until"
+ │ │ ├── closing_loc: (30,0)-(30,3) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (29,6)-(29,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (29,6)-(29,9) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── statements: ∅
+ │ ├── call_operator_loc: (30,3)-(30,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (30,4)-(30,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(32,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ WhileNode (location: (31,0)-(32,3))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (31,0)-(31,5) = "while"
+ │ │ ├── closing_loc: (32,0)-(32,3) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (31,6)-(31,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (31,6)-(31,9) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── statements: ∅
+ │ ├── call_operator_loc: (32,3)-(32,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (32,4)-(32,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (33,0)-(34,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (33,0)-(34,1))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :loop
+ │ │ ├── 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) = "}"
+ │ ├── call_operator_loc: (34,1)-(34,2) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (34,2)-(34,5) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (35,0)-(36,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IfNode (location: (35,0)-(36,3))
+ │ │ ├── if_keyword_loc: (35,0)-(35,2) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (35,3)-(35,6))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (35,3)-(35,6) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: (36,0)-(36,3) = "end"
+ │ ├── call_operator_loc: (36,3)-(36,4) = "."
+ │ ├── name: :baz
+ │ ├── message_loc: (36,4)-(36,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (37,0)-(37,19))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (37,0)-(37,15))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (37,1)-(37,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (37,1)-(37,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ RegularExpressionNode (location: (37,1)-(37,6))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (37,1)-(37,2) = "/"
+ │ │ │ │ ├── content_loc: (37,2)-(37,5) = "bar"
+ │ │ │ │ ├── closing_loc: (37,5)-(37,6) = "/"
+ │ │ │ │ └── unescaped: "bar"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :=~
+ │ │ │ ├── message_loc: (37,7)-(37,9) = "=~"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (37,10)-(37,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (37,10)-(37,14))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (37,10)-(37,11) = ":"
+ │ │ │ │ ├── value_loc: (37,11)-(37,14) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (37,0)-(37,1) = "("
+ │ │ └── closing_loc: (37,14)-(37,15) = ")"
+ │ ├── call_operator_loc: (37,15)-(37,16) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (37,16)-(37,19) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (38,0)-(38,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (38,0)-(38,6))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (38,1)-(38,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ RangeNode (location: (38,1)-(38,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── left:
+ │ │ │ │ @ IntegerNode (location: (38,1)-(38,2))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── right:
+ │ │ │ │ @ IntegerNode (location: (38,4)-(38,5))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── operator_loc: (38,2)-(38,4) = ".."
+ │ │ ├── opening_loc: (38,0)-(38,1) = "("
+ │ │ └── closing_loc: (38,5)-(38,6) = ")"
+ │ ├── call_operator_loc: (38,6)-(38,7) = "."
+ │ ├── name: :max
+ │ ├── message_loc: (38,7)-(38,10) = "max"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (39,0)-(39,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (39,0)-(39,14))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (39,1)-(39,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (39,1)-(39,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (39,1)-(39,4))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (39,1)-(39,4) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :=~
+ │ │ │ ├── message_loc: (39,5)-(39,7) = "=~"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (39,8)-(39,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ RegularExpressionNode (location: (39,8)-(39,13))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (39,8)-(39,9) = "/"
+ │ │ │ │ ├── content_loc: (39,9)-(39,12) = "bar"
+ │ │ │ │ ├── closing_loc: (39,12)-(39,13) = "/"
+ │ │ │ │ └── unescaped: "bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (39,0)-(39,1) = "("
+ │ │ └── closing_loc: (39,13)-(39,14) = ")"
+ │ ├── call_operator_loc: (39,14)-(39,15) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (39,15)-(39,18) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (40,0)-(40,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (40,0)-(40,5))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (40,0)-(40,1) = "/"
+ │ │ ├── content_loc: (40,1)-(40,4) = "bar"
+ │ │ ├── closing_loc: (40,4)-(40,5) = "/"
+ │ │ └── unescaped: "bar"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (40,6)-(40,8) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (40,9)-(40,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (40,9)-(40,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (40,9)-(40,10) = ":"
+ │ │ ├── value_loc: (40,10)-(40,13) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (41,0)-(41,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (41,0)-(41,5))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (41,0)-(41,1) = "/"
+ │ │ ├── content_loc: (41,1)-(41,4) = "bar"
+ │ │ ├── closing_loc: (41,4)-(41,5) = "/"
+ │ │ └── unescaped: "bar"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (41,6)-(41,8) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,9)-(41,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (41,9)-(41,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (41,9)-(41,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ RangeNode (location: (42,0)-(42,8))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ IntegerNode (location: (42,0)-(42,1))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── right:
+ │ │ @ CallNode (location: (42,3)-(42,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (42,3)-(42,4))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── call_operator_loc: (42,4)-(42,5) = "."
+ │ │ ├── name: :max
+ │ │ ├── message_loc: (42,5)-(42,8) = "max"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (42,1)-(42,3) = ".."
+ ├── @ CallNode (location: (43,0)-(43,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (43,0)-(43,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (43,1)-(43,2) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (43,2)-(43,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (44,0)-(44,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :FOO
+ │ ├── message_loc: (44,0)-(44,3) = "FOO"
+ │ ├── opening_loc: (44,3)-(44,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (44,4)-(44,5) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (45,0)-(45,4))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (45,0)-(45,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (45,0)-(45,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (45,1)-(45,3) = "&."
+ │ ├── name: :b
+ │ ├── message_loc: (45,3)-(45,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (46,0)-(46,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (46,0)-(46,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (46,0)-(46,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (46,1)-(46,2) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (46,2)-(46,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (47,0)-(47,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (48,0)-(48,18))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (48,0)-(48,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (48,0)-(48,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<<
+ │ ├── message_loc: (48,4)-(48,6) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (48,7)-(48,18))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (48,8)-(48,11))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (48,8)-(48,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :*
+ │ │ │ ├── message_loc: (48,12)-(48,13) = "*"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (48,14)-(48,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (48,14)-(48,17))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (48,14)-(48,17) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (48,7)-(48,8) = "("
+ │ │ └── closing_loc: (48,17)-(48,18) = ")"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (49,0)-(49,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (49,0)-(49,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (49,0)-(49,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (49,4)-(49,6) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (49,7)-(49,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (49,7)-(49,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (49,7)-(49,8) = "/"
+ │ │ ├── content_loc: (49,8)-(49,11) = "bar"
+ │ │ ├── closing_loc: (49,11)-(49,12) = "/"
+ │ │ └── unescaped: "bar"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (50,0)-(50,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (50,6)-(50,9) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (50,13)-(50,16))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (50,13)-(50,16) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (50,10)-(50,12) = "||"
+ │ │ ├── opening_loc: (50,5)-(50,6) = "("
+ │ │ └── closing_loc: (50,16)-(50,17) = ")"
+ │ └── operator_loc: (50,4)-(50,5) = "&"
+ ├── @ CallNode (location: (51,0)-(51,10))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :block
+ │ │ ├── message_loc: (51,5)-(51,10) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (51,4)-(51,5) = "&"
+ ├── @ CallNode (location: (52,0)-(52,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (52,0)-(52,3) = "foo"
+ │ ├── opening_loc: (52,3)-(52,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (52,4)-(52,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (52,4)-(52,9))
+ │ │ ├── operator_loc: (52,4)-(52,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (52,5)-(52,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :args
+ │ │ ├── message_loc: (52,5)-(52,9) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (52,17)-(52,18) = ")"
+ │ └── block:
+ │ @ BlockArgumentNode (location: (52,11)-(52,17))
+ │ ├── expression:
+ │ │ @ CallNode (location: (52,12)-(52,17))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :block
+ │ │ ├── message_loc: (52,12)-(52,17) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (52,11)-(52,12) = "&"
+ ├── @ CallNode (location: (53,0)-(53,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (53,0)-(53,3) = "foo"
+ │ ├── opening_loc: (53,3)-(53,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (53,4)-(53,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (53,4)-(53,14))
+ │ │ ├── operator_loc: (53,4)-(53,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (53,5)-(53,14))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :arguments
+ │ │ ├── message_loc: (53,5)-(53,14) = "arguments"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (53,14)-(53,15) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (54,0)-(54,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (54,0)-(54,3) = "foo"
+ │ ├── opening_loc: (54,3)-(54,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (54,4)-(54,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (54,4)-(54,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (54,7)-(54,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: (54,8)-(54,9) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (55,0)-(55,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (55,0)-(55,3) = "foo"
+ │ ├── opening_loc: (55,3)-(55,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (55,4)-(55,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (55,4)-(55,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (55,4)-(55,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (55,7)-(55,8) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (56,0)-(56,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (56,0)-(56,3) = "foo"
+ │ ├── opening_loc: (56,3)-(56,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (56,4)-(56,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (56,4)-(56,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (56,4)-(56,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ SplatNode (location: (56,9)-(56,14))
+ │ │ ├── operator_loc: (56,9)-(56,10) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (56,10)-(56,14))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :args
+ │ │ ├── message_loc: (56,10)-(56,14) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (56,14)-(56,15) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (57,0)-(57,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (57,0)-(57,3) = "foo"
+ │ ├── opening_loc: (57,3)-(57,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (57,4)-(57,16))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (57,4)-(57,16))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (57,4)-(57,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (57,4)-(57,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (57,8)-(57,10) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (57,11)-(57,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ RegularExpressionNode (location: (57,11)-(57,16))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (57,11)-(57,12) = "/"
+ │ │ │ ├── content_loc: (57,12)-(57,15) = "bar"
+ │ │ │ ├── closing_loc: (57,15)-(57,16) = "/"
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (57,16)-(57,17) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (58,0)-(58,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (58,0)-(58,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (58,0)-(58,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (58,3)-(58,4) = "."
+ │ ├── name: :bar
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (58,9)-(58,12) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (58,8)-(58,9) = "&"
+ ├── @ CallNode (location: (59,0)-(59,26))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (59,0)-(59,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (59,0)-(59,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (59,3)-(59,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (59,4)-(59,7) = "bar"
+ │ ├── opening_loc: (59,7)-(59,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (59,8)-(59,25))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ SplatNode (location: (59,8)-(59,13))
+ │ │ │ ├── operator_loc: (59,8)-(59,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (59,9)-(59,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :arga
+ │ │ │ ├── message_loc: (59,9)-(59,13) = "arga"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── @ CallNode (location: (59,15)-(59,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (59,15)-(59,18) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ SplatNode (location: (59,20)-(59,25))
+ │ │ ├── operator_loc: (59,20)-(59,21) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (59,21)-(59,25))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :argb
+ │ │ ├── message_loc: (59,21)-(59,25) = "argb"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (59,25)-(59,26) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (60,0)-(60,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (60,0)-(60,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (60,0)-(60,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (60,3)-(60,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (60,4)-(60,7) = "bar"
+ │ ├── opening_loc: (60,7)-(60,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (60,8)-(60,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (60,8)-(60,13))
+ │ │ ├── operator_loc: (60,8)-(60,9) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (60,9)-(60,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :args
+ │ │ ├── message_loc: (60,9)-(60,13) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (60,13)-(60,14) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (61,0)-(61,19))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (61,0)-(61,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (61,0)-(61,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (61,3)-(61,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (61,4)-(61,7) = "bar"
+ │ ├── opening_loc: (61,7)-(61,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (61,8)-(61,18))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SplatNode (location: (61,8)-(61,13))
+ │ │ │ ├── operator_loc: (61,8)-(61,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (61,9)-(61,13))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :args
+ │ │ │ ├── message_loc: (61,9)-(61,13) = "args"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (61,15)-(61,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (61,15)-(61,18) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (61,18)-(61,19) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (62,0)-(62,19))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (62,0)-(62,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (62,0)-(62,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (62,3)-(62,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (62,4)-(62,7) = "bar"
+ │ ├── opening_loc: (62,7)-(62,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (62,8)-(62,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (62,8)-(62,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (62,15)-(62,18) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (62,14)-(62,15) = "&"
+ ├── @ CallNode (location: (63,0)-(63,17))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (63,0)-(63,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (63,0)-(63,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (63,3)-(63,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (63,4)-(63,7) = "bar"
+ │ ├── opening_loc: (63,7)-(63,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (63,8)-(63,16))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (63,8)-(63,16))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (63,8)-(63,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (63,8)-(63,12))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (63,8)-(63,11) = "baz"
+ │ │ │ ├── closing_loc: (63,11)-(63,12) = ":"
+ │ │ │ └── unescaped: "baz"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (63,13)-(63,16))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :boz
+ │ │ │ ├── message_loc: (63,13)-(63,16) = "boz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (63,16)-(63,17) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (64,0)-(64,26))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (64,0)-(64,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (64,0)-(64,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (64,3)-(64,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (64,4)-(64,7) = "bar"
+ │ ├── opening_loc: (64,7)-(64,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (64,8)-(64,25))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (64,8)-(64,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (64,8)-(64,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ KeywordHashNode (location: (64,13)-(64,25))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (64,13)-(64,25))
+ │ │ ├── key:
+ │ │ │ @ StringNode (location: (64,13)-(64,18))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :boz
+ │ │ │ ├── message_loc: (64,22)-(64,25) = "boz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (64,19)-(64,21) = "=>"
+ │ ├── closing_loc: (64,25)-(64,26) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (65,0)-(65,19))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (65,0)-(65,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (65,0)-(65,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (65,3)-(65,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (65,4)-(65,7) = "bar"
+ │ ├── opening_loc: (65,7)-(65,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (65,8)-(65,18))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (65,8)-(65,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (65,8)-(65,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ SplatNode (location: (65,13)-(65,18))
+ │ │ ├── operator_loc: (65,13)-(65,14) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (65,14)-(65,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :args
+ │ │ ├── message_loc: (65,14)-(65,18) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (65,18)-(65,19) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (66,0)-(66,27))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (66,0)-(66,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (66,0)-(66,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (66,3)-(66,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (66,4)-(66,7) = "bar"
+ │ ├── opening_loc: (66,7)-(66,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (66,8)-(66,18))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (66,8)-(66,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (66,8)-(66,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ SplatNode (location: (66,13)-(66,18))
+ │ │ ├── operator_loc: (66,13)-(66,14) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (66,14)-(66,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :args
+ │ │ ├── message_loc: (66,14)-(66,18) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (66,26)-(66,27) = ")"
+ │ └── block:
+ │ @ BlockArgumentNode (location: (66,20)-(66,26))
+ │ ├── expression:
+ │ │ @ CallNode (location: (66,21)-(66,26))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :block
+ │ │ ├── message_loc: (66,21)-(66,26) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (66,20)-(66,21) = "&"
+ ├── @ CallNode (location: (67,0)-(67,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (67,0)-(67,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (67,0)-(67,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (67,3)-(67,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (67,4)-(67,7) = "bar"
+ │ ├── opening_loc: (67,7)-(67,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (67,8)-(67,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (67,8)-(67,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (67,8)-(67,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ 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: ∅
+ ├── @ CallNode (location: (68,0)-(68,26))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (68,0)-(68,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (68,0)-(68,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (68,3)-(68,4) = "."
+ │ ├── name: :bar
+ │ ├── message_loc: (68,4)-(68,7) = "bar"
+ │ ├── opening_loc: (68,7)-(68,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (68,8)-(68,25))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (68,10)-(68,13) = "foo"
+ │ │ │ │ │ ├── closing_loc: (68,13)-(68,14) = ":"
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (68,15)-(68,18))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :boz
+ │ │ │ │ │ ├── message_loc: (68,15)-(68,18) = "boz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── closing_loc: (68,19)-(68,20) = "}"
+ │ │ └── @ CallNode (location: (68,22)-(68,25))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :boz
+ │ │ ├── message_loc: (68,22)-(68,25) = "boz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (68,25)-(68,26) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (69,0)-(69,12))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (69,0)-(69,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (69,0)-(69,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (69,3)-(69,4) = "."
+ │ ├── name: :bar=
+ │ ├── message_loc: (69,4)-(69,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (69,8)-(69,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (69,8)-(69,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (69,8)-(69,9) = ":"
+ │ │ ├── value_loc: (69,9)-(69,12) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (70,0)-(70,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (70,0)-(70,3) = "foo"
+ │ ├── opening_loc: (70,3)-(70,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (70,4)-(70,8))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (70,4)-(70,8))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (70,4)-(70,8))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (70,4)-(70,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (70,4)-(70,5) = "a"
+ │ │ │ ├── closing_loc: (70,5)-(70,6) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (70,7)-(70,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (70,7)-(70,8) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (70,8)-(70,9) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (71,0)-(71,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (71,0)-(71,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (71,0)-(71,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (71,3)-(71,4) = "."
+ │ ├── name: :&
+ │ ├── message_loc: (71,4)-(71,5) = "&"
+ │ ├── opening_loc: (71,5)-(71,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (71,6)-(71,10))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (71,6)-(71,10))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (71,6)-(71,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (71,6)-(71,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (71,6)-(71,7) = "a"
+ │ │ │ ├── closing_loc: (71,7)-(71,8) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (71,9)-(71,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (71,9)-(71,10) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (71,10)-(71,11) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (72,0)-(72,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (72,0)-(72,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (72,0)-(72,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (72,3)-(72,4) = "."
+ │ ├── name: :&
+ │ ├── message_loc: (72,4)-(72,5) = "&"
+ │ ├── opening_loc: (72,5)-(72,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (72,6)-(72,9))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (72,6)-(72,9))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (72,6)-(72,9))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (72,8)-(72,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (72,8)-(72,9) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (72,6)-(72,8) = "**"
+ │ ├── closing_loc: (72,9)-(72,10) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (73,0)-(73,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (73,0)-(73,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (73,0)-(73,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (73,3)-(73,9) = "[*baz]"
+ │ ├── opening_loc: (73,3)-(73,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (73,4)-(73,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (73,4)-(73,8))
+ │ │ ├── operator_loc: (73,4)-(73,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (73,5)-(73,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (73,5)-(73,8) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (73,8)-(73,9) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (74,0)-(74,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (74,0)-(74,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (74,0)-(74,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (74,3)-(74,9) = "[1, 2]"
+ │ ├── opening_loc: (74,3)-(74,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (74,4)-(74,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (74,4)-(74,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (74,7)-(74,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── closing_loc: (74,8)-(74,9) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (75,0)-(75,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (75,0)-(75,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (75,0)-(75,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (75,3)-(75,5) = "[]"
+ │ ├── opening_loc: (75,3)-(75,4) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (75,4)-(75,5) = "]"
+ │ └── block: ∅
+ ├── @ CallNode (location: (76,0)-(76,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (76,0)-(76,4))
+ │ ├── call_operator_loc: (76,4)-(76,5) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (76,5)-(76,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (77,0)-(77,13))
+ │ ├── flags: attribute_write, ignore_visibility
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (77,0)-(77,4))
+ │ ├── call_operator_loc: (77,4)-(77,5) = "."
+ │ ├── name: :foo=
+ │ ├── message_loc: (77,5)-(77,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (77,9)-(77,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (77,9)-(77,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (77,9)-(77,10) = ":"
+ │ │ ├── value_loc: (77,10)-(77,13) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (78,0)-(78,17))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (78,0)-(78,7))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (78,1)-(78,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (78,1)-(78,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (78,1)-(78,2))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (78,1)-(78,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (78,3)-(78,4) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (78,5)-(78,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (78,5)-(78,6))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (78,5)-(78,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (78,0)-(78,1) = "("
+ │ │ └── closing_loc: (78,6)-(78,7) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :/
+ │ ├── message_loc: (78,8)-(78,9) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (78,10)-(78,17))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (78,11)-(78,12))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (78,11)-(78,12) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :-
+ │ │ │ ├── message_loc: (78,13)-(78,14) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (78,15)-(78,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (78,15)-(78,16))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── message_loc: (78,15)-(78,16) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (78,10)-(78,11) = "("
+ │ │ └── closing_loc: (78,16)-(78,17) = ")"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (79,0)-(79,19))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (79,0)-(79,7))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (79,1)-(79,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (79,1)-(79,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (79,1)-(79,2))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (79,1)-(79,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (79,3)-(79,4) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (79,5)-(79,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (79,5)-(79,6))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (79,5)-(79,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (79,0)-(79,1) = "("
+ │ │ └── closing_loc: (79,6)-(79,7) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :/
+ │ ├── message_loc: (79,8)-(79,9) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (79,10)-(79,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (79,10)-(79,19))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (79,10)-(79,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (79,10)-(79,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (79,11)-(79,12) = "."
+ │ │ ├── name: :-
+ │ │ ├── message_loc: (79,12)-(79,13) = "-"
+ │ │ ├── opening_loc: (79,13)-(79,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (79,14)-(79,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ CallNode (location: (79,14)-(79,15))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :e
+ │ │ │ │ ├── message_loc: (79,14)-(79,15) = "e"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── @ CallNode (location: (79,17)-(79,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :f
+ │ │ │ ├── message_loc: (79,17)-(79,18) = "f"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (79,18)-(79,19) = ")"
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (80,0)-(80,17))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (80,0)-(80,7))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (80,1)-(80,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (80,1)-(80,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (80,1)-(80,2))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (80,1)-(80,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (80,3)-(80,4) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (80,5)-(80,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (80,5)-(80,6))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (80,5)-(80,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (80,0)-(80,1) = "("
+ │ │ └── closing_loc: (80,6)-(80,7) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :/
+ │ ├── message_loc: (80,8)-(80,9) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (80,10)-(80,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (80,10)-(80,17))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (80,10)-(80,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (80,10)-(80,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (80,11)-(80,12) = "."
+ │ │ ├── name: :-
+ │ │ ├── message_loc: (80,12)-(80,13) = "-"
+ │ │ ├── opening_loc: (80,13)-(80,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (80,14)-(80,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SplatNode (location: (80,14)-(80,16))
+ │ │ │ ├── operator_loc: (80,14)-(80,15) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (80,15)-(80,16))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :f
+ │ │ │ ├── message_loc: (80,15)-(80,16) = "f"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (80,16)-(80,17) = ")"
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (81,0)-(81,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :x
+ │ ├── message_loc: (81,0)-(81,1) = "x"
+ │ ├── opening_loc: (81,1)-(81,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (81,2)-(81,7))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (81,2)-(81,7))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (81,2)-(81,7))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (81,4)-(81,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (81,4)-(81,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (81,2)-(81,4) = "**"
+ │ ├── closing_loc: (81,7)-(81,8) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (82,0)-(82,6))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (82,0)-(82,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (82,0)-(82,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (82,3)-(82,5) = "&."
+ │ ├── name: :!
+ │ ├── message_loc: (82,5)-(82,6) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (83,0)-(83,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (83,0)-(83,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (83,0)-(83,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (83,3)-(83,4) = "."
+ │ ├── name: :~
+ │ ├── message_loc: (83,4)-(83,5) = "~"
+ │ ├── opening_loc: (83,5)-(83,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (83,6)-(83,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (83,6)-(83,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (83,6)-(83,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (83,7)-(83,8) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (84,0)-(84,7))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (84,0)-(84,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (84,0)-(84,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (84,1)-(84,3) = "&."
+ ├── name: :+
+ ├── message_loc: (84,3)-(84,4) = "+"
+ ├── opening_loc: (84,4)-(84,5) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (84,5)-(84,6))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (84,5)-(84,6))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (84,5)-(84,6) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (84,6)-(84,7) = ")"
+ └── block: ∅
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..60edc18604
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
@@ -0,0 +1,49 @@
+@ 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:
+ │ │ @ NumberedParametersNode (location: (1,0)-(3,1))
+ │ │ └── maximum: 2
+ │ └── body:
+ │ @ StatementsNode (location: (2,2)-(2,9))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,2)-(2,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (2,2)-(2,4))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (2,5)-(2,6) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,7)-(2,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (2,7)-(2,9))
+ │ │ ├── name: :_2
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ ParenthesesNode (location: (4,0)-(4,5))
+ ├── body:
+ │ @ StatementsNode (location: (4,1)-(4,4))
+ │ └── body: (length: 1)
+ │ └── @ RangeNode (location: (4,1)-(4,4))
+ │ ├── flags: ∅
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (4,3)-(4,4))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── operator_loc: (4,1)-(4,3) = ".."
+ ├── 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..300dd869f5
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/30.txt
@@ -0,0 +1,88 @@
+@ 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
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ │ └── value: 42
+ │ │ ├── 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
+ │ └── value: 1
+ ├── 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..142a56ae83
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/31.txt
@@ -0,0 +1,90 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,8)-(1,9) = "&"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── 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) = "&"
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (5,11)-(5,12))
+ │ ├── flags: ∅
+ │ ├── name: ∅
+ │ ├── name_loc: ∅
+ │ └── operator_loc: (5,11)-(5,12) = "&"
+ ├── body:
+ │ @ StatementsNode (location: (6,2)-(6,7))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (6,2)-(6,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── 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) = "&"
+ ├── 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..2b28be2fa8
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/32.txt
@@ -0,0 +1,156 @@
+@ ProgramNode (location: (1,0)-(11,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,3))
+ └── body: (length: 3)
+ ├── @ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :argument
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (1,18)-(1,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (2,2)-(2,5) = "bar"
+ │ │ ├── opening_loc: (2,5)-(2,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,6)-(2,18))
+ │ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ LocalVariableReadNode (location: (2,6)-(2,14))
+ │ │ │ │ ├── name: :argument
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ KeywordHashNode (location: (2,16)-(2,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocSplatNode (location: (2,16)-(2,18))
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: (2,16)-(2,18) = "**"
+ │ │ ├── closing_loc: (2,18)-(2,19) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :argument
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (5,18)-(5,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (6,2)-(6,5) = "bar"
+ │ │ ├── opening_loc: (6,5)-(6,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (6,6)-(6,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── 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"
+ └── @ DefNode (location: (9,0)-(11,3))
+ ├── name: :foo
+ ├── name_loc: (9,4)-(9,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (9,8)-(9,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (9,8)-(9,10))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (9,8)-(9,10) = "**"
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (10,2)-(10,20))
+ │ └── body: (length: 1)
+ │ └── @ HashNode (location: (10,2)-(10,20))
+ │ ├── opening_loc: (10,2)-(10,3) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (10,4)-(10,14))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (10,4)-(10,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (10,4)-(10,11) = "default"
+ │ │ │ │ ├── closing_loc: (10,11)-(10,12) = ":"
+ │ │ │ │ └── unescaped: "default"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (10,13)-(10,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocSplatNode (location: (10,16)-(10,18))
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: (10,16)-(10,18) = "**"
+ │ └── closing_loc: (10,19)-(10,20) = "}"
+ ├── locals: []
+ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (9,7)-(9,8) = "("
+ ├── rparen_loc: (9,10)-(9,11) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (11,0)-(11,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..d5a7889919
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/super.txt
@@ -0,0 +1,277 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,6)-(3,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (3,6)-(3,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (4,6)-(4,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (4,6)-(4,7) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (4,9)-(4,10))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (4,9)-(4,10) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── rparen_loc: (4,10)-(4,11) = ")"
+ │ └── block: ∅
+ ├── @ SuperNode (location: (5,0)-(5,13))
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :block
+ │ │ ├── message_loc: (5,7)-(5,12) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (5,6)-(5,7) = "&"
+ ├── @ SuperNode (location: (6,0)-(6,16))
+ │ ├── keyword_loc: (6,0)-(6,5) = "super"
+ │ ├── lparen_loc: (6,5)-(6,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,6)-(6,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (6,6)-(6,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (6,6)-(6,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── rparen_loc: (6,15)-(6,16) = ")"
+ │ └── block:
+ │ @ BlockArgumentNode (location: (6,9)-(6,15))
+ │ ├── expression:
+ │ │ @ CallNode (location: (6,10)-(6,15))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :block
+ │ │ ├── message_loc: (6,10)-(6,15) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,6)-(9,1))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (8,2)-(8,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (7,8)-(7,9) = "{"
+ │ │ └── closing_loc: (9,0)-(9,1) = "}"
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (11,2)-(11,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (13,6)-(13,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (13,6)-(13,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (14,2)-(14,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (17,2)-(17,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (19,6)-(19,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (19,6)-(19,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ CallNode (location: (19,9)-(19,10))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (19,9)-(19,10) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (20,2)-(20,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..5e9563d811
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/unary.txt
@@ -0,0 +1,248 @@
+@ ProgramNode (location: (1,0)-(8,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,9))
+ └── body: (length: 8)
+ ├── @ CallNode (location: (1,0)-(1,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (2,0)-(2,5))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (2,1)-(2,5))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ IntegerNode (location: (2,3)-(2,4))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :!
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "!"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (2,1)-(2,2) = "("
+ │ │ └── closing_loc: (2,4)-(2,5) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (2,0)-(2,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,16))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (3,1)-(3,16))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,15))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,2)-(3,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── right:
+ │ │ │ │ │ │ @ CallNode (location: (3,11)-(3,14))
+ │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ │ ├── message_loc: (3,11)-(3,14) = "bar"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ └── operator_loc: (3,8)-(3,10) = "||"
+ │ │ │ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ │ │ │ └── closing_loc: (3,14)-(3,15) = ")"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :!
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "!"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (3,1)-(3,2) = "("
+ │ │ └── closing_loc: (3,15)-(3,16) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (3,0)-(3,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (4,0)-(4,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (4,1)-(4,9))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ ParenthesesNode (location: (4,1)-(4,5))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (4,2)-(4,4))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ IntegerNode (location: (4,3)-(4,4))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :!
+ │ │ │ │ ├── message_loc: (4,2)-(4,3) = "!"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (4,1)-(4,2) = "("
+ │ │ │ └── closing_loc: (4,4)-(4,5) = ")"
+ │ │ ├── call_operator_loc: (4,5)-(4,6) = "."
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (4,6)-(4,9) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (4,0)-(4,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,1)-(5,2))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (5,1)-(5,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :~
+ │ ├── message_loc: (5,0)-(5,1) = "~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (6,0)-(6,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,1)-(6,2))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (6,1)-(6,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :-@
+ │ ├── message_loc: (6,0)-(6,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(7,2))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,1)-(7,2))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (7,1)-(7,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+@
+ │ ├── message_loc: (7,0)-(7,1) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (8,0)-(8,9))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (8,1)-(8,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (8,1)-(8,5))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (8,2)-(8,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (8,2)-(8,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (8,3)-(8,4))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (8,3)-(8,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :-@
+ │ │ │ ├── message_loc: (8,2)-(8,3) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (8,1)-(8,2) = "("
+ │ │ └── closing_loc: (8,4)-(8,5) = ")"
+ │ ├── call_operator_loc: (8,5)-(8,6) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (8,6)-(8,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :-@
+ ├── message_loc: (8,0)-(8,1) = "-"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..282cbe8f87
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/undef.txt
@@ -0,0 +1,29 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (2,6)-(2,7) = ":"
+ │ │ ├── value_loc: (2,7)-(2,10) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ SymbolNode (location: (2,12)-(2,16))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..9ae8ad1207
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/variables.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(10,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(10,17))
+ └── body: (length: 10)
+ ├── @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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))
+ │ └── name: :$`
+ ├── @ ConstantReadNode (location: (7,0)-(7,5))
+ │ └── name: :CONST
+ ├── @ ConstantPathNode (location: (8,0)-(8,13))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (8,0)-(8,6))
+ │ │ └── name: :SCOPED
+ │ ├── name: :CONST
+ │ ├── delimiter_loc: (8,6)-(8,8) = "::"
+ │ └── name_loc: (8,8)-(8,13) = "CONST"
+ ├── @ ConstantPathNode (location: (9,0)-(9,10))
+ │ ├── parent: ∅
+ │ ├── name: :TOPLEVEL
+ │ ├── delimiter_loc: (9,0)-(9,2) = "::"
+ │ └── name_loc: (9,2)-(9,10) = "TOPLEVEL"
+ └── @ ConstantPathNode (location: (10,0)-(10,17))
+ ├── parent:
+ │ @ ConstantPathNode (location: (10,0)-(10,10))
+ │ ├── parent: ∅
+ │ ├── name: :TOPLEVEL
+ │ ├── delimiter_loc: (10,0)-(10,2) = "::"
+ │ └── name_loc: (10,2)-(10,10) = "TOPLEVEL"
+ ├── name: :CONST
+ ├── delimiter_loc: (10,10)-(10,12) = "::"
+ └── name_loc: (10,12)-(10,17) = "CONST"
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..0f752f3392
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/while.txt
@@ -0,0 +1,704 @@
+@ 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── keyword_loc: (3,4)-(3,9) = "while"
+ │ │ │ ├── closing_loc: (5,4)-(5,7) = "end"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ CallNode (location: (3,10)-(3,13))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (3,10)-(3,13) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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) = "="
+ │ │ ├── opening_loc: (2,6)-(2,7) = "{"
+ │ │ └── closing_loc: (6,2)-(6,3) = "}"
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (10,12)-(10,17) = "while"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (10,18)-(10,28))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (10,18)-(10,21))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :!=
+ │ │ │ ├── message_loc: (10,22)-(10,24) = "!="
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (10,25)-(10,28))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (10,25)-(10,28))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (10,25)-(10,28) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (10,8)-(10,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (10,6)-(10,7) = "="
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (14,8)-(14,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (14,6)-(14,7) = "="
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (18,8)-(18,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (18,6)-(18,7) = "="
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (22,2)-(22,7) = "while"
+ │ │ ├── closing_loc: (24,2)-(24,5) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (22,8)-(22,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (22,8)-(22,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (23,10)-(23,13) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (23,8)-(23,9) = "="
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :each
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── keyword_loc: (29,4)-(29,9) = "while"
+ │ │ │ ├── closing_loc: (31,4)-(31,7) = "end"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ CallNode (location: (29,10)-(29,13))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (29,10)-(29,13) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (30,12)-(30,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (30,10)-(30,11) = "="
+ │ │ ├── opening_loc: (28,7)-(28,8) = "{"
+ │ │ └── closing_loc: (32,2)-(32,3) = "}"
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :each
+ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (38,12)-(38,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (38,10)-(38,11) = "="
+ │ │ ├── opening_loc: (36,7)-(36,8) = "{"
+ │ │ └── closing_loc: (40,2)-(40,3) = "}"
+ │ ├── 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))
+ │ │ │ ├── flags: begin_modifier
+ │ │ │ ├── keyword_loc: (44,4)-(44,9) = "while"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── predicate:
+ │ │ │ │ @ CallNode (location: (44,10)-(44,13))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── message_loc: (44,10)-(44,13) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (43,2)-(43,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── rescue_clause: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (44,0)-(44,3) = "end"
+ │ │ ├── opening_loc: (42,4)-(42,5) = "("
+ │ │ └── closing_loc: (44,13)-(44,14) = ")"
+ │ └── operator_loc: (42,2)-(42,3) = "="
+ ├── @ WhileNode (location: (45,0)-(47,13))
+ │ ├── flags: begin_modifier
+ │ ├── keyword_loc: (47,4)-(47,9) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (47,10)-(47,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (47,10)-(47,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (46,2)-(46,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (47,0)-(47,3) = "end"
+ ├── @ UntilNode (location: (48,0)-(51,13))
+ │ ├── flags: begin_modifier
+ │ ├── keyword_loc: (51,4)-(51,9) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (51,10)-(51,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (51,10)-(51,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (49,2)-(49,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (50,2)-(50,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (50,2)-(50,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
+ ├── @ WhileNode (location: (52,0)-(55,13))
+ │ ├── flags: begin_modifier
+ │ ├── keyword_loc: (55,4)-(55,9) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (55,10)-(55,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (55,10)-(55,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (53,2)-(53,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (54,2)-(54,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (54,2)-(54,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (55,0)-(55,3) = "end"
+ ├── @ WhileNode (location: (56,0)-(57,3))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (56,0)-(56,5) = "while"
+ │ ├── closing_loc: (57,0)-(57,3) = "end"
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (56,6)-(56,11))
+ │ └── statements: ∅
+ ├── @ WhileNode (location: (58,0)-(60,3))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ └── value: 3
+ ├── @ WhileNode (location: (61,0)-(64,3))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── 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) = "}"
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (63,2)-(63,3) = ":"
+ │ ├── value_loc: (63,3)-(63,7) = "body"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "body"
+ ├── @ UntilNode (location: (65,0)-(66,3))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (65,0)-(65,5) = "until"
+ │ ├── closing_loc: (66,0)-(66,3) = "end"
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (65,6)-(65,11))
+ │ └── statements: ∅
+ ├── @ UntilNode (location: (67,0)-(69,3))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ └── value: 3
+ └── @ UntilNode (location: (70,0)-(73,3))
+ ├── flags: ∅
+ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── 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) = "}"
+ │ ├── 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))
+ ├── flags: forced_us_ascii_encoding
+ ├── opening_loc: (72,2)-(72,3) = ":"
+ ├── value_loc: (72,3)-(72,7) = "body"
+ ├── closing_loc: ∅
+ └── unescaped: "body"
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..4d2b272e35
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/yield.txt
@@ -0,0 +1,56 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (2,6)-(2,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,6)-(2,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,6)-(3,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (3,6)-(3,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ CallNode (location: (3,9)-(3,10))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (3,9)-(3,10) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..bc9d674e44
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/and.txt
@@ -0,0 +1,235 @@
+@ 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))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (1,1)-(1,4) = "..."
+ │ ├── right:
+ │ │ @ RangeNode (location: (1,9)-(1,14))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (1,9)-(1,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (1,9)-(1,10) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (1,13)-(1,14) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (1,10)-(1,13) = "..."
+ │ └── operator_loc: (1,6)-(1,8) = "or"
+ ├── @ AndNode (location: (2,0)-(2,15))
+ │ ├── left:
+ │ │ @ RangeNode (location: (2,0)-(2,5))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (2,4)-(2,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (2,4)-(2,5) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (2,1)-(2,4) = "..."
+ │ ├── right:
+ │ │ @ RangeNode (location: (2,10)-(2,15))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (2,10)-(2,11))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (2,10)-(2,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (2,14)-(2,15))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (2,14)-(2,15) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (2,11)-(2,14) = "..."
+ │ └── 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))
+ │ │ │ ├── flags: exclude_end
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (4,3)-(4,4))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (4,3)-(4,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (4,7)-(4,8))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (4,7)-(4,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (4,4)-(4,7) = "..."
+ │ │ ├── right:
+ │ │ │ @ FlipFlopNode (location: (4,12)-(4,17))
+ │ │ │ ├── flags: exclude_end
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (4,12)-(4,13))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (4,12)-(4,13) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (4,16)-(4,17))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── message_loc: (4,16)-(4,17) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (4,13)-(4,16) = "..."
+ │ │ └── operator_loc: (4,9)-(4,11) = "or"
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (7,3)-(7,4))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (7,3)-(7,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (7,7)-(7,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (7,7)-(7,8) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (7,4)-(7,7) = "..."
+ │ ├── right:
+ │ │ @ FlipFlopNode (location: (7,13)-(7,18))
+ │ │ ├── flags: exclude_end
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (7,13)-(7,14))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (7,13)-(7,14) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (7,17)-(7,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (7,17)-(7,18) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (7,14)-(7,17) = "..."
+ │ └── operator_loc: (7,9)-(7,12) = "and"
+ ├── then_keyword_loc: ∅
+ ├── 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..b9aa6b2184
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/block.txt
@@ -0,0 +1,191 @@
+@ ProgramNode (location: (1,0)-(26,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(26,3))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(2,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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"
+ ├── @ CallNode (location: (4,0)-(6,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (4,0)-(4,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (4,4)-(6,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (4,4)-(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"
+ ├── @ CallNode (location: (8,0)-(11,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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"
+ ├── @ CallNode (location: (13,0)-(14,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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"
+ ├── @ CallNode (location: (16,0)-(20,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (16,0)-(16,3) = "foo"
+ │ ├── opening_loc: (16,3)-(16,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (16,4)-(16,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (16,4)-(16,10))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (16,4)-(16,10) = "<<-DOC"
+ │ │ ├── content_loc: (17,0)-(18,0) = " b\n"
+ │ │ ├── closing_loc: (18,0)-(19,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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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"
+ └── @ CallNode (location: (22,0)-(26,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (22,0)-(22,3) = "foo"
+ ├── opening_loc: (22,3)-(22,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (22,4)-(22,10))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (22,4)-(22,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (22,4)-(22,10) = "<<-DOC"
+ │ ├── content_loc: (23,0)-(24,0) = " b\n"
+ │ ├── closing_loc: (24,0)-(25,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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (25,2)-(25,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (22,12)-(22,14) = "do"
+ └── closing_loc: (26,0)-(26,3) = "end"
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..b44983c2f3
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/def.txt
@@ -0,0 +1,90 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (2,3)-(2,4))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (2,3)-(2,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :-
+ │ │ │ ├── message_loc: (2,5)-(2,6) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,7)-(2,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (2,7)-(2,8))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (2,7)-(2,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (6,2)-(6,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..499bf59d1a
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/dstr.txt
@@ -0,0 +1,598 @@
+@ 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)-(2,0) = ""
+ │ ├── closing_loc: (2,0)-(3,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (4,0)-(4,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (4,0)-(4,7) = "<<'DOC'"
+ │ ├── content_loc: (5,0)-(5,0) = ""
+ │ ├── closing_loc: (5,0)-(6,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (7,0)-(7,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,6) = "<<~DOC"
+ │ ├── content_loc: (8,0)-(8,0) = ""
+ │ ├── closing_loc: (8,0)-(9,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (10,0)-(10,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (10,0)-(10,8) = "<<~'DOC'"
+ │ ├── content_loc: (11,0)-(11,0) = ""
+ │ ├── closing_loc: (11,0)-(12,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (13,0)-(13,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (13,0)-(13,5) = "<<DOC"
+ │ ├── content_loc: (14,0)-(15,0) = " a\n"
+ │ ├── closing_loc: (15,0)-(16,0) = "DOC\n"
+ │ └── unescaped: " a\n"
+ ├── @ StringNode (location: (17,0)-(17,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (17,0)-(17,7) = "<<'DOC'"
+ │ ├── content_loc: (18,0)-(19,0) = " a\n"
+ │ ├── closing_loc: (19,0)-(20,0) = "DOC\n"
+ │ └── unescaped: " a\n"
+ ├── @ InterpolatedStringNode (location: (21,0)-(21,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (21,0)-(21,5) = "<<DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (22,0)-(23,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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)-(24,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (23,5)-(24,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (24,0)-(25,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (26,0)-(26,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (26,0)-(26,6) = "<<~DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (27,0)-(28,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (27,0)-(28,0) = " 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)-(29,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (28,5)-(29,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (29,0)-(30,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (31,0)-(31,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (31,0)-(31,6) = "<<~DOC"
+ │ ├── parts: (length: 4)
+ │ │ ├── @ StringNode (location: (32,0)-(33,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (32,0)-(33,0) = " 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: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (33,5)-(34,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── @ StringNode (location: (34,0)-(35,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (34,0)-(35,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n"
+ │ └── closing_loc: (35,0)-(36,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (37,0)-(37,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (37,0)-(37,6) = "<<~DOC"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (38,0)-(39,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (38,0)-(39,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ StringNode (location: (39,0)-(40,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (39,0)-(40,0) = " b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " b\n"
+ │ └── closing_loc: (40,0)-(41,0) = "DOC\n"
+ ├── @ StringNode (location: (42,0)-(42,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (42,0)-(42,7) = "<<'DOC'"
+ │ ├── content_loc: (43,0)-(46,0) = "a\n\nb\n"
+ │ ├── closing_loc: (46,0)-(47,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)-(52,0) = " a\n\n b\n"
+ │ ├── closing_loc: (52,0)-(53,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)-(56,0) = " a\\nb\n"
+ │ ├── closing_loc: (56,0)-(57,0) = "DOC\n"
+ │ └── unescaped: " a\\nb\n"
+ ├── @ InterpolatedStringNode (location: (58,0)-(58,5))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ │ ├── 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)-(61,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (60,4)-(61,0) = "a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\n"
+ │ └── closing_loc: (61,0)-(62,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (63,0)-(63,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (63,0)-(63,5) = "<<DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (64,0)-(64,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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)-(66,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (64,5)-(66,0) = "\n \\\#{}\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n \#{}\n"
+ │ └── closing_loc: (66,0)-(67,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (68,0)-(68,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (68,0)-(68,5) = "<<DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (69,0)-(69,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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)-(71,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (69,5)-(71,0) = "b\n c\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n c\n"
+ │ └── closing_loc: (71,0)-(72,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (73,0)-(73,6))
+ │ ├── flags: ∅
+ │ ├── 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)-(75,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (74,5)-(75,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (75,0)-(76,0) = "DOC\n"
+ ├── @ IfNode (location: (77,0)-(81,3))
+ │ ├── if_keyword_loc: (77,0)-(77,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (77,3)-(77,7))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (78,2)-(78,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (78,2)-(78,8))
+ │ │ ├── flags: ∅
+ │ │ ├── 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)-(80,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (79,7)-(80,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (80,0)-(81,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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (84,2)-(84,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (84,2)-(84,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (84,2)-(84,8) = "<<~DOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (85,0)-(85,5))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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)-(86,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (85,8)-(86,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (86,0)-(87,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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (90,2)-(90,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (90,2)-(90,8))
+ │ │ ├── flags: ∅
+ │ │ ├── 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)-(92,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (91,7)-(92,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── closing_loc: (92,0)-(93,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))
+ │ ├── then_keyword_loc: ∅
+ │ ├── 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)-(100,0) = " a\n\n b\n"
+ │ │ ├── closing_loc: (100,0)-(101,0) = " DOC\n"
+ │ │ └── unescaped: " a\n\n b\n"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (101,0)-(101,3) = "end"
+ ├── @ InterpolatedStringNode (location: (103,0)-(103,6))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (105,0)-(105,2) = "%("
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (105,2)-(105,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (107,0)-(107,3) = "%Q("
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (107,3)-(107,7))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (109,0)-(109,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (109,1)-(110,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (109,1)-(110,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: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (113,0)-(113,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (113,1)-(113,4))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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: frozen
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (116,0)-(116,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (116,1)-(117,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (116,1)-(117,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: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (117,3)-(117,6) = "\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\nb"
+ │ └── closing_loc: (117,6)-(117,7) = "\""
+ ├── @ InterpolatedStringNode (location: (119,0)-(120,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (119,0)-(119,3))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (119,0)-(119,1) = "'"
+ │ │ │ ├── content_loc: (119,1)-(119,2) = "a"
+ │ │ │ ├── closing_loc: (119,2)-(119,3) = "'"
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ InterpolatedStringNode (location: (120,0)-(120,5))
+ │ │ ├── flags: ∅
+ │ │ ├── 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) = "\""
+ │ └── closing_loc: ∅
+ ├── @ InterpolatedStringNode (location: (122,0)-(122,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (122,0)-(122,2))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (122,0)-(122,1) = "\""
+ │ │ │ ├── content_loc: (122,1)-(122,1) = ""
+ │ │ │ ├── closing_loc: (122,1)-(122,2) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ ├── @ StringNode (location: (122,3)-(122,5))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (122,3)-(122,4) = "\""
+ │ │ │ ├── content_loc: (122,4)-(122,4) = ""
+ │ │ │ ├── closing_loc: (122,4)-(122,5) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ └── @ StringNode (location: (122,6)-(122,8))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (122,6)-(122,7) = "\""
+ │ │ ├── content_loc: (122,7)-(122,7) = ""
+ │ │ ├── closing_loc: (122,7)-(122,8) = "\""
+ │ │ └── unescaped: ""
+ │ └── closing_loc: ∅
+ ├── @ InterpolatedStringNode (location: (124,0)-(124,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ InterpolatedStringNode (location: (124,0)-(124,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (124,0)-(124,1) = "\""
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (124,1)-(124,2))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── 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) = "\""
+ │ │ └── @ StringNode (location: (124,9)-(124,12))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (124,9)-(124,10) = "\""
+ │ │ ├── content_loc: (124,10)-(124,11) = "b"
+ │ │ ├── closing_loc: (124,11)-(124,12) = "\""
+ │ │ └── unescaped: "b"
+ │ └── closing_loc: ∅
+ ├── @ InterpolatedStringNode (location: (125,0)-(125,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ InterpolatedStringNode (location: (125,0)-(125,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (125,0)-(125,1) = "\""
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (125,1)-(125,2))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── 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) = "\""
+ │ │ └── @ StringNode (location: (125,7)-(125,10))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (125,7)-(125,8) = "\""
+ │ │ ├── content_loc: (125,8)-(125,9) = "b"
+ │ │ ├── closing_loc: (125,9)-(125,10) = "\""
+ │ │ └── unescaped: "b"
+ │ └── closing_loc: ∅
+ ├── @ InterpolatedStringNode (location: (126,0)-(126,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ InterpolatedStringNode (location: (126,0)-(126,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (126,0)-(126,1) = "\""
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (126,1)-(126,2))
+ │ │ │ │ │ ├── flags: frozen
+ │ │ │ │ │ ├── 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) = "\""
+ │ │ └── @ StringNode (location: (126,7)-(126,10))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (126,7)-(126,8) = "\""
+ │ │ ├── content_loc: (126,8)-(126,9) = "b"
+ │ │ ├── closing_loc: (126,9)-(126,10) = "\""
+ │ │ └── unescaped: "b"
+ │ └── closing_loc: ∅
+ └── @ InterpolatedStringNode (location: (127,0)-(127,11))
+ ├── flags: ∅
+ ├── opening_loc: ∅
+ ├── parts: (length: 2)
+ │ ├── @ InterpolatedStringNode (location: (127,0)-(127,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (127,0)-(127,1) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (127,1)-(127,2))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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) = "\""
+ │ └── @ StringNode (location: (127,8)-(127,11))
+ │ ├── flags: frozen
+ │ ├── opening_loc: (127,8)-(127,9) = "\""
+ │ ├── content_loc: (127,9)-(127,10) = "b"
+ │ ├── closing_loc: (127,10)-(127,11) = "\""
+ │ └── unescaped: "b"
+ └── closing_loc: ∅
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..38486ddc12
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (11,2)-(11,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (15,2)-(15,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (17,2)-(17,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (21,2)-(21,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (22,2)-(22,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (22,2)-(22,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (24,2)-(24,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (35,2)-(35,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (39,2)-(39,3) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (41,2)-(41,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..ef666890be
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/literal.txt
@@ -0,0 +1,103 @@
+@ 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))
+ │ └── value: 1.0
+ ├── @ RationalNode (location: (2,0)-(2,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (2,0)-(2,2))
+ │ ├── flags: decimal
+ │ └── value: 0
+ ├── @ IntegerNode (location: (3,0)-(3,3))
+ │ ├── flags: hexadecimal
+ │ └── value: 1
+ ├── @ IntegerNode (location: (4,0)-(4,5))
+ │ ├── flags: decimal
+ │ └── value: 1000
+ ├── @ FloatNode (location: (5,0)-(5,4))
+ │ └── value: 10000000000.0
+ ├── @ FloatNode (location: (6,0)-(6,14))
+ │ └── value: Infinity
+ ├── @ FloatNode (location: (7,0)-(7,15))
+ │ └── value: -Infinity
+ ├── @ 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (9,0)-(9,3) = "%r("
+ │ ├── content_loc: (9,3)-(9,4) = "/"
+ │ ├── closing_loc: (9,4)-(9,5) = ")"
+ │ └── unescaped: "/"
+ ├── @ RegularExpressionNode (location: (10,0)-(10,6))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (10,0)-(10,3) = "%r("
+ │ ├── content_loc: (10,3)-(10,5) = "\\)"
+ │ ├── closing_loc: (10,5)-(10,6) = ")"
+ │ └── unescaped: "\\)"
+ ├── @ InterpolatedRegularExpressionNode (location: (11,0)-(11,14))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (11,10)-(11,13) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ └── closing_loc: (11,13)-(11,14) = ")"
+ ├── @ FloatNode (location: (12,0)-(12,16))
+ │ └── value: Infinity
+ ├── @ FloatNode (location: (13,0)-(13,17))
+ │ └── value: -Infinity
+ └── @ CallNode (location: (14,0)-(14,10))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :w
+ ├── message_loc: (14,0)-(14,1) = "w"
+ ├── opening_loc: (14,1)-(14,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (14,2)-(14,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (14,2)-(14,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (14,2)-(14,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (14,6)-(14,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (14,6)-(14,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (14,6)-(14,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (14,9)-(14,10) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/unparser/corpus/semantic/opasgn.txt b/test/prism/snapshots/unparser/corpus/semantic/opasgn.txt
new file mode 100644
index 0000000000..7dd26a38dc
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/opasgn.txt
@@ -0,0 +1,69 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ IndexOperatorWriteNode (location: (1,0)-(1,25))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :y
+ │ ├── message_loc: (1,0)-(1,1) = "y"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,2)-(1,11))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,8))
+ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,5)-(1,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,5)-(1,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 42
+ │ │ │ └── closing_loc: (1,7)-(1,8) = "}"
+ │ │ └── @ StringNode (location: (1,8)-(1,10))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,8)-(1,10) = "\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (1,10)-(1,11) = "\""
+ ├── closing_loc: (1,11)-(1,12) = "]"
+ ├── block: ∅
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (1,13)-(1,15) = "+="
+ └── value:
+ @ InterpolatedStringNode (location: (1,16)-(1,25))
+ ├── flags: ∅
+ ├── opening_loc: (1,16)-(1,17) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (1,17)-(1,22))
+ │ │ ├── opening_loc: (1,17)-(1,19) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,19)-(1,21))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,19)-(1,21))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ └── closing_loc: (1,21)-(1,22) = "}"
+ │ └── @ StringNode (location: (1,22)-(1,24))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,22)-(1,24) = "\\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (1,24)-(1,25) = "\""
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..7c152c3bfb
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/send.txt
@@ -0,0 +1,163 @@
+@ ProgramNode (location: (1,0)-(6,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,15))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (2,0)-(2,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (2,4)-(2,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: (2,5)-(2,6) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (4,0)-(4,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (4,0)-(4,10))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (4,0)-(4,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (4,0)-(4,1))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (4,0)-(4,1) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: (4,1)-(4,2) = "."
+ │ │ │ ├── name: :===
+ │ │ │ ├── message_loc: (4,2)-(4,5) = "==="
+ │ │ │ ├── opening_loc: (4,5)-(4,6) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (4,6)-(4,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (4,6)-(4,7))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (4,6)-(4,7) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (4,7)-(4,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (4,8)-(4,9) = "."
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (4,9)-(4,10) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :==
+ │ ├── message_loc: (4,11)-(4,13) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (4,14)-(4,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (4,14)-(4,15))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :d
+ │ │ ├── message_loc: (4,14)-(4,15) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (6,0)-(6,15))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (6,0)-(6,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :==
+ ├── message_loc: (6,2)-(6,4) = "=="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (6,5)-(6,15))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (6,5)-(6,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,5)-(6,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (6,5)-(6,6))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :d
+ │ │ │ ├── message_loc: (6,5)-(6,6) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── call_operator_loc: (6,6)-(6,7) = "."
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (6,7)-(6,8) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (6,8)-(6,9) = "."
+ │ ├── name: :===
+ │ ├── message_loc: (6,9)-(6,12) = "==="
+ │ ├── opening_loc: (6,12)-(6,13) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,13)-(6,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (6,13)-(6,14))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (6,13)-(6,14) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (6,14)-(6,15) = ")"
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..ecb073148d
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/undef.txt
@@ -0,0 +1,29 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (2,6)-(2,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ SymbolNode (location: (2,11)-(2,14))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..36bfba5be6
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/while.txt
@@ -0,0 +1,277 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (1,2)-(1,7) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,8)-(1,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b?
+ │ │ ├── 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) = "}"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,0)-(1,1))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ UntilNode (location: (3,0)-(5,3))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (3,0)-(3,5) = "until"
+ │ ├── closing_loc: (5,0)-(5,3) = "end"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (3,6)-(3,11))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b?
+ │ │ ├── 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) = "}"
+ │ └── statements:
+ │ @ StatementsNode (location: (4,2)-(4,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (4,2)-(4,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (4,2)-(4,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ WhileNode (location: (7,0)-(7,19))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (7,6)-(7,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (7,4)-(7,5) = "="
+ ├── @ UntilNode (location: (9,0)-(9,18))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (9,2)-(9,7) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ AndNode (location: (9,8)-(9,18))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (9,8)-(9,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (9,8)-(9,9) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (9,13)-(9,18))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── 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) = "}"
+ │ │ └── operator_loc: (9,10)-(9,12) = "&&"
+ │ └── statements:
+ │ @ StatementsNode (location: (9,0)-(9,1))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (9,0)-(9,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ WhileNode (location: (11,0)-(13,3))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (11,10)-(11,11) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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
+ ├── @ UntilNode (location: (15,0)-(18,3))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (15,2)-(15,7) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (15,8)-(18,3))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (15,8)-(15,9) = "b"
+ │ │ ├── opening_loc: (15,9)-(15,10) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,10)-(15,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (15,10)-(15,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (15,10)-(15,16) = "<<-FOO"
+ │ │ │ ├── content_loc: (16,0)-(16,0) = ""
+ │ │ │ ├── closing_loc: (16,0)-(17,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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (17,2)-(17,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (15,18)-(15,20) = "do"
+ │ │ └── closing_loc: (18,0)-(18,3) = "end"
+ │ └── statements:
+ │ @ StatementsNode (location: (15,0)-(15,1))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (15,0)-(15,1))
+ │ ├── name: :a
+ │ └── depth: 0
+ └── @ 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :exp
+ │ │ │ ├── message_loc: (21,8)-(21,11) = "exp"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (21,6)-(21,7) = "="
+ │ └── @ WhileNode (location: (22,2)-(24,5))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (23,10)-(23,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (23,8)-(23,9) = "="
+ ├── 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..e855dc89f7
--- /dev/null
+++ b/test/prism/snapshots/until.txt
@@ -0,0 +1,180 @@
+@ ProgramNode (location: (1,0)-(13,20))
+├── locals: [:baz]
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,20))
+ └── body: (length: 7)
+ ├── @ UntilNode (location: (1,0)-(1,18))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ └── value: 1
+ ├── @ UntilNode (location: (3,0)-(3,12))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ └── value: 1
+ ├── @ CallNode (location: (5,0)-(5,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (5,0)-(5,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (5,4)-(5,24))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,6)-(5,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ UntilNode (location: (5,6)-(5,22))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (5,12)-(5,17) = "until"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (5,18)-(5,22))
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (5,6)-(5,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (5,6)-(5,11))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (5,6)-(5,11) = "break"
+ │ ├── opening_loc: (5,4)-(5,5) = "{"
+ │ └── closing_loc: (5,23)-(5,24) = "}"
+ ├── @ CallNode (location: (7,0)-(7,23))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (7,0)-(7,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (7,4)-(7,23))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,6)-(7,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ UntilNode (location: (7,6)-(7,21))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (7,11)-(7,16) = "until"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (7,17)-(7,21))
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (7,6)-(7,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (7,6)-(7,10))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (7,6)-(7,10) = "next"
+ │ ├── opening_loc: (7,4)-(7,5) = "{"
+ │ └── closing_loc: (7,22)-(7,23) = "}"
+ ├── @ UntilNode (location: (9,0)-(9,17))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ └── arguments: ∅
+ ├── @ UntilNode (location: (11,0)-(11,21))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (11,11)-(11,16) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (11,17)-(11,21))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar?
+ │ │ ├── message_loc: (11,17)-(11,21) = "bar?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (11,0)-(11,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,0)-(11,10))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (11,4)-(11,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (11,4)-(11,5) = ":"
+ │ │ │ ├── value_loc: (11,5)-(11,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (11,8)-(11,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (11,8)-(11,9) = ":"
+ │ │ ├── value_loc: (11,9)-(11,10) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ WhileNode (location: (13,0)-(13,20))
+ ├── flags: ∅
+ ├── keyword_loc: (13,4)-(13,9) = "while"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ MatchPredicateNode (location: (13,10)-(13,20))
+ │ ├── value:
+ │ │ @ CallNode (location: (13,10)-(13,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (13,10)-(13,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ LocalVariableTargetNode (location: (13,17)-(13,20))
+ │ │ ├── name: :baz
+ │ │ └── depth: 0
+ │ └── operator_loc: (13,14)-(13,16) = "in"
+ └── statements:
+ @ StatementsNode (location: (13,0)-(13,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (13,0)-(13,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (13,0)-(13,3) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/variables.txt b/test/prism/snapshots/variables.txt
new file mode 100644
index 0000000000..b79612f924
--- /dev/null
+++ b/test/prism/snapshots/variables.txt
@@ -0,0 +1,408 @@
+@ ProgramNode (location: (1,0)-(47,17))
+├── locals: [:abc, :foo, :bar, :baz, :a, :b, :c, :d]
+└── statements:
+ @ StatementsNode (location: (1,0)-(47,17))
+ └── body: (length: 25)
+ ├── @ 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
+ │ │ └── value: 1
+ │ └── operator_loc: (3,6)-(3,7) = "="
+ ├── @ MultiWriteNode (location: (5,0)-(5,16))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ ClassVariableTargetNode (location: (5,0)-(5,5))
+ │ │ │ └── name: :@@foo
+ │ │ └── @ ClassVariableTargetNode (location: (5,7)-(5,12))
+ │ │ └── name: :@@bar
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (5,13)-(5,14) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (5,15)-(5,16))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ ClassVariableWriteNode (location: (7,0)-(7,12))
+ │ ├── name: :@@foo
+ │ ├── name_loc: (7,0)-(7,5) = "@@foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (7,8)-(7,12))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (7,8)-(7,9))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (7,11)-(7,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── 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
+ │ │ └── value: 1
+ │ └── operator_loc: (15,5)-(15,6) = "="
+ ├── @ CallNode (location: (17,0)-(17,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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
+ │ │ └── value: 1
+ │ └── operator_loc: (19,4)-(19,5) = "="
+ ├── @ MultiWriteNode (location: (21,0)-(21,14))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ GlobalVariableTargetNode (location: (21,0)-(21,4))
+ │ │ │ └── name: :$foo
+ │ │ └── @ GlobalVariableTargetNode (location: (21,6)-(21,10))
+ │ │ └── name: :$bar
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (21,11)-(21,12) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (21,13)-(21,14))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ GlobalVariableWriteNode (location: (23,0)-(23,11))
+ │ ├── name: :$foo
+ │ ├── name_loc: (23,0)-(23,4) = "$foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (23,7)-(23,11))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (23,7)-(23,8))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (23,10)-(23,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (23,5)-(23,6) = "="
+ ├── @ MultiWriteNode (location: (25,0)-(25,14))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ InstanceVariableTargetNode (location: (25,0)-(25,4))
+ │ │ │ └── name: :@foo
+ │ │ └── @ InstanceVariableTargetNode (location: (25,6)-(25,10))
+ │ │ └── name: :@bar
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (25,11)-(25,12) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (25,13)-(25,14))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ InstanceVariableWriteNode (location: (27,0)-(27,11))
+ │ ├── name: :@foo
+ │ ├── name_loc: (27,0)-(27,4) = "@foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (27,7)-(27,11))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (27,7)-(27,8))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (27,10)-(27,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (29,15)-(29,16))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (29,18)-(29,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (31,6)-(31,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (31,9)-(31,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (31,4)-(31,5) = "="
+ ├── @ MultiWriteNode (location: (33,0)-(33,13))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (33,0)-(33,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (33,5)-(33,6))
+ │ │ ├── operator_loc: (33,5)-(33,6) = "*"
+ │ │ └── expression: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (33,7)-(33,8) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (33,9)-(33,13))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (33,9)-(33,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (33,12)-(33,13))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (35,0)-(35,11))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (35,0)-(35,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ ImplicitRestNode (location: (35,3)-(35,4))
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (35,5)-(35,6) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (35,7)-(35,11))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (35,7)-(35,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (35,10)-(35,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (37,0)-(37,16))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (37,0)-(37,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (37,5)-(37,9))
+ │ │ ├── operator_loc: (37,5)-(37,6) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (37,6)-(37,9))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (37,10)-(37,11) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (37,12)-(37,16))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (37,12)-(37,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (37,15)-(37,16))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (39,0)-(39,27))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (39,0)-(39,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ MultiTargetNode (location: (39,5)-(39,15))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (39,6)-(39,9))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (39,11)-(39,14))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: (39,5)-(39,6) = "("
+ │ │ └── rparen_loc: (39,14)-(39,15) = ")"
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (39,16)-(39,17) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (39,18)-(39,27))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (39,18)-(39,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ ArrayNode (location: (39,21)-(39,27))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (39,22)-(39,23))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ └── @ IntegerNode (location: (39,25)-(39,26))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 3
+ │ │ ├── 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))
+ │ │ ├── flags: contains_splat
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (43,6)-(43,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (43,9)-(43,10))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (45,1)-(45,2) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── @ CallNode (location: (45,4)-(45,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (45,4)-(45,5) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ CallNode (location: (45,7)-(45,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :c
+ │ │ ├── message_loc: (45,7)-(45,8) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (45,0)-(45,1) = "("
+ │ └── closing_loc: (45,8)-(45,9) = ")"
+ └── @ MultiWriteNode (location: (47,0)-(47,17))
+ ├── lefts: (length: 3)
+ │ ├── @ LocalVariableTargetNode (location: (47,0)-(47,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── @ MultiTargetNode (location: (47,3)-(47,9))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (47,4)-(47,5))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (47,7)-(47,8))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: (47,3)-(47,4) = "("
+ │ │ └── rparen_loc: (47,8)-(47,9) = ")"
+ │ └── @ LocalVariableTargetNode (location: (47,11)-(47,12))
+ │ ├── name: :d
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (47,13)-(47,14) = "="
+ └── value:
+ @ ArrayNode (location: (47,15)-(47,17))
+ ├── flags: ∅
+ ├── elements: (length: 0)
+ ├── opening_loc: (47,15)-(47,16) = "["
+ └── closing_loc: (47,16)-(47,17) = "]"
diff --git a/test/prism/snapshots/while.txt b/test/prism/snapshots/while.txt
new file mode 100644
index 0000000000..a2972face0
--- /dev/null
+++ b/test/prism/snapshots/while.txt
@@ -0,0 +1,470 @@
+@ ProgramNode (location: (1,0)-(23,20))
+├── locals: [:baz]
+└── statements:
+ @ StatementsNode (location: (1,0)-(23,20))
+ └── body: (length: 12)
+ ├── @ WhileNode (location: (1,0)-(1,18))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ └── value: 1
+ ├── @ WhileNode (location: (3,0)-(3,12))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ └── value: 1
+ ├── @ CallNode (location: (5,0)-(5,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (5,0)-(5,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (5,4)-(5,24))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,6)-(5,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (5,6)-(5,22))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (5,12)-(5,17) = "while"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (5,18)-(5,22))
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (5,6)-(5,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (5,6)-(5,11))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (5,6)-(5,11) = "break"
+ │ ├── opening_loc: (5,4)-(5,5) = "{"
+ │ └── closing_loc: (5,23)-(5,24) = "}"
+ ├── @ CallNode (location: (7,0)-(7,23))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (7,0)-(7,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (7,4)-(7,23))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,6)-(7,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (7,6)-(7,21))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (7,11)-(7,16) = "while"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (7,17)-(7,21))
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (7,6)-(7,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (7,6)-(7,10))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (7,6)-(7,10) = "next"
+ │ ├── opening_loc: (7,4)-(7,5) = "{"
+ │ └── closing_loc: (7,22)-(7,23) = "}"
+ ├── @ WhileNode (location: (9,0)-(9,17))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ └── arguments: ∅
+ ├── @ WhileNode (location: (11,0)-(11,21))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (11,11)-(11,16) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (11,17)-(11,21))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar?
+ │ │ ├── message_loc: (11,17)-(11,21) = "bar?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (11,0)-(11,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,0)-(11,10))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (11,4)-(11,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (11,4)-(11,5) = ":"
+ │ │ │ ├── value_loc: (11,5)-(11,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (11,8)-(11,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (11,8)-(11,9) = ":"
+ │ │ ├── value_loc: (11,9)-(11,10) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (13,0)-(13,58))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (13,0)-(13,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (13,4)-(13,58))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (13,6)-(13,56))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (13,6)-(13,56))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (13,6)-(13,11) = "while"
+ │ │ ├── closing_loc: (13,53)-(13,56) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ DefNode (location: (13,12)-(13,44))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (13,21)-(13,24) = "foo"
+ │ │ │ ├── receiver:
+ │ │ │ │ @ SelfNode (location: (13,16)-(13,20))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (13,25)-(13,39))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (13,25)-(13,39))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ ├── name_loc: (13,25)-(13,26) = "a"
+ │ │ │ │ │ ├── operator_loc: (13,27)-(13,28) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ CallNode (location: (13,29)-(13,39))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :tap
+ │ │ │ │ │ ├── message_loc: (13,29)-(13,32) = "tap"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block:
+ │ │ │ │ │ @ BlockNode (location: (13,33)-(13,39))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (13,33)-(13,35) = "do"
+ │ │ │ │ │ └── closing_loc: (13,36)-(13,39) = "end"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── locals: [:a]
+ │ │ │ ├── def_keyword_loc: (13,12)-(13,15) = "def"
+ │ │ │ ├── operator_loc: (13,20)-(13,21) = "."
+ │ │ │ ├── lparen_loc: ∅
+ │ │ │ ├── rparen_loc: ∅
+ │ │ │ ├── equal_loc: ∅
+ │ │ │ └── end_keyword_loc: (13,41)-(13,44) = "end"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (13,46)-(13,51))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (13,46)-(13,51))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (13,46)-(13,51) = "break"
+ │ ├── opening_loc: (13,4)-(13,5) = "{"
+ │ └── closing_loc: (13,57)-(13,58) = "}"
+ ├── @ CallNode (location: (15,0)-(15,55))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (15,0)-(15,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (15,4)-(15,55))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (15,6)-(15,53))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (15,6)-(15,53))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (15,6)-(15,11) = "while"
+ │ │ ├── closing_loc: (15,50)-(15,53) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ ClassNode (location: (15,12)-(15,41))
+ │ │ │ ├── locals: [:a]
+ │ │ │ ├── class_keyword_loc: (15,12)-(15,17) = "class"
+ │ │ │ ├── constant_path:
+ │ │ │ │ @ ConstantReadNode (location: (15,18)-(15,21))
+ │ │ │ │ └── name: :Foo
+ │ │ │ ├── inheritance_operator_loc: ∅
+ │ │ │ ├── superclass: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (15,22)-(15,36))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableWriteNode (location: (15,22)-(15,36))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── depth: 0
+ │ │ │ │ ├── name_loc: (15,22)-(15,23) = "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (15,26)-(15,36))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :tap
+ │ │ │ │ │ ├── message_loc: (15,26)-(15,29) = "tap"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block:
+ │ │ │ │ │ @ BlockNode (location: (15,30)-(15,36))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (15,30)-(15,32) = "do"
+ │ │ │ │ │ └── closing_loc: (15,33)-(15,36) = "end"
+ │ │ │ │ └── operator_loc: (15,24)-(15,25) = "="
+ │ │ │ ├── end_keyword_loc: (15,38)-(15,41) = "end"
+ │ │ │ └── name: :Foo
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (15,43)-(15,48))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (15,43)-(15,48))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (15,43)-(15,48) = "break"
+ │ ├── opening_loc: (15,4)-(15,5) = "{"
+ │ └── closing_loc: (15,54)-(15,55) = "}"
+ ├── @ CallNode (location: (17,0)-(17,56))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (17,0)-(17,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (17,4)-(17,56))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (17,6)-(17,54))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (17,6)-(17,54))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (17,6)-(17,11) = "while"
+ │ │ ├── closing_loc: (17,51)-(17,54) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ SingletonClassNode (location: (17,12)-(17,42))
+ │ │ │ ├── locals: []
+ │ │ │ ├── class_keyword_loc: (17,12)-(17,17) = "class"
+ │ │ │ ├── operator_loc: (17,18)-(17,20) = "<<"
+ │ │ │ ├── expression:
+ │ │ │ │ @ SelfNode (location: (17,21)-(17,25))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (17,27)-(17,37))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (17,27)-(17,37))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :tap
+ │ │ │ │ ├── message_loc: (17,27)-(17,30) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockNode (location: (17,31)-(17,37))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (17,31)-(17,33) = "do"
+ │ │ │ │ └── closing_loc: (17,34)-(17,37) = "end"
+ │ │ │ └── end_keyword_loc: (17,39)-(17,42) = "end"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (17,44)-(17,49))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (17,44)-(17,49))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (17,44)-(17,49) = "break"
+ │ ├── opening_loc: (17,4)-(17,5) = "{"
+ │ └── closing_loc: (17,55)-(17,56) = "}"
+ ├── @ CallNode (location: (19,0)-(19,60))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (19,0)-(19,3) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (19,4)-(19,60))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (19,6)-(19,58))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (19,6)-(19,58))
+ │ │ ├── flags: ∅
+ │ │ ├── keyword_loc: (19,6)-(19,11) = "while"
+ │ │ ├── closing_loc: (19,55)-(19,58) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ SingletonClassNode (location: (19,12)-(19,46))
+ │ │ │ ├── locals: [:a]
+ │ │ │ ├── class_keyword_loc: (19,12)-(19,17) = "class"
+ │ │ │ ├── operator_loc: (19,18)-(19,20) = "<<"
+ │ │ │ ├── expression:
+ │ │ │ │ @ SelfNode (location: (19,21)-(19,25))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (19,27)-(19,41))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableWriteNode (location: (19,27)-(19,41))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── depth: 0
+ │ │ │ │ ├── name_loc: (19,27)-(19,28) = "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (19,31)-(19,41))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :tap
+ │ │ │ │ │ ├── message_loc: (19,31)-(19,34) = "tap"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block:
+ │ │ │ │ │ @ BlockNode (location: (19,35)-(19,41))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (19,35)-(19,37) = "do"
+ │ │ │ │ │ └── closing_loc: (19,38)-(19,41) = "end"
+ │ │ │ │ └── operator_loc: (19,29)-(19,30) = "="
+ │ │ │ └── end_keyword_loc: (19,43)-(19,46) = "end"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (19,48)-(19,53))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (19,48)-(19,53))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (19,48)-(19,53) = "break"
+ │ ├── opening_loc: (19,4)-(19,5) = "{"
+ │ └── closing_loc: (19,59)-(19,60) = "}"
+ ├── @ WhileNode (location: (21,0)-(21,31))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (21,0)-(21,5) = "while"
+ │ ├── closing_loc: (21,28)-(21,31) = "end"
+ │ ├── predicate:
+ │ │ @ DefNode (location: (21,6)-(21,26))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (21,10)-(21,13) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (21,16)-(21,26))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (21,16)-(21,26))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (21,16)-(21,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockNode (location: (21,20)-(21,26))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (21,20)-(21,22) = "do"
+ │ │ │ └── closing_loc: (21,23)-(21,26) = "end"
+ │ │ ├── locals: []
+ │ │ ├── def_keyword_loc: (21,6)-(21,9) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: (21,14)-(21,15) = "="
+ │ │ └── end_keyword_loc: ∅
+ │ └── statements: ∅
+ └── @ WhileNode (location: (23,0)-(23,20))
+ ├── flags: ∅
+ ├── keyword_loc: (23,4)-(23,9) = "while"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ MatchPredicateNode (location: (23,10)-(23,20))
+ │ ├── value:
+ │ │ @ CallNode (location: (23,10)-(23,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (23,10)-(23,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── pattern:
+ │ │ @ LocalVariableTargetNode (location: (23,17)-(23,20))
+ │ │ ├── name: :baz
+ │ │ └── depth: 0
+ │ └── operator_loc: (23,14)-(23,16) = "in"
+ └── statements:
+ @ StatementsNode (location: (23,0)-(23,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (23,0)-(23,3))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (23,0)-(23,3) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..509ea2b633
--- /dev/null
+++ b/test/prism/snapshots/whitequark/alias.txt
@@ -0,0 +1,21 @@
+@ 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..d13f816555
--- /dev/null
+++ b/test/prism/snapshots/whitequark/alias_gvar.txt
@@ -0,0 +1,21 @@
+@ 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))
+ │ │ └── name: :$+
+ │ └── 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..c6a5c14934
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt
@@ -0,0 +1,60 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (1,2)-(1,3) = "?"
+ ├── statements:
+ │ @ StatementsNode (location: (1,4)-(1,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :&
+ │ ├── message_loc: (1,6)-(1,7) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── 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..d2e1b33c50
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (1,4)-(1,6) = "&&"
+ └── @ AndNode (location: (3,0)-(3,11))
+ ├── left:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── right:
+ │ @ CallNode (location: (3,8)-(3,11))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..5c7a9a2319
--- /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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ ├── read_name: :a
+ │ ├── write_name: :a=
+ │ ├── operator_loc: (1,6)-(1,9) = "&&="
+ │ └── value:
+ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ ├── flags: decimal
+ │ └── value: 1
+ └── @ IndexAndWriteNode (location: (3,0)-(3,15))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (3,3)-(3,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (3,4)-(3,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ └── @ IntegerNode (location: (3,7)-(3,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (3,8)-(3,9) = "]"
+ ├── block: ∅
+ ├── operator_loc: (3,10)-(3,13) = "&&="
+ └── value:
+ @ IntegerNode (location: (3,14)-(3,15))
+ ├── flags: decimal
+ └── value: 2
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..05aff040cd
--- /dev/null
+++ b/test/prism/snapshots/whitequark/and_or_masgn.txt
@@ -0,0 +1,93 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ ParenthesesNode (location: (1,7)-(1,19))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,8)-(1,18))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ MultiWriteNode (location: (1,8)-(1,18))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ LocalVariableTargetNode (location: (1,8)-(1,9))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (1,11)-(1,12))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: ∅
+ │ │ │ ├── rparen_loc: ∅
+ │ │ │ ├── operator_loc: (1,13)-(1,14) = "="
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (1,15)-(1,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,15)-(1,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── right:
+ │ @ ParenthesesNode (location: (3,7)-(3,19))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,8)-(3,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MultiWriteNode (location: (3,8)-(3,18))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (3,8)-(3,9))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (3,11)-(3,12))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (3,13)-(3,14) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (3,15)-(3,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,15)-(3,18) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..92cf1504a9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/anonymous_blockarg.txt
@@ -0,0 +1,46 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── name: ∅
+ │ ├── name_loc: ∅
+ │ └── operator_loc: (1,8)-(1,9) = "&"
+ ├── body:
+ │ @ StatementsNode (location: (1,12)-(1,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,12)-(1,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── 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) = "&"
+ ├── 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..38fdb190f3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg.txt
@@ -0,0 +1,56 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :foo
+ │ │ └── @ RequiredParameterNode (location: (3,11)-(3,14))
+ │ │ ├── flags: ∅
+ │ │ └── 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..21dc1b7417
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt
@@ -0,0 +1,59 @@
+@ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :_
+ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
+ │ │ │ ├── flags: repeated_parameter
+ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :_a
+ │ │ └── @ RequiredParameterNode (location: (3,12)-(3,14))
+ │ │ ├── flags: repeated_parameter
+ │ │ └── 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..b72ea59a5d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg_label.txt
@@ -0,0 +1,115 @@
+@ 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (2,1)-(2,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,2)-(2,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,2)-(2,4))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (2,2)-(2,3) = ":"
+ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (4,10)-(4,11) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (4,11)-(4,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (4,11)-(4,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (4,11)-(4,12) = ":"
+ │ │ │ ├── value_loc: (4,12)-(4,13) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (6,7)-(6,8) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,8)-(6,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (6,8)-(6,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (6,8)-(6,9) = ":"
+ │ │ ├── value_loc: (6,9)-(6,10) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (6,2)-(6,3) = "{"
+ └── closing_loc: (6,11)-(6,12) = "}"
diff --git a/test/prism/snapshots/whitequark/arg_scope.txt b/test/prism/snapshots/whitequark/arg_scope.txt
new file mode 100644
index 0000000000..c04356b8ee
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg_scope.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :lambda
+ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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) = "}"
diff --git a/test/prism/snapshots/whitequark/args.txt b/test/prism/snapshots/whitequark/args.txt
new file mode 100644
index 0000000000..bc7ea8ad7d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args.txt
@@ -0,0 +1,1075 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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)
+ │ │ │ └── @ MultiTargetNode (location: (3,7)-(3,12))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ MultiTargetNode (location: (3,8)-(3,11))
+ │ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (3,9)-(3,10))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (3,8)-(3,9) = "("
+ │ │ │ │ └── rparen_loc: (3,10)-(3,11) = ")"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (3,7)-(3,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (5,7)-(5,10))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (5,8)-(5,9))
+ │ │ │ │ ├── operator_loc: (5,8)-(5,9) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (5,7)-(5,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (7,7)-(7,13))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (7,8)-(7,9))
+ │ │ │ │ ├── operator_loc: (7,8)-(7,9) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (7,11)-(7,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── lparen_loc: (7,7)-(7,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (9,7)-(9,11))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (9,8)-(9,10))
+ │ │ │ │ ├── operator_loc: (9,8)-(9,9) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (9,9)-(9,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :r
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (9,7)-(9,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (11,7)-(11,14))
+ │ │ │ ├── lefts: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (11,8)-(11,10))
+ │ │ │ │ ├── operator_loc: (11,8)-(11,9) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (11,9)-(11,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :r
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (11,12)-(11,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── lparen_loc: (11,7)-(11,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (13,7)-(13,13))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (13,8)-(13,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (13,11)-(13,12))
+ │ │ │ │ ├── operator_loc: (13,11)-(13,12) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (13,7)-(13,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (15,7)-(15,16))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (15,8)-(15,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (15,11)-(15,12))
+ │ │ │ │ ├── operator_loc: (15,11)-(15,12) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (15,14)-(15,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── lparen_loc: (15,7)-(15,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (17,7)-(17,14))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (17,8)-(17,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (17,11)-(17,13))
+ │ │ │ │ ├── operator_loc: (17,11)-(17,12) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (17,12)-(17,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :r
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (17,7)-(17,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (19,7)-(19,17))
+ │ │ │ ├── lefts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (19,8)-(19,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (19,11)-(19,13))
+ │ │ │ │ ├── operator_loc: (19,11)-(19,12) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (19,12)-(19,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :r
+ │ │ │ ├── rights: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (19,15)-(19,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── lparen_loc: (19,7)-(19,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ MultiTargetNode (location: (21,7)-(21,14))
+ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (21,8)-(21,9))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (21,11)-(21,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a1
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── rights: (length: 0)
+ │ │ │ ├── lparen_loc: (21,7)-(21,8) = "("
+ │ │ │ └── rparen_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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (23,7)-(23,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (23,7)-(23,11) = "foo:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (23,12)-(23,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (23,15)-(23,17))
+ │ │ ├── flags: ∅
+ │ │ ├── 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)
+ │ │ │ ├── @ OptionalKeywordParameterNode (location: (25,7)-(25,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── name_loc: (25,7)-(25,11) = "foo:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (25,12)-(25,13))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (25,15)-(25,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (25,15)-(25,19) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (25,20)-(25,21))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (25,23)-(25,28))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (25,25)-(25,28) = "baz"
+ │ │ │ └── operator_loc: (25,23)-(25,25) = "**"
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (25,30)-(25,32))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (27,8)-(27,11) = "baz"
+ │ │ │ └── operator_loc: (27,6)-(27,8) = "**"
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (27,13)-(27,15))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (29,6)-(29,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (29,9)-(29,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: ∅
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (33,7)-(33,8) = "r"
+ │ │ │ └── operator_loc: (33,6)-(33,7) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (33,10)-(33,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (33,13)-(33,15))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (37,9)-(37,11))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (39,9)-(39,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (41,9)-(41,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (41,10)-(41,11) = "r"
+ │ │ │ └── operator_loc: (41,9)-(41,10) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (41,13)-(41,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (41,16)-(41,18))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (43,9)-(43,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (43,9)-(43,10) = "o"
+ │ │ │ ├── operator_loc: (43,10)-(43,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (43,11)-(43,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (43,14)-(43,16))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (45,9)-(45,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (45,9)-(45,10) = "o"
+ │ │ │ ├── operator_loc: (45,10)-(45,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (45,11)-(45,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (45,14)-(45,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (47,9)-(47,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (47,9)-(47,10) = "o"
+ │ │ │ ├── operator_loc: (47,10)-(47,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (47,11)-(47,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (47,14)-(47,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (47,15)-(47,16) = "r"
+ │ │ │ └── operator_loc: (47,14)-(47,15) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (47,18)-(47,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (47,21)-(47,23))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (49,9)-(49,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (49,9)-(49,10) = "o"
+ │ │ │ ├── operator_loc: (49,10)-(49,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (49,11)-(49,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (49,14)-(49,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (49,17)-(49,19))
+ │ │ ├── flags: ∅
+ │ │ ├── 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)
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (51,6)-(51,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ └── name_loc: (51,6)-(51,10) = "foo:"
+ │ │ ├── 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)
+ │ │ │ └── @ OptionalKeywordParameterNode (location: (54,6)-(54,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (54,6)-(54,10) = "foo:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (54,11)-(54,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: -1
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (57,6)-(57,7) = "o"
+ │ │ │ ├── operator_loc: (57,7)-(57,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (57,8)-(57,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (57,11)-(57,13))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (59,6)-(59,7) = "o"
+ │ │ │ ├── operator_loc: (59,7)-(59,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (59,8)-(59,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (59,11)-(59,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (61,6)-(61,7) = "o"
+ │ │ │ ├── operator_loc: (61,7)-(61,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (61,8)-(61,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (61,11)-(61,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (61,12)-(61,13) = "r"
+ │ │ │ └── operator_loc: (61,11)-(61,12) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (61,15)-(61,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (61,18)-(61,20))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :o
+ │ │ ├── name_loc: (63,6)-(63,7) = "o"
+ │ │ ├── operator_loc: (63,7)-(63,8) = "="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (63,8)-(63,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── rest: ∅
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (63,11)-(63,12))
+ │ │ ├── flags: ∅
+ │ │ └── name: :p
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (63,14)-(63,16))
+ │ ├── flags: ∅
+ │ ├── 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..d257a885ce
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_assocs.txt
@@ -0,0 +1,96 @@
+@ ProgramNode (location: (1,0)-(3,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,24))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ KeywordHashNode (location: (1,9)-(1,18))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,9)-(1,18))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,9)-(1,13))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (1,14)-(1,16) = "=>"
+ │ ├── closing_loc: (1,18)-(1,19) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,24))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (3,0)-(3,3) = "fun"
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,18))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,4)-(3,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ KeywordHashNode (location: (3,9)-(3,18))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (3,9)-(3,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,9)-(3,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (3,21)-(3,24) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (3,20)-(3,21) = "&"
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..2d986dd90a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_assocs_comma.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,3)-(1,20) = "[bar, :baz => 1,]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ KeywordHashNode (location: (1,9)-(1,18))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,9)-(1,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,9)-(1,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── operator_loc: (1,14)-(1,16) = "=>"
+ ├── closing_loc: (1,19)-(1,20) = "]"
+ └── block: ∅
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..09113a72b6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_comma.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,3)-(1,9) = "[bar,]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ └── block: ∅
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..26c9e72da3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_star.txt
@@ -0,0 +1,90 @@
+@ ProgramNode (location: (1,0)-(3,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,19))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ SplatNode (location: (1,9)-(1,13))
+ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,10)-(1,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (1,13)-(1,14) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,19))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (3,0)-(3,3) = "fun"
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,4)-(3,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ SplatNode (location: (3,9)-(3,13))
+ │ ├── operator_loc: (3,9)-(3,10) = "*"
+ │ └── expression:
+ │ @ CallNode (location: (3,10)-(3,13))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,10)-(3,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (3,19)-(3,20) = ")"
+ └── block:
+ @ BlockArgumentNode (location: (3,15)-(3,19))
+ ├── expression:
+ │ @ CallNode (location: (3,16)-(3,19))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (3,16)-(3,19) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (3,15)-(3,16) = "&"
diff --git a/test/prism/snapshots/whitequark/args_assocs.txt b/test/prism/snapshots/whitequark/args_assocs.txt
new file mode 100644
index 0000000000..47cb68d899
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_assocs.txt
@@ -0,0 +1,195 @@
+@ ProgramNode (location: (1,0)-(11,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,17))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,4)-(1,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,4)-(1,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (1,9)-(1,11) = "=>"
+ │ ├── closing_loc: (1,13)-(1,14) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (3,0)-(3,3) = "fun"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (3,4)-(3,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,4)-(3,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (3,16)-(3,19) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (3,15)-(3,16) = "&"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (5,0)-(5,4))
+ │ ├── call_operator_loc: (5,4)-(5,5) = "."
+ │ ├── name: :[]=
+ │ ├── message_loc: (5,5)-(5,8) = "[]="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,9)-(5,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,9)-(5,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,14)-(5,21))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,14)-(5,16))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (5,17)-(5,19) = "=>"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(7,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (7,0)-(7,4))
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (7,4)-(7,15) = "[:bar => 1]"
+ │ ├── opening_loc: (7,4)-(7,5) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,5)-(7,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (7,5)-(7,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (7,5)-(7,9))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (7,10)-(7,12) = "=>"
+ │ ├── closing_loc: (7,14)-(7,15) = "]"
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (9,6)-(9,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,6)-(9,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 42
+ │ │ └── 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (11,6)-(11,16))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (11,6)-(11,16))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (11,6)-(11,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 42
+ │ └── 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..64a25bbc45
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_assocs_comma.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,3)-(1,15) = "[:baz => 1,]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,4)-(1,13))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,4)-(1,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── operator_loc: (1,9)-(1,11) = "=>"
+ ├── closing_loc: (1,14)-(1,15) = "]"
+ └── block: ∅
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..47cb68d899
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_assocs_legacy.txt
@@ -0,0 +1,195 @@
+@ ProgramNode (location: (1,0)-(11,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,17))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,4)-(1,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,4)-(1,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (1,9)-(1,11) = "=>"
+ │ ├── closing_loc: (1,13)-(1,14) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (3,0)-(3,3) = "fun"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (3,4)-(3,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,4)-(3,8))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (3,16)-(3,19) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (3,15)-(3,16) = "&"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (5,0)-(5,4))
+ │ ├── call_operator_loc: (5,4)-(5,5) = "."
+ │ ├── name: :[]=
+ │ ├── message_loc: (5,5)-(5,8) = "[]="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,9)-(5,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,9)-(5,12))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,14)-(5,21))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,14)-(5,16))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (5,17)-(5,19) = "=>"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(7,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (7,0)-(7,4))
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :[]
+ │ ├── message_loc: (7,4)-(7,15) = "[:bar => 1]"
+ │ ├── opening_loc: (7,4)-(7,5) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,5)-(7,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (7,5)-(7,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (7,5)-(7,9))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: (7,10)-(7,12) = "=>"
+ │ ├── closing_loc: (7,14)-(7,15) = "]"
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (9,6)-(9,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,6)-(9,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 42
+ │ │ └── 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (11,6)-(11,16))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (11,6)-(11,16))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (11,6)-(11,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 42
+ │ └── 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..99ffa81934
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,5)-(1,8) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (1,4)-(1,5) = "&"
diff --git a/test/prism/snapshots/whitequark/args_cmd.txt b/test/prism/snapshots/whitequark/args_cmd.txt
new file mode 100644
index 0000000000..0089e56157
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_cmd.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (1,4)-(1,5) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/args_star.txt b/test/prism/snapshots/whitequark/args_star.txt
new file mode 100644
index 0000000000..c19577f106
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_star.txt
@@ -0,0 +1,70 @@
+@ ProgramNode (location: (1,0)-(3,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,14))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (1,4)-(1,8))
+ │ │ ├── operator_loc: (1,4)-(1,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (1,8)-(1,9) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (3,0)-(3,3) = "fun"
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ SplatNode (location: (3,4)-(3,8))
+ │ ├── operator_loc: (3,4)-(3,5) = "*"
+ │ └── expression:
+ │ @ CallNode (location: (3,5)-(3,8))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,5)-(3,8) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (3,14)-(3,15) = ")"
+ └── block:
+ @ BlockArgumentNode (location: (3,10)-(3,14))
+ ├── expression:
+ │ @ CallNode (location: (3,11)-(3,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (3,11)-(3,14) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── operator_loc: (3,10)-(3,11) = "&"
diff --git a/test/prism/snapshots/whitequark/array_assocs.txt b/test/prism/snapshots/whitequark/array_assocs.txt
new file mode 100644
index 0000000000..3747e3f7d8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_assocs.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(3,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,13))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,10))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,2)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,2)-(1,8))
+ │ │ ├── key:
+ │ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (1,4)-(1,6) = "=>"
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,9)-(1,10) = "]"
+ └── @ ArrayNode (location: (3,0)-(3,13))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (3,2)-(3,3))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ KeywordHashNode (location: (3,5)-(3,11))
+ │ ├── flags: ∅
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (3,5)-(3,11))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (3,5)-(3,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,10)-(3,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── 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..b183a7ac6b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_plain.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── 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..f76563e9f4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_splat.txt
@@ -0,0 +1,68 @@
+@ ProgramNode (location: (1,0)-(5,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,9))
+ └── body: (length: 3)
+ ├── @ ArrayNode (location: (1,0)-(1,6))
+ │ ├── flags: contains_splat
+ │ ├── elements: (length: 1)
+ │ │ └── @ SplatNode (location: (1,1)-(1,5))
+ │ │ ├── operator_loc: (1,1)-(1,2) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,2)-(1,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,2)-(1,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,5)-(1,6) = "]"
+ ├── @ ArrayNode (location: (3,0)-(3,12))
+ │ ├── flags: contains_splat
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ SplatNode (location: (3,4)-(3,8))
+ │ │ │ ├── operator_loc: (3,4)-(3,5) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (3,5)-(3,8))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (3,5)-(3,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ IntegerNode (location: (3,10)-(3,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: (3,0)-(3,1) = "["
+ │ └── closing_loc: (3,11)-(3,12) = "]"
+ └── @ ArrayNode (location: (5,0)-(5,9))
+ ├── flags: contains_splat
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (5,1)-(5,2))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ SplatNode (location: (5,4)-(5,8))
+ │ ├── operator_loc: (5,4)-(5,5) = "*"
+ │ └── expression:
+ │ @ CallNode (location: (5,5)-(5,8))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,5)-(5,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..0662f01af1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_symbols.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,11))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ SymbolNode (location: (1,3)-(1,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ SymbolNode (location: (1,7)-(1,10))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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..1068ba6d0e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_symbols_empty.txt
@@ -0,0 +1,15 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,4))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (1,0)-(1,3) = "%I("
+ │ └── closing_loc: (1,3)-(1,4) = ")"
+ └── @ ArrayNode (location: (3,0)-(3,4))
+ ├── flags: ∅
+ ├── 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..2437486b43
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_symbols_interp.txt
@@ -0,0 +1,67 @@
+@ ProgramNode (location: (1,0)-(3,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,13))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,14))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,3)-(1,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (1,9)-(1,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ ├── flags: ∅
+ ├── elements: (length: 1)
+ │ └── @ InterpolatedSymbolNode (location: (3,3)-(3,12))
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (3,3)-(3,6))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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..84121de355
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_words.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,11))
+ ├── flags: ∅
+ ├── 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..e4dba94cdf
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_words_empty.txt
@@ -0,0 +1,15 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,4))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (1,0)-(1,3) = "%W("
+ │ └── closing_loc: (1,3)-(1,4) = ")"
+ └── @ ArrayNode (location: (3,0)-(3,4))
+ ├── flags: ∅
+ ├── 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..c3ae9a0cf8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_words_interp.txt
@@ -0,0 +1,80 @@
+@ ProgramNode (location: (1,0)-(3,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,22))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,14))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (1,9)-(1,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── 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))
+ ├── flags: ∅
+ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (3,9)-(3,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (3,12)-(3,13) = "}"
+ │ │ ├── @ StringNode (location: (3,13)-(3,16))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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..4a3c36680b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/asgn_cmd.txt
@@ -0,0 +1,55 @@
+@ 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :m
+ │ │ │ ├── message_loc: (1,12)-(1,13) = "m"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,14)-(1,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (1,14)-(1,17))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (3,6)-(3,7) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,8)-(3,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (3,8)-(3,11))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..41d5bdc5bf
--- /dev/null
+++ b/test/prism/snapshots/whitequark/asgn_mrhs.txt
@@ -0,0 +1,87 @@
+@ 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))
+ │ │ ├── flags: contains_splat
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SplatNode (location: (1,6)-(1,10))
+ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ CallNode (location: (3,6)-(3,9))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (3,6)-(3,9) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── @ IntegerNode (location: (3,11)-(3,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ ├── flags: contains_splat
+ │ ├── elements: (length: 2)
+ │ │ ├── @ CallNode (location: (5,6)-(5,9))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (5,6)-(5,9) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ SplatNode (location: (5,11)-(5,15))
+ │ │ ├── operator_loc: (5,11)-(5,12) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (5,12)-(5,15))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (5,12)-(5,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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..ea6b76faf7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/back_ref.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ BackReferenceReadNode (location: (1,0)-(1,2))
+ └── name: :$+
diff --git a/test/prism/snapshots/whitequark/bang.txt b/test/prism/snapshots/whitequark/bang.txt
new file mode 100644
index 0000000000..997a8718c5
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,4))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,1)-(1,4) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/bang_cmd.txt b/test/prism/snapshots/whitequark/bang_cmd.txt
new file mode 100644
index 0000000000..e487da5e57
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bang_cmd.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,1)-(1,2) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,3)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/begin_cmdarg.txt b/test/prism/snapshots/whitequark/begin_cmdarg.txt
new file mode 100644
index 0000000000..b0c03c1754
--- /dev/null
+++ b/test/prism/snapshots/whitequark/begin_cmdarg.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,28))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── call_operator_loc: (1,9)-(1,10) = "."
+ │ │ ├── name: :times
+ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ ├── opening_loc: (1,16)-(1,18) = "do"
+ │ │ └── closing_loc: (1,21)-(1,24) = "end"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (1,25)-(1,28) = "end"
+ ├── closing_loc: ∅
+ └── block: ∅
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..69db24a127
--- /dev/null
+++ b/test/prism/snapshots/whitequark/beginless_erange_after_newline.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(2,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,6))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ RangeNode (location: (2,0)-(2,6))
+ ├── flags: exclude_end
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (2,3)-(2,6))
+ │ ├── flags: decimal
+ │ └── value: 100
+ └── operator_loc: (2,0)-(2,3) = "..."
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..cbc11c83c1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/beginless_irange_after_newline.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(2,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,5))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ RangeNode (location: (2,0)-(2,5))
+ ├── flags: ∅
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (2,2)-(2,5))
+ │ ├── flags: decimal
+ │ └── value: 100
+ └── operator_loc: (2,0)-(2,2) = ".."
diff --git a/test/prism/snapshots/whitequark/beginless_range.txt b/test/prism/snapshots/whitequark/beginless_range.txt
new file mode 100644
index 0000000000..59e6f135ad
--- /dev/null
+++ b/test/prism/snapshots/whitequark/beginless_range.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(3,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,5))
+ └── body: (length: 2)
+ ├── @ RangeNode (location: (1,0)-(1,6))
+ │ ├── flags: exclude_end
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (1,3)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 100
+ │ └── operator_loc: (1,0)-(1,3) = "..."
+ └── @ RangeNode (location: (3,0)-(3,5))
+ ├── flags: ∅
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (3,2)-(3,5))
+ │ ├── flags: decimal
+ │ └── value: 100
+ └── operator_loc: (3,0)-(3,2) = ".."
diff --git a/test/prism/snapshots/whitequark/blockarg.txt b/test/prism/snapshots/whitequark/blockarg.txt
new file mode 100644
index 0000000000..70b054e073
--- /dev/null
+++ b/test/prism/snapshots/whitequark/blockarg.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── 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..149c3765c9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/blockargs.txt
@@ -0,0 +1,1339 @@
+@ ProgramNode (location: (1,0)-(71,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(71,7))
+ └── body: (length: 35)
+ ├── @ CallNode (location: (1,0)-(1,5))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (5,0)-(5,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (7,0)-(7,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── name_loc: (7,6)-(7,9) = "baz"
+ │ │ │ │ └── operator_loc: (7,4)-(7,6) = "**"
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (7,11)-(7,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (9,0)-(9,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: ∅
+ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ └── operator_loc: (9,4)-(9,5) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (9,7)-(9,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (11,0)-(11,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :r
+ │ │ │ │ ├── name_loc: (11,5)-(11,6) = "r"
+ │ │ │ │ └── operator_loc: (11,4)-(11,5) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (11,8)-(11,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (11,11)-(11,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (13,0)-(13,13))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (15,0)-(15,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (17,0)-(17,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: ∅
+ │ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (19,0)-(21,3))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (23,0)-(23,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (25,0)-(25,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (25,7)-(25,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (27,0)-(27,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (27,7)-(27,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: ∅
+ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ └── operator_loc: (27,7)-(27,8) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (27,10)-(27,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (29,0)-(29,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (29,7)-(29,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :r
+ │ │ │ │ ├── name_loc: (29,8)-(29,9) = "r"
+ │ │ │ │ └── operator_loc: (29,7)-(29,8) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (29,11)-(29,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (29,14)-(29,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (31,0)-(31,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (31,7)-(31,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (33,0)-(33,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (33,7)-(33,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (35,0)-(35,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (35,7)-(35,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: ∅
+ │ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (37,0)-(37,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (37,7)-(37,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ ImplicitRestNode (location: (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) = "}"
+ ├── @ CallNode (location: (39,0)-(39,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (39,7)-(39,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (41,0)-(41,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (41,7)-(41,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o
+ │ │ │ │ ├── name_loc: (41,7)-(41,8) = "o"
+ │ │ │ │ ├── operator_loc: (41,8)-(41,9) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (41,9)-(41,10))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (41,12)-(41,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (43,0)-(43,24))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (43,7)-(43,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o
+ │ │ │ │ ├── name_loc: (43,7)-(43,8) = "o"
+ │ │ │ │ ├── operator_loc: (43,8)-(43,9) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (43,9)-(43,10))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (43,12)-(43,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :r
+ │ │ │ │ ├── name_loc: (43,13)-(43,14) = "r"
+ │ │ │ │ └── operator_loc: (43,12)-(43,13) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (43,16)-(43,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (43,19)-(43,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (45,0)-(45,27))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 2)
+ │ │ │ │ ├── @ OptionalParameterNode (location: (45,7)-(45,10))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (45,7)-(45,8) = "o"
+ │ │ │ │ │ ├── operator_loc: (45,8)-(45,9) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (45,9)-(45,10))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ OptionalParameterNode (location: (45,12)-(45,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o1
+ │ │ │ │ ├── name_loc: (45,12)-(45,14) = "o1"
+ │ │ │ │ ├── operator_loc: (45,14)-(45,15) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (45,15)-(45,16))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (45,18)-(45,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (47,0)-(47,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (47,7)-(47,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o
+ │ │ │ │ ├── name_loc: (47,7)-(47,8) = "o"
+ │ │ │ │ ├── operator_loc: (47,8)-(47,9) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (47,9)-(47,10))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (47,12)-(47,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (47,15)-(47,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (49,0)-(49,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ ImplicitRestNode (location: (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) = "}"
+ ├── @ CallNode (location: (51,0)-(51,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (53,0)-(53,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (55,0)-(55,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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) = "}"
+ ├── @ CallNode (location: (57,0)-(57,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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)
+ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (57,4)-(57,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── name_loc: (57,4)-(57,8) = "foo:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (57,9)-(57,10))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (57,12)-(57,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (59,0)-(59,32))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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)
+ │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (59,4)-(59,10))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── name_loc: (59,4)-(59,8) = "foo:"
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (59,9)-(59,10))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 1
+ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (59,12)-(59,18))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── name_loc: (59,12)-(59,16) = "bar:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (59,17)-(59,18))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 2
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (59,20)-(59,25))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ ├── name_loc: (59,22)-(59,25) = "baz"
+ │ │ │ │ └── operator_loc: (59,20)-(59,22) = "**"
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (59,27)-(59,29))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (61,0)-(61,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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)
+ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (61,4)-(61,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ └── name_loc: (61,4)-(61,8) = "foo:"
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (63,0)-(63,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o
+ │ │ │ │ ├── name_loc: (63,4)-(63,5) = "o"
+ │ │ │ │ ├── operator_loc: (63,5)-(63,6) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (63,6)-(63,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (63,9)-(63,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (65,0)-(65,18))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o
+ │ │ │ │ ├── name_loc: (65,4)-(65,5) = "o"
+ │ │ │ │ ├── operator_loc: (65,5)-(65,6) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (65,6)-(65,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (65,9)-(65,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (67,0)-(67,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o
+ │ │ │ │ ├── name_loc: (67,4)-(67,5) = "o"
+ │ │ │ │ ├── operator_loc: (67,5)-(67,6) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (67,6)-(67,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (67,9)-(67,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :r
+ │ │ │ │ ├── name_loc: (67,10)-(67,11) = "r"
+ │ │ │ │ └── operator_loc: (67,9)-(67,10) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (67,13)-(67,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (67,16)-(67,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (69,0)-(69,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :o
+ │ │ │ │ ├── name_loc: (69,4)-(69,5) = "o"
+ │ │ │ │ ├── operator_loc: (69,5)-(69,6) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (69,6)-(69,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (69,9)-(69,10))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :p
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (69,12)-(69,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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) = "}"
+ └── @ CallNode (location: (71,0)-(71,7))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── 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) = "}"
diff --git a/test/prism/snapshots/whitequark/bug_435.txt b/test/prism/snapshots/whitequark/bug_435.txt
new file mode 100644
index 0000000000..42f9a49c5c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_435.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,14))
+ ├── flags: ∅
+ ├── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── 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..7291d01175
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_447.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(3,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,14))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,0)-(1,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ArrayNode (location: (1,2)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ ├── 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"
+ └── @ CallNode (location: (3,0)-(3,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (3,0)-(3,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,2)-(3,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ ArrayNode (location: (3,2)-(3,4))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 0)
+ │ │ ├── opening_loc: (3,2)-(3,3) = "["
+ │ │ └── closing_loc: (3,3)-(3,4) = "]"
+ │ └── @ IntegerNode (location: (3,6)-(3,7))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── 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"
diff --git a/test/prism/snapshots/whitequark/bug_452.txt b/test/prism/snapshots/whitequark/bug_452.txt
new file mode 100644
index 0000000000..e1ea52fbd1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_452.txt
@@ -0,0 +1,63 @@
+@ ProgramNode (location: (1,0)-(1,37))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,37))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :td
+ │ ├── message_loc: (1,0)-(1,2) = "td"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,3)-(1,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,3)-(1,21))
+ │ │ ├── flags: ∅
+ │ │ ├── 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
+ │ │ │ │ └── value: 1500
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ │ └── closing_loc: (1,9)-(1,10) = ")"
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── name: :toString
+ │ │ ├── message_loc: (1,11)-(1,19) = "toString"
+ │ │ ├── opening_loc: (1,19)-(1,20) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (1,20)-(1,21) = ")"
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (1,23)-(1,37))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,23)-(1,25))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :td
+ │ ├── message_loc: (1,23)-(1,25) = "td"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,25)-(1,26) = "."
+ ├── name: :num
+ ├── 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"
diff --git a/test/prism/snapshots/whitequark/bug_466.txt b/test/prism/snapshots/whitequark/bug_466.txt
new file mode 100644
index 0000000000..4167c223f2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_466.txt
@@ -0,0 +1,70 @@
+@ ProgramNode (location: (1,0)-(1,27))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,27))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,27))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,19))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,4)-(1,19))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ParenthesesNode (location: (1,7)-(1,12))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (1,8)-(1,11))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,8)-(1,11))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :+
+ │ │ │ │ │ ├── message_loc: (1,9)-(1,10) = "+"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ │ └── value: 1
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── opening_loc: (1,7)-(1,8) = "("
+ │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ │ │ ├── call_operator_loc: (1,12)-(1,13) = "."
+ │ │ │ ├── name: :to_i
+ │ │ │ ├── message_loc: (1,13)-(1,17) = "to_i"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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"
diff --git a/test/prism/snapshots/whitequark/bug_473.txt b/test/prism/snapshots/whitequark/bug_473.txt
new file mode 100644
index 0000000000..028b6a517c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_473.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,2)-(1,9))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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: ∅
diff --git a/test/prism/snapshots/whitequark/bug_480.txt b/test/prism/snapshots/whitequark/bug_480.txt
new file mode 100644
index 0000000000..ed6ba40795
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_480.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,12))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,2)-(1,12))
+ │ ├── flags: ∅
+ │ ├── 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: ∅
diff --git a/test/prism/snapshots/whitequark/bug_481.txt b/test/prism/snapshots/whitequark/bug_481.txt
new file mode 100644
index 0000000000..0b093d483c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_481.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,0)-(1,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ └── @ CallNode (location: (1,16)-(1,28))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ IntegerNode (location: (1,16)-(1,17))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── call_operator_loc: (1,17)-(1,18) = "."
+ ├── name: :tap
+ ├── 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"
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..7aa8694f66
--- /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: forced_utf8_encoding
+ ├── 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..50c988fa1f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :desc
+ ├── message_loc: (1,0)-(1,4) = "desc"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,10))
+ │ ├── flags: ∅
+ │ └── 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"
diff --git a/test/prism/snapshots/whitequark/bug_cmdarg.txt b/test/prism/snapshots/whitequark/bug_cmdarg.txt
new file mode 100644
index 0000000000..32d05746a7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_cmdarg.txt
@@ -0,0 +1,106 @@
+@ ProgramNode (location: (1,0)-(5,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,26))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,15))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :assert
+ │ ├── message_loc: (1,0)-(1,6) = "assert"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,7)-(1,15))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,7)-(1,15))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,7)-(1,15))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,7)-(1,10))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── @ CallNode (location: (3,0)-(3,11))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :assert
+ │ ├── message_loc: (3,0)-(3,6) = "assert"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,7)-(3,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,7)-(3,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :dogs
+ │ │ ├── message_loc: (3,7)-(3,11) = "dogs"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,26))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (5,0)-(5,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,2)-(5,26))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (5,2)-(5,26))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (5,2)-(5,26))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (5,2)-(5,4))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── 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"
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..9b95adda35
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,33))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,33))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,33))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :bar
+ ├── message_loc: (1,0)-(1,3) = "bar"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,33))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (1,13)-(1,17))
+ │ │ ├── call_operator_loc: (1,17)-(1,18) = "."
+ │ │ ├── name: :each
+ │ │ ├── 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"
+ │ ├── 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: ∅
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..3946bc1a4a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :tap
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,17))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :proc
+ │ │ ├── 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"
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,16)-(1,17) = ")"
+ ├── closing_loc: ∅
+ └── block: ∅
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..183d465439
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt
@@ -0,0 +1,383 @@
+@ ProgramNode (location: (1,0)-(9,52))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,52))
+ └── body: (length: 5)
+ ├── @ CallNode (location: (1,0)-(1,42))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (1,0)-(1,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,42))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,2)-(1,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :proc
+ │ │ │ │ │ ├── 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"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (1,27)-(1,41))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (1,27)-(1,29))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (1,27)-(1,28) = "b"
+ │ │ │ │ ├── closing_loc: (1,28)-(1,29) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (1,30)-(1,41))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :proc
+ │ │ │ │ ├── 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"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (1,41)-(1,42) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,40))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (3,0)-(3,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,40))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (3,2)-(3,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :proc
+ │ │ │ │ │ ├── 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"
+ │ │ │ │ └── operator_loc: (3,9)-(3,11) = "**"
+ │ │ │ └── @ AssocNode (location: (3,25)-(3,39))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (3,25)-(3,27))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (3,25)-(3,26) = "b"
+ │ │ │ │ ├── closing_loc: (3,26)-(3,27) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (3,28)-(3,39))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :proc
+ │ │ │ │ ├── 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"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (3,39)-(3,40) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,43))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (5,0)-(5,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,43))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (5,2)-(5,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (5,9)-(5,10) = ":"
+ │ │ │ │ │ ├── value_loc: (5,10)-(5,11) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (5,15)-(5,26))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :proc
+ │ │ │ │ │ ├── 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"
+ │ │ │ │ └── operator_loc: (5,12)-(5,14) = "=>"
+ │ │ │ └── @ AssocNode (location: (5,28)-(5,42))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (5,28)-(5,30))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (5,28)-(5,29) = "b"
+ │ │ │ │ ├── closing_loc: (5,29)-(5,30) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (5,31)-(5,42))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :proc
+ │ │ │ │ ├── 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"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (5,42)-(5,43) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(7,40))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (7,0)-(7,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,2)-(7,40))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (7,2)-(7,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (7,9)-(7,10) = "a"
+ │ │ │ │ │ ├── closing_loc: (7,10)-(7,11) = ":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (7,12)-(7,23))
+ │ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :proc
+ │ │ │ │ │ ├── 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"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (7,25)-(7,39))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (7,25)-(7,27))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (7,25)-(7,26) = "b"
+ │ │ │ │ ├── closing_loc: (7,26)-(7,27) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (7,28)-(7,39))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :proc
+ │ │ │ │ ├── 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"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (7,39)-(7,40) = "}"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (9,0)-(9,52))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (9,0)-(9,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (9,2)-(9,52))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (9,2)-(9,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :proc
+ │ │ │ │ ├── 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"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (9,24)-(9,35))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :proc
+ │ │ │ │ ├── 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"
+ │ │ │ └── operator_loc: (9,21)-(9,23) = "=>"
+ │ │ └── @ AssocNode (location: (9,37)-(9,51))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,37)-(9,39))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (9,37)-(9,38) = "b"
+ │ │ │ ├── closing_loc: (9,38)-(9,39) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (9,40)-(9,51))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :proc
+ │ │ │ ├── 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"
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (9,51)-(9,52) = "}"
+ ├── closing_loc: ∅
+ └── block: ∅
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..bf4dd645fb
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_heredoc_do.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,10))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,2)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,2)-(1,10) = "<<-TABLE"
+ │ ├── content_loc: (2,0)-(2,0) = ""
+ │ ├── closing_loc: (2,0)-(3,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"
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..74af8607e0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_interp_single.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 2)
+ ├── @ InterpolatedStringNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ └── closing_loc: (1,5)-(1,6) = "\""
+ └── @ ArrayNode (location: (3,0)-(3,8))
+ ├── flags: ∅
+ ├── elements: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (3,3)-(3,7))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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..7178345a22
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_lambda_leakage.txt
@@ -0,0 +1,38 @@
+@ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :scope
+ ├── message_loc: (1,14)-(1,19) = "scope"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..4464b66e38
--- /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))
+ ├── flags: extended, forced_us_ascii_encoding
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,3) = "#)"
+ ├── closing_loc: (1,3)-(1,5) = "/x"
+ └── unescaped: "#)"
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..aa8aa11ccc
--- /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))
+ ├── flags: ∅
+ ├── keyword_loc: (1,0)-(1,5) = "while"
+ ├── closing_loc: (1,20)-(1,23) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,16))
+ │ ├── flags: ∅
+ │ ├── 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: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── statements: ∅
diff --git a/test/prism/snapshots/whitequark/case_cond.txt b/test/prism/snapshots/whitequark/case_cond.txt
new file mode 100644
index 0000000000..fbe17eaf8f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_cond.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ └── 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..b1aff2450e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_cond_else.txt
@@ -0,0 +1,46 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ └── 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..23054ed132
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_expr.txt
@@ -0,0 +1,44 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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: frozen
+ │ │ ├── opening_loc: (1,15)-(1,16) = "'"
+ │ │ ├── content_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── closing_loc: (1,19)-(1,20) = "'"
+ │ │ └── unescaped: "bar"
+ │ ├── then_keyword_loc: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (1,22)-(1,25))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,22)-(1,25))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..0624d97c84
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_expr_else.txt
@@ -0,0 +1,60 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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: frozen
+ │ │ ├── opening_loc: (1,15)-(1,16) = "'"
+ │ │ ├── content_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── closing_loc: (1,19)-(1,20) = "'"
+ │ │ └── unescaped: "bar"
+ │ ├── then_keyword_loc: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (1,22)-(1,25))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,22)-(1,25))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (1,32)-(1,35) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..42b90be061
--- /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
+ │ ├── name: :Foo
+ │ ├── delimiter_loc: (1,3)-(1,5) = "::"
+ │ └── name_loc: (1,5)-(1,8) = "Foo"
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ IntegerNode (location: (1,11)-(1,13))
+ ├── flags: decimal
+ └── value: 10
diff --git a/test/prism/snapshots/whitequark/casgn_toplevel.txt b/test/prism/snapshots/whitequark/casgn_toplevel.txt
new file mode 100644
index 0000000000..070d90a46b
--- /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: ∅
+ │ ├── name: :Foo
+ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ └── name_loc: (1,2)-(1,5) = "Foo"
+ ├── operator_loc: (1,6)-(1,7) = "="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,10))
+ ├── flags: decimal
+ └── value: 10
diff --git a/test/prism/snapshots/whitequark/casgn_unscoped.txt b/test/prism/snapshots/whitequark/casgn_unscoped.txt
new file mode 100644
index 0000000000..f535cafdc6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/casgn_unscoped.txt
@@ -0,0 +1,13 @@
+@ 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
+ │ └── value: 10
+ └── 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_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..c873ea0c12
--- /dev/null
+++ b/test/prism/snapshots/whitequark/class_super_label.txt
@@ -0,0 +1,35 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,12)-(1,13) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,13)-(1,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,13)-(1,15))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,13)-(1,14) = ":"
+ │ │ ├── value_loc: (1,14)-(1,15) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..e33f798ef5
--- /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))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,0)-(3,2) = "&."
+ │ ├── name: :foo
+ │ ├── message_loc: (3,2)-(3,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (6,0)-(8,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,0)-(6,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (8,0)-(8,1) = "."
+ │ ├── name: :foo
+ │ ├── message_loc: (8,1)-(8,4) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (11,0)-(13,5))
+ │ ├── flags: safe_navigation
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,0)-(11,1))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (11,0)-(11,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (13,0)-(13,2) = "&."
+ │ ├── name: :foo
+ │ ├── message_loc: (13,2)-(13,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (16,0)-(18,4))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (16,0)-(16,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (16,0)-(16,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (18,0)-(18,1) = "."
+ ├── name: :foo
+ ├── message_loc: (18,1)-(18,4) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/complex.txt b/test/prism/snapshots/whitequark/complex.txt
new file mode 100644
index 0000000000..e688585a5f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/complex.txt
@@ -0,0 +1,27 @@
+@ 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))
+ │ └── value: 42.1
+ ├── @ ImaginaryNode (location: (3,0)-(3,6))
+ │ └── numeric:
+ │ @ RationalNode (location: (3,0)-(3,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (3,0)-(3,4))
+ │ └── value: 42.1
+ ├── @ ImaginaryNode (location: (5,0)-(5,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (5,0)-(5,2))
+ │ ├── flags: decimal
+ │ └── value: 42
+ └── @ ImaginaryNode (location: (7,0)-(7,4))
+ └── numeric:
+ @ RationalNode (location: (7,0)-(7,3))
+ └── numeric:
+ @ IntegerNode (location: (7,0)-(7,2))
+ ├── flags: decimal
+ └── value: 42
diff --git a/test/prism/snapshots/whitequark/cond_begin.txt b/test/prism/snapshots/whitequark/cond_begin.txt
new file mode 100644
index 0000000000..e349c198a5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_begin.txt
@@ -0,0 +1,40 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,7)-(1,8) = ")"
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (1,10)-(1,13))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,10)-(1,13))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,10)-(1,13) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..b4e6d8682c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_begin_masgn.txt
@@ -0,0 +1,52 @@
+@ 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ MultiWriteNode (location: (1,9)-(1,19))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,12)-(1,13))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (1,14)-(1,15) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,16)-(1,19) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,19)-(1,20) = ")"
+ ├── then_keyword_loc: ∅
+ ├── 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..18fee58492
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_eflipflop.txt
@@ -0,0 +1,78 @@
+@ ProgramNode (location: (1,0)-(3,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,17))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (1,1)-(1,12))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,2)-(1,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FlipFlopNode (location: (1,2)-(1,11))
+ │ │ │ ├── flags: exclude_end
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (1,2)-(1,5))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (1,2)-(1,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (1,8)-(1,11))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (1,8)-(1,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (1,5)-(1,8) = "..."
+ │ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ IfNode (location: (3,0)-(3,17))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (3,3)-(3,12))
+ │ ├── flags: exclude_end
+ │ ├── left:
+ │ │ @ CallNode (location: (3,3)-(3,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (3,9)-(3,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,9)-(3,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (3,6)-(3,9) = "..."
+ ├── then_keyword_loc: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,14)-(3,17) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_eflipflop_with_beginless_range.txt b/test/prism/snapshots/whitequark/cond_eflipflop_with_beginless_range.txt
new file mode 100644
index 0000000000..05972521e8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_eflipflop_with_beginless_range.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,14))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (1,3)-(1,9))
+ │ ├── flags: exclude_end
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (1,3)-(1,6) = "..."
+ ├── then_keyword_loc: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,11)-(1,14) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_eflipflop_with_endless_range.txt b/test/prism/snapshots/whitequark/cond_eflipflop_with_endless_range.txt
new file mode 100644
index 0000000000..c85ff292a5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_eflipflop_with_endless_range.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,14))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (1,3)-(1,9))
+ │ ├── flags: exclude_end
+ │ ├── left:
+ │ │ @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right: ∅
+ │ └── operator_loc: (1,6)-(1,9) = "..."
+ ├── then_keyword_loc: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,11)-(1,14) = "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..f76a6636f6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_iflipflop.txt
@@ -0,0 +1,78 @@
+@ ProgramNode (location: (1,0)-(3,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,16))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (1,1)-(1,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,2)-(1,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FlipFlopNode (location: (1,2)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (1,2)-(1,5))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (1,2)-(1,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: (1,5)-(1,7) = ".."
+ │ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ IfNode (location: (3,0)-(3,16))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (3,3)-(3,11))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ CallNode (location: (3,3)-(3,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (3,8)-(3,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (3,6)-(3,8) = ".."
+ ├── then_keyword_loc: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,13)-(3,16) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_iflipflop_with_beginless_range.txt b/test/prism/snapshots/whitequark/cond_iflipflop_with_beginless_range.txt
new file mode 100644
index 0000000000..63b87ffd49
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_iflipflop_with_beginless_range.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,13))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (1,3)-(1,8))
+ │ ├── flags: ∅
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (1,3)-(1,5) = ".."
+ ├── then_keyword_loc: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_iflipflop_with_endless_range.txt b/test/prism/snapshots/whitequark/cond_iflipflop_with_endless_range.txt
new file mode 100644
index 0000000000..328a2da153
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_iflipflop_with_endless_range.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,13))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (1,3)-(1,8))
+ │ ├── flags: ∅
+ │ ├── left:
+ │ │ @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right: ∅
+ │ └── operator_loc: (1,6)-(1,8) = ".."
+ ├── then_keyword_loc: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,10)-(1,13) = "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..700d0966f7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_match_current_line.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(3,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,13))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ MatchLastLineNode (location: (1,1)-(1,6))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,1)-(1,2) = "/"
+ │ │ ├── content_loc: (1,2)-(1,5) = "wat"
+ │ │ ├── closing_loc: (1,5)-(1,6) = "/"
+ │ │ └── unescaped: "wat"
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ IfNode (location: (3,0)-(3,13))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ MatchLastLineNode (location: (3,3)-(3,8))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (3,3)-(3,4) = "/"
+ │ ├── content_loc: (3,4)-(3,7) = "wat"
+ │ ├── closing_loc: (3,7)-(3,8) = "/"
+ │ └── unescaped: "wat"
+ ├── then_keyword_loc: ∅
+ ├── 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..71df6208d2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/const_op_asgn.txt
@@ -0,0 +1,97 @@
+@ 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: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ │ └── name_loc: (1,2)-(1,3) = "A"
+ │ ├── binary_operator_loc: (1,4)-(1,6) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── binary_operator: :+
+ ├── @ ConstantOperatorWriteNode (location: (3,0)-(3,6))
+ │ ├── name: :A
+ │ ├── name_loc: (3,0)-(3,1) = "A"
+ │ ├── binary_operator_loc: (3,2)-(3,4) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,5)-(3,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── binary_operator: :+
+ ├── @ ConstantPathOperatorWriteNode (location: (5,0)-(5,9))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (5,0)-(5,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (5,0)-(5,1))
+ │ │ │ └── name: :B
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (5,1)-(5,3) = "::"
+ │ │ └── name_loc: (5,3)-(5,4) = "A"
+ │ ├── binary_operator_loc: (5,5)-(5,7) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (5,8)-(5,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── binary_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: ∅
+ │ │ │ ├── name: :A
+ │ │ │ ├── delimiter_loc: (7,7)-(7,9) = "::"
+ │ │ │ └── name_loc: (7,9)-(7,10) = "A"
+ │ │ ├── operator_loc: (7,11)-(7,14) = "||="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (7,15)-(7,16))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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))
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (9,11)-(9,13) = "::"
+ │ │ └── name_loc: (9,13)-(9,14) = "A"
+ │ ├── operator_loc: (9,15)-(9,18) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (9,19)-(9,20))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── 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..83af4b187b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/const_scoped.txt
@@ -0,0 +1,12 @@
+@ 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
+ ├── name: :Foo
+ ├── delimiter_loc: (1,3)-(1,5) = "::"
+ └── name_loc: (1,5)-(1,8) = "Foo"
diff --git a/test/prism/snapshots/whitequark/const_toplevel.txt b/test/prism/snapshots/whitequark/const_toplevel.txt
new file mode 100644
index 0000000000..3d7df5defc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/const_toplevel.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ConstantPathNode (location: (1,0)-(1,5))
+ ├── parent: ∅
+ ├── name: :Foo
+ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ └── name_loc: (1,2)-(1,5) = "Foo"
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..e801456bf7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cpath.txt
@@ -0,0 +1,31 @@
+@ 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: ∅
+ │ │ ├── name: :Foo
+ │ │ ├── delimiter_loc: (1,7)-(1,9) = "::"
+ │ │ └── name_loc: (1,9)-(1,12) = "Foo"
+ │ ├── 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
+ │ ├── name: :Foo
+ │ ├── delimiter_loc: (3,10)-(3,12) = "::"
+ │ └── name_loc: (3,12)-(3,15) = "Foo"
+ ├── 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..f3eceed4a4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cvasgn.txt
@@ -0,0 +1,13 @@
+@ 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
+ │ └── value: 10
+ └── 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..67896b2415
--- /dev/null
+++ b/test/prism/snapshots/whitequark/dedenting_heredoc.txt
@@ -0,0 +1,496 @@
+@ ProgramNode (location: (1,0)-(72,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(72,8))
+ └── body: (length: 16)
+ ├── @ CallNode (location: (1,0)-(1,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (1,0)-(1,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (1,2)-(1,8))
+ │ │ ├── flags: mutable
+ │ │ ├── opening_loc: (1,2)-(1,8) = "<<~\"E\""
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (2,0)-(3,0) = " 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: frozen
+ │ │ │ │ │ ├── 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)-(4,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,10)-(4,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (4,0)-(5,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (6,0)-(6,8))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (6,0)-(6,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,2)-(6,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (6,2)-(6,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (6,2)-(6,8) = "<<~\"E\""
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (7,0)-(8,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (7,0)-(8,0) = " 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))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── message_loc: (8,4)-(8,7) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ └── closing_loc: (8,7)-(8,8) = "}"
+ │ │ │ └── @ StringNode (location: (8,8)-(9,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (8,8)-(9,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (9,0)-(10,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (11,0)-(11,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (11,0)-(11,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,2)-(11,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (11,2)-(11,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (11,2)-(11,6) = "<<~E"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (12,0)-(13,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (12,0)-(13,0) = "\tx\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x\n"
+ │ │ │ └── @ StringNode (location: (13,0)-(14,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (13,0)-(14,0) = " y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "y\n"
+ │ │ └── closing_loc: (14,0)-(15,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (16,0)-(16,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (16,0)-(16,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (16,2)-(16,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (16,2)-(16,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (16,2)-(16,6) = "<<~E"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (17,0)-(18,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (17,0)-(18,0) = "\tx\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\tx\n"
+ │ │ │ └── @ StringNode (location: (18,0)-(19,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (18,0)-(19,0) = " y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "y\n"
+ │ │ └── closing_loc: (19,0)-(20,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (21,0)-(21,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (21,0)-(21,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (21,2)-(21,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (21,2)-(21,6) = "<<~E"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (22,0)-(23,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (22,0)-(23,0) = " \tx\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x\n"
+ │ │ │ └── @ StringNode (location: (23,0)-(24,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (23,0)-(24,0) = " y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "y\n"
+ │ │ └── closing_loc: (24,0)-(25,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (26,0)-(26,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (26,0)-(26,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (26,2)-(26,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (26,2)-(26,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (26,2)-(26,6) = "<<~E"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (27,0)-(28,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (27,0)-(28,0) = " \tx\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\tx\n"
+ │ │ │ └── @ StringNode (location: (28,0)-(29,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (28,0)-(29,0) = "\ty\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "y\n"
+ │ │ └── closing_loc: (29,0)-(30,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(31,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (31,0)-(31,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,2)-(31,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (31,2)-(31,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (31,2)-(31,6) = "<<~E"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (32,0)-(33,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (32,0)-(33,0) = " x\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " x\n"
+ │ │ │ └── @ StringNode (location: (33,0)-(34,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (33,0)-(34,0) = " \\\ty\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\ty\n"
+ │ │ └── closing_loc: (34,0)-(35,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (36,0)-(36,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (36,0)-(36,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (36,2)-(36,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (36,2)-(36,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (36,2)-(36,6) = "<<~E"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (37,0)-(38,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (37,0)-(38,0) = " x\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " x\n"
+ │ │ │ └── @ StringNode (location: (38,0)-(39,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (38,0)-(39,0) = " \\ y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " y\n"
+ │ │ └── closing_loc: (39,0)-(40,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (41,0)-(41,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (41,0)-(41,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,2)-(41,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (41,2)-(41,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (41,2)-(41,6) = "<<~E"
+ │ │ ├── content_loc: (42,0)-(42,0) = ""
+ │ │ ├── closing_loc: (42,0)-(43,0) = " E\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (44,0)-(44,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (44,0)-(44,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (44,2)-(44,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (44,2)-(44,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (44,2)-(44,6) = "<<~E"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (45,0)-(46,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (45,0)-(46,0) = " x\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " x\n"
+ │ │ │ ├── @ StringNode (location: (46,0)-(47,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (46,0)-(47,0) = "\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\n"
+ │ │ │ └── @ StringNode (location: (47,0)-(48,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (47,0)-(48,0) = "y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "y\n"
+ │ │ └── closing_loc: (48,0)-(49,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (50,0)-(50,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (50,0)-(50,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (50,2)-(50,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (50,2)-(50,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (50,2)-(50,6) = "<<~E"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (51,0)-(52,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (51,0)-(52,0) = " x\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x\n"
+ │ │ │ ├── @ StringNode (location: (52,0)-(53,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (52,0)-(53,0) = " \n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " \n"
+ │ │ │ └── @ StringNode (location: (53,0)-(54,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (53,0)-(54,0) = " y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "y\n"
+ │ │ └── closing_loc: (54,0)-(55,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (56,0)-(56,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (56,0)-(56,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (56,2)-(56,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (56,2)-(56,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (56,2)-(56,6) = "<<~E"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (57,0)-(58,0))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (57,0)-(58,0) = " x\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x\n"
+ │ │ │ └── @ StringNode (location: (58,0)-(59,0))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (58,0)-(59,0) = " y\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " y\n"
+ │ │ └── closing_loc: (59,0)-(60,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (61,0)-(61,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (61,0)-(61,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (61,2)-(61,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (61,2)-(61,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (61,2)-(61,6) = "<<~E"
+ │ │ ├── content_loc: (62,0)-(63,0) = " x\n"
+ │ │ ├── closing_loc: (63,0)-(64,0) = "E\n"
+ │ │ └── unescaped: "x\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (65,0)-(65,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (65,0)-(65,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (65,2)-(65,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (65,2)-(65,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (65,2)-(65,6) = "<<~E"
+ │ │ ├── content_loc: (66,0)-(67,0) = " ð\n"
+ │ │ ├── closing_loc: (67,0)-(68,0) = "E\n"
+ │ │ └── unescaped: "ð\n"
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (69,0)-(69,6))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (69,0)-(69,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (69,2)-(69,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (69,2)-(69,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (69,2)-(69,6) = "<<~E"
+ │ │ ├── content_loc: (70,0)-(70,0) = ""
+ │ │ ├── closing_loc: (70,0)-(71,0) = "E\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (72,0)-(72,8))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (72,0)-(72,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (72,2)-(72,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedXStringNode (location: (72,2)-(72,8))
+ │ ├── opening_loc: (72,2)-(72,8) = "<<~`E`"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (73,0)-(74,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (73,0)-(74,0) = " 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── message_loc: (74,4)-(74,7) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (74,7)-(74,8) = "}"
+ │ │ └── @ StringNode (location: (74,8)-(75,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (74,8)-(75,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (75,0)-(76,0) = "E\n"
+ ├── closing_loc: ∅
+ └── block: ∅
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..8d093fdab6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,8) = "<<~'FOO'"
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(3,0) = " baz\\\\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz\\\\\n"
+ │ └── @ StringNode (location: (3,0)-(4,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (3,0)-(4,0) = " qux\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "qux\n"
+ └── closing_loc: (4,0)-(5,0) = "FOO\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..d43d313e6b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,8) = "<<~'FOO'"
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(3,0) = " baz\\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz\\\n"
+ │ └── @ StringNode (location: (3,0)-(4,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (3,0)-(4,0) = " qux\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "qux\n"
+ └── closing_loc: (4,0)-(5,0) = "FOO\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..5e05870b21
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,9)-(3,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..616cca6155
--- /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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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..3a21ce5559
--- /dev/null
+++ b/test/prism/snapshots/whitequark/empty_stmt.txt
@@ -0,0 +1,5 @@
+@ ProgramNode (location: (1,0)-(1,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,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..28ec3843bb
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_comparison_method.txt
@@ -0,0 +1,221 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :do_something
+ │ │ ├── message_loc: (1,16)-(1,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :do_something
+ │ │ ├── message_loc: (3,16)-(3,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :do_something
+ │ │ ├── message_loc: (5,16)-(5,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :do_something
+ │ │ ├── message_loc: (7,16)-(7,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :do_something
+ │ │ ├── message_loc: (9,17)-(9,29) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :do_something
+ │ ├── message_loc: (11,16)-(11,28) = "do_something"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..17d3873b66
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method.txt
@@ -0,0 +1,151 @@
+@ 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
+ │ │ └── value: 42
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (3,13)-(3,14))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+
+ │ │ ├── message_loc: (3,15)-(3,16) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,17)-(3,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,17)-(3,18))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :obj
+ │ │ ├── message_loc: (5,4)-(5,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,16)-(5,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,16)-(5,18))
+ │ │ ├── flags: decimal
+ │ │ └── value: 42
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :obj
+ │ ├── message_loc: (7,4)-(7,7) = "obj"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (7,12)-(7,13))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (7,12)-(7,13))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (7,17)-(7,18))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (7,19)-(7,20) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,21)-(7,22))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,21)-(7,22))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..4ec57ccd35
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_command_syntax.txt
@@ -0,0 +1,394 @@
+@ 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (1,10)-(1,14) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,15)-(1,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (3,12)-(3,16) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,17)-(3,24))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (5,13)-(5,17) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,18)-(5,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (5,18)-(5,19))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :obj
+ │ │ ├── message_loc: (7,4)-(7,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,14)-(7,26))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,14)-(7,26))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (7,14)-(7,18) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,19)-(7,26))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :obj
+ │ │ ├── message_loc: (9,4)-(9,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (9,16)-(9,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (9,16)-(9,28))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (9,16)-(9,20) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,21)-(9,28))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :obj
+ │ │ ├── message_loc: (11,4)-(11,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (11,12)-(11,13))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (11,12)-(11,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (11,17)-(11,21) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,22)-(11,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (11,22)-(11,23))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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)
+ │ │ └── @ RescueModifierNode (location: (13,17)-(13,60))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (13,17)-(13,37))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (13,17)-(13,22) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (13,23)-(13,37))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ 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"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (13,38)-(13,44) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ InterpolatedStringNode (location: (13,45)-(13,60))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (13,45)-(13,46) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (13,46)-(13,55))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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) = "\""
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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)
+ │ └── @ RescueModifierNode (location: (15,22)-(15,62))
+ │ ├── expression:
+ │ │ @ CallNode (location: (15,22)-(15,42))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (15,22)-(15,27) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,28)-(15,42))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ 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"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (15,43)-(15,49) = "rescue"
+ │ └── rescue_expression:
+ │ @ InterpolatedStringNode (location: (15,50)-(15,62))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (15,50)-(15,51) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (15,51)-(15,57))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── 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) = "\""
+ ├── 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..64a3ffa252
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt
@@ -0,0 +1,43 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,15)-(1,18) = "bar"
+ │ ├── opening_loc: (1,18)-(1,19) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,19)-(1,22))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (1,19)-(1,22))
+ │ ├── closing_loc: (1,22)-(1,23) = ")"
+ │ └── block: ∅
+ ├── 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..2284b24354
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt
@@ -0,0 +1,56 @@
+@ 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
+ │ │ │ └── value: 1
+ │ │ ├── keyword_loc: (1,12)-(1,18) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ IntegerNode (location: (1,19)-(1,20))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── 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
+ │ │ └── value: 1
+ │ ├── keyword_loc: (3,17)-(3,23) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (3,24)-(3,25))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── 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..a7a9c93ef3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_without_args.txt
@@ -0,0 +1,89 @@
+@ 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
+ │ │ └── value: 42
+ │ ├── 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
+ │ │ │ └── value: 42
+ │ │ ├── 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
+ │ │ └── value: 42
+ │ ├── 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
+ │ │ └── value: 42
+ │ ├── 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..a48d2370e8
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,21)-(1,24) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..5e6a597db7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/float.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ FloatNode (location: (1,0)-(1,5))
+ │ └── value: -1.33
+ └── @ FloatNode (location: (3,0)-(3,4))
+ └── value: 1.33
diff --git a/test/prism/snapshots/whitequark/for.txt b/test/prism/snapshots/whitequark/for.txt
new file mode 100644
index 0000000000..fec8bdfd64
--- /dev/null
+++ b/test/prism/snapshots/whitequark/for.txt
@@ -0,0 +1,83 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,16)-(1,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── message_loc: (1,16)-(1,17) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,18)-(1,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (1,18)-(1,19))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,9)-(3,12) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (3,14)-(3,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,14)-(3,17))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (3,14)-(3,15) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,16)-(3,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (3,16)-(3,17))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..42d8fa2258
--- /dev/null
+++ b/test/prism/snapshots/whitequark/for_mlhs.txt
@@ -0,0 +1,56 @@
+@ 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))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ └── rparen_loc: ∅
+ ├── collection:
+ │ @ CallNode (location: (1,12)-(1,15))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,12)-(1,15) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (1,17)-(1,23))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,17)-(1,23))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :p
+ │ ├── message_loc: (1,17)-(1,18) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,19)-(1,23))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── 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..17504c64e0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forward_arg.txt
@@ -0,0 +1,43 @@
+@ 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,14)-(1,17) = "bar"
+ │ ├── opening_loc: (1,17)-(1,18) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,18)-(1,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (1,18)-(1,21))
+ │ ├── closing_loc: (1,21)-(1,22) = ")"
+ │ └── block: ∅
+ ├── 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..7e58260b58
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt
@@ -0,0 +1,404 @@
+@ 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (2,2)-(2,5) = "bar"
+ │ │ │ ├── opening_loc: (2,5)-(2,6) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,6)-(2,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ForwardingArgumentsNode (location: (2,6)-(2,9))
+ │ │ │ ├── closing_loc: (2,9)-(2,10) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (5,14)-(5,17) = "bar"
+ │ │ │ ├── opening_loc: (5,17)-(5,18) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,18)-(5,21))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ForwardingArgumentsNode (location: (5,18)-(5,21))
+ │ │ │ ├── closing_loc: (5,21)-(5,22) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (10,13)-(10,16) = "bar"
+ │ │ ├── opening_loc: (10,16)-(10,17) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (10,17)-(10,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (10,17)-(10,20))
+ │ │ ├── closing_loc: (10,20)-(10,21) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (13,2)-(13,5) = "bar"
+ │ │ ├── opening_loc: (13,5)-(13,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,6)-(13,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (13,6)-(13,9))
+ │ │ ├── closing_loc: (13,9)-(13,10) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (16,16)-(16,19) = "bar"
+ │ │ ├── opening_loc: (16,19)-(16,20) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (16,20)-(16,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (16,20)-(16,23))
+ │ │ ├── closing_loc: (16,23)-(16,24) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (18,11)-(18,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (18,11)-(18,12) = "b"
+ │ │ │ ├── operator_loc: (18,13)-(18,14) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (18,15)-(18,16))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (21,8)-(21,9) = "b"
+ │ │ │ ├── operator_loc: (21,10)-(21,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (21,12)-(21,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (22,2)-(22,5) = "bar"
+ │ │ ├── opening_loc: (22,5)-(22,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (22,6)-(22,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (22,6)-(22,9))
+ │ │ ├── closing_loc: (22,9)-(22,10) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (25,8)-(25,9) = "b"
+ │ │ │ ├── operator_loc: (25,10)-(25,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (25,12)-(25,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (25,20)-(25,23) = "bar"
+ │ │ ├── opening_loc: (25,23)-(25,24) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (25,24)-(25,27))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (25,24)-(25,27))
+ │ │ ├── closing_loc: (25,27)-(25,28) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (27,16)-(27,19) = "bar"
+ │ ├── opening_loc: (27,19)-(27,20) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,20)-(27,23))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (27,20)-(27,23))
+ │ ├── closing_loc: (27,23)-(27,24) = ")"
+ │ └── block: ∅
+ ├── 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..f46967ba50
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forward_args_legacy.txt
@@ -0,0 +1,99 @@
+@ 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,14)-(1,17) = "bar"
+ │ │ ├── opening_loc: (1,17)-(1,18) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,18)-(1,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (1,18)-(1,21))
+ │ │ ├── closing_loc: (1,21)-(1,22) = ")"
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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..acaf9c052d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt
@@ -0,0 +1,58 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── name: :argument
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,18)-(1,20))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,23)-(1,26) = "bar"
+ │ ├── opening_loc: (1,26)-(1,27) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,27)-(1,39))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ LocalVariableReadNode (location: (1,27)-(1,35))
+ │ │ │ ├── name: :argument
+ │ │ │ └── depth: 0
+ │ │ └── @ KeywordHashNode (location: (1,37)-(1,39))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (1,37)-(1,39))
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: (1,37)-(1,39) = "**"
+ │ ├── closing_loc: (1,39)-(1,40) = ")"
+ │ └── block: ∅
+ ├── 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..367fad7fec
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt
@@ -0,0 +1,55 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── name: :argument
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,18)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ ├── opening_loc: (1,25)-(1,26) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,26)-(1,37))
+ │ │ ├── flags: ∅
+ │ │ └── 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: ∅
+ ├── 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..b4235fb20a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt
@@ -0,0 +1,52 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ ├── opening_loc: (1,16)-(1,17) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,17)-(1,19))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,17)-(1,19))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (1,17)-(1,19))
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: (1,17)-(1,19) = "**"
+ │ ├── closing_loc: (1,19)-(1,20) = ")"
+ │ └── block: ∅
+ ├── 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..33779abcc1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
@@ -0,0 +1,63 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ ├── opening_loc: (1,16)-(1,17) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,17)-(1,35))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,17)-(1,35))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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: ∅
+ ├── 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..17ff8894af
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_restarg.txt
@@ -0,0 +1,49 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ ├── opening_loc: (1,15)-(1,16) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,16)-(1,17))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (1,16)-(1,17))
+ │ │ ├── operator_loc: (1,16)-(1,17) = "*"
+ │ │ └── expression: ∅
+ │ ├── closing_loc: (1,17)-(1,18) = ")"
+ │ └── block: ∅
+ ├── 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..fc044054d8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/gvasgn.txt
@@ -0,0 +1,13 @@
+@ 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
+ │ └── value: 10
+ └── 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..e661a7b048
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_hashrocket.txt
@@ -0,0 +1,49 @@
+@ 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: 1
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── 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: 1
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,7)-(3,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: (3,4)-(3,6) = "=>"
+ │ └── @ AssocNode (location: (3,10)-(3,23))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,10)-(3,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..a5d12174cc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_kwsplat.txt
@@ -0,0 +1,35 @@
+@ 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocSplatNode (location: (1,10)-(1,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (1,12)-(1,15))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..fdf7a21ed0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_label.txt
@@ -0,0 +1,22 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 2
+ │ └── 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..88b70d38e2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_label_end.txt
@@ -0,0 +1,100 @@
+@ ProgramNode (location: (1,0)-(5,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,22))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :f
+ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IfNode (location: (1,2)-(1,11))
+ │ │ ├── if_keyword_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: (1,4)-(1,5) = "?"
+ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── closing_loc: (1,11)-(1,12) = ")"
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocNode (location: (5,12)-(5,21))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (5,12)-(5,18))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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..455ba48407
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_pair_value_omission.txt
@@ -0,0 +1,97 @@
+@ 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (3,1)-(3,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (3,5)-(3,7))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,5)-(3,7))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (3,5)-(3,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :puts
+ │ │ ├── message_loc: (5,1)-(5,5) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..86543097ee
--- /dev/null
+++ b/test/prism/snapshots/whitequark/heredoc.txt
@@ -0,0 +1,23 @@
+@ 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)-(4,0) = "foo\nbar\n"
+ │ ├── closing_loc: (4,0)-(5,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)-(9,0) = "foo\nbar\n"
+ │ ├── closing_loc: (9,0)-(10,0) = "HERE\n"
+ │ └── unescaped: "foo\nbar\n"
+ └── @ XStringNode (location: (11,0)-(11,8))
+ ├── flags: ∅
+ ├── opening_loc: (11,0)-(11,8) = "<<`HERE`"
+ ├── content_loc: (12,0)-(14,0) = "foo\nbar\n"
+ ├── closing_loc: (14,0)-(15,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..809a100f8c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if.txt
@@ -0,0 +1,63 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,7)-(1,11) = "then"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,12)-(1,15))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (3,8)-(3,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,8)-(3,11))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..c7dab47f13
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_else.txt
@@ -0,0 +1,95 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,7)-(1,11) = "then"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,12)-(1,15))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (1,22)-(1,25) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (3,8)-(3,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,8)-(3,11))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (3,18)-(3,21) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..1bd1ab7f42
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_elsif.txt
@@ -0,0 +1,65 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (1,8)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,8)-(1,11))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,8)-(1,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── consequent:
+ │ @ IfNode (location: (1,13)-(1,38))
+ │ ├── if_keyword_loc: (1,13)-(1,18) = "elsif"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,19)-(1,22))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (1,19)-(1,22) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,24)-(1,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,24)-(1,25))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ │ └── value: 2
+ │ │ └── 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..c76a93574d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_masgn__24.txt
@@ -0,0 +1,42 @@
+@ 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))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,11)-(1,14))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,14)-(1,15) = ")"
+ ├── then_keyword_loc: ∅
+ ├── 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..241918f020
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_mod.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,7)-(1,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,0)-(1,3) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..fbbafe7390
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_nl_then.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (2,0)-(2,4) = "then"
+ ├── statements:
+ │ @ StatementsNode (location: (2,5)-(2,8))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,5)-(2,8))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (2,5)-(2,8) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (2,9)-(2,12) = "end"
diff --git a/test/prism/snapshots/whitequark/int.txt b/test/prism/snapshots/whitequark/int.txt
new file mode 100644
index 0000000000..6fee32f117
--- /dev/null
+++ b/test/prism/snapshots/whitequark/int.txt
@@ -0,0 +1,14 @@
+@ 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
+ │ └── value: 42
+ ├── @ IntegerNode (location: (3,0)-(3,3))
+ │ ├── flags: decimal
+ │ └── value: -42
+ └── @ IntegerNode (location: (5,0)-(5,2))
+ ├── flags: decimal
+ └── value: 42
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..09d9098105
--- /dev/null
+++ b/test/prism/snapshots/whitequark/interp_digit_var.txt
@@ -0,0 +1,273 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (5,4)-(5,7))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (7,4)-(7,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (17,5)-(17,8))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (19,5)-(19,9))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (25,1)-(25,4) = "%r{"
+ │ ├── content_loc: (25,4)-(25,7) = "\#@1"
+ │ ├── closing_loc: (25,7)-(25,8) = "}"
+ │ └── unescaped: "\#@1"
+ ├── @ RegularExpressionNode (location: (27,1)-(27,9))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (27,1)-(27,4) = "%r{"
+ │ ├── content_loc: (27,4)-(27,8) = "\#@@1"
+ │ ├── closing_loc: (27,8)-(27,9) = "}"
+ │ └── unescaped: "\#@@1"
+ ├── @ SymbolNode (location: (29,1)-(29,8))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (49,1)-(49,2) = "/"
+ │ ├── content_loc: (49,2)-(49,5) = "\#@1"
+ │ ├── closing_loc: (49,5)-(49,6) = "/"
+ │ └── unescaped: "\#@1"
+ ├── @ RegularExpressionNode (location: (51,1)-(51,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (51,1)-(51,2) = "/"
+ │ ├── content_loc: (51,2)-(51,6) = "\#@@1"
+ │ ├── closing_loc: (51,6)-(51,7) = "/"
+ │ └── unescaped: "\#@@1"
+ ├── @ SymbolNode (location: (53,1)-(53,7))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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)-(67,0) = "\#@1\n"
+ │ ├── closing_loc: (67,0)-(68,0) = "HERE\n"
+ │ └── unescaped: "\#@1\n"
+ ├── @ StringNode (location: (69,0)-(69,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (69,0)-(69,9) = "<<-\"HERE\""
+ │ ├── content_loc: (70,0)-(71,0) = "\#@@1\n"
+ │ ├── closing_loc: (71,0)-(72,0) = "HERE\n"
+ │ └── unescaped: "\#@@1\n"
+ ├── @ StringNode (location: (73,0)-(73,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (73,0)-(73,9) = "<<-'HERE'"
+ │ ├── content_loc: (74,0)-(75,0) = "\#@1\n"
+ │ ├── closing_loc: (75,0)-(76,0) = "HERE\n"
+ │ └── unescaped: "\#@1\n"
+ ├── @ StringNode (location: (77,0)-(77,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (77,0)-(77,9) = "<<-'HERE'"
+ │ ├── content_loc: (78,0)-(79,0) = "\#@@1\n"
+ │ ├── closing_loc: (79,0)-(80,0) = "HERE\n"
+ │ └── unescaped: "\#@@1\n"
+ ├── @ XStringNode (location: (81,0)-(81,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (81,0)-(81,9) = "<<-`HERE`"
+ │ ├── content_loc: (82,0)-(83,0) = "\#@1\n"
+ │ ├── closing_loc: (83,0)-(84,0) = "HERE\n"
+ │ └── unescaped: "\#@1\n"
+ └── @ XStringNode (location: (85,0)-(85,9))
+ ├── flags: ∅
+ ├── opening_loc: (85,0)-(85,9) = "<<-`HERE`"
+ ├── content_loc: (86,0)-(87,0) = "\#@@1\n"
+ ├── closing_loc: (87,0)-(88,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..2b57f39554
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ivasgn.txt
@@ -0,0 +1,13 @@
+@ 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
+ │ └── value: 10
+ └── 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..446b45b56b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/keyword_argument_omission.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,10))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,4)-(1,10))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 2)
+ │ ├── @ AssocNode (location: (1,4)-(1,6))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,4)-(1,6))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :a
+ │ │ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocNode (location: (1,8)-(1,10))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,8)-(1,10))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,8)-(1,9) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,10)-(1,11) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/kwarg.txt b/test/prism/snapshots/whitequark/kwarg.txt
new file mode 100644
index 0000000000..5969402356
--- /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)
+ │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :foo
+ │ │ └── name_loc: (1,6)-(1,10) = "foo:"
+ │ ├── 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..376e628f8e
--- /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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo!
+ │ │ ├── message_loc: (1,6)-(1,10) = "foo!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ CallNode (location: (1,12)-(1,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar!
+ │ ├── message_loc: (1,12)-(1,16) = "bar!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..492f817696
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── 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) = "}"
diff --git a/test/prism/snapshots/whitequark/kwoptarg.txt b/test/prism/snapshots/whitequark/kwoptarg.txt
new file mode 100644
index 0000000000..9c2c4f9c4c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwoptarg.txt
@@ -0,0 +1,34 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,12))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (1,6)-(1,10) = "foo:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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..db281e2f0d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
@@ -0,0 +1,58 @@
+@ 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)
+ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,12))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,6)-(1,8) = "a:"
+ │ │ └── value:
+ │ │ @ NilNode (location: (1,9)-(1,12))
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,14)-(1,16))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :b
+ │ ├── message_loc: (1,19)-(1,20) = "b"
+ │ ├── opening_loc: (1,20)-(1,21) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,21)-(1,23))
+ │ │ ├── flags: contains_keywords, contains_keyword_splat
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,21)-(1,23))
+ │ │ ├── flags: ∅
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (1,21)-(1,23))
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: (1,21)-(1,23) = "**"
+ │ ├── closing_loc: (1,23)-(1,24) = ")"
+ │ └── block: ∅
+ ├── 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..d24426aed5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwrestarg_named.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..d471e5ab09
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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..f877fcd270
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :let
+ ├── message_loc: (1,0)-(1,3) = "let"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── 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"
+ ├── opening_loc: (1,9)-(1,10) = "{"
+ └── closing_loc: (1,21)-(1,22) = "}"
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..afddc9cd3c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt
@@ -0,0 +1,67 @@
+@ ProgramNode (location: (1,0)-(3,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,15))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ ParenthesesNode (location: (1,4)-(1,10))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (1,5)-(1,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (1,5)-(1,9))
+ │ │ │ │ └── value: -1.3
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ │ └── closing_loc: (1,9)-(1,10) = ")"
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── name: :abs
+ │ │ ├── message_loc: (1,11)-(1,14) = "abs"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :meth
+ ├── message_loc: (3,0)-(3,4) = "meth"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,5)-(3,15))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (3,5)-(3,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (3,5)-(3,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,6)-(3,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FloatNode (location: (3,6)-(3,10))
+ │ │ │ └── value: -1.3
+ │ │ ├── opening_loc: (3,5)-(3,6) = "("
+ │ │ └── closing_loc: (3,10)-(3,11) = ")"
+ │ ├── call_operator_loc: (3,11)-(3,12) = "."
+ │ ├── name: :abs
+ │ ├── message_loc: (3,12)-(3,15) = "abs"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/lvar.txt b/test/prism/snapshots/whitequark/lvar.txt
new file mode 100644
index 0000000000..afceb6a1a4
--- /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))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..0d1df23d0d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lvar_injecting_match.txt
@@ -0,0 +1,39 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ RegularExpressionNode (location: (1,0)-(1,15))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (1,0)-(1,1) = "/"
+ │ │ │ ├── content_loc: (1,1)-(1,14) = "(?<match>bar)"
+ │ │ │ ├── closing_loc: (1,14)-(1,15) = "/"
+ │ │ │ └── unescaped: "(?<match>bar)"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :=~
+ │ │ ├── message_loc: (1,16)-(1,18) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,19)-(1,24))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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: ∅
+ │ └── targets: (length: 1)
+ │ └── @ LocalVariableTargetNode (location: (1,4)-(1,9))
+ │ ├── name: :match
+ │ └── depth: 0
+ └── @ 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..be35c00587
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lvasgn.txt
@@ -0,0 +1,17 @@
+@ 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
+ │ │ └── value: 10
+ │ └── 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..32e46bfdf7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn.txt
@@ -0,0 +1,83 @@
+@ 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))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,1)-(1,4))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (1,6)-(1,9))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (1,13)-(1,14))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (1,16)-(1,17))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (3,0)-(3,15))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (3,0)-(3,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (3,5)-(3,8))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (3,9)-(3,10) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (3,11)-(3,15))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (3,11)-(3,12))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ IntegerNode (location: (3,14)-(3,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── @ MultiWriteNode (location: (5,0)-(5,20))
+ ├── lefts: (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
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (5,14)-(5,15) = "="
+ └── value:
+ @ ArrayNode (location: (5,16)-(5,20))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (5,16)-(5,17))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (5,19)-(5,20))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── 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..f4f4276597
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_attr.txt
@@ -0,0 +1,82 @@
+@ ProgramNode (location: (1,0)-(5,18))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,18))
+ └── body: (length: 3)
+ ├── @ MultiWriteNode (location: (1,0)-(1,17))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ CallTargetNode (location: (1,0)-(1,6))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver:
+ │ │ │ │ @ SelfNode (location: (1,0)-(1,4))
+ │ │ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ │ │ ├── name: :A=
+ │ │ │ └── message_loc: (1,5)-(1,6) = "A"
+ │ │ └── @ LocalVariableTargetNode (location: (1,8)-(1,11))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 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))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ CallTargetNode (location: (3,0)-(3,6))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver:
+ │ │ │ │ @ SelfNode (location: (3,0)-(3,4))
+ │ │ │ ├── call_operator_loc: (3,4)-(3,5) = "."
+ │ │ │ ├── name: :a=
+ │ │ │ └── message_loc: (3,5)-(3,6) = "a"
+ │ │ └── @ IndexTargetNode (location: (3,8)-(3,18))
+ │ │ ├── flags: attribute_write, ignore_visibility
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (3,8)-(3,12))
+ │ │ ├── opening_loc: (3,12)-(3,13) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,13)-(3,17))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (3,13)-(3,14))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (3,16)-(3,17))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: (3,17)-(3,18) = "]"
+ │ │ └── block: ∅
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ ├── lefts: (length: 2)
+ │ ├── @ CallTargetNode (location: (5,0)-(5,7))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (5,0)-(5,4))
+ │ │ ├── call_operator_loc: (5,4)-(5,6) = "::"
+ │ │ ├── name: :a=
+ │ │ └── message_loc: (5,6)-(5,7) = "a"
+ │ └── @ LocalVariableTargetNode (location: (5,9)-(5,12))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 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..1c62658ab2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_cmd.txt
@@ -0,0 +1,35 @@
+@ 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))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,8))
+ │ ├── name: :bar
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ CallNode (location: (1,11)-(1,16))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (1,11)-(1,12) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,13)-(1,16))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (1,13)-(1,16))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/masgn_const.txt b/test/prism/snapshots/whitequark/masgn_const.txt
new file mode 100644
index 0000000000..ddfccb0d8b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_const.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(3,18))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,18))
+ └── body: (length: 2)
+ ├── @ MultiWriteNode (location: (1,0)-(1,14))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ ConstantPathTargetNode (location: (1,0)-(1,3))
+ │ │ │ ├── parent: ∅
+ │ │ │ ├── name: :A
+ │ │ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
+ │ │ │ └── name_loc: (1,2)-(1,3) = "A"
+ │ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,8))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 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))
+ ├── lefts: (length: 2)
+ │ ├── @ ConstantPathTargetNode (location: (3,0)-(3,7))
+ │ │ ├── parent:
+ │ │ │ @ SelfNode (location: (3,0)-(3,4))
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (3,4)-(3,6) = "::"
+ │ │ └── name_loc: (3,6)-(3,7) = "A"
+ │ └── @ LocalVariableTargetNode (location: (3,9)-(3,12))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 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..3e4602472f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_nested.txt
@@ -0,0 +1,66 @@
+@ 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))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ MultiTargetNode (location: (1,1)-(1,6))
+ │ │ ├── lefts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,2)-(1,3))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ ImplicitRestNode (location: (1,3)-(1,4))
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: (1,1)-(1,2) = "("
+ │ │ └── rparen_loc: (1,5)-(1,6) = ")"
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,10)-(1,13) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ MultiWriteNode (location: (3,0)-(3,15))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (3,0)-(3,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ MultiTargetNode (location: (3,3)-(3,9))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (3,4)-(3,5))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (3,7)-(3,8))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: (3,3)-(3,4) = "("
+ │ └── rparen_loc: (3,8)-(3,9) = ")"
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (3,10)-(3,11) = "="
+ └── value:
+ @ CallNode (location: (3,12)-(3,15))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :foo
+ ├── message_loc: (3,12)-(3,15) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/masgn_splat.txt b/test/prism/snapshots/whitequark/masgn_splat.txt
new file mode 100644
index 0000000000..0db040a3ab
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_splat.txt
@@ -0,0 +1,284 @@
+@ 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))
+ │ ├── lefts: (length: 0)
+ │ ├── rest:
+ │ │ @ SplatNode (location: (1,0)-(1,1))
+ │ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ │ └── expression: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (1,2)-(1,3) = "="
+ │ └── value:
+ │ @ CallNode (location: (1,4)-(1,7))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (3,0)-(3,13))
+ │ ├── lefts: (length: 0)
+ │ ├── rest:
+ │ │ @ SplatNode (location: (3,0)-(3,1))
+ │ │ ├── operator_loc: (3,0)-(3,1) = "*"
+ │ │ └── expression: ∅
+ │ ├── rights: (length: 2)
+ │ │ ├── @ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,10)-(3,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (5,0)-(5,8))
+ │ ├── lefts: (length: 0)
+ │ ├── rest:
+ │ │ @ SplatNode (location: (5,0)-(5,2))
+ │ │ ├── operator_loc: (5,0)-(5,1) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (5,1)-(5,2))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (5,3)-(5,4) = "="
+ │ └── value:
+ │ @ CallNode (location: (5,5)-(5,8))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (5,5)-(5,8) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (7,0)-(7,11))
+ │ ├── lefts: (length: 0)
+ │ ├── rest:
+ │ │ @ SplatNode (location: (7,0)-(7,2))
+ │ │ ├── operator_loc: (7,0)-(7,1) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (7,1)-(7,2))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rights: (length: 1)
+ │ │ └── @ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (7,8)-(7,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (9,0)-(9,18))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ InstanceVariableTargetNode (location: (9,0)-(9,4))
+ │ │ │ └── name: :@foo
+ │ │ └── @ ClassVariableTargetNode (location: (9,6)-(9,11))
+ │ │ └── name: :@@bar
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (9,12)-(9,13) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (9,14)-(9,18))
+ │ ├── flags: contains_splat
+ │ ├── elements: (length: 1)
+ │ │ └── @ SplatNode (location: (9,14)-(9,18))
+ │ │ ├── operator_loc: (9,14)-(9,15) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (9,15)-(9,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (9,15)-(9,18) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (11,0)-(11,10))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (11,0)-(11,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (11,3)-(11,4))
+ │ │ ├── operator_loc: (11,3)-(11,4) = "*"
+ │ │ └── expression: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (11,5)-(11,6) = "="
+ │ └── value:
+ │ @ CallNode (location: (11,7)-(11,10))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (11,7)-(11,10) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (13,0)-(13,13))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (13,0)-(13,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (13,3)-(13,4))
+ │ │ ├── operator_loc: (13,3)-(13,4) = "*"
+ │ │ └── expression: ∅
+ │ ├── rights: (length: 1)
+ │ │ └── @ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (13,10)-(13,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (15,0)-(15,11))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (15,0)-(15,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (15,3)-(15,5))
+ │ │ ├── operator_loc: (15,3)-(15,4) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (15,4)-(15,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (15,6)-(15,7) = "="
+ │ └── value:
+ │ @ CallNode (location: (15,8)-(15,11))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (15,8)-(15,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ MultiWriteNode (location: (17,0)-(17,14))
+ │ ├── lefts: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (17,0)-(17,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest:
+ │ │ @ SplatNode (location: (17,3)-(17,5))
+ │ │ ├── operator_loc: (17,3)-(17,4) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (17,4)-(17,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rights: (length: 1)
+ │ │ └── @ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (17,11)-(17,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ MultiWriteNode (location: (19,0)-(19,16))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (19,0)-(19,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (19,3)-(19,4))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 0)
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (19,5)-(19,6) = "="
+ └── value:
+ @ ArrayNode (location: (19,7)-(19,16))
+ ├── flags: contains_splat
+ ├── elements: (length: 2)
+ │ ├── @ SplatNode (location: (19,7)-(19,11))
+ │ │ ├── operator_loc: (19,7)-(19,8) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (19,8)-(19,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (19,8)-(19,11) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ CallNode (location: (19,13)-(19,16))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (19,13)-(19,16) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: ∅
+ └── closing_loc: ∅
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..afa3517e11
--- /dev/null
+++ b/test/prism/snapshots/whitequark/multiple_pattern_matches.txt
@@ -0,0 +1,173 @@
+@ 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (1,5)-(1,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (1,10)-(1,12))
+ │ │ ├── constant: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (1,10)-(1,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (1,10)-(1,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (1,10)-(1,11) = "a"
+ │ │ │ │ ├── closing_loc: (1,11)-(1,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (1,10)-(1,11))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (1,10)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (2,5)-(2,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,10)-(2,12))
+ │ │ ├── constant: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,10)-(2,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,10)-(2,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,10)-(2,11) = "a"
+ │ │ │ │ ├── closing_loc: (2,11)-(2,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (2,10)-(2,11))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (4,5)-(4,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (4,10)-(4,12))
+ │ │ ├── constant: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (4,10)-(4,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (4,10)-(4,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (4,10)-(4,11) = "a"
+ │ │ │ │ ├── closing_loc: (4,11)-(4,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (4,10)-(4,11))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (4,10)-(4,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 0
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (5,5)-(5,6) = "}"
+ ├── pattern:
+ │ @ HashPatternNode (location: (5,10)-(5,12))
+ │ ├── constant: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,10)-(5,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,10)-(5,12))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (5,10)-(5,11) = "a"
+ │ │ │ ├── closing_loc: (5,11)-(5,12) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ ImplicitNode (location: (5,10)-(5,11))
+ │ │ │ └── value:
+ │ │ │ @ LocalVariableTargetNode (location: (5,10)-(5,11))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── operator_loc: ∅
+ │ ├── rest: ∅
+ │ ├── 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..7ef006645b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/newline_in_hash_argument.txt
@@ -0,0 +1,163 @@
+@ ProgramNode (location: (1,0)-(14,1))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(14,1))
+ └── body: (length: 3)
+ ├── @ CaseMatchNode (location: (1,0)-(8,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── conditions: (length: 2)
+ │ │ ├── @ InNode (location: (2,0)-(4,4))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (2,3)-(2,5))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (2,3)-(2,5))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── value_loc: (2,3)-(2,4) = "a"
+ │ │ │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
+ │ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ ImplicitNode (location: (2,3)-(2,4))
+ │ │ │ │ │ │ └── value:
+ │ │ │ │ │ │ @ LocalVariableTargetNode (location: (2,3)-(2,4))
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ └── closing_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,0)-(4,4))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (3,0)-(3,1))
+ │ │ │ │ │ ├── flags: decimal
+ │ │ │ │ │ └── value: 0
+ │ │ │ │ └── @ 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: ∅
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (5,3)-(5,7))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (5,3)-(5,7))
+ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ │ ├── opening_loc: (5,3)-(5,4) = "\""
+ │ │ │ │ │ ├── value_loc: (5,4)-(5,5) = "b"
+ │ │ │ │ │ ├── closing_loc: (5,5)-(5,7) = "\":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ ImplicitNode (location: (5,4)-(5,5))
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (5,4)-(5,5))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (6,0)-(7,4))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (6,0)-(6,1))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 0
+ │ │ │ └── @ 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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (10,0)-(10,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :obj
+ │ │ ├── message_loc: (10,0)-(10,3) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (10,3)-(10,4) = "."
+ │ ├── name: :set
+ │ ├── message_loc: (10,4)-(10,7) = "set"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (10,8)-(11,1))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (10,8)-(11,1))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (10,8)-(11,1))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (10,8)-(10,14))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (13,0)-(14,1))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (13,0)-(13,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :obj
+ │ ├── message_loc: (13,0)-(13,3) = "obj"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (13,3)-(13,4) = "."
+ ├── name: :set
+ ├── message_loc: (13,4)-(13,7) = "set"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (13,8)-(14,1))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (13,8)-(14,1))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (13,8)-(14,1))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (13,8)-(13,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..584e997df2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/non_lvar_injecting_match.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ InterpolatedRegularExpressionNode (location: (1,0)-(1,19))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ │ └── @ StringNode (location: (1,5)-(1,18))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,5)-(1,18) = "(?<match>bar)"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "(?<match>bar)"
+ │ └── closing_loc: (1,18)-(1,19) = "/"
+ ├── call_operator_loc: ∅
+ ├── name: :=~
+ ├── message_loc: (1,20)-(1,22) = "=~"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,23)-(1,28))
+ │ ├── flags: ∅
+ │ └── 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: ∅
diff --git a/test/prism/snapshots/whitequark/not.txt b/test/prism/snapshots/whitequark/not.txt
new file mode 100644
index 0000000000..0a6d60e502
--- /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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (1,0)-(1,3) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,5))
+ │ ├── flags: ∅
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!
+ │ ├── message_loc: (3,0)-(3,3) = "not"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (3,4)-(3,5) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,8))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (5,4)-(5,7))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,4)-(5,7) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (5,0)-(5,3) = "not"
+ ├── opening_loc: (5,3)-(5,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (5,7)-(5,8) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/not_cmd.txt b/test/prism/snapshots/whitequark/not_cmd.txt
new file mode 100644
index 0000000000..3b111272c6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/not_cmd.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,4)-(1,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,4)-(1,5) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,3) = "not"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..90124c3866
--- /dev/null
+++ b/test/prism/snapshots/whitequark/not_masgn__24.txt
@@ -0,0 +1,45 @@
+@ 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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ ParenthesesNode (location: (1,1)-(1,13))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,2)-(1,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MultiWriteNode (location: (1,2)-(1,12))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,2)-(1,3))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,6))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,9)-(1,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ └── closing_loc: (1,12)-(1,13) = ")"
+ ├── call_operator_loc: ∅
+ ├── name: :!
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..56419adccd
--- /dev/null
+++ b/test/prism/snapshots/whitequark/numbered_args_after_27.txt
@@ -0,0 +1,143 @@
+@ 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:
+ │ │ @ NumberedParametersNode (location: (1,0)-(1,17))
+ │ │ └── maximum: 9
+ │ └── body:
+ │ @ StatementsNode (location: (1,6)-(1,13))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,6)-(1,13))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (1,6)-(1,8))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (1,9)-(1,10) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,11)-(1,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,11)-(1,13))
+ │ │ ├── name: :_9
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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:
+ │ │ @ NumberedParametersNode (location: (3,0)-(3,13))
+ │ │ └── maximum: 9
+ │ └── body:
+ │ @ StatementsNode (location: (3,5)-(3,12))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,5)-(3,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (3,5)-(3,7))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (3,8)-(3,9) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,10)-(3,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (3,10)-(3,12))
+ │ │ ├── name: :_9
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,16))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── 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:
+ │ │ @ NumberedParametersNode (location: (5,2)-(5,16))
+ │ │ └── maximum: 9
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,5)-(5,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,5)-(5,12))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (5,5)-(5,7))
+ │ │ │ ├── name: :_1
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+
+ │ │ ├── message_loc: (5,8)-(5,9) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,10)-(5,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (5,10)-(5,12))
+ │ │ │ ├── name: :_9
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (5,2)-(5,4) = "do"
+ │ └── closing_loc: (5,13)-(5,16) = "end"
+ └── @ CallNode (location: (7,0)-(7,13))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── 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:
+ │ @ NumberedParametersNode (location: (7,2)-(7,13))
+ │ └── maximum: 9
+ ├── body:
+ │ @ StatementsNode (location: (7,4)-(7,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (7,4)-(7,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (7,4)-(7,6))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (7,7)-(7,8) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,9)-(7,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (7,9)-(7,11))
+ │ │ ├── name: :_9
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── opening_loc: (7,2)-(7,3) = "{"
+ └── closing_loc: (7,12)-(7,13) = "}"
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..d79aedf7f9
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :_1
+ │ ├── message_loc: (1,0)-(1,2) = "_1"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,9)-(3,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,14)-(3,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,14)-(3,16))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :_1
+ │ │ ├── message_loc: (3,14)-(3,16) = "_1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :_1
+ │ │ ├── message_loc: (5,9)-(5,11) = "_1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :_1
+ │ │ ├── message_loc: (7,12)-(7,14) = "_1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :_1
+ │ ├── message_loc: (9,10)-(9,12) = "_1"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── end_keyword_loc: (9,14)-(9,17) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/whitequark/numparam_ruby_bug_19025.txt b/test/prism/snapshots/whitequark/numparam_ruby_bug_19025.txt
new file mode 100644
index 0000000000..396238cbbf
--- /dev/null
+++ b/test/prism/snapshots/whitequark/numparam_ruby_bug_19025.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block:
+ @ BlockNode (location: (1,2)-(1,14))
+ ├── locals: [:_1]
+ ├── parameters:
+ │ @ NumberedParametersNode (location: (1,2)-(1,14))
+ │ └── maximum: 1
+ ├── body:
+ │ @ StatementsNode (location: (1,4)-(1,12))
+ │ └── body: (length: 1)
+ │ └── @ ArrayNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ CallNode (location: (1,5)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (1,5)-(1,7))
+ │ │ │ ├── name: :_1
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :**
+ │ │ ├── message_loc: (1,8)-(1,10) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,4)-(1,5) = "["
+ │ └── closing_loc: (1,11)-(1,12) = "]"
+ ├── opening_loc: (1,2)-(1,3) = "{"
+ └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/whitequark/op_asgn.txt b/test/prism/snapshots/whitequark/op_asgn.txt
new file mode 100644
index 0000000000..f726617904
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn.txt
@@ -0,0 +1,74 @@
+@ ProgramNode (location: (1,0)-(5,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,11))
+ └── body: (length: 3)
+ ├── @ CallOperatorWriteNode (location: (1,0)-(1,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "A"
+ │ ├── read_name: :A
+ │ ├── write_name: :A=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (1,6)-(1,8) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── @ CallOperatorWriteNode (location: (3,0)-(3,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ ├── message_loc: (3,4)-(3,5) = "a"
+ │ ├── read_name: :a
+ │ ├── write_name: :a=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (3,6)-(3,8) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (3,9)-(3,10))
+ │ ├── flags: decimal
+ │ └── value: 1
+ └── @ CallOperatorWriteNode (location: (5,0)-(5,11))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (5,0)-(5,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (5,3)-(5,5) = "::"
+ ├── message_loc: (5,5)-(5,6) = "a"
+ ├── read_name: :a
+ ├── write_name: :a=
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (5,7)-(5,9) = "+="
+ └── value:
+ @ IntegerNode (location: (5,10)-(5,11))
+ ├── flags: decimal
+ └── value: 1
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..d2d86b1bf9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn_cmd.txt
@@ -0,0 +1,177 @@
+@ ProgramNode (location: (1,0)-(7,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,15))
+ └── body: (length: 4)
+ ├── @ CallOperatorWriteNode (location: (1,0)-(1,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "A"
+ │ ├── read_name: :A
+ │ ├── write_name: :A=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (1,6)-(1,8) = "+="
+ │ └── value:
+ │ @ CallNode (location: (1,9)-(1,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,9)-(1,10) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,11)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallOperatorWriteNode (location: (3,0)-(3,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ ├── message_loc: (3,4)-(3,5) = "a"
+ │ ├── read_name: :a
+ │ ├── write_name: :a=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (3,6)-(3,8) = "+="
+ │ └── value:
+ │ @ CallNode (location: (3,9)-(3,14))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (3,9)-(3,10) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,11)-(3,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,11)-(3,14))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,11)-(3,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ConstantPathOperatorWriteNode (location: (5,0)-(5,15))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (5,0)-(5,6))
+ │ │ ├── parent:
+ │ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (5,3)-(5,5) = "::"
+ │ │ └── name_loc: (5,5)-(5,6) = "A"
+ │ ├── binary_operator_loc: (5,7)-(5,9) = "+="
+ │ ├── value:
+ │ │ @ CallNode (location: (5,10)-(5,15))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :m
+ │ │ ├── message_loc: (5,10)-(5,11) = "m"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,12)-(5,15))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,12)-(5,15))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (5,12)-(5,15) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── binary_operator: :+
+ └── @ CallOperatorWriteNode (location: (7,0)-(7,15))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (7,0)-(7,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (7,3)-(7,5) = "::"
+ ├── message_loc: (7,5)-(7,6) = "a"
+ ├── read_name: :a
+ ├── write_name: :a=
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (7,7)-(7,9) = "+="
+ └── value:
+ @ CallNode (location: (7,10)-(7,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (7,10)-(7,11) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,12)-(7,15))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (7,12)-(7,15))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (7,12)-(7,15) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..b302abdafe
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn_index.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ IndexOperatorWriteNode (location: (1,0)-(1,14))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (1,10)-(1,12) = "+="
+ └── value:
+ @ IntegerNode (location: (1,13)-(1,14))
+ ├── flags: decimal
+ └── value: 2
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..319ed1a51a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn_index_cmd.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ IndexOperatorWriteNode (location: (1,0)-(1,18))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (1,10)-(1,12) = "+="
+ └── value:
+ @ CallNode (location: (1,13)-(1,18))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (1,13)-(1,14) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,15)-(1,18))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,15)-(1,18))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,15)-(1,18) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/optarg.txt b/test/prism/snapshots/whitequark/optarg.txt
new file mode 100644
index 0000000000..695ed827ad
--- /dev/null
+++ b/test/prism/snapshots/whitequark/optarg.txt
@@ -0,0 +1,74 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (1,6)-(1,9) = "foo"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (3,6)-(3,9) = "foo"
+ │ │ │ ├── operator_loc: (3,9)-(3,10) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (3,10)-(3,11))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── @ OptionalParameterNode (location: (3,13)-(3,18))
+ │ │ ├── flags: ∅
+ │ │ ├── name: :bar
+ │ │ ├── name_loc: (3,13)-(3,16) = "bar"
+ │ │ ├── operator_loc: (3,16)-(3,17) = "="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (3,17)-(3,18))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── 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..439146b8db
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── operator_loc: (1,4)-(1,6) = "or"
+ └── @ OrNode (location: (3,0)-(3,10))
+ ├── left:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── right:
+ │ @ CallNode (location: (3,7)-(3,10))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,7)-(3,10) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..c0ded24b93
--- /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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ ├── read_name: :a
+ │ ├── write_name: :a=
+ │ ├── operator_loc: (1,6)-(1,9) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ ├── flags: decimal
+ │ └── value: 1
+ └── @ IndexOrWriteNode (location: (3,0)-(3,15))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (3,3)-(3,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (3,4)-(3,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ └── @ IntegerNode (location: (3,7)-(3,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (3,8)-(3,9) = "]"
+ ├── block: ∅
+ ├── operator_loc: (3,10)-(3,13) = "||="
+ └── value:
+ @ IntegerNode (location: (3,14)-(3,15))
+ ├── flags: decimal
+ └── value: 2
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..f158f255b9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_272.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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"
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..7e5fc9ee35
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_507.txt
@@ -0,0 +1,36 @@
+@ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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..3a31a97cdc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_525.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(1,32))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,32))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,32))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m1
+ ├── message_loc: (1,0)-(1,2) = "m1"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,3)-(1,11))
+ │ ├── flags: contains_keywords
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,3)-(1,11))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,3)-(1,11))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,3)-(1,5))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,3)-(1,4) = ":"
+ │ │ ├── value_loc: (1,4)-(1,5) = "k"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "k"
+ │ ├── value:
+ │ │ @ CallNode (location: (1,9)-(1,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :m2
+ │ │ ├── message_loc: (1,9)-(1,11) = "m2"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m3
+ │ ├── 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"
+ ├── opening_loc: (1,12)-(1,14) = "do"
+ └── closing_loc: (1,29)-(1,32) = "end"
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..2577e3bc55
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_604.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(1,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (1,4)-(1,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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"
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..157576838b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_640.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,6) = "<<~FOO"
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (2,0)-(3,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(3,0) = " baz\\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ └── @ StringNode (location: (3,0)-(4,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (3,0)-(4,0) = " qux\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "qux\n"
+ └── closing_loc: (4,0)-(5,0) = "FOO\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..5700f3c3db
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_645.txt
@@ -0,0 +1,35 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── 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..e52b291d6a
--- /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))
+ ├── flags: forced_us_ascii_encoding
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,3) = "\\("
+ ├── closing_loc: (1,3)-(1,4) = "/"
+ └── unescaped: "\\("
diff --git a/test/prism/snapshots/whitequark/parser_bug_989.txt b/test/prism/snapshots/whitequark/parser_bug_989.txt
new file mode 100644
index 0000000000..c241d6127f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_989.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,1)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,1)-(1,8))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,1)-(1,8))
+ ├── flags: ∅
+ ├── opening_loc: (1,1)-(1,8) = "<<-HERE"
+ ├── content_loc: (2,0)-(3,0) = "\t\tcontent\n"
+ ├── closing_loc: (3,0)-(4,0) = "\tHERE\n"
+ └── unescaped: "\t\tcontent\n"
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..018d7916a6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── 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)-(3,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,5)-(3,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (3,0)-(4,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..080d4d0e7d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt
@@ -0,0 +1,139 @@
+@ 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (4,3)-(5,1))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (4,3)-(5,1) = "a\\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\nb"
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (10,3)-(11,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (10,3)-(11,1) = "a\\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\nb"
+ │ ├── opening_loc: (10,0)-(10,3) = "%W{"
+ │ └── closing_loc: (11,1)-(11,2) = "}"
+ ├── @ ArrayNode (location: (13,0)-(14,2))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (13,3)-(14,1))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (19,0)-(19,3) = "%r{"
+ │ ├── content_loc: (19,3)-(20,1) = "a\\\nb"
+ │ ├── closing_loc: (20,1)-(20,2) = "}"
+ │ └── unescaped: "ab"
+ ├── @ SymbolNode (location: (22,0)-(23,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (22,0)-(22,3) = "%s{"
+ │ ├── value_loc: (22,3)-(23,1) = "a\\\nb"
+ │ ├── closing_loc: (23,1)-(23,2) = "}"
+ │ └── unescaped: "a\\\nb"
+ ├── @ ArrayNode (location: (25,0)-(26,2))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (37,0)-(37,1) = "/"
+ │ ├── content_loc: (37,1)-(38,1) = "a\\\nb"
+ │ ├── closing_loc: (38,1)-(38,2) = "/"
+ │ └── unescaped: "ab"
+ ├── @ SymbolNode (location: (40,0)-(41,2))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── opening_loc: (43,0)-(43,2) = ":'"
+ │ ├── value_loc: (43,2)-(44,1) = "a\\\nb"
+ │ ├── closing_loc: (44,1)-(44,2) = "'"
+ │ └── unescaped: "a\\\nb"
+ ├── @ StringNode (location: (46,0)-(46,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (46,0)-(46,9) = "<<-\"HERE\""
+ │ ├── content_loc: (47,0)-(49,0) = "a\\\nb\n"
+ │ ├── closing_loc: (49,0)-(50,0) = "HERE\n"
+ │ └── unescaped: "ab\n"
+ ├── @ StringNode (location: (51,0)-(51,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (51,0)-(51,9) = "<<-'HERE'"
+ │ ├── content_loc: (52,0)-(54,0) = "a\\\nb\n"
+ │ ├── closing_loc: (54,0)-(55,0) = "HERE\n"
+ │ └── unescaped: "a\\\nb\n"
+ ├── @ XStringNode (location: (56,0)-(56,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (56,0)-(56,9) = "<<-`HERE`"
+ │ ├── content_loc: (57,0)-(59,0) = "a\\\nb\n"
+ │ ├── closing_loc: (59,0)-(60,0) = "HERE\n"
+ │ └── unescaped: "ab\n"
+ └── @ XStringNode (location: (61,0)-(62,2))
+ ├── flags: ∅
+ ├── 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..6f315780ad
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,8)-(3,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,8)-(3,11))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,8)-(3,11))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,13)-(1,51))
+ │ ├── flags: ∅
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SourceFileNode (location: (1,14)-(1,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── filepath: "whitequark/pattern_matching__FILE__LINE_literals.txt"
+ │ │ ├── @ CallNode (location: (1,24)-(1,36))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ SourceLineNode (location: (1,24)-(1,32))
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :+
+ │ │ │ ├── message_loc: (1,33)-(1,34) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,35)-(1,36))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,35)-(1,36))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── @ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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..6015c000a9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_blank_else.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(1,26))
+ ├── predicate:
+ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (1,8)-(1,15))
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,14)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,14)-(1,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── 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..7f83aafe99
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_else.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,29))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,29))
+ └── body: (length: 1)
+ └── @ CaseMatchNode (location: (1,0)-(1,29))
+ ├── predicate:
+ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (1,8)-(1,15))
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,14)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,14)-(1,15))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ ├── 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
+ │ │ └── value: 4
+ │ └── 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..2396172dce
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_single_line.txt
@@ -0,0 +1,45 @@
+@ 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
+ │ │ └── value: 1
+ │ ├── 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
+ │ │ └── value: 1
+ │ ├── 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..757a7780c2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
@@ -0,0 +1,249 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (3,4)-(3,5))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (5,5)-(5,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (5,10)-(5,12))
+ │ │ ├── constant: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (5,10)-(5,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (5,10)-(5,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (5,10)-(5,11) = "a"
+ │ │ │ │ ├── closing_loc: (5,11)-(5,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (5,10)-(5,11))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (5,10)-(5,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (7,5)-(7,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (7,10)-(7,12))
+ │ │ ├── constant: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (7,10)-(7,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (7,10)-(7,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (7,10)-(7,11) = "a"
+ │ │ │ │ ├── closing_loc: (7,11)-(7,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (7,10)-(7,11))
+ │ │ │ │ └── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (7,10)-(7,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (9,1)-(9,4) = "key"
+ │ │ │ │ ├── closing_loc: (9,4)-(9,5) = ":"
+ │ │ │ │ └── unescaped: "key"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (9,6)-(9,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (9,17)-(9,27))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (9,17)-(9,21))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (11,1)-(11,4) = "key"
+ │ │ │ │ ├── closing_loc: (11,4)-(11,5) = ":"
+ │ │ │ │ └── unescaped: "key"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (11,6)-(11,12))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (11,17)-(11,27))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (11,17)-(11,21))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── 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: ∅
+ │ │ ├── rest: ∅
+ │ │ ├── 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..6f27327063
--- /dev/null
+++ b/test/prism/snapshots/whitequark/postexe.txt
@@ -0,0 +1,15 @@
+@ 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
+ │ └── value: 1
+ ├── 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..5e4b88d096
--- /dev/null
+++ b/test/prism/snapshots/whitequark/preexe.txt
@@ -0,0 +1,15 @@
+@ 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
+ │ └── value: 1
+ ├── 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..378c7e5b36
--- /dev/null
+++ b/test/prism/snapshots/whitequark/procarg0.txt
@@ -0,0 +1,78 @@
+@ ProgramNode (location: (1,0)-(3,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,11))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,18))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── 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)
+ │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,15))
+ │ │ │ │ ├── lefts: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,9))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: :foo
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,14))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :bar
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── rights: (length: 0)
+ │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── rparen_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) = "}"
+ └── @ CallNode (location: (3,0)-(3,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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) = "}"
diff --git a/test/prism/snapshots/whitequark/range_exclusive.txt b/test/prism/snapshots/whitequark/range_exclusive.txt
new file mode 100644
index 0000000000..f74077ce67
--- /dev/null
+++ b/test/prism/snapshots/whitequark/range_exclusive.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,5))
+ ├── flags: exclude_end
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── right:
+ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── operator_loc: (1,1)-(1,4) = "..."
diff --git a/test/prism/snapshots/whitequark/range_inclusive.txt b/test/prism/snapshots/whitequark/range_inclusive.txt
new file mode 100644
index 0000000000..1836312033
--- /dev/null
+++ b/test/prism/snapshots/whitequark/range_inclusive.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── right:
+ │ @ IntegerNode (location: (1,3)-(1,4))
+ │ ├── flags: decimal
+ │ └── value: 2
+ └── operator_loc: (1,1)-(1,3) = ".."
diff --git a/test/prism/snapshots/whitequark/rational.txt b/test/prism/snapshots/whitequark/rational.txt
new file mode 100644
index 0000000000..90bbd17929
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rational.txt
@@ -0,0 +1,14 @@
+@ 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))
+ │ └── value: 42.1
+ └── @ RationalNode (location: (3,0)-(3,3))
+ └── numeric:
+ @ IntegerNode (location: (3,0)-(3,2))
+ ├── flags: decimal
+ └── value: 42
diff --git a/test/prism/snapshots/whitequark/regex_interp.txt b/test/prism/snapshots/whitequark/regex_interp.txt
new file mode 100644
index 0000000000..0a6db4cfdf
--- /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))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ └── @ StringNode (location: (1,10)-(1,13))
+ │ ├── flags: frozen
+ │ ├── 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/regex_plain.txt b/test/prism/snapshots/whitequark/regex_plain.txt
new file mode 100644
index 0000000000..df771f7a21
--- /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))
+ ├── flags: ignore_case, multi_line, forced_us_ascii_encoding
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,7) = "source"
+ ├── closing_loc: (1,7)-(1,10) = "/im"
+ └── unescaped: "source"
diff --git a/test/prism/snapshots/whitequark/resbody_list.txt b/test/prism/snapshots/whitequark/resbody_list.txt
new file mode 100644
index 0000000000..52fcfd02e0
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,31)-(1,34) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..d48ddb120d
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,31)-(1,34) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,36)-(1,39))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,36)-(1,39))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,36)-(1,39) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..85efb1a3de
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,34))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 1)
+ │ │ └── @ CallNode (location: (1,20)-(1,23))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,20)-(1,23) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,31)-(1,34) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..e12d921c75
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,28)-(1,31) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (3,7)-(3,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,27)-(3,30) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..28c4f11e67
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..36b01a7ef6
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,32)-(1,35) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..d97821931b
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (1,21)-(1,24) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,31)-(1,34) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,44)-(1,47) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..f6cddbcc5e
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (1,21)-(1,24) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,34)-(1,37) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..2ab854cdd7
--- /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,3)-(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..cd4f0fff45
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── keyword_loc: (1,5)-(1,11) = "rescue"
+ └── rescue_expression:
+ @ CallNode (location: (1,12)-(1,15))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :bar
+ ├── message_loc: (1,12)-(1,15) = "bar"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..ee094138e5
--- /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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (1,6)-(1,10) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (1,11)-(1,17) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (1,18)-(1,21))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,18)-(1,21) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..dbe289702f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_mod_masgn.txt
@@ -0,0 +1,44 @@
+@ 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))
+ ├── lefts: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,8))
+ │ ├── name: :bar
+ │ └── depth: 0
+ ├── rest: ∅
+ ├── rights: (length: 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,11)-(1,15) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── keyword_loc: (1,16)-(1,22) = "rescue"
+ └── rescue_expression:
+ @ ArrayNode (location: (1,23)-(1,29))
+ ├── flags: ∅
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,24)-(1,25))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (1,27)-(1,28))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── 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..840e5a4fc0
--- /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"
+ ├── binary_operator_loc: (1,4)-(1,6) = "+="
+ ├── value:
+ │ @ RescueModifierNode (location: (1,7)-(1,22))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,7)-(1,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (1,12)-(1,18) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (1,19)-(1,22))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,19)-(1,22) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── name: :foo
+ ├── binary_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..4281442ab2
--- /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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :meth
+ ├── 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,5)-(1,30))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,9)-(1,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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"
diff --git a/test/prism/snapshots/whitequark/restarg_named.txt b/test/prism/snapshots/whitequark/restarg_named.txt
new file mode 100644
index 0000000000..fab9dd9a79
--- /dev/null
+++ b/test/prism/snapshots/whitequark/restarg_named.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── 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..077230f7ba
--- /dev/null
+++ b/test/prism/snapshots/whitequark/restarg_unnamed.txt
@@ -0,0 +1,31 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ ├── name: ∅
+ │ │ ├── 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/return.txt b/test/prism/snapshots/whitequark/return.txt
new file mode 100644
index 0000000000..5c98259103
--- /dev/null
+++ b/test/prism/snapshots/whitequark/return.txt
@@ -0,0 +1,60 @@
+@ ProgramNode (location: (1,0)-(7,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,11))
+ └── body: (length: 4)
+ ├── @ ReturnNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (1,0)-(1,6) = "return"
+ │ └── arguments: ∅
+ ├── @ ReturnNode (location: (3,0)-(3,10))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (3,0)-(3,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (3,7)-(3,10))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (3,7)-(3,10))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,7)-(3,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ReturnNode (location: (5,0)-(5,8))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (5,0)-(5,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (5,6)-(5,8))
+ │ ├── flags: ∅
+ │ └── 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))
+ ├── flags: ∅
+ ├── keyword_loc: (7,0)-(7,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (7,6)-(7,11))
+ ├── flags: ∅
+ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (7,7)-(7,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..36746a361b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/return_block.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ ReturnNode (location: (1,0)-(1,21))
+ ├── flags: ∅
+ ├── keyword_loc: (1,0)-(1,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (1,7)-(1,21))
+ ├── flags: ∅
+ └── arguments: (length: 1)
+ └── @ CallNode (location: (1,7)-(1,21))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (1,7)-(1,10) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,11)-(1,14))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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"
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..66684350a4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_10279.txt
@@ -0,0 +1,32 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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))
+ │ │ ├── then_keyword_loc: (1,12)-(1,16) = "then"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,17)-(1,19))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,17)-(1,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ ├── 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..400a8c2861
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_10653.txt
@@ -0,0 +1,173 @@
+@ 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))
+ │ ├── then_keyword_loc: (1,6)-(1,7) = "?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,8)-(1,20))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,8)-(1,20))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── 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"
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :tap
+ │ │ │ ├── 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"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (3,0)-(3,25))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (3,0)-(3,5))
+ │ ├── then_keyword_loc: (3,6)-(3,7) = "?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,8)-(3,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,8)-(3,16))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── 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) = "}"
+ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :tap
+ │ │ │ ├── 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) = "}"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ IfNode (location: (5,0)-(5,31))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ TrueNode (location: (5,0)-(5,4))
+ ├── then_keyword_loc: (5,5)-(5,6) = "?"
+ ├── statements:
+ │ @ StatementsNode (location: (5,7)-(5,27))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (5,7)-(5,27))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (5,7)-(5,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── call_operator_loc: (5,8)-(5,9) = "."
+ │ ├── name: :tap
+ │ ├── 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── message_loc: (5,20)-(5,21) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,22)-(5,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (5,22)-(5,23))
+ │ │ │ ├── name: :n
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (5,13)-(5,15) = "do"
+ │ └── closing_loc: (5,24)-(5,27) = "end"
+ ├── 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
+ │ │ └── value: 0
+ │ └── 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..36ece50d88
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11107.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,24))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,24))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── 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"
+ ├── closing_loc: ∅
+ └── block: ∅
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..d5ec10b06c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11380.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,21))
+ │ ├── flags: contains_keywords
+ │ └── 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (1,7)-(1,8) = ":"
+ │ │ ├── value_loc: (1,8)-(1,13) = "hello"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "hello"
+ │ └── @ KeywordHashNode (location: (1,17)-(1,21))
+ │ ├── flags: symbol_keys
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,17)-(1,21))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,17)-(1,19))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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
+ │ │ └── value: 1
+ │ └── 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"
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..2999662cc4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873.txt
@@ -0,0 +1,767 @@
+@ ProgramNode (location: (1,0)-(23,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(23,22))
+ └── body: (length: 12)
+ ├── @ CallNode (location: (1,0)-(1,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,2)-(1,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (1,6)-(1,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ 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"
+ ├── @ CallNode (location: (3,0)-(3,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (3,2)-(3,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ │ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,4)-(3,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,4)-(3,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (3,4)-(3,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (3,6)-(3,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (3,7)-(3,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ RegularExpressionNode (location: (3,10)-(3,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (3,10)-(3,11) = "/"
+ │ │ ├── content_loc: (3,11)-(3,12) = "x"
+ │ │ ├── closing_loc: (3,12)-(3,13) = "/"
+ │ │ └── unescaped: "x"
+ │ ├── 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"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,2)-(5,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (5,2)-(5,3) = "b"
+ │ │ │ ├── opening_loc: (5,3)-(5,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,4)-(5,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (5,4)-(5,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (5,4)-(5,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (5,6)-(5,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (5,6)-(5,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (5,7)-(5,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ RegularExpressionNode (location: (5,10)-(5,14))
+ │ │ ├── flags: multi_line, forced_us_ascii_encoding
+ │ │ ├── opening_loc: (5,10)-(5,11) = "/"
+ │ │ ├── content_loc: (5,11)-(5,12) = "x"
+ │ │ ├── closing_loc: (5,12)-(5,14) = "/m"
+ │ │ └── unescaped: "x"
+ │ ├── 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"
+ ├── @ CallNode (location: (7,0)-(7,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (7,0)-(7,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,2)-(7,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (7,2)-(7,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (7,2)-(7,3) = "b"
+ │ │ │ ├── opening_loc: (7,3)-(7,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (7,4)-(7,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (7,4)-(7,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (7,4)-(7,5) = "c"
+ │ │ │ │ ├── opening_loc: (7,5)-(7,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (7,6)-(7,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (7,7)-(7,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (7,8)-(7,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ 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"
+ ├── @ CallNode (location: (9,0)-(9,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,2)-(9,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (9,2)-(9,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (9,2)-(9,3) = "b"
+ │ │ │ ├── opening_loc: (9,3)-(9,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,4)-(9,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (9,4)-(9,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (9,4)-(9,5) = "c"
+ │ │ │ │ ├── opening_loc: (9,5)-(9,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (9,6)-(9,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (9,6)-(9,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (9,6)-(9,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (9,7)-(9,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (9,8)-(9,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ RegularExpressionNode (location: (9,11)-(9,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (9,11)-(9,12) = "/"
+ │ │ ├── content_loc: (9,12)-(9,13) = "x"
+ │ │ ├── closing_loc: (9,13)-(9,14) = "/"
+ │ │ └── unescaped: "x"
+ │ ├── 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"
+ ├── @ CallNode (location: (11,0)-(11,22))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (11,0)-(11,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,2)-(11,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (11,2)-(11,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (11,2)-(11,3) = "b"
+ │ │ │ ├── opening_loc: (11,3)-(11,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (11,4)-(11,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (11,4)-(11,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (11,4)-(11,5) = "c"
+ │ │ │ │ ├── opening_loc: (11,5)-(11,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (11,6)-(11,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (11,6)-(11,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (11,6)-(11,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (11,7)-(11,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (11,8)-(11,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ RegularExpressionNode (location: (11,11)-(11,15))
+ │ │ ├── flags: multi_line, forced_us_ascii_encoding
+ │ │ ├── opening_loc: (11,11)-(11,12) = "/"
+ │ │ ├── content_loc: (11,12)-(11,13) = "x"
+ │ │ ├── closing_loc: (11,13)-(11,15) = "/m"
+ │ │ └── unescaped: "x"
+ │ ├── 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"
+ ├── @ CallNode (location: (13,0)-(13,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,2)-(13,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (13,2)-(13,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (13,4)-(13,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (13,6)-(13,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (13,6)-(13,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (13,6)-(13,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (13,3)-(13,4) = "{"
+ │ │ │ └── closing_loc: (13,7)-(13,8) = "}"
+ │ │ └── @ 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"
+ ├── @ CallNode (location: (15,0)-(15,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (15,0)-(15,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,2)-(15,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (15,2)-(15,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (15,4)-(15,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (15,6)-(15,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (15,6)-(15,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (15,6)-(15,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (15,3)-(15,4) = "{"
+ │ │ │ └── closing_loc: (15,7)-(15,8) = "}"
+ │ │ └── @ RegularExpressionNode (location: (15,10)-(15,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (15,10)-(15,11) = "/"
+ │ │ ├── content_loc: (15,11)-(15,12) = "x"
+ │ │ ├── closing_loc: (15,12)-(15,13) = "/"
+ │ │ └── unescaped: "x"
+ │ ├── 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"
+ ├── @ CallNode (location: (17,0)-(17,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,2)-(17,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (17,2)-(17,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (17,4)-(17,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (17,6)-(17,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (17,6)-(17,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (17,6)-(17,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (17,3)-(17,4) = "{"
+ │ │ │ └── closing_loc: (17,7)-(17,8) = "}"
+ │ │ └── @ RegularExpressionNode (location: (17,10)-(17,14))
+ │ │ ├── flags: multi_line, forced_us_ascii_encoding
+ │ │ ├── opening_loc: (17,10)-(17,11) = "/"
+ │ │ ├── content_loc: (17,11)-(17,12) = "x"
+ │ │ ├── closing_loc: (17,12)-(17,14) = "/m"
+ │ │ └── unescaped: "x"
+ │ ├── 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"
+ ├── @ CallNode (location: (19,0)-(19,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (19,0)-(19,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,2)-(19,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (19,2)-(19,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (19,4)-(19,5) = "c"
+ │ │ │ │ ├── opening_loc: (19,5)-(19,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (19,6)-(19,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (19,6)-(19,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (19,7)-(19,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (19,3)-(19,4) = "{"
+ │ │ │ └── closing_loc: (19,8)-(19,9) = "}"
+ │ │ └── @ 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"
+ ├── @ CallNode (location: (21,0)-(21,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (21,0)-(21,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (21,2)-(21,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (21,4)-(21,5) = "c"
+ │ │ │ │ ├── opening_loc: (21,5)-(21,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (21,6)-(21,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (21,6)-(21,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (21,6)-(21,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (21,7)-(21,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (21,3)-(21,4) = "{"
+ │ │ │ └── closing_loc: (21,8)-(21,9) = "}"
+ │ │ └── @ RegularExpressionNode (location: (21,11)-(21,14))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: (21,11)-(21,12) = "/"
+ │ │ ├── content_loc: (21,12)-(21,13) = "x"
+ │ │ ├── closing_loc: (21,13)-(21,14) = "/"
+ │ │ └── unescaped: "x"
+ │ ├── 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"
+ └── @ CallNode (location: (23,0)-(23,22))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (23,0)-(23,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (23,2)-(23,15))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (23,2)-(23,9))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (23,4)-(23,5) = "c"
+ │ │ │ ├── opening_loc: (23,5)-(23,6) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (23,6)-(23,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (23,6)-(23,7))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── message_loc: (23,6)-(23,7) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (23,7)-(23,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (23,3)-(23,4) = "{"
+ │ │ └── closing_loc: (23,8)-(23,9) = "}"
+ │ └── @ RegularExpressionNode (location: (23,11)-(23,15))
+ │ ├── flags: multi_line, forced_us_ascii_encoding
+ │ ├── opening_loc: (23,11)-(23,12) = "/"
+ │ ├── content_loc: (23,12)-(23,13) = "x"
+ │ ├── closing_loc: (23,13)-(23,15) = "/m"
+ │ └── unescaped: "x"
+ ├── 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"
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..93418e6448
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt
@@ -0,0 +1,1231 @@
+@ ProgramNode (location: (1,0)-(39,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(39,20))
+ └── body: (length: 20)
+ ├── @ CallNode (location: (1,0)-(1,18))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,2)-(1,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (1,6)-(1,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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"
+ ├── @ CallNode (location: (3,0)-(3,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (3,2)-(3,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ │ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,4)-(3,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,4)-(3,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (3,4)-(3,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (3,6)-(3,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (3,7)-(3,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ FloatNode (location: (3,10)-(3,13))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,2)-(5,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (5,2)-(5,3) = "b"
+ │ │ │ ├── opening_loc: (5,3)-(5,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,4)-(5,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (5,4)-(5,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (5,4)-(5,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (5,6)-(5,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (5,6)-(5,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (5,7)-(5,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ ImaginaryNode (location: (5,10)-(5,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (5,10)-(5,13))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (7,0)-(7,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (7,0)-(7,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,2)-(7,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (7,2)-(7,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (7,2)-(7,3) = "b"
+ │ │ │ ├── opening_loc: (7,3)-(7,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (7,4)-(7,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (7,4)-(7,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (7,4)-(7,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (7,6)-(7,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (7,7)-(7,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ RationalNode (location: (7,10)-(7,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (7,10)-(7,13))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (9,0)-(9,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,2)-(9,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (9,2)-(9,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (9,2)-(9,3) = "b"
+ │ │ │ ├── opening_loc: (9,3)-(9,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,4)-(9,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (9,4)-(9,7))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (9,4)-(9,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (9,6)-(9,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (9,6)-(9,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (9,6)-(9,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (9,7)-(9,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ SymbolNode (location: (9,10)-(9,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CallNode (location: (11,0)-(11,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (11,0)-(11,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,2)-(11,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (11,2)-(11,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (11,2)-(11,3) = "b"
+ │ │ │ ├── opening_loc: (11,3)-(11,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (11,4)-(11,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (11,4)-(11,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (11,4)-(11,5) = "c"
+ │ │ │ │ ├── opening_loc: (11,5)-(11,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (11,6)-(11,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (11,6)-(11,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (11,6)-(11,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (11,7)-(11,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (11,8)-(11,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ IntegerNode (location: (11,11)-(11,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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"
+ ├── @ CallNode (location: (13,0)-(13,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,2)-(13,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (13,2)-(13,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (13,2)-(13,3) = "b"
+ │ │ │ ├── opening_loc: (13,3)-(13,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (13,4)-(13,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (13,4)-(13,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (13,4)-(13,5) = "c"
+ │ │ │ │ ├── opening_loc: (13,5)-(13,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (13,6)-(13,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (13,6)-(13,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (13,6)-(13,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (13,7)-(13,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (13,8)-(13,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ FloatNode (location: (13,11)-(13,14))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (15,0)-(15,22))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (15,0)-(15,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,2)-(15,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (15,2)-(15,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (15,2)-(15,3) = "b"
+ │ │ │ ├── opening_loc: (15,3)-(15,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (15,4)-(15,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (15,4)-(15,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (15,4)-(15,5) = "c"
+ │ │ │ │ ├── opening_loc: (15,5)-(15,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (15,6)-(15,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (15,6)-(15,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (15,6)-(15,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (15,7)-(15,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (15,8)-(15,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ ImaginaryNode (location: (15,11)-(15,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (15,11)-(15,14))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (17,0)-(17,22))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,2)-(17,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (17,2)-(17,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (17,2)-(17,3) = "b"
+ │ │ │ ├── opening_loc: (17,3)-(17,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (17,4)-(17,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (17,4)-(17,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (17,4)-(17,5) = "c"
+ │ │ │ │ ├── opening_loc: (17,5)-(17,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (17,6)-(17,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (17,6)-(17,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (17,6)-(17,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (17,7)-(17,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (17,8)-(17,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ RationalNode (location: (17,11)-(17,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (17,11)-(17,14))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (19,0)-(19,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (19,0)-(19,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,2)-(19,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (19,2)-(19,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── message_loc: (19,2)-(19,3) = "b"
+ │ │ │ ├── opening_loc: (19,3)-(19,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (19,4)-(19,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (19,4)-(19,8))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (19,4)-(19,5) = "c"
+ │ │ │ │ ├── opening_loc: (19,5)-(19,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (19,6)-(19,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (19,6)-(19,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (19,7)-(19,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (19,8)-(19,9) = ")"
+ │ │ │ └── block: ∅
+ │ │ └── @ SymbolNode (location: (19,11)-(19,13))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CallNode (location: (21,0)-(21,18))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (21,0)-(21,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (21,2)-(21,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (21,4)-(21,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (21,6)-(21,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (21,6)-(21,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (21,6)-(21,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (21,3)-(21,4) = "{"
+ │ │ │ └── closing_loc: (21,7)-(21,8) = "}"
+ │ │ └── @ IntegerNode (location: (21,10)-(21,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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"
+ ├── @ CallNode (location: (23,0)-(23,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (23,0)-(23,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,2)-(23,13))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (23,2)-(23,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (23,4)-(23,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (23,6)-(23,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (23,6)-(23,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (23,6)-(23,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (23,3)-(23,4) = "{"
+ │ │ │ └── closing_loc: (23,7)-(23,8) = "}"
+ │ │ └── @ FloatNode (location: (23,10)-(23,13))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (25,0)-(25,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (25,0)-(25,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,2)-(25,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (25,2)-(25,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (25,4)-(25,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (25,6)-(25,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (25,6)-(25,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (25,6)-(25,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (25,3)-(25,4) = "{"
+ │ │ │ └── closing_loc: (25,7)-(25,8) = "}"
+ │ │ └── @ ImaginaryNode (location: (25,10)-(25,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (25,10)-(25,13))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (27,0)-(27,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (27,0)-(27,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,2)-(27,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (27,2)-(27,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (27,4)-(27,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (27,6)-(27,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (27,6)-(27,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (27,6)-(27,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (27,3)-(27,4) = "{"
+ │ │ │ └── closing_loc: (27,7)-(27,8) = "}"
+ │ │ └── @ RationalNode (location: (27,10)-(27,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (27,10)-(27,13))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (29,0)-(29,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (29,0)-(29,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,2)-(29,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (29,2)-(29,8))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (29,4)-(29,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (29,6)-(29,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (29,6)-(29,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (29,6)-(29,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (29,3)-(29,4) = "{"
+ │ │ │ └── closing_loc: (29,7)-(29,8) = "}"
+ │ │ └── @ SymbolNode (location: (29,10)-(29,12))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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"
+ ├── @ CallNode (location: (31,0)-(31,19))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (31,0)-(31,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,2)-(31,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (31,2)-(31,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (31,4)-(31,5) = "c"
+ │ │ │ │ ├── opening_loc: (31,5)-(31,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (31,6)-(31,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (31,6)-(31,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (31,6)-(31,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (31,7)-(31,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (31,3)-(31,4) = "{"
+ │ │ │ └── closing_loc: (31,8)-(31,9) = "}"
+ │ │ └── @ IntegerNode (location: (31,11)-(31,12))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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"
+ ├── @ CallNode (location: (33,0)-(33,21))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (33,0)-(33,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,2)-(33,14))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (33,2)-(33,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (33,4)-(33,5) = "c"
+ │ │ │ │ ├── opening_loc: (33,5)-(33,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (33,6)-(33,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (33,6)-(33,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (33,6)-(33,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (33,7)-(33,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (33,3)-(33,4) = "{"
+ │ │ │ └── closing_loc: (33,8)-(33,9) = "}"
+ │ │ └── @ FloatNode (location: (33,11)-(33,14))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (35,0)-(35,22))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (35,0)-(35,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,2)-(35,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (35,2)-(35,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (35,4)-(35,5) = "c"
+ │ │ │ │ ├── opening_loc: (35,5)-(35,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (35,6)-(35,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (35,6)-(35,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (35,6)-(35,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (35,7)-(35,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (35,3)-(35,4) = "{"
+ │ │ │ └── closing_loc: (35,8)-(35,9) = "}"
+ │ │ └── @ ImaginaryNode (location: (35,11)-(35,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (35,11)-(35,14))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ ├── @ CallNode (location: (37,0)-(37,22))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (37,0)-(37,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,2)-(37,15))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (37,2)-(37,9))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :b
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── message_loc: (37,4)-(37,5) = "c"
+ │ │ │ │ ├── opening_loc: (37,5)-(37,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (37,6)-(37,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (37,6)-(37,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── message_loc: (37,6)-(37,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (37,7)-(37,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── opening_loc: (37,3)-(37,4) = "{"
+ │ │ │ └── closing_loc: (37,8)-(37,9) = "}"
+ │ │ └── @ RationalNode (location: (37,11)-(37,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (37,11)-(37,14))
+ │ │ └── value: 1.0
+ │ ├── 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"
+ └── @ CallNode (location: (39,0)-(39,20))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :a
+ ├── message_loc: (39,0)-(39,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (39,2)-(39,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (39,2)-(39,9))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :b
+ │ │ ├── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :c
+ │ │ │ ├── message_loc: (39,4)-(39,5) = "c"
+ │ │ │ ├── opening_loc: (39,5)-(39,6) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (39,6)-(39,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (39,6)-(39,7))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── message_loc: (39,6)-(39,7) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (39,7)-(39,8) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (39,3)-(39,4) = "{"
+ │ │ └── closing_loc: (39,8)-(39,9) = "}"
+ │ └── @ SymbolNode (location: (39,11)-(39,13))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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"
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..6aa8e55e54
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt
@@ -0,0 +1,98 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,18))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,2)-(1,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :p
+ │ │ ├── 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))
+ │ │ │ │ ├── flags: ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :p
+ │ │ │ │ ├── message_loc: (1,4)-(1,5) = "p"
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── name: :p
+ │ │ │ │ │ ├── message_loc: (1,6)-(1,7) = "p"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ │ │ └── block: ∅
+ │ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :p
+ │ │ │ ├── message_loc: (1,9)-(1,10) = "p"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,11)-(1,12))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :p
+ │ │ │ │ ├── message_loc: (1,11)-(1,12) = "p"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (1,3)-(1,4) = "{"
+ │ │ └── closing_loc: (1,12)-(1,13) = "}"
+ │ └── @ CallNode (location: (1,15)-(1,18))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :tap
+ │ ├── message_loc: (1,15)-(1,18) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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"
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..fe17087e53
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11989.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,2)-(1,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,2)-(1,8) = "<<~\"E\""
+ │ ├── content_loc: (2,0)-(3,0) = " x\\n y\n"
+ │ ├── closing_loc: (3,0)-(4,0) = "E\n"
+ │ └── unescaped: "x\n y\n"
+ ├── closing_loc: ∅
+ └── block: ∅
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..0a5fba1482
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11990.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :p
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,12))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,2)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (1,2)-(1,6))
+ │ │ │ ├── flags: frozen
+ │ │ │ ├── opening_loc: (1,2)-(1,6) = "<<~E"
+ │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n"
+ │ │ │ ├── closing_loc: (3,0)-(4,0) = "E\n"
+ │ │ │ └── unescaped: "x\n"
+ │ │ └── @ StringNode (location: (1,7)-(1,12))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: (1,7)-(1,8) = "\""
+ │ │ ├── content_loc: (1,8)-(1,11) = " y"
+ │ │ ├── closing_loc: (1,11)-(1,12) = "\""
+ │ │ └── unescaped: " y"
+ │ └── closing_loc: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..2b4d3eab2a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12073.txt
@@ -0,0 +1,95 @@
+@ 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
+ │ │ └── value: 1
+ │ └── operator_loc: (1,2)-(1,3) = "="
+ ├── @ CallNode (location: (1,7)-(1,13))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,7)-(1,8) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,9)-(1,13))
+ │ │ ├── flags: contains_keywords
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,9)-(1,13))
+ │ │ ├── flags: symbol_keys
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,9)-(1,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,9)-(1,11))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ 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))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :raise
+ │ ├── message_loc: (3,15)-(3,20) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,21)-(3,29))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ ConstantPathNode (location: (3,21)-(3,25))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (3,21)-(3,22))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── name: :B
+ │ │ │ ├── delimiter_loc: (3,22)-(3,24) = "::"
+ │ │ │ └── name_loc: (3,24)-(3,25) = "B"
+ │ │ └── @ 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: ∅
+ ├── 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..4935007f8a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12402.txt
@@ -0,0 +1,565 @@
+@ 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"
+ │ ├── binary_operator_loc: (1,4)-(1,6) = "+="
+ │ ├── value:
+ │ │ @ RescueModifierNode (location: (1,7)-(1,27))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (1,7)-(1,16))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (1,7)-(1,12) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,13)-(1,16))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (1,17)-(1,23) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (1,24)-(1,27))
+ │ ├── name: :foo
+ │ ├── binary_operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,28))
+ │ ├── name_loc: (3,0)-(3,3) = "foo"
+ │ ├── binary_operator_loc: (3,4)-(3,6) = "+="
+ │ ├── value:
+ │ │ @ RescueModifierNode (location: (3,7)-(3,28))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (3,7)-(3,17))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (3,7)-(3,12) = "raise"
+ │ │ │ ├── opening_loc: (3,12)-(3,13) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,13)-(3,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,13)-(3,16))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (3,13)-(3,16) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (3,16)-(3,17) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (3,18)-(3,24) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (3,25)-(3,28))
+ │ ├── name: :foo
+ │ ├── binary_operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableWriteNode (location: (5,0)-(5,26))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (5,0)-(5,3) = "foo"
+ │ ├── value:
+ │ │ @ RescueModifierNode (location: (5,6)-(5,26))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (5,6)-(5,15))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (5,6)-(5,11) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,12)-(5,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (5,12)-(5,15))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (5,12)-(5,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── keyword_loc: (5,16)-(5,22) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (5,23)-(5,26))
+ │ └── 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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (7,6)-(7,11) = "raise"
+ │ │ │ ├── opening_loc: (7,11)-(7,12) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (7,12)-(7,15))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (7,12)-(7,15))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (7,12)-(7,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: (7,15)-(7,16) = ")"
+ │ │ │ └── block: ∅
+ │ │ ├── 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))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :C
+ │ ├── write_name: :C=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (9,6)-(9,8) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (9,9)-(9,29))
+ │ ├── expression:
+ │ │ @ CallNode (location: (9,9)-(9,18))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (9,9)-(9,14) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,15)-(9,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (9,15)-(9,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (9,15)-(9,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (9,19)-(9,25) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (9,26)-(9,29))
+ ├── @ CallOperatorWriteNode (location: (11,0)-(11,30))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :C
+ │ ├── write_name: :C=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (11,6)-(11,8) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (11,9)-(11,30))
+ │ ├── expression:
+ │ │ @ CallNode (location: (11,9)-(11,19))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (11,9)-(11,14) = "raise"
+ │ │ ├── opening_loc: (11,14)-(11,15) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,15)-(11,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (11,15)-(11,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (11,15)-(11,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (11,18)-(11,19) = ")"
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (11,20)-(11,26) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (11,27)-(11,30))
+ ├── @ CallOperatorWriteNode (location: (13,0)-(13,29))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :m
+ │ ├── write_name: :m=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (13,6)-(13,8) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (13,9)-(13,29))
+ │ ├── expression:
+ │ │ @ CallNode (location: (13,9)-(13,18))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (13,9)-(13,14) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,15)-(13,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (13,15)-(13,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (13,15)-(13,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (13,19)-(13,25) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (13,26)-(13,29))
+ ├── @ CallOperatorWriteNode (location: (15,0)-(15,30))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :m
+ │ ├── write_name: :m=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (15,6)-(15,8) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (15,9)-(15,30))
+ │ ├── expression:
+ │ │ @ CallNode (location: (15,9)-(15,19))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (15,9)-(15,14) = "raise"
+ │ │ ├── opening_loc: (15,14)-(15,15) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,15)-(15,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (15,15)-(15,18))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (15,15)-(15,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (15,18)-(15,19) = ")"
+ │ │ └── block: ∅
+ │ ├── 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
+ │ │ ├── name: :C
+ │ │ ├── delimiter_loc: (17,3)-(17,5) = "::"
+ │ │ └── name_loc: (17,5)-(17,6) = "C"
+ │ ├── operator_loc: (17,7)-(17,10) = "||="
+ │ └── value:
+ │ @ RescueModifierNode (location: (17,11)-(17,31))
+ │ ├── expression:
+ │ │ @ CallNode (location: (17,11)-(17,20))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (17,11)-(17,16) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (17,17)-(17,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (17,17)-(17,20))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (17,17)-(17,20) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (17,21)-(17,27) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (17,28)-(17,31))
+ ├── @ ConstantPathOrWriteNode (location: (19,0)-(19,32))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (19,0)-(19,6))
+ │ │ ├── parent:
+ │ │ │ @ LocalVariableReadNode (location: (19,0)-(19,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── name: :C
+ │ │ ├── delimiter_loc: (19,3)-(19,5) = "::"
+ │ │ └── name_loc: (19,5)-(19,6) = "C"
+ │ ├── operator_loc: (19,7)-(19,10) = "||="
+ │ └── value:
+ │ @ RescueModifierNode (location: (19,11)-(19,32))
+ │ ├── expression:
+ │ │ @ CallNode (location: (19,11)-(19,21))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (19,11)-(19,16) = "raise"
+ │ │ ├── opening_loc: (19,16)-(19,17) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (19,17)-(19,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (19,17)-(19,20))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (19,17)-(19,20) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (19,20)-(19,21) = ")"
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (19,22)-(19,28) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (19,29)-(19,32))
+ ├── @ CallOperatorWriteNode (location: (21,0)-(21,30))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :m
+ │ ├── write_name: :m=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (21,7)-(21,9) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (21,10)-(21,30))
+ │ ├── expression:
+ │ │ @ CallNode (location: (21,10)-(21,19))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (21,10)-(21,15) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (21,16)-(21,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (21,16)-(21,19))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (21,16)-(21,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (21,20)-(21,26) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (21,27)-(21,30))
+ ├── @ CallOperatorWriteNode (location: (23,0)-(23,31))
+ │ ├── flags: ∅
+ │ ├── 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"
+ │ ├── read_name: :m
+ │ ├── write_name: :m=
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (23,7)-(23,9) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (23,10)-(23,31))
+ │ ├── expression:
+ │ │ @ CallNode (location: (23,10)-(23,20))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (23,10)-(23,15) = "raise"
+ │ │ ├── opening_loc: (23,15)-(23,16) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (23,16)-(23,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (23,16)-(23,19))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (23,16)-(23,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: (23,19)-(23,20) = ")"
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (23,21)-(23,27) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (23,28)-(23,31))
+ ├── @ IndexOperatorWriteNode (location: (25,0)-(25,30))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (25,0)-(25,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── opening_loc: (25,3)-(25,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,4)-(25,5))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (25,4)-(25,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 0
+ │ ├── closing_loc: (25,5)-(25,6) = "]"
+ │ ├── block: ∅
+ │ ├── binary_operator: :+
+ │ ├── binary_operator_loc: (25,7)-(25,9) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (25,10)-(25,30))
+ │ ├── expression:
+ │ │ @ CallNode (location: (25,10)-(25,19))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (25,10)-(25,15) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (25,16)-(25,19))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (25,16)-(25,19))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (25,16)-(25,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (25,20)-(25,26) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (25,27)-(25,30))
+ └── @ IndexOperatorWriteNode (location: (27,0)-(27,31))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ LocalVariableReadNode (location: (27,0)-(27,3))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── call_operator_loc: ∅
+ ├── opening_loc: (27,3)-(27,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (27,4)-(27,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (27,4)-(27,5))
+ │ ├── flags: decimal
+ │ └── value: 0
+ ├── closing_loc: (27,5)-(27,6) = "]"
+ ├── block: ∅
+ ├── binary_operator: :+
+ ├── binary_operator_loc: (27,7)-(27,9) = "+="
+ └── value:
+ @ RescueModifierNode (location: (27,10)-(27,31))
+ ├── expression:
+ │ @ CallNode (location: (27,10)-(27,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :raise
+ │ ├── message_loc: (27,10)-(27,15) = "raise"
+ │ ├── opening_loc: (27,15)-(27,16) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,16)-(27,19))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (27,16)-(27,19))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (27,16)-(27,19) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (27,19)-(27,20) = ")"
+ │ └── block: ∅
+ ├── 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..6151143ba8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12669.txt
@@ -0,0 +1,133 @@
+@ 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"
+ │ ├── binary_operator_loc: (1,2)-(1,4) = "+="
+ │ ├── value:
+ │ │ @ LocalVariableOperatorWriteNode (location: (1,5)-(1,18))
+ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ ├── binary_operator_loc: (1,7)-(1,9) = "+="
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (1,10)-(1,15) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,16)-(1,18))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (1,16)-(1,18))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (1,16)-(1,17) = ":"
+ │ │ │ │ ├── value_loc: (1,17)-(1,18) = "x"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── name: :b
+ │ │ ├── binary_operator: :+
+ │ │ └── depth: 0
+ │ ├── name: :a
+ │ ├── binary_operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,17))
+ │ ├── name_loc: (3,0)-(3,1) = "a"
+ │ ├── binary_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))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (3,9)-(3,14) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,15)-(3,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (3,15)-(3,17))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (3,15)-(3,16) = ":"
+ │ │ │ │ ├── value_loc: (3,16)-(3,17) = "x"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── operator_loc: (3,7)-(3,8) = "="
+ │ ├── name: :a
+ │ ├── binary_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"
+ │ │ ├── binary_operator_loc: (5,6)-(5,8) = "+="
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (5,9)-(5,17))
+ │ │ │ ├── flags: ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :raise
+ │ │ │ ├── message_loc: (5,9)-(5,14) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,15)-(5,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (5,15)-(5,17))
+ │ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ │ ├── opening_loc: (5,15)-(5,16) = ":"
+ │ │ │ │ ├── value_loc: (5,16)-(5,17) = "x"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── name: :b
+ │ │ ├── binary_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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :raise
+ │ │ ├── message_loc: (7,8)-(7,13) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,14)-(7,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (7,14)-(7,16))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── opening_loc: (7,14)-(7,15) = ":"
+ │ │ │ ├── value_loc: (7,15)-(7,16) = "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "x"
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..427c96bbe0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12686.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :f
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,16))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :g
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "g"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── 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: ∅
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..eae9587ea0
--- /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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,4))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── 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) = "}"
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..36629797db
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_14690.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,23))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :let
+ ├── message_loc: (1,0)-(1,3) = "let"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,6))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,9)-(1,10) = "m"
+ │ ├── opening_loc: (1,10)-(1,11) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,11)-(1,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (1,11)-(1,12) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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"
+ ├── opening_loc: (1,7)-(1,8) = "{"
+ └── closing_loc: (1,22)-(1,23) = "}"
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..db8bc1401f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_15789.txt
@@ -0,0 +1,120 @@
+@ ProgramNode (location: (1,0)-(3,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,19))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,20))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,0)-(1,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,20))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── 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:
+ │ │ │ │ │ │ @ NumberedParametersNode (location: (1,9)-(1,15))
+ │ │ │ │ │ │ └── maximum: 1
+ │ │ │ │ │ └── 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: ∅
+ └── @ CallNode (location: (3,0)-(3,19))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :m
+ ├── message_loc: (3,0)-(3,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,2)-(3,19))
+ │ ├── flags: ∅
+ │ └── 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)
+ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (3,5)-(3,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── 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:
+ │ │ │ │ │ @ NumberedParametersNode (location: (3,8)-(3,14))
+ │ │ │ │ │ └── maximum: 1
+ │ │ │ │ └── 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: ∅
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..910b08c3ef
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_9669.txt
@@ -0,0 +1,59 @@
+@ 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)
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :b
+ │ │ │ └── name_loc: (1,6)-(1,8) = "b:"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,0)-(2,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (2,0)-(2,6))
+ │ │ ├── flags: redundant
+ │ │ ├── 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))
+ │ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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..53188a7b8a
--- /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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..1d09daa4a6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_attr_asgn.txt
@@ -0,0 +1,105 @@
+@ ProgramNode (location: (1,0)-(7,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,10))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,9))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── name: :A=
+ │ ├── message_loc: (1,4)-(1,5) = "A"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,9))
+ │ ├── flags: attribute_write
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ ├── name: :a=
+ │ ├── message_loc: (3,4)-(3,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,8)-(3,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,8)-(3,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ ConstantPathWriteNode (location: (5,0)-(5,10))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (5,0)-(5,6))
+ │ │ ├── parent:
+ │ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :foo
+ │ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── name: :A
+ │ │ ├── delimiter_loc: (5,3)-(5,5) = "::"
+ │ │ └── name_loc: (5,5)-(5,6) = "A"
+ │ ├── operator_loc: (5,7)-(5,8) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (5,9)-(5,10))
+ │ ├── flags: decimal
+ │ └── value: 1
+ └── @ CallNode (location: (7,0)-(7,10))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (7,0)-(7,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (7,3)-(7,5) = "::"
+ ├── name: :a=
+ ├── message_loc: (7,5)-(7,6) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,9)-(7,10))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (7,9)-(7,10))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..3cec95ae7c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── flags: safe_navigation, attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :b=
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..540a7681dc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_binary_op.txt
@@ -0,0 +1,551 @@
+@ ProgramNode (location: (1,0)-(41,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(41,7))
+ └── body: (length: 21)
+ ├── @ CallNode (location: (1,0)-(1,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!=
+ │ ├── message_loc: (1,4)-(1,6) = "!="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :!~
+ │ ├── message_loc: (3,4)-(3,6) = "!~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,7)-(3,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,7)-(3,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (5,0)-(5,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :%
+ │ ├── message_loc: (5,4)-(5,5) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (7,0)-(7,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :&
+ │ ├── message_loc: (7,4)-(7,5) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,6)-(7,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,6)-(7,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (9,0)-(9,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :*
+ │ ├── message_loc: (9,4)-(9,5) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,6)-(9,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (9,6)-(9,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (11,0)-(11,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,0)-(11,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :**
+ │ ├── message_loc: (11,4)-(11,6) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,7)-(11,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (11,7)-(11,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (13,0)-(13,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (13,0)-(13,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+
+ │ ├── message_loc: (13,4)-(13,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,6)-(13,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,6)-(13,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (15,0)-(15,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (15,0)-(15,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (15,0)-(15,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :-
+ │ ├── message_loc: (15,4)-(15,5) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,6)-(15,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (15,6)-(15,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (17,0)-(17,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (17,0)-(17,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (17,0)-(17,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :/
+ │ ├── message_loc: (17,4)-(17,5) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,6)-(17,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (17,6)-(17,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (19,0)-(19,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (19,0)-(19,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (19,0)-(19,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<
+ │ ├── message_loc: (19,4)-(19,5) = "<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (19,6)-(19,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (21,0)-(21,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (21,0)-(21,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (21,0)-(21,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<<
+ │ ├── message_loc: (21,4)-(21,6) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,7)-(21,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (21,7)-(21,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (23,0)-(23,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (23,0)-(23,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<=
+ │ ├── message_loc: (23,4)-(23,6) = "<="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,7)-(23,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (23,7)-(23,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (25,0)-(25,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (25,0)-(25,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (25,0)-(25,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :<=>
+ │ ├── message_loc: (25,4)-(25,7) = "<=>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,8)-(25,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (25,8)-(25,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (27,0)-(27,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (27,0)-(27,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (27,0)-(27,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :==
+ │ ├── message_loc: (27,4)-(27,6) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,7)-(27,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (27,7)-(27,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (29,0)-(29,9))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (29,0)-(29,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (29,0)-(29,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :===
+ │ ├── message_loc: (29,4)-(29,7) = "==="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,8)-(29,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (29,8)-(29,9))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (31,0)-(31,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (31,0)-(31,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :=~
+ │ ├── message_loc: (31,4)-(31,6) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,7)-(31,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,7)-(31,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (33,0)-(33,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (33,0)-(33,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (33,0)-(33,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>
+ │ ├── message_loc: (33,4)-(33,5) = ">"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,6)-(33,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (33,6)-(33,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (35,0)-(35,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (35,0)-(35,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (35,0)-(35,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>=
+ │ ├── message_loc: (35,4)-(35,6) = ">="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,7)-(35,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (35,7)-(35,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (37,0)-(37,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (37,0)-(37,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (37,0)-(37,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :>>
+ │ ├── message_loc: (37,4)-(37,6) = ">>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,7)-(37,8))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (37,7)-(37,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (39,0)-(39,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (39,0)-(39,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (39,0)-(39,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :^
+ │ ├── message_loc: (39,4)-(39,5) = "^"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,6)-(39,7))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (39,6)-(39,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (41,0)-(41,7))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (41,0)-(41,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :|
+ ├── message_loc: (41,4)-(41,5) = "|"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (41,6)-(41,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (41,6)-(41,7))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: ∅
+ └── block: ∅
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..4013888882
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_block_chain_cmd.txt
@@ -0,0 +1,325 @@
+@ ProgramNode (location: (1,0)-(13,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,23))
+ └── body: (length: 7)
+ ├── @ CallNode (location: (1,0)-(1,21))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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"
+ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ ├── name: :fun
+ │ ├── message_loc: (1,14)-(1,17) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,18)-(1,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,18)-(1,21))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,18)-(1,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,28))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (3,0)-(3,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,5)-(3,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,5)-(3,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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"
+ │ ├── call_operator_loc: (3,13)-(3,14) = "."
+ │ ├── name: :fun
+ │ ├── message_loc: (3,14)-(3,17) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,18)-(3,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,18)-(3,21))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,18)-(3,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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"
+ ├── @ CallNode (location: (5,0)-(5,20))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (5,0)-(5,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,5)-(5,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,5)-(5,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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"
+ │ ├── call_operator_loc: (5,13)-(5,14) = "."
+ │ ├── name: :fun
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (7,0)-(7,22))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (7,0)-(7,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,5)-(7,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (7,5)-(7,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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"
+ │ ├── call_operator_loc: (7,13)-(7,14) = "."
+ │ ├── name: :fun
+ │ ├── message_loc: (7,14)-(7,17) = "fun"
+ │ ├── opening_loc: (7,17)-(7,18) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,18)-(7,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,18)-(7,21))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (7,18)-(7,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: (7,21)-(7,22) = ")"
+ │ └── block: ∅
+ ├── @ CallNode (location: (9,0)-(9,25))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (9,0)-(9,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,5)-(9,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (9,5)-(9,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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"
+ │ ├── call_operator_loc: (9,13)-(9,14) = "."
+ │ ├── name: :fun
+ │ ├── message_loc: (9,14)-(9,17) = "fun"
+ │ ├── opening_loc: (9,17)-(9,18) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,18)-(9,21))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (9,18)-(9,21))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (9,18)-(9,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (11,0)-(11,22))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,0)-(11,13))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :meth
+ │ │ ├── message_loc: (11,0)-(11,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,5)-(11,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (11,5)-(11,6))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── 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"
+ │ ├── call_operator_loc: (11,13)-(11,15) = "::"
+ │ ├── name: :fun
+ │ ├── message_loc: (11,15)-(11,18) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,19)-(11,22))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (11,19)-(11,22))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (11,19)-(11,22) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (13,0)-(13,23))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (13,0)-(13,13))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (13,0)-(13,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,5)-(13,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,5)-(13,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── 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"
+ ├── call_operator_loc: (13,13)-(13,15) = "::"
+ ├── name: :fun
+ ├── message_loc: (13,15)-(13,18) = "fun"
+ ├── opening_loc: (13,18)-(13,19) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (13,19)-(13,22))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (13,19)-(13,22))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (13,19)-(13,22) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (13,22)-(13,23) = ")"
+ └── block: ∅
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..826d3c8464
--- /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))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,3)-(1,5) = "&."
+ ├── name: :bar
+ ├── 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) = "}"
diff --git a/test/prism/snapshots/whitequark/send_call.txt b/test/prism/snapshots/whitequark/send_call.txt
new file mode 100644
index 0000000000..48063e0121
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_call.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── name: :call
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── closing_loc: (1,6)-(1,7) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (3,0)-(3,8))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ ├── name: :call
+ ├── message_loc: ∅
+ ├── opening_loc: (3,5)-(3,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (3,6)-(3,7))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (3,7)-(3,8) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/send_conditional.txt b/test/prism/snapshots/whitequark/send_conditional.txt
new file mode 100644
index 0000000000..7b402d9ef2
--- /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))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── name: :b
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/send_index.txt b/test/prism/snapshots/whitequark/send_index.txt
new file mode 100644
index 0000000000..6c9e08f2ea
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index.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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ └── block: ∅
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..9d2e6efcb6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_asgn.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))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]=
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ └── block: ∅
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..9d2e6efcb6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_asgn_legacy.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))
+ ├── flags: attribute_write
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]=
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ ├── flags: decimal
+ │ │ └── value: 2
+ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ ├── flags: decimal
+ │ └── value: 3
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ └── block: ∅
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..0a41fd051d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_cmd.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,3)-(1,10) = "[m bar]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,4)-(1,5) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: (1,9)-(1,10) = "]"
+ └── block: ∅
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..6c9e08f2ea
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_legacy.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))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :[]
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ ├── flags: decimal
+ │ └── value: 2
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/send_lambda.txt b/test/prism/snapshots/whitequark/send_lambda.txt
new file mode 100644
index 0000000000..bf21700539
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda.txt
@@ -0,0 +1,44 @@
+@ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: ∅
+ │ │ │ │ ├── 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..f61f622bdd
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda_args.txt
@@ -0,0 +1,51 @@
+@ 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))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── 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..747656af6b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt
@@ -0,0 +1,57 @@
+@ 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)
+ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,3)-(1,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,3)-(1,5) = "a:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ ├── 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)
+ │ │ │ └── @ RequiredKeywordParameterNode (location: (3,3)-(3,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── name: :a
+ │ │ │ └── name_loc: (3,3)-(3,5) = "a:"
+ │ │ ├── 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..34a63ec503
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 2)
+ │ │ ├── @ BlockLocalVariableNode (location: (1,6)-(1,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :foo
+ │ │ └── @ BlockLocalVariableNode (location: (1,11)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ └── 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..05966fc5a3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_op_asgn_conditional.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallAndWriteNode (location: (1,0)-(1,10))
+ ├── flags: safe_navigation
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :a
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── read_name: :b
+ ├── write_name: :b=
+ ├── operator_loc: (1,5)-(1,8) = "&&="
+ └── value:
+ @ IntegerNode (location: (1,9)-(1,10))
+ ├── flags: decimal
+ └── value: 1
diff --git a/test/prism/snapshots/whitequark/send_plain.txt b/test/prism/snapshots/whitequark/send_plain.txt
new file mode 100644
index 0000000000..be57bee5a0
--- /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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── name: :fun
+ │ ├── message_loc: (1,4)-(1,7) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ │ ├── name: :Fun
+ │ ├── message_loc: (3,5)-(3,8) = "Fun"
+ │ ├── opening_loc: (3,8)-(3,9) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (3,9)-(3,10) = ")"
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,8))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (5,0)-(5,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (5,3)-(5,5) = "::"
+ ├── name: :fun
+ ├── message_loc: (5,5)-(5,8) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..59236e114d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_plain_cmd.txt
@@ -0,0 +1,104 @@
+@ ProgramNode (location: (1,0)-(5,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,12))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── name: :fun
+ │ ├── message_loc: (1,4)-(1,7) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,8)-(1,11))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,8)-(1,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,12))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ │ ├── name: :Fun
+ │ ├── message_loc: (3,5)-(3,8) = "Fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,9)-(3,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,9)-(3,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (3,9)-(3,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,12))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (5,0)-(5,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: (5,3)-(5,5) = "::"
+ ├── name: :fun
+ ├── message_loc: (5,5)-(5,8) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,9)-(5,12))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (5,9)-(5,12))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (5,9)-(5,12) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/send_self.txt b/test/prism/snapshots/whitequark/send_self.txt
new file mode 100644
index 0000000000..41fd822110
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_self.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(5,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,6))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,4))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun!
+ │ ├── message_loc: (3,0)-(3,4) = "fun!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,6))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (5,0)-(5,3) = "fun"
+ ├── opening_loc: (5,3)-(5,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,4)-(5,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (5,4)-(5,5))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── closing_loc: (5,5)-(5,6) = ")"
+ └── block: ∅
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..c92935603b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_self_block.txt
@@ -0,0 +1,75 @@
+@ ProgramNode (location: (1,0)-(7,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,10))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,10))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── 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"
+ ├── @ CallNode (location: (3,0)-(3,7))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── 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) = "}"
+ ├── @ CallNode (location: (5,0)-(5,9))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :fun
+ │ ├── 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) = "}"
+ └── @ CallNode (location: (7,0)-(7,10))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (7,0)-(7,3) = "fun"
+ ├── opening_loc: (7,3)-(7,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,4)-(7,5))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (7,4)-(7,5))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── 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) = "}"
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..8ca1de7968
--- /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))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,1)-(1,4))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,1)-(1,4) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :+@
+ │ ├── message_loc: (1,0)-(1,1) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,4))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,1)-(3,4))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,1)-(3,4) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :-@
+ │ ├── message_loc: (3,0)-(3,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,4))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (5,1)-(5,4))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,1)-(5,4) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :~
+ ├── message_loc: (5,0)-(5,1) = "~"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..ba1fce0c68
--- /dev/null
+++ b/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt
@@ -0,0 +1,34 @@
+@ 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)-(5,0) = " 1 \\\n 2\n 3\n"
+ │ ├── closing_loc: (5,0)-(6,0) = "E\n"
+ │ └── unescaped: " 1 2\n 3\n"
+ └── @ InterpolatedStringNode (location: (8,0)-(8,4))
+ ├── flags: ∅
+ ├── opening_loc: (8,0)-(8,4) = "<<~E"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (9,0)-(10,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (9,0)-(10,0) = " 1 \\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "1 "
+ │ ├── @ StringNode (location: (10,0)-(11,0))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (10,0)-(11,0) = " 2\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "2\n"
+ │ └── @ StringNode (location: (11,0)-(12,0))
+ │ ├── flags: frozen
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (11,0)-(12,0) = " 3\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "3\n"
+ └── closing_loc: (12,0)-(13,0) = "E\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..55750d2b61
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg.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))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ └── value: 1
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,6)-(1,7) = ")"
+ ├── closing_loc: ∅
+ └── block: ∅
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..a6224bcca1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg_block.txt
@@ -0,0 +1,109 @@
+@ ProgramNode (location: (1,0)-(5,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,10))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── name: :fun
+ │ ├── message_loc: (1,4)-(1,7) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ └── 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
+ │ │ │ └── value: 1
+ │ │ ├── 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) = "}"
+ ├── @ CallNode (location: (3,0)-(3,15))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ │ ├── name: :fun
+ │ ├── message_loc: (3,5)-(3,8) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,9)-(3,12))
+ │ │ ├── flags: ∅
+ │ │ └── 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
+ │ │ │ └── value: 1
+ │ │ ├── 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) = "}"
+ └── @ CallNode (location: (5,0)-(5,10))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (5,0)-(5,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,4)-(5,7))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ └── value: 1
+ │ ├── 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) = "}"
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..767b099a8b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg_call.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ └── closing_loc: (1,6)-(1,7) = ")"
+ │ ├── call_operator_loc: (1,7)-(1,8) = "."
+ │ ├── name: :to_i
+ │ ├── message_loc: (1,8)-(1,12) = "to_i"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
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..7727a5ddd9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg_newline.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,1))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(2,1))
+ │ ├── flags: ∅
+ │ └── 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
+ │ │ └── value: 1
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (2,0)-(2,1) = ")"
+ ├── closing_loc: ∅
+ └── block: ∅
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..62b549a674
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_block.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,6))
+ │ ├── flags: ∅
+ │ └── 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) = "}"
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..8a75bef6a8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_cmd.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── flags: ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :fun
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,11))
+ │ ├── flags: ∅
+ │ └── 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))
+ │ │ ├── flags: ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :f
+ │ │ ├── message_loc: (1,5)-(1,6) = "f"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,7)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,10)-(1,11) = ")"
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/string___FILE__.txt b/test/prism/snapshots/whitequark/string___FILE__.txt
new file mode 100644
index 0000000000..a12499a631
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string___FILE__.txt
@@ -0,0 +1,8 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ SourceFileNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ └── 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..f7f7bf9723
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string_concat.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,14))
+ ├── flags: ∅
+ ├── opening_loc: ∅
+ ├── parts: (length: 2)
+ │ ├── @ InterpolatedStringNode (location: (1,0)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ │ │ ├── flags: frozen
+ │ │ │ │ ├── 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) = "\""
+ │ └── @ StringNode (location: (1,9)-(1,14))
+ │ ├── flags: frozen
+ │ ├── opening_loc: (1,9)-(1,10) = "\""
+ │ ├── content_loc: (1,10)-(1,13) = "bar"
+ │ ├── closing_loc: (1,13)-(1,14) = "\""
+ │ └── unescaped: "bar"
+ └── closing_loc: ∅
diff --git a/test/prism/snapshots/whitequark/string_dvar.txt b/test/prism/snapshots/whitequark/string_dvar.txt
new file mode 100644
index 0000000000..9d04232580
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string_dvar.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))
+ ├── flags: ∅
+ ├── 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: frozen
+ │ │ ├── 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: frozen
+ │ │ ├── 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..597e8c5d5b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string_interp.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,14))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ ├── flags: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ └── @ StringNode (location: (1,10)-(1,13))
+ │ ├── flags: frozen
+ │ ├── 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..132b4912e4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/super.txt
@@ -0,0 +1,49 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (5,6)-(5,9))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (5,6)-(5,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..d9ce7b86be
--- /dev/null
+++ b/test/prism/snapshots/whitequark/super_block.txt
@@ -0,0 +1,48 @@
+@ 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,6)-(3,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ CallNode (location: (3,11)-(3,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,11)-(3,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..a9b8dfcb63
--- /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: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,10)-(1,11) = "}"
+ │ └── @ StringNode (location: (1,11)-(1,14))
+ │ ├── flags: frozen
+ │ ├── 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..a2466600f5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/symbol_plain.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ SymbolNode (location: (1,0)-(1,6))
+ │ ├── flags: forced_us_ascii_encoding
+ │ ├── 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))
+ ├── flags: forced_us_ascii_encoding
+ ├── 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..fa637ffb4e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ternary.txt
@@ -0,0 +1,36 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: (1,4)-(1,5) = "?"
+ ├── statements:
+ │ @ StatementsNode (location: (1,6)-(1,7))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ ├── flags: decimal
+ │ └── value: 1
+ ├── 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
+ │ │ └── value: 2
+ │ └── 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..833afcff42
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt
@@ -0,0 +1,50 @@
+@ 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
+ │ │ └── value: 1
+ │ └── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,8)-(1,9) = ")"
+ ├── then_keyword_loc: (1,9)-(1,10) = "?"
+ ├── 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..e12dad132b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/trailing_forward_arg.txt
@@ -0,0 +1,55 @@
+@ 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))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :a
+ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
+ │ │ ├── flags: ∅
+ │ │ └── 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))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,20)-(1,23) = "bar"
+ │ ├── opening_loc: (1,23)-(1,24) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,24)-(1,34))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ LocalVariableReadNode (location: (1,24)-(1,25))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── @ IntegerNode (location: (1,27)-(1,29))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 42
+ │ │ └── @ ForwardingArgumentsNode (location: (1,31)-(1,34))
+ │ ├── closing_loc: (1,34)-(1,35) = ")"
+ │ └── block: ∅
+ ├── 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..e14b0567e7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unary_num_pow_precedence.txt
@@ -0,0 +1,80 @@
+@ ProgramNode (location: (1,0)-(5,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,10))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ FloatNode (location: (1,0)-(1,4))
+ │ │ └── value: 2.0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :**
+ │ ├── message_loc: (1,5)-(1,7) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,1)-(3,8))
+ │ │ ├── flags: ∅
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :**
+ │ │ ├── message_loc: (3,3)-(3,5) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,6)-(3,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,6)-(3,8))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 10
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :-@
+ │ ├── message_loc: (3,0)-(3,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ CallNode (location: (5,0)-(5,10))
+ ├── flags: ∅
+ ├── receiver:
+ │ @ CallNode (location: (5,1)-(5,10))
+ │ ├── flags: ∅
+ │ ├── receiver:
+ │ │ @ FloatNode (location: (5,1)-(5,4))
+ │ │ └── value: 2.0
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :**
+ │ ├── message_loc: (5,5)-(5,7) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,8)-(5,10))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,8)-(5,10))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :-@
+ ├── message_loc: (5,0)-(5,1) = "-"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/undef.txt b/test/prism/snapshots/whitequark/undef.txt
new file mode 100644
index 0000000000..163cc2e867
--- /dev/null
+++ b/test/prism/snapshots/whitequark/undef.txt
@@ -0,0 +1,39 @@
+@ 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))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── @ SymbolNode (location: (1,11)-(1,15))
+ │ │ ├── flags: forced_us_ascii_encoding
+ │ │ ├── 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: frozen
+ │ │ │ ├── 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
+ │ │ │ └── value: 1
+ │ │ └── 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..a3bbbe69c8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unless.txt
@@ -0,0 +1,63 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,7)-(1,10) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,11)-(1,15) = "then"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,16)-(1,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,7)-(3,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (3,12)-(3,15))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,12)-(3,15))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,12)-(3,15) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..f4f95379e5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unless_else.txt
@@ -0,0 +1,95 @@
+@ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,7)-(1,10) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: (1,11)-(1,15) = "then"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,16)-(1,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (1,26)-(1,29) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,7)-(3,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (3,12)-(3,15))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,12)-(3,15))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (3,12)-(3,15) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (3,22)-(3,25) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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..d4dfda6b2c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unless_mod.txt
@@ -0,0 +1,34 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── then_keyword_loc: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,0)-(1,3))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,0)-(1,3) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..e5f60a2cf7
--- /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))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (1,0)-(1,5) = "until"
+ │ ├── closing_loc: (1,18)-(1,21) = "end"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (1,13)-(1,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,13)-(1,17))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,13)-(1,17) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ UntilNode (location: (3,0)-(3,19))
+ ├── flags: ∅
+ ├── keyword_loc: (3,0)-(3,5) = "until"
+ ├── closing_loc: (3,16)-(3,19) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (3,6)-(3,9))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── statements:
+ @ StatementsNode (location: (3,11)-(3,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (3,11)-(3,15))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :meth
+ ├── message_loc: (3,11)-(3,15) = "meth"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/until_mod.txt b/test/prism/snapshots/whitequark/until_mod.txt
new file mode 100644
index 0000000000..0b7e2360b5
--- /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))
+ ├── flags: ∅
+ ├── keyword_loc: (1,5)-(1,10) = "until"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,11)-(1,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :meth
+ ├── message_loc: (1,0)-(1,4) = "meth"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/until_post.txt b/test/prism/snapshots/whitequark/until_post.txt
new file mode 100644
index 0000000000..5b282c363b
--- /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))
+ ├── flags: begin_modifier
+ ├── keyword_loc: (1,15)-(1,20) = "until"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,21)-(1,24))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,6)-(1,10) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,11)-(1,14) = "end"
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..a3c90f804c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_and_asgn.txt
@@ -0,0 +1,14 @@
+@ 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
+ │ └── value: 1
+ ├── 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..f20f612fa2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_op_asgn.txt
@@ -0,0 +1,57 @@
+@ 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"
+ │ ├── binary_operator_loc: (1,6)-(1,8) = "|="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ └── binary_operator: :|
+ ├── @ InstanceVariableOperatorWriteNode (location: (3,0)-(3,7))
+ │ ├── name: :@a
+ │ ├── name_loc: (3,0)-(3,2) = "@a"
+ │ ├── binary_operator_loc: (3,3)-(3,5) = "|="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,6)-(3,7))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ └── binary_operator: :|
+ ├── @ LocalVariableOperatorWriteNode (location: (5,0)-(5,6))
+ │ ├── name_loc: (5,0)-(5,1) = "a"
+ │ ├── binary_operator_loc: (5,2)-(5,4) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (5,5)-(5,6))
+ │ │ ├── flags: decimal
+ │ │ └── value: 1
+ │ ├── name: :a
+ │ ├── binary_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"
+ │ ├── binary_operator_loc: (7,13)-(7,15) = "|="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (7,16)-(7,18))
+ │ │ ├── flags: decimal
+ │ │ └── value: 10
+ │ └── binary_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..0bfa06d5b7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_op_asgn_cmd.txt
@@ -0,0 +1,28 @@
+@ 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"
+ ├── binary_operator_loc: (1,4)-(1,6) = "+="
+ ├── value:
+ │ @ CallNode (location: (1,7)-(1,12))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :m
+ │ ├── message_loc: (1,7)-(1,8) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,9)-(1,12))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,9)-(1,12))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── name: :foo
+ ├── binary_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..a0531d2c30
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_or_asgn.txt
@@ -0,0 +1,14 @@
+@ 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
+ │ └── value: 1
+ ├── 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..1c399b642d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/when_multi.txt
@@ -0,0 +1,50 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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: frozen
+ │ │ │ ├── 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: frozen
+ │ │ ├── opening_loc: (1,22)-(1,23) = "'"
+ │ │ ├── content_loc: (1,23)-(1,26) = "baz"
+ │ │ ├── closing_loc: (1,26)-(1,27) = "'"
+ │ │ └── unescaped: "baz"
+ │ ├── then_keyword_loc: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (1,29)-(1,32))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,29)-(1,32))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,29)-(1,32) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..351631714e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/when_splat.txt
@@ -0,0 +1,72 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ SplatNode (location: (1,18)-(1,22))
+ │ │ │ ├── operator_loc: (1,18)-(1,19) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (1,19)-(1,22))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (1,19)-(1,22) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── then_keyword_loc: ∅
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (1,24)-(1,27))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,24)-(1,27))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (1,24)-(1,27) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── @ 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))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,35)-(1,38) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── then_keyword_loc: ∅
+ │ └── 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..eb6f261ba4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/when_then.txt
@@ -0,0 +1,44 @@
+@ 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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: frozen
+ │ │ ├── opening_loc: (1,15)-(1,16) = "'"
+ │ │ ├── content_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── closing_loc: (1,19)-(1,20) = "'"
+ │ │ └── unescaped: "bar"
+ │ ├── then_keyword_loc: (1,21)-(1,25) = "then"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,26)-(1,29))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,26)-(1,29))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,26)-(1,29) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── 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..72f9971fe5
--- /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))
+ │ ├── flags: ∅
+ │ ├── keyword_loc: (1,0)-(1,5) = "while"
+ │ ├── closing_loc: (1,18)-(1,21) = "end"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── statements:
+ │ @ StatementsNode (location: (1,13)-(1,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,13)-(1,17))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,13)-(1,17) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── @ WhileNode (location: (3,0)-(3,19))
+ ├── flags: ∅
+ ├── keyword_loc: (3,0)-(3,5) = "while"
+ ├── closing_loc: (3,16)-(3,19) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (3,6)-(3,9))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── statements:
+ @ StatementsNode (location: (3,11)-(3,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (3,11)-(3,15))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :meth
+ ├── message_loc: (3,11)-(3,15) = "meth"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/while_mod.txt b/test/prism/snapshots/whitequark/while_mod.txt
new file mode 100644
index 0000000000..50a8f84d81
--- /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))
+ ├── flags: ∅
+ ├── keyword_loc: (1,5)-(1,10) = "while"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,11)-(1,14))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── flags: variable_call, ignore_visibility
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── name: :meth
+ ├── message_loc: (1,0)-(1,4) = "meth"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/while_post.txt b/test/prism/snapshots/whitequark/while_post.txt
new file mode 100644
index 0000000000..63c6c84a24
--- /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))
+ ├── flags: begin_modifier
+ ├── keyword_loc: (1,15)-(1,20) = "while"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,21)-(1,24))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :meth
+ │ ├── message_loc: (1,6)-(1,10) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,11)-(1,14) = "end"
diff --git a/test/prism/snapshots/whitequark/xstring_interp.txt b/test/prism/snapshots/whitequark/xstring_interp.txt
new file mode 100644
index 0000000000..0676ea9683
--- /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: frozen
+ │ │ ├── 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))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ └── @ StringNode (location: (1,10)-(1,13))
+ │ ├── flags: frozen
+ │ ├── 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..97084286d9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/xstring_plain.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ XStringNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── 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..2b37dd479f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/yield.txt
@@ -0,0 +1,51 @@
+@ 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))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,6)-(3,9))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :foo
+ │ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ └── 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))
+ │ ├── flags: ∅
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (7,6)-(7,9))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :foo
+ │ ├── message_loc: (7,6)-(7,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ └── 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..1a177026db
--- /dev/null
+++ b/test/prism/snapshots/xstring.txt
@@ -0,0 +1,67 @@
+@ ProgramNode (location: (1,0)-(13,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,4))
+ └── body: (length: 6)
+ ├── @ XStringNode (location: (1,0)-(1,7))
+ │ ├── flags: ∅
+ │ ├── 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: frozen
+ │ │ │ ├── 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))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── message_loc: (3,7)-(3,10) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ └── closing_loc: (3,10)-(3,11) = "}"
+ │ │ └── @ StringNode (location: (3,11)-(3,15))
+ │ │ ├── flags: frozen
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,11)-(3,15) = " baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " baz"
+ │ └── closing_loc: (3,15)-(3,16) = "`"
+ ├── @ XStringNode (location: (5,0)-(5,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,0)-(5,1) = "`"
+ │ ├── content_loc: (5,1)-(5,4) = "foo"
+ │ ├── closing_loc: (5,4)-(5,5) = "`"
+ │ └── unescaped: "foo"
+ ├── @ XStringNode (location: (7,0)-(9,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,3) = "%x{"
+ │ ├── content_loc: (7,3)-(9,0) = "\n foo\n"
+ │ ├── closing_loc: (9,0)-(9,1) = "}"
+ │ └── unescaped: "\n foo\n"
+ ├── @ XStringNode (location: (11,0)-(11,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,0)-(11,1) = "`"
+ │ ├── content_loc: (11,1)-(11,1) = ""
+ │ ├── closing_loc: (11,1)-(11,2) = "`"
+ │ └── unescaped: ""
+ └── @ XStringNode (location: (13,0)-(13,4))
+ ├── flags: ∅
+ ├── opening_loc: (13,0)-(13,3) = "%x{"
+ ├── content_loc: (13,3)-(13,3) = ""
+ ├── closing_loc: (13,3)-(13,4) = "}"
+ └── unescaped: ""
diff --git a/test/prism/snapshots/xstring_with_backslash.txt b/test/prism/snapshots/xstring_with_backslash.txt
new file mode 100644
index 0000000000..7e0fa1ab5f
--- /dev/null
+++ b/test/prism/snapshots/xstring_with_backslash.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ XStringNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "`"
+ ├── content_loc: (1,1)-(1,5) = "f\\oo"
+ ├── closing_loc: (1,5)-(1,6) = "`"
+ └── unescaped: "foo"
diff --git a/test/prism/snapshots/yield.txt b/test/prism/snapshots/yield.txt
new file mode 100644
index 0000000000..e9680c3b2d
--- /dev/null
+++ b/test/prism/snapshots/yield.txt
@@ -0,0 +1,103 @@
+@ ProgramNode (location: (1,0)-(7,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,28))
+ └── body: (length: 4)
+ ├── @ DefNode (location: (1,0)-(1,19))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,9)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ YieldNode (location: (1,9)-(1,14))
+ │ │ ├── keyword_loc: (1,9)-(1,14) = "yield"
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,16)-(1,19) = "end"
+ ├── @ DefNode (location: (3,0)-(3,21))
+ │ ├── name: :foo
+ │ ├── name_loc: (3,4)-(3,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,9)-(3,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ YieldNode (location: (3,9)-(3,16))
+ │ │ ├── keyword_loc: (3,9)-(3,14) = "yield"
+ │ │ ├── lparen_loc: (3,14)-(3,15) = "("
+ │ │ ├── arguments: ∅
+ │ │ └── rparen_loc: (3,15)-(3,16) = ")"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,18)-(3,21) = "end"
+ ├── @ DefNode (location: (5,0)-(5,22))
+ │ ├── name: :foo
+ │ ├── name_loc: (5,4)-(5,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,9)-(5,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ YieldNode (location: (5,9)-(5,17))
+ │ │ ├── keyword_loc: (5,9)-(5,14) = "yield"
+ │ │ ├── lparen_loc: (5,14)-(5,15) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,15)-(5,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,15)-(5,16))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ └── rparen_loc: (5,16)-(5,17) = ")"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,19)-(5,22) = "end"
+ └── @ DefNode (location: (7,0)-(7,28))
+ ├── name: :foo
+ ├── name_loc: (7,4)-(7,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (7,9)-(7,23))
+ │ └── body: (length: 1)
+ │ └── @ YieldNode (location: (7,9)-(7,23))
+ │ ├── keyword_loc: (7,9)-(7,14) = "yield"
+ │ ├── lparen_loc: (7,14)-(7,15) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,15)-(7,22))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (7,15)-(7,16))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 1
+ │ │ ├── @ IntegerNode (location: (7,18)-(7,19))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ └── @ IntegerNode (location: (7,21)-(7,22))
+ │ │ ├── flags: decimal
+ │ │ └── value: 3
+ │ └── rparen_loc: (7,22)-(7,23) = ")"
+ ├── locals: []
+ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (7,25)-(7,28) = "end"
diff --git a/test/prism/static_inspect_test.rb b/test/prism/static_inspect_test.rb
new file mode 100644
index 0000000000..8df2fd241e
--- /dev/null
+++ b/test/prism/static_inspect_test.rb
@@ -0,0 +1,90 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if Prism::BACKEND == :FFI
+
+module Prism
+ class StaticInspectTest < TestCase
+ def test_false
+ assert_equal "false", static_inspect("false")
+ end
+
+ def test_float
+ assert_equal "0.25", static_inspect("0.25")
+ assert_equal "5.125", static_inspect("5.125")
+
+ assert_equal "0.0", static_inspect("0.0")
+ assert_equal "-0.0", static_inspect("-0.0")
+
+ assert_equal "1.0e+100", static_inspect("1e100")
+ assert_equal "-1.0e+100", static_inspect("-1e100")
+
+ assert_equal "Infinity", static_inspect("1e1000")
+ assert_equal "-Infinity", static_inspect("-1e1000")
+ end
+
+ def test_imaginary
+ assert_equal "(0+1i)", static_inspect("1i")
+ assert_equal "(0-1i)", static_inspect("-1i")
+ end
+
+ def test_integer
+ assert_equal "1000", static_inspect("1_0_0_0")
+ assert_equal "10000000000000000000000000000", static_inspect("1_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0")
+ end
+
+ def test_nil
+ assert_equal "nil", static_inspect("nil")
+ end
+
+ def test_rational
+ assert_equal "(0/1)", static_inspect("0r")
+ assert_equal "(1/1)", static_inspect("1r")
+ assert_equal "(1/1)", static_inspect("1.0r")
+ assert_equal "(77777/1000)", static_inspect("77.777r")
+ end
+
+ def test_regular_expression
+ assert_equal "/.*/", static_inspect("/.*/")
+ assert_equal "/.*/i", static_inspect("/.*/i")
+ assert_equal "/.*/", static_inspect("/.*/u")
+ assert_equal "/.*/n", static_inspect("/.*/un")
+ end
+
+ def test_source_encoding
+ assert_equal "#<Encoding:UTF-8>", static_inspect("__ENCODING__")
+ assert_equal "#<Encoding:Windows-31J>", static_inspect("__ENCODING__", encoding: "Windows-31J")
+ end
+
+ def test_source_file
+ assert_equal __FILE__.inspect, static_inspect("__FILE__", filepath: __FILE__, frozen_string_literal: true)
+ end
+
+ def test_source_line
+ assert_equal "1", static_inspect("__LINE__")
+ assert_equal "5", static_inspect("__LINE__", line: 5)
+ end
+
+ def test_string
+ assert_equal "\"\"", static_inspect('""', frozen_string_literal: true)
+ assert_equal "\"Hello, World!\"", static_inspect('"Hello, World!"', frozen_string_literal: true)
+ assert_equal "\"\\a\"", static_inspect("\"\\a\"", frozen_string_literal: true)
+ end
+
+ def test_symbol
+ assert_equal ":foo", static_inspect(":foo")
+ assert_equal ":foo", static_inspect("%s[foo]")
+ end
+
+ def test_true
+ assert_equal "true", static_inspect("true")
+ end
+
+ private
+
+ def static_inspect(source, **options)
+ Debug.static_inspect(source, **options)
+ end
+ end
+end
diff --git a/test/prism/static_literals_test.rb b/test/prism/static_literals_test.rb
new file mode 100644
index 0000000000..31c802bf90
--- /dev/null
+++ b/test/prism/static_literals_test.rb
@@ -0,0 +1,92 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class StaticLiteralsTest < TestCase
+ def test_static_literals
+ assert_warning("1")
+ assert_warning("0xA", "10", "10")
+ assert_warning("0o10", "8", "8")
+ assert_warning("0b10", "2", "2")
+ assert_warning("1_000", "1000", "1000")
+ assert_warning((2**32).to_s(10), "0x#{(2**32).to_s(16)}", (2**32).to_s(10))
+ assert_warning((2**64).to_s(10), "0x#{(2**64).to_s(16)}", (2**64).to_s(10))
+
+ refute_warning("1", "-1")
+ refute_warning((2**32).to_s(10), "-0x#{(2**32).to_s(16)}")
+ refute_warning((2**64).to_s(10), "-0x#{(2**64).to_s(16)}")
+
+ assert_warning("__LINE__", "2", "2")
+ assert_warning("3", "__LINE__", "3")
+
+ assert_warning("1.0")
+ assert_warning("1e2", "100.0", "100.0")
+
+ assert_warning("1r", "1r", "(1/1)")
+ assert_warning("1.0r", "1.0r", "(1/1)")
+
+ assert_warning("1i", "1i", "(0+1i)")
+ assert_warning("1.0i", "1.0i", "(0+1.0i)")
+
+ assert_warning("1ri", "1ri", "(0+(1/1)*i)")
+ assert_warning("1.0ri", "1.0ri", "(0+(1/1)*i)")
+
+ assert_warning("__FILE__", "\"#{__FILE__}\"", __FILE__)
+ assert_warning("\"#{__FILE__}\"")
+ assert_warning("\"foo\"")
+
+ assert_warning("/foo/")
+
+ refute_warning("/foo/", "/foo/i")
+
+ assert_warning(":foo")
+ assert_warning("%s[foo]", ":foo", ":foo")
+
+ assert_warning("true")
+ assert_warning("false")
+ assert_warning("nil")
+ assert_warning("__ENCODING__", "__ENCODING__", "#<Encoding:UTF-8>")
+ end
+
+ private
+
+ class NullWarning
+ def message
+ ""
+ end
+ end
+
+ def parse_warnings(left, right)
+ warnings = []
+
+ warnings << (Prism.parse(<<~RUBY, filepath: __FILE__).warnings.first || NullWarning.new)
+ {
+ #{left} => 1,
+ #{right} => 2
+ }
+ RUBY
+
+ warnings << (Prism.parse(<<~RUBY, filepath: __FILE__).warnings.first || NullWarning.new)
+ case foo
+ when #{left}
+ when #{right}
+ end
+ RUBY
+
+ warnings
+ end
+
+ def assert_warning(left, right = left, message = left)
+ hash_keys, when_clauses = parse_warnings(left, right)
+
+ assert_include hash_keys.message, message
+ assert_include hash_keys.message, "line 3"
+ assert_include when_clauses.message, "line 3"
+ end
+
+ def refute_warning(left, right)
+ assert_empty parse_warnings(left, right).grep_v(NullWarning)
+ end
+ end
+end
diff --git a/test/prism/test_helper.rb b/test/prism/test_helper.rb
new file mode 100644
index 0000000000..77af7e7b45
--- /dev/null
+++ b/test/prism/test_helper.rb
@@ -0,0 +1,126 @@
+# frozen_string_literal: true
+
+require "prism"
+require "ripper"
+require "pp"
+require "test/unit"
+require "tempfile"
+
+puts "Using prism backend: #{Prism::BACKEND}" if ENV["PRISM_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 Prism
+ class TestCase < ::Test::Unit::TestCase
+ private
+
+ if RUBY_ENGINE == "ruby"
+ # Check that the given source is valid syntax by compiling it with RubyVM.
+ def check_syntax(source)
+ $VERBOSE, previous = nil, $VERBOSE
+
+ begin
+ RubyVM::InstructionSequence.compile(source)
+ ensure
+ $VERBOSE = previous
+ end
+ end
+
+ # Assert that the given source is valid Ruby syntax by attempting to
+ # compile it, and then implicitly checking that it does not raise an
+ # syntax errors.
+ def assert_valid_syntax(source)
+ check_syntax(source)
+ end
+
+ # Refute that the given source is invalid Ruby syntax by attempting to
+ # compile it and asserting that it raises a SyntaxError.
+ def refute_valid_syntax(source)
+ assert_raise(SyntaxError) { check_syntax(source) }
+ end
+ else
+ def assert_valid_syntax(source)
+ end
+
+ def refute_valid_syntax(source)
+ end
+ end
+
+ 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
+ expected_deconstruct = expected.deconstruct_keys(nil)
+ actual_deconstruct = actual.deconstruct_keys(nil)
+ assert_equal expected_deconstruct.keys, actual_deconstruct.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.
+ expected_filepath = expected_deconstruct.delete(:filepath)
+ actual_filepath = actual_deconstruct.delete(:filepath)
+
+ assert_equal expected_deconstruct, actual_deconstruct
+ assert_equal File.basename(expected_filepath), File.basename(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..3f78a59b11
--- /dev/null
+++ b/test/prism/unescape_test.rb
@@ -0,0 +1,235 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if RUBY_VERSION < "3.1.0" || Prism::BACKEND == :FFI
+
+module Prism
+ class UnescapeTest < TestCase
+ module Context
+ class Base
+ attr_reader :left, :right
+
+ def initialize(left, right)
+ @left = left
+ @right = right
+ end
+
+ def name
+ "#{left}#{right}".delete("\n")
+ end
+
+ private
+
+ def code(escape)
+ "#{left}\\#{escape}#{right}".b
+ end
+
+ def ruby(escape)
+ previous, $VERBOSE = $VERBOSE, nil
+
+ begin
+ yield eval(code(escape))
+ rescue SyntaxError
+ :error
+ ensure
+ $VERBOSE = previous
+ end
+ end
+
+ def prism(escape)
+ result = Prism.parse(code(escape), encoding: "binary")
+
+ if result.success?
+ yield result.value.statements.body.first
+ else
+ :error
+ end
+ end
+
+ def `(command)
+ command
+ end
+ end
+
+ class List < Base
+ def ruby_result(escape)
+ ruby(escape) { |value| value.first.to_s }
+ end
+
+ def prism_result(escape)
+ prism(escape) { |node| node.elements.first.unescaped }
+ end
+ end
+
+ class Symbol < Base
+ def ruby_result(escape)
+ ruby(escape, &:to_s)
+ end
+
+ def prism_result(escape)
+ prism(escape, &:unescaped)
+ end
+ end
+
+ class String < Base
+ def ruby_result(escape)
+ ruby(escape, &:itself)
+ end
+
+ def prism_result(escape)
+ prism(escape, &:unescaped)
+ end
+ end
+
+ class Heredoc < Base
+ def ruby_result(escape)
+ ruby(escape, &:itself)
+ end
+
+ def prism_result(escape)
+ prism(escape) do |node|
+ case node.type
+ when :interpolated_string_node, :interpolated_x_string_node
+ node.parts.flat_map(&:unescaped).join
+ else
+ node.unescaped
+ end
+ end
+ end
+ end
+
+ class RegExp < Base
+ def ruby_result(escape)
+ ruby(escape, &:source)
+ end
+
+ def prism_result(escape)
+ prism(escape, &:unescaped)
+ end
+ end
+ end
+
+ def test_char; assert_context(Context::String.new("?", "")); end
+ def test_sqte; assert_context(Context::String.new("'", "'")); end
+ def test_dqte; assert_context(Context::String.new("\"", "\"")); end
+ def test_lwrq; assert_context(Context::String.new("%q[", "]")); end
+ def test_uprq; assert_context(Context::String.new("%Q[", "]")); end
+ def test_dstr; assert_context(Context::String.new("%[", "]")); end
+ def test_xstr; assert_context(Context::String.new("`", "`")); end
+ def test_lwrx; assert_context(Context::String.new("%x[", "]")); end
+ def test_h0_1; assert_context(Context::String.new("<<H\n", "\nH")); end
+ def test_h0_2; assert_context(Context::String.new("<<'H'\n", "\nH")); end
+ def test_h0_3; assert_context(Context::String.new("<<\"H\"\n", "\nH")); end
+ def test_h0_4; assert_context(Context::String.new("<<`H`\n", "\nH")); end
+ def test_hd_1; assert_context(Context::String.new("<<-H\n", "\nH")); end
+ def test_hd_2; assert_context(Context::String.new("<<-'H'\n", "\nH")); end
+ def test_hd_3; assert_context(Context::String.new("<<-\"H\"\n", "\nH")); end
+ def test_hd_4; assert_context(Context::String.new("<<-`H`\n", "\nH")); end
+ def test_ht_1; assert_context(Context::Heredoc.new("<<~H\n", "\nH")); end
+ def test_ht_2; assert_context(Context::Heredoc.new("<<~'H'\n", "\nH")); end
+ def test_ht_3; assert_context(Context::Heredoc.new("<<~\"H\"\n", "\nH")); end
+ def test_ht_4; assert_context(Context::Heredoc.new("<<~`H`\n", "\nH")); end
+ def test_pw_1; assert_context(Context::List.new("%w[", "]")); end
+ def test_pw_2; assert_context(Context::List.new("%w<", ">")); end
+ def test_uprw; assert_context(Context::List.new("%W[", "]")); end
+ def test_lwri; assert_context(Context::List.new("%i[", "]")); end
+ def test_upri; assert_context(Context::List.new("%I[", "]")); end
+ def test_lwrs; assert_context(Context::Symbol.new("%s[", "]")); end
+ def test_sym1; assert_context(Context::Symbol.new(":'", "'")); end
+ def test_sym2; assert_context(Context::Symbol.new(":\"", "\"")); end
+ def test_reg1; assert_context(Context::RegExp.new("/", "/")); end
+ def test_reg2; assert_context(Context::RegExp.new("%r[", "]")); end
+ def test_reg3; assert_context(Context::RegExp.new("%r<", ">")); end
+ def test_reg4; assert_context(Context::RegExp.new("%r{", "}")); end
+ def test_reg5; assert_context(Context::RegExp.new("%r(", ")")); end
+ def test_reg6; assert_context(Context::RegExp.new("%r|", "|")); end
+
+ private
+
+ def assert_context(context)
+ octal = [*("0".."7")]
+ hex = [*("a".."f"), *("A".."F"), *("0".."9")]
+
+ (0...256).each do |ord|
+ # I think this might be a bug in Ruby.
+ next if context.name == "?" && ord == 0xFF
+
+ # We don't currently support scanning for the number of capture groups
+ # to validate backreferences so these are all going to fail.
+ next if (context.name == "//" || context.name.start_with?("%r")) && ord.chr.start_with?(/\d/)
+
+ # \a \b \c ...
+ assert_unescape(context, ord.chr)
+ end
+
+ # \\r\n
+ assert_unescape(context, "\r\n")
+
+ # We don't currently support scanning for the number of capture groups to
+ # validate backreferences so these are all going to fail.
+ if context.name != "//" && !context.name.start_with?("%r")
+ # \00 \01 \02 ...
+ octal.product(octal).each { |digits| assert_unescape(context, digits.join) }
+
+ # \000 \001 \002 ...
+ octal.product(octal).product(octal).each { |digits| assert_unescape(context, digits.join) }
+ end
+
+ # \x0 \x1 \x2 ...
+ hex.each { |digit| assert_unescape(context, "x#{digit}") }
+
+ # \x00 \x01 \x02 ...
+ hex.product(hex).each { |digits| assert_unescape(context, "x#{digits.join}") }
+
+ # \u0000 \u0001 \u0002 ...
+ assert_unescape(context, "u#{["5"].concat(hex.sample(3)).join}")
+
+ # The behavior of whitespace in the middle of these escape sequences
+ # changed in Ruby 3.3.0, so we only want to test against latest.
+ if RUBY_VERSION >= "3.3.0"
+ # \u{00 00} ...
+ assert_unescape(context, "u{00#{["5"].concat(hex.sample(3)).join} \t\v 00#{["5"].concat(hex.sample(3)).join}}")
+ end
+
+ (0...128).each do |ord|
+ chr = ord.chr
+ next if chr == "\\" || !chr.match?(/[[:print:]]/)
+
+ # \C-a \C-b \C-c ...
+ assert_unescape(context, "C-#{chr}")
+
+ # \ca \cb \cc ...
+ assert_unescape(context, "c#{chr}")
+
+ # \M-a \M-b \M-c ...
+ assert_unescape(context, "M-#{chr}")
+
+ # \M-\C-a \M-\C-b \M-\C-c ...
+ assert_unescape(context, "M-\\C-#{chr}")
+
+ # \M-\ca \M-\cb \M-\cc ...
+ assert_unescape(context, "M-\\c#{chr}")
+
+ # \c\M-a \c\M-b \c\M-c ...
+ assert_unescape(context, "c\\M-#{chr}")
+ end
+ end
+
+ def assert_unescape(context, escape)
+ expected = context.ruby_result(escape)
+ actual = context.prism_result(escape)
+
+ message = -> do
+ "Expected #{context.name} to unescape #{escape.inspect} to " \
+ "#{expected.inspect}, but got #{actual.inspect}"
+ end
+
+ if expected == :error || actual == :error
+ assert_equal expected, actual, message
+ else
+ assert_equal expected.bytes, actual.bytes, message
+ end
+ end
+ end
+end
diff --git a/test/prism/version_test.rb b/test/prism/version_test.rb
new file mode 100644
index 0000000000..29ee6b224c
--- /dev/null
+++ b/test/prism/version_test.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class VersionTest < TestCase
+ def test_version_is_set
+ refute_nil VERSION
+ end
+ end
+end
diff --git a/test/prism/warnings_test.rb b/test/prism/warnings_test.rb
new file mode 100644
index 0000000000..b138a3cb43
--- /dev/null
+++ b/test/prism/warnings_test.rb
@@ -0,0 +1,246 @@
+# frozen_string_literal: true
+
+return if RUBY_VERSION < "3.1"
+
+require_relative "test_helper"
+require "stringio"
+
+module Prism
+ class WarningsTest < TestCase
+ def test_ambiguous_uminus
+ assert_warning("a -b", "ambiguous first argument")
+ end
+
+ def test_ambiguous_uplus
+ assert_warning("a +b", "ambiguous first argument")
+ end
+
+ def test_ambiguous_ustar
+ assert_warning("a *b", "argument prefix")
+ end
+
+ def test_ambiguous_regexp
+ assert_warning("a /b/", "wrap regexp in parentheses")
+ end
+
+ def test_equal_in_conditional
+ assert_warning("if a = 1; end; a = a", "should be ==")
+ end
+
+ def test_dot_dot_dot_eol
+ assert_warning("_ = foo...", "... at EOL")
+ assert_warning("def foo(...) = bar ...", "... at EOL")
+
+ assert_warning("_ = foo... #", "... at EOL")
+ assert_warning("_ = foo... \t\v\f\n", "... at EOL")
+
+ refute_warning("p foo...bar")
+ refute_warning("p foo... bar")
+ end
+
+ def test_END_in_method
+ assert_warning("def foo; END {}; end", "END in method")
+ end
+
+ def test_duplicated_hash_key
+ assert_warning("{ a: 1, a: 2 }", "duplicated and overwritten")
+ assert_warning("{ a: 1, **{ a: 2 } }", "duplicated and overwritten")
+ end
+
+ def test_duplicated_when_clause
+ assert_warning("case 1; when 1, 1; end", "clause with line")
+ end
+
+ def test_float_out_of_range
+ assert_warning("_ = 1.0e100000", "out of range")
+ end
+
+ def test_integer_in_flip_flop
+ assert_warning("1 if 2..foo", "integer")
+ end
+
+ def test_keyword_eol
+ assert_warning("if\ntrue; end", "end of line")
+ assert_warning("if true\nelsif\nfalse; end", "end of line")
+ end
+
+ def test_shareable_constant_value
+ assert_warning("foo # shareable_constant_value: none", "ignored")
+ assert_warning("\v # shareable_constant_value: none", "ignored")
+
+ refute_warning("# shareable_constant_value: none")
+ refute_warning(" # shareable_constant_value: none")
+ refute_warning("\t\t# shareable_constant_value: none")
+ end
+
+ def test_string_in_predicate
+ assert_warning("if 'foo'; end", "string")
+ assert_warning("if \"\#{foo}\"; end", "string")
+ assert_warning("if __FILE__; end", "string")
+ end
+
+ def test_symbol_in_predicate
+ assert_warning("if :foo; end", "symbol")
+ assert_warning("if :\"\#{foo}\"; end", "symbol")
+ end
+
+ def test_literal_in_predicate
+ assert_warning("if __LINE__; end", "literal")
+ assert_warning("if __ENCODING__; end", "literal")
+ assert_warning("if 1; end", "literal")
+ assert_warning("if 1.0; end", "literal")
+ assert_warning("if 1r; end", "literal")
+ assert_warning("if 1i; end", "literal")
+ end
+
+ def test_regexp_in_predicate
+ assert_warning("if /foo/; end", "regex")
+ assert_warning("if /foo\#{bar}/; end", "regex")
+ end
+
+ def test_unused_local_variables
+ assert_warning("foo = 1", "unused")
+
+ refute_warning("foo = 1", compare: false, command_line: "e")
+ refute_warning("foo = 1", compare: false, scopes: [[]])
+
+ assert_warning("def foo; bar = 1; end", "unused")
+ assert_warning("def foo; bar, = 1; end", "unused")
+
+ refute_warning("def foo; bar &&= 1; end")
+ refute_warning("def foo; bar ||= 1; end")
+ refute_warning("def foo; bar += 1; end")
+
+ refute_warning("def foo; bar = bar; end")
+ refute_warning("def foo; bar = bar = 1; end")
+ refute_warning("def foo; bar = (bar = 1); end")
+ refute_warning("def foo; bar = begin; bar = 1; end; end")
+ refute_warning("def foo; bar = (qux; bar = 1); end")
+ refute_warning("def foo; bar, = bar = 1; end")
+ refute_warning("def foo; bar, = 1, bar = 1; end")
+
+ refute_warning("def foo(bar); end")
+ refute_warning("def foo(bar = 1); end")
+ refute_warning("def foo((bar)); end")
+ refute_warning("def foo(*bar); end")
+ refute_warning("def foo(*, bar); end")
+ refute_warning("def foo(*, (bar)); end")
+ refute_warning("def foo(bar:); end")
+ refute_warning("def foo(**bar); end")
+ refute_warning("def foo(&bar); end")
+ refute_warning("->(bar) {}")
+ refute_warning("->(; bar) {}", compare: false)
+
+ refute_warning("def foo; bar = 1; tap { bar }; end")
+ refute_warning("def foo; bar = 1; tap { baz = bar; baz }; end")
+ end
+
+ def test_void_statements
+ assert_warning("foo = 1; foo", "a variable in void")
+ assert_warning("@foo", "a variable in void")
+ assert_warning("@@foo", "a variable in void")
+ assert_warning("$foo", "a variable in void")
+ assert_warning("$+", "a variable in void")
+ assert_warning("$1", "a variable in void")
+
+ assert_warning("self", "self in void")
+ assert_warning("nil", "nil in void")
+ assert_warning("true", "true in void")
+ assert_warning("false", "false in void")
+
+ assert_warning("1", "literal in void")
+ assert_warning("1.0", "literal in void")
+ assert_warning("1r", "literal in void")
+ assert_warning("1i", "literal in void")
+ assert_warning(":foo", "literal in void")
+ assert_warning("\"foo\"", "literal in void")
+ assert_warning("\"foo\#{1}\"", "literal in void")
+ assert_warning("/foo/", "literal in void")
+ assert_warning("/foo\#{1}/", "literal in void")
+
+ assert_warning("Foo", "constant in void")
+ assert_warning("::Foo", ":: in void")
+ assert_warning("Foo::Bar", ":: in void")
+
+ assert_warning("1..2", ".. in void")
+ assert_warning("1..", ".. in void")
+ assert_warning("..2", ".. in void")
+ assert_warning("1...2", "... in void")
+ assert_warning("1...;", "... in void")
+ assert_warning("...2", "... in void")
+
+ assert_warning("defined?(foo)", "defined? in void")
+
+ assert_warning("1 + 1", "+ in void")
+ assert_warning("1 - 1", "- in void")
+ assert_warning("1 * 1", "* in void")
+ assert_warning("1 / 1", "/ in void")
+ assert_warning("1 % 1", "% in void")
+ assert_warning("1 | 1", "| in void")
+ assert_warning("1 ^ 1", "^ in void")
+ assert_warning("1 & 1", "& in void")
+ assert_warning("1 > 1", "> in void")
+ assert_warning("1 < 1", "< in void")
+
+ assert_warning("1 ** 1", "** in void")
+ assert_warning("1 <= 1", "<= in void")
+ assert_warning("1 >= 1", ">= in void")
+ assert_warning("1 != 1", "!= in void")
+ assert_warning("1 == 1", "== in void")
+ assert_warning("1 <=> 1", "<=> in void")
+
+ assert_warning("+foo", "+@ in void")
+ assert_warning("-foo", "-@ in void")
+
+ assert_warning("def foo; @bar; @baz; end", "variable in void")
+ refute_warning("def foo; @bar; end")
+ refute_warning("@foo", compare: false, scopes: [[]])
+ end
+
+ def test_unreachable_statement
+ assert_warning("begin; rescue; retry; foo; end", "statement not reached")
+
+ assert_warning("return; foo", "statement not reached")
+
+ assert_warning("tap { break; foo }", "statement not reached")
+ assert_warning("tap { break 1; foo }", "statement not reached")
+
+ assert_warning("tap { next; foo }", "statement not reached")
+ assert_warning("tap { next 1; foo }", "statement not reached")
+
+ assert_warning("tap { redo; foo }", "statement not reached")
+ end
+
+ private
+
+ def assert_warning(source, message)
+ warnings = Prism.parse(source).warnings
+
+ assert_equal 1, warnings.length
+ assert_include warnings.first.message, message
+
+ if defined?(RubyVM::AbstractSyntaxTree)
+ assert_include capture_warning { RubyVM::AbstractSyntaxTree.parse(source) }, message
+ end
+ end
+
+ def refute_warning(source, compare: true, **options)
+ assert_empty Prism.parse(source, **options).warnings
+
+ if compare && defined?(RubyVM::AbstractSyntaxTree)
+ assert_empty capture_warning { RubyVM::AbstractSyntaxTree.parse(source) }
+ end
+ end
+
+ def capture_warning
+ stderr, $stderr, verbose, $VERBOSE = $stderr, StringIO.new, $VERBOSE, true
+
+ begin
+ yield
+ $stderr.string
+ ensure
+ $stderr, $VERBOSE = stderr, verbose
+ end
+ end
+ end
+end