summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/whitequark
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/snapshots/whitequark')
-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
306 files changed, 22310 insertions, 0 deletions
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: ∅