summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb6
-rw-r--r--test/-ext-/integer/test_my_integer.rb34
-rw-r--r--test/-ext-/required.rb10
-rw-r--r--test/-ext-/string/test_capacity.rb2
-rw-r--r--test/-ext-/string/test_chilled.rb19
-rw-r--r--test/-ext-/string/test_set_len.rb18
-rw-r--r--test/-ext-/test_ensure_and_callcc.rb40
-rw-r--r--test/-ext-/thread/test_instrumentation_api.rb4
-rw-r--r--test/.excludes-parsey/TestBugReporter.rb1
-rw-r--r--test/.excludes-parsey/TestM17N.rb1
-rw-r--r--test/.excludes-parsey/TestMixedUnicodeEscape.rb1
-rw-r--r--test/.excludes-parsey/TestRubyLiteral.rb1
-rw-r--r--test/.excludes-parsey/TestRubyOptions.rb10
-rw-r--r--test/.excludes-prism/TestAssignment.rb1
-rw-r--r--test/.excludes-prism/TestAssignmentGen.rb1
-rw-r--r--test/.excludes-prism/TestCoverage.rb1
-rw-r--r--test/.excludes-prism/TestISeq.rb4
-rw-r--r--test/.excludes-prism/TestM17N.rb2
-rw-r--r--test/.excludes-prism/TestMixedUnicodeEscape.rb1
-rw-r--r--test/.excludes-prism/TestParse.rb10
-rw-r--r--test/.excludes-prism/TestRegexp.rb2
-rw-r--r--test/.excludes-prism/TestRequire.rb1
-rw-r--r--test/.excludes-prism/TestRubyLiteral.rb1
-rw-r--r--test/.excludes-prism/TestSyntax.rb12
-rw-r--r--test/error_highlight/test_error_highlight.rb8
-rw-r--r--test/fiber/test_io.rb41
-rw-r--r--test/fiddle/test_function.rb6
-rw-r--r--test/fileutils/test_fileutils.rb16
-rw-r--r--test/io/console/test_ractor.rb34
-rw-r--r--test/irb/command/test_cd.rb65
-rw-r--r--test/irb/command/test_custom_command.rb45
-rw-r--r--test/irb/command/test_disable_irb.rb28
-rw-r--r--test/irb/helper.rb13
-rw-r--r--test/irb/test_command.rb43
-rw-r--r--test/irb/test_completion.rb10
-rw-r--r--test/irb/test_context.rb1
-rw-r--r--test/irb/test_history.rb9
-rw-r--r--test/irb/test_init.rb10
-rw-r--r--test/irb/test_input_method.rb26
-rw-r--r--test/irb/test_irb.rb27
-rw-r--r--test/irb/test_nesting_parser.rb3
-rw-r--r--test/irb/test_type_completor.rb5
-rw-r--r--test/irb/test_workspace.rb1
-rw-r--r--test/irb/yamatanooroti/test_rendering.rb22
-rwxr-xr-xtest/json/json_generator_test.rb2
-rw-r--r--test/lib/parser_support.rb20
-rw-r--r--test/logger/test_logger.rb9
-rw-r--r--test/logger/test_logperiod.rb83
-rw-r--r--test/mkmf/test_flags.rb4
-rw-r--r--test/net/http/test_http.rb46
-rw-r--r--test/net/http/test_https.rb69
-rw-r--r--test/net/http/test_https_proxy.rb49
-rw-r--r--test/net/http/utils.rb357
-rw-r--r--test/objspace/test_objspace.rb43
-rw-r--r--test/open-uri/test_ftp.rb216
-rw-r--r--test/open-uri/test_open-uri.rb600
-rw-r--r--test/open-uri/test_proxy.rb174
-rw-r--r--test/open-uri/test_ssl.rb435
-rw-r--r--test/open-uri/utils.rb738
-rw-r--r--test/openssl/test_ossl.rb8
-rw-r--r--test/openssl/test_pair.rb21
-rw-r--r--test/openssl/test_pkcs12.rb31
-rw-r--r--test/openssl/test_pkey.rb32
-rw-r--r--test/openssl/test_pkey_dsa.rb23
-rw-r--r--test/openssl/test_pkey_rsa.rb247
-rw-r--r--test/openssl/test_provider.rb25
-rw-r--r--test/openssl/test_ssl.rb13
-rw-r--r--test/openssl/test_x509attr.rb4
-rw-r--r--test/openssl/test_x509cert.rb32
-rw-r--r--test/openssl/ut_eof.rb4
-rw-r--r--test/optparse/test_acceptable.rb2
-rw-r--r--test/optparse/test_optparse.rb13
-rw-r--r--test/prism/api/command_line_test.rb111
-rw-r--r--test/prism/api/dump_test.rb56
-rw-r--r--test/prism/api/lex_test.rb23
-rw-r--r--test/prism/api/parse_comments_test.rb33
-rw-r--r--test/prism/api/parse_stream_test.rb81
-rw-r--r--test/prism/api/parse_success_test.rb16
-rw-r--r--test/prism/api/parse_test.rb117
-rw-r--r--test/prism/attribute_write_test.rb60
-rw-r--r--test/prism/bom_test.rb2
-rw-r--r--test/prism/command_line_test.rb111
-rw-r--r--test/prism/comments_test.rb138
-rw-r--r--test/prism/compiler_test.rb31
-rw-r--r--test/prism/constant_path_node_test.rb91
-rw-r--r--test/prism/desugar_compiler_test.rb80
-rw-r--r--test/prism/dispatcher_test.rb46
-rw-r--r--test/prism/encoding/encodings_test.rb101
-rw-r--r--test/prism/encoding/regular_expression_encoding_test.rb131
-rw-r--r--test/prism/encoding/string_encoding_test.rb136
-rw-r--r--test/prism/encoding/symbol_encoding_test.rb108
-rw-r--r--test/prism/encoding_test.rb577
-rw-r--r--test/prism/errors/1_2_3.txt11
-rw-r--r--test/prism/errors/aliasing_global_variable_with_global_number_variable.txt3
-rw-r--r--test/prism/errors/aliasing_global_variable_with_non_global_variable.txt3
-rw-r--r--test/prism/errors/aliasing_non_global_variable_with_global_variable.txt3
-rw-r--r--test/prism/errors/alnum_delimiters.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_2.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_3.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_4.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_5.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_6.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_7.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_8.txt3
-rw-r--r--test/prism/errors/alnum_delimiters_9.txt3
-rw-r--r--test/prism/errors/argument_after_ellipsis.txt3
-rw-r--r--test/prism/errors/argument_forwarding_only_effects_its_own_internals.txt3
-rw-r--r--test/prism/errors/argument_forwarding_when_parent_is_not_forwarding.txt3
-rw-r--r--test/prism/errors/arguments_after_block.txt3
-rw-r--r--test/prism/errors/arguments_binding_power_for_and.txt5
-rw-r--r--test/prism/errors/assign_to_numbered_parameter.txt11
-rw-r--r--test/prism/errors/bad_arguments.txt6
-rw-r--r--test/prism/errors/begin_at_toplevel.txt3
-rw-r--r--test/prism/errors/binary_range_with_left_unary_range.txt7
-rw-r--r--test/prism/errors/block_arg_and_block.txt3
-rw-r--r--test/prism/errors/block_beginning_with_brace_and_ending_with_end.txt6
-rw-r--r--test/prism/errors/break_1.txt4
-rw-r--r--test/prism/errors/break_1_2_3.txt8
-rw-r--r--test/prism/errors/call_with_block_and_write.txt4
-rw-r--r--test/prism/errors/call_with_block_operator_write.txt4
-rw-r--r--test/prism/errors/call_with_block_or_write.txt4
-rw-r--r--test/prism/errors/cannot_assign_to_a_reserved_numbered_parameter.txt14
-rw-r--r--test/prism/errors/case_without_clauses.txt4
-rw-r--r--test/prism/errors/case_without_when_clauses_errors_on_else_clause.txt5
-rw-r--r--test/prism/errors/check_value_expression.txt20
-rw-r--r--test/prism/errors/class_definition_in_method_body.txt3
-rw-r--r--test/prism/errors/class_definition_in_method_defs.txt7
-rw-r--r--test/prism/errors/class_name.txt3
-rw-r--r--test/prism/errors/command_call_in.txt7
-rw-r--r--test/prism/errors/command_calls.txt3
-rw-r--r--test/prism/errors/command_calls_10.txt3
-rw-r--r--test/prism/errors/command_calls_11.txt3
-rw-r--r--test/prism/errors/command_calls_12.txt3
-rw-r--r--test/prism/errors/command_calls_13.txt3
-rw-r--r--test/prism/errors/command_calls_14.txt3
-rw-r--r--test/prism/errors/command_calls_15.txt3
-rw-r--r--test/prism/errors/command_calls_16.txt3
-rw-r--r--test/prism/errors/command_calls_17.txt5
-rw-r--r--test/prism/errors/command_calls_18.txt3
-rw-r--r--test/prism/errors/command_calls_19.txt3
-rw-r--r--test/prism/errors/command_calls_2.txt6
-rw-r--r--test/prism/errors/command_calls_20.txt3
-rw-r--r--test/prism/errors/command_calls_21.txt5
-rw-r--r--test/prism/errors/command_calls_22.txt3
-rw-r--r--test/prism/errors/command_calls_23.txt3
-rw-r--r--test/prism/errors/command_calls_24.txt5
-rw-r--r--test/prism/errors/command_calls_25.txt8
-rw-r--r--test/prism/errors/command_calls_26.txt3
-rw-r--r--test/prism/errors/command_calls_27.txt3
-rw-r--r--test/prism/errors/command_calls_28.txt3
-rw-r--r--test/prism/errors/command_calls_29.txt3
-rw-r--r--test/prism/errors/command_calls_3.txt3
-rw-r--r--test/prism/errors/command_calls_30.txt3
-rw-r--r--test/prism/errors/command_calls_4.txt3
-rw-r--r--test/prism/errors/command_calls_5.txt3
-rw-r--r--test/prism/errors/command_calls_6.txt6
-rw-r--r--test/prism/errors/command_calls_7.txt6
-rw-r--r--test/prism/errors/command_calls_8.txt6
-rw-r--r--test/prism/errors/command_calls_9.txt6
-rw-r--r--test/prism/errors/conditional_predicate_closed.txt6
-rw-r--r--test/prism/errors/constant_assignment_in_method.txt3
-rw-r--r--test/prism/errors/constant_path_with_invalid_token_after.txt4
-rw-r--r--test/prism/errors/content_after_unterminated_heredoc.txt4
-rw-r--r--test/prism/errors/cr_without_lf_in_percent_expression.txt3
-rw-r--r--test/prism/errors/def_with_empty_expression_receiver.txt3
-rw-r--r--test/prism/errors/def_with_expression_receiver_and_no_identifier.txt4
-rw-r--r--test/prism/errors/def_with_multiple_statements_receiver.txt10
-rw-r--r--test/prism/errors/defining_numbered_parameter.txt3
-rw-r--r--test/prism/errors/defining_numbered_parameter_2.txt3
-rw-r--r--test/prism/errors/do_not_allow_characters_other_than_0_9_a_f_and_A_F_in_u_Unicode_character_notation.txt4
-rw-r--r--test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt3
-rw-r--r--test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt3
-rw-r--r--test/prism/errors/do_not_allow_more_than_6_hexadecimal_digits_in_u_Unicode_character_notation.txt3
-rw-r--r--test/prism/errors/do_not_allow_multiple_codepoints_in_a_single_character_literal.txt3
-rw-r--r--test/prism/errors/do_not_allow_trailing_commas_in_lambda_parameters.txt3
-rw-r--r--test/prism/errors/do_not_allow_trailing_commas_in_method_parameters.txt3
-rw-r--r--test/prism/errors/dont_allow_return_inside_class_body.txt3
-rw-r--r--test/prism/errors/dont_allow_return_inside_module_body.txt3
-rw-r--r--test/prism/errors/dont_allow_return_inside_sclass_body.txt3
-rw-r--r--test/prism/errors/dont_allow_setting_to_back_and_nth_reference.txt7
-rw-r--r--test/prism/errors/double_arguments_forwarding.txt4
-rw-r--r--test/prism/errors/double_scope_numbered_parameters.txt3
-rw-r--r--test/prism/errors/double_splat_followed_by_splat_argument.txt3
-rw-r--r--test/prism/errors/duplicate_pattern_capture.txt17
-rw-r--r--test/prism/errors/duplicate_pattern_hash_key.txt4
-rw-r--r--test/prism/errors/duplicate_pattern_hash_key_2.txt3
-rw-r--r--test/prism/errors/duplicated_parameter_names.txt3
-rw-r--r--test/prism/errors/duplicated_parameter_names_2.txt3
-rw-r--r--test/prism/errors/duplicated_parameter_names_3.txt3
-rw-r--r--test/prism/errors/duplicated_parameter_names_4.txt3
-rw-r--r--test/prism/errors/duplicated_parameter_names_5.txt3
-rw-r--r--test/prism/errors/ellipsis_in_no_paren_call.txt3
-rw-r--r--test/prism/errors/for_loops_index_missing.txt5
-rw-r--r--test/prism/errors/for_loops_only_end.txt5
-rw-r--r--test/prism/errors/forwarding_arg_after_keyword_rest.txt3
-rw-r--r--test/prism/errors/forwarding_arg_and_block.txt3
-rw-r--r--test/prism/errors/incomplete_instance_var_string.txt4
-rw-r--r--test/prism/errors/index_call_with_block_and_write.txt5
-rw-r--r--test/prism/errors/index_call_with_block_operator_write.txt5
-rw-r--r--test/prism/errors/index_call_with_block_or_write.txt5
-rw-r--r--test/prism/errors/interpolated_regular_expression_with_unknown_regexp_options.txt3
-rw-r--r--test/prism/errors/invalid_global_variable_write.txt4
-rw-r--r--test/prism/errors/invalid_hex_escape.txt3
-rw-r--r--test/prism/errors/invalid_multi_target.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_10.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_11.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_12.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_13.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_14.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_15.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_16.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_17.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_18.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_19.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_2.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_20.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_3.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_4.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_5.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_6.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_7.txt3
-rw-r--r--test/prism/errors/invalid_multi_target_8.txt4
-rw-r--r--test/prism/errors/invalid_multi_target_9.txt4
-rw-r--r--test/prism/errors/invalid_number_underscores.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_10.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_11.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_12.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_2.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_3.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_4.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_5.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_6.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_7.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_8.txt3
-rw-r--r--test/prism/errors/invalid_number_underscores_9.txt3
-rw-r--r--test/prism/errors/invalid_operator_write_dot.txt3
-rw-r--r--test/prism/errors/invalid_operator_write_fcall.txt3
-rw-r--r--test/prism/errors/it_with_ordinary_parameter.txt3
-rw-r--r--test/prism/errors/keywords_parameters_before_required_parameters.txt4
-rw-r--r--test/prism/errors/loop_conditional_is_closed.txt4
-rw-r--r--test/prism/errors/match_plus.txt7
-rw-r--r--test/prism/errors/method_parameters_after_arguments_forwarding.txt4
-rw-r--r--test/prism/errors/method_parameters_after_block.txt4
-rw-r--r--test/prism/errors/method_with_arguments_after_anonymous_block.txt4
-rw-r--r--test/prism/errors/missing_terminator_in_parentheses.txt3
-rw-r--r--test/prism/errors/module_definition_in_method_body.txt3
-rw-r--r--test/prism/errors/module_definition_in_method_body_within_block.txt7
-rw-r--r--test/prism/errors/module_definition_in_method_defs.txt7
-rw-r--r--test/prism/errors/module_name_recoverable.txt4
-rw-r--r--test/prism/errors/multiple_error_in_parameters_order.txt5
-rw-r--r--test/prism/errors/next_1.txt4
-rw-r--r--test/prism/errors/next_1_2_3.txt8
-rw-r--r--test/prism/errors/non_assoc_equality.txt19
-rw-r--r--test/prism/errors/non_assoc_range.txt4
-rw-r--r--test/prism/errors/numbered_parameters_in_block_arguments.txt3
-rw-r--r--test/prism/errors/optional_block_parameters_with_unary_operator.txt3
-rw-r--r--test/prism/errors/optional_block_parameters_with_unary_operator_2.txt3
-rw-r--r--test/prism/errors/optional_block_parameters_with_unary_operator_3.txt3
-rw-r--r--test/prism/errors/optional_block_parameters_with_unary_operator_4.txt3
-rw-r--r--test/prism/errors/parameter_name_ending_with_bang_or_question_mark.txt4
-rw-r--r--test/prism/errors/pre_execution_context.txt4
-rw-r--r--test/prism/errors/pre_execution_missing_brace.txt3
-rw-r--r--test/prism/errors/range_and_bin_op.txt4
-rw-r--r--test/prism/errors/range_and_bin_op_2.txt4
-rw-r--r--test/prism/errors/range_and_bin_op_3.txt3
-rw-r--r--test/prism/errors/range_and_bin_op_4.txt4
-rw-r--r--test/prism/errors/range_and_bin_op_5.txt5
-rw-r--r--test/prism/errors/range_and_bin_op_6.txt3
-rw-r--r--test/prism/errors/range_and_bin_op_7.txt3
-rw-r--r--test/prism/errors/range_and_bin_op_8.txt4
-rw-r--r--test/prism/errors/rational_number_with_exponential_portion.txt4
-rw-r--r--test/prism/errors/regexp_unicode_too_short.txt4
-rw-r--r--test/prism/errors/regular_expression_with_unknown_regexp_options.txt3
-rw-r--r--test/prism/errors/repeated_parameter_name_in_destructured_params.txt3
-rw-r--r--test/prism/errors/rest_keywords_parameters_before_required_parameters.txt4
-rw-r--r--test/prism/errors/return_1.txt3
-rw-r--r--test/prism/errors/return_1_2_3.txt7
-rw-r--r--test/prism/errors/returning_to_optional_parameters_multiple_times.txt4
-rw-r--r--test/prism/errors/semicolon_after_inheritance_operator.txt3
-rw-r--r--test/prism/errors/setter_method_cannot_be_defined_in_an_endless_method_definition.txt3
-rw-r--r--test/prism/errors/shadow_args_in_block.txt3
-rw-r--r--test/prism/errors/shadow_args_in_lambda.txt5
-rw-r--r--test/prism/errors/singleton_method_for_literals.txt39
-rw-r--r--test/prism/errors/splat_argument_after_keyword_argument.txt3
-rw-r--r--test/prism/errors/statement_at_non_statement.txt9
-rw-r--r--test/prism/errors/statement_operators.txt25
-rw-r--r--test/prism/errors/switching_to_named_arguments_twice.txt5
-rw-r--r--test/prism/errors/switching_to_optional_arguments_twice.txt5
-rw-r--r--test/prism/errors/symbol_in_hash.txt3
-rw-r--r--test/prism/errors/symbol_in_keyword_parameter.txt3
-rw-r--r--test/prism/errors/targeting_numbered_parameter.txt3
-rw-r--r--test/prism/errors/top_level_constant_starting_with_downcased_identifier.txt4
-rw-r--r--test/prism/errors/top_level_constant_with_downcased_identifier.txt4
-rw-r--r--test/prism/errors/trailing_comma_in_calls.txt3
-rw-r--r--test/prism/errors/unexpected_block.txt3
-rw-r--r--test/prism/errors/unterminated_W_list.txt3
-rw-r--r--test/prism/errors/unterminated_argument_expression.txt5
-rw-r--r--test/prism/errors/unterminated_embdoc.txt3
-rw-r--r--test/prism/errors/unterminated_embdoc_2.txt3
-rw-r--r--test/prism/errors/unterminated_empty_string.txt3
-rw-r--r--test/prism/errors/unterminated_global_variable.txt3
-rw-r--r--test/prism/errors/unterminated_global_variable_2.txt3
-rw-r--r--test/prism/errors/unterminated_i_list.txt3
-rw-r--r--test/prism/errors/unterminated_interpolated_string.txt3
-rw-r--r--test/prism/errors/unterminated_interpolated_symbol.txt3
-rw-r--r--test/prism/errors/unterminated_parenthesized_expression.txt4
-rw-r--r--test/prism/errors/unterminated_regular_expression.txt3
-rw-r--r--test/prism/errors/unterminated_regular_expression_with_heredoc.txt4
-rw-r--r--test/prism/errors/unterminated_s_symbol.txt3
-rw-r--r--test/prism/errors/unterminated_string.txt3
-rw-r--r--test/prism/errors/unterminated_unicode_brackets_should_be_a_syntax_error.txt3
-rw-r--r--test/prism/errors/unterminated_xstring.txt3
-rw-r--r--test/prism/errors/void_value_expression_in_arguments.txt17
-rw-r--r--test/prism/errors/void_value_expression_in_array.txt15
-rw-r--r--test/prism/errors/void_value_expression_in_assignment.txt9
-rw-r--r--test/prism/errors/void_value_expression_in_begin_statement.txt21
-rw-r--r--test/prism/errors/void_value_expression_in_binary_call.txt11
-rw-r--r--test/prism/errors/void_value_expression_in_call.txt11
-rw-r--r--test/prism/errors/void_value_expression_in_constant_path.txt5
-rw-r--r--test/prism/errors/void_value_expression_in_def.txt10
-rw-r--r--test/prism/errors/void_value_expression_in_expression.txt19
-rw-r--r--test/prism/errors/void_value_expression_in_hash.txt9
-rw-r--r--test/prism/errors/void_value_expression_in_modifier.txt13
-rw-r--r--test/prism/errors/void_value_expression_in_statement.txt26
-rw-r--r--test/prism/errors/void_value_expression_in_unary_call.txt5
-rw-r--r--test/prism/errors/while_endless_method.txt5
-rw-r--r--test/prism/errors/writing_numbered_parameter.txt3
-rw-r--r--test/prism/errors_test.rb2243
-rw-r--r--test/prism/fixtures/break.txt4
-rw-r--r--test/prism/fixtures/methods.txt5
-rw-r--r--test/prism/fixtures/patterns.txt3
-rw-r--r--test/prism/fixtures/regex.txt2
-rw-r--r--test/prism/fixtures/regex_escape_encoding.txt3
-rw-r--r--test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt2
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/unary.txt1
-rw-r--r--test/prism/fixtures/whitequark/method_definition_in_while_cond.txt7
-rw-r--r--test/prism/fixtures_test.rb21
-rw-r--r--test/prism/format_errors_test.rb24
-rw-r--r--test/prism/fuzzer_test.rb10
-rw-r--r--test/prism/heredoc_dedent_test.rb133
-rw-r--r--test/prism/index_write_test.rb89
-rw-r--r--test/prism/integer_parse_test.rb45
-rw-r--r--test/prism/lex_test.rb90
-rw-r--r--test/prism/library_symbols_test.rb2
-rw-r--r--test/prism/locals_test.rb210
-rw-r--r--test/prism/location_test.rb946
-rw-r--r--test/prism/magic_comment_test.rb121
-rw-r--r--test/prism/memsize_test.rb17
-rw-r--r--test/prism/newline_offsets_test.rb22
-rw-r--r--test/prism/newline_test.rb30
-rw-r--r--test/prism/onigmo_test.rb66
-rw-r--r--test/prism/parameters_signature_test.rb93
-rw-r--r--test/prism/parse_comments_test.rb21
-rw-r--r--test/prism/parse_stream_test.rb74
-rw-r--r--test/prism/parse_test.rb371
-rw-r--r--test/prism/parser_test.rb186
-rw-r--r--test/prism/pattern_test.rb132
-rw-r--r--test/prism/redundant_return_test.rb73
-rw-r--r--test/prism/reflection_test.rb22
-rw-r--r--test/prism/regexp_test.rb126
-rw-r--r--test/prism/result/attribute_write_test.rb56
-rw-r--r--test/prism/result/breadth_first_search_test.rb18
-rw-r--r--test/prism/result/comments_test.rb138
-rw-r--r--test/prism/result/constant_path_node_test.rb91
-rw-r--r--test/prism/result/equality_test.rb22
-rw-r--r--test/prism/result/heredoc_test.rb19
-rw-r--r--test/prism/result/implicit_array_test.rb59
-rw-r--r--test/prism/result/index_write_test.rb89
-rw-r--r--test/prism/result/integer_base_flags_test.rb33
-rw-r--r--test/prism/result/integer_parse_test.rb41
-rw-r--r--test/prism/result/node_id_test.rb27
-rw-r--r--test/prism/result/numeric_value_test.rb21
-rw-r--r--test/prism/result/overlap_test.rb43
-rw-r--r--test/prism/result/regular_expression_options_test.rb25
-rw-r--r--test/prism/result/source_location_test.rb950
-rw-r--r--test/prism/result/static_inspect_test.rb89
-rw-r--r--test/prism/result/static_literals_test.rb92
-rw-r--r--test/prism/result/warnings_test.rb430
-rw-r--r--test/prism/ripper_test.rb85
-rw-r--r--test/prism/ruby/compiler_test.rb31
-rw-r--r--test/prism/ruby/desugar_compiler_test.rb80
-rw-r--r--test/prism/ruby/dispatcher_test.rb46
-rw-r--r--test/prism/ruby/location_test.rb173
-rw-r--r--test/prism/ruby/parameters_signature_test.rb91
-rw-r--r--test/prism/ruby/parser_test.rb291
-rw-r--r--test/prism/ruby/pattern_test.rb132
-rw-r--r--test/prism/ruby/reflection_test.rb22
-rw-r--r--test/prism/ruby/ripper_test.rb62
-rw-r--r--test/prism/ruby/ruby_parser_test.rb127
-rw-r--r--test/prism/ruby/tunnel_test.rb26
-rw-r--r--test/prism/ruby_api_test.rb307
-rw-r--r--test/prism/ruby_parser_test.rb144
-rw-r--r--test/prism/snapshots/alias.txt194
-rw-r--r--test/prism/snapshots/arithmetic.txt255
-rw-r--r--test/prism/snapshots/arrays.txt1837
-rw-r--r--test/prism/snapshots/begin_ensure.txt251
-rw-r--r--test/prism/snapshots/begin_rescue.txt699
-rw-r--r--test/prism/snapshots/blocks.txt774
-rw-r--r--test/prism/snapshots/boolean_operators.txt54
-rw-r--r--test/prism/snapshots/booleans.txt7
-rw-r--r--test/prism/snapshots/break.txt401
-rw-r--r--test/prism/snapshots/case.txt495
-rw-r--r--test/prism/snapshots/classes.txt365
-rw-r--r--test/prism/snapshots/command_method_call.txt755
-rw-r--r--test/prism/snapshots/comments.txt145
-rw-r--r--test/prism/snapshots/constants.txt1225
-rw-r--r--test/prism/snapshots/dash_heredocs.txt260
-rw-r--r--test/prism/snapshots/defined.txt88
-rw-r--r--test/prism/snapshots/dos_endings.txt110
-rw-r--r--test/prism/snapshots/dstring.txt85
-rw-r--r--test/prism/snapshots/dsym_str.txt11
-rw-r--r--test/prism/snapshots/embdoc_no_newline_at_end.txt5
-rw-r--r--test/prism/snapshots/emoji_method_calls.txt31
-rw-r--r--test/prism/snapshots/endless_methods.txt107
-rw-r--r--test/prism/snapshots/endless_range_in_conditional.txt53
-rw-r--r--test/prism/snapshots/for.txt188
-rw-r--r--test/prism/snapshots/global_variables.txt191
-rw-r--r--test/prism/snapshots/hashes.txt384
-rw-r--r--test/prism/snapshots/heredoc.txt11
-rw-r--r--test/prism/snapshots/heredoc_with_carriage_returns.txt11
-rw-r--r--test/prism/snapshots/heredoc_with_comment.txt21
-rw-r--r--test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt67
-rw-r--r--test/prism/snapshots/heredoc_with_trailing_newline.txt11
-rw-r--r--test/prism/snapshots/heredocs_leading_whitespace.txt63
-rw-r--r--test/prism/snapshots/heredocs_nested.txt94
-rw-r--r--test/prism/snapshots/heredocs_with_ignored_newlines.txt70
-rw-r--r--test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt11
-rw-r--r--test/prism/snapshots/if.txt531
-rw-r--r--test/prism/snapshots/indented_file_end.txt18
-rw-r--r--test/prism/snapshots/integer_operations.txt635
-rw-r--r--test/prism/snapshots/keyword_method_names.txt173
-rw-r--r--test/prism/snapshots/keywords.txt47
-rw-r--r--test/prism/snapshots/lambda.txt202
-rw-r--r--test/prism/snapshots/method_calls.txt2456
-rw-r--r--test/prism/snapshots/methods.txt2054
-rw-r--r--test/prism/snapshots/modules.txt180
-rw-r--r--test/prism/snapshots/multi_write.txt93
-rw-r--r--test/prism/snapshots/newline_terminated.txt107
-rw-r--r--test/prism/snapshots/next.txt329
-rw-r--r--test/prism/snapshots/nils.txt34
-rw-r--r--test/prism/snapshots/non_alphanumeric_methods.txt503
-rw-r--r--test/prism/snapshots/not.txt351
-rw-r--r--test/prism/snapshots/numbers.txt142
-rw-r--r--test/prism/snapshots/patterns.txt4915
-rw-r--r--test/prism/snapshots/procs.txt403
-rw-r--r--test/prism/snapshots/range_begin_open_exclusive.txt13
-rw-r--r--test/prism/snapshots/range_begin_open_inclusive.txt13
-rw-r--r--test/prism/snapshots/range_end_open_exclusive.txt13
-rw-r--r--test/prism/snapshots/range_end_open_inclusive.txt13
-rw-r--r--test/prism/snapshots/ranges.txt533
-rw-r--r--test/prism/snapshots/regex.txt510
-rw-r--r--test/prism/snapshots/regex_char_width.txt50
-rw-r--r--test/prism/snapshots/repeat_parameters.txt473
-rw-r--r--test/prism/snapshots/rescue.txt528
-rw-r--r--test/prism/snapshots/return.txt165
-rw-r--r--test/prism/snapshots/seattlerb/BEGIN.txt15
-rw-r--r--test/prism/snapshots/seattlerb/TestRubyParserShared.txt361
-rw-r--r--test/prism/snapshots/seattlerb/__ENCODING__.txt6
-rw-r--r--test/prism/snapshots/seattlerb/alias_gvar_backref.txt13
-rw-r--r--test/prism/snapshots/seattlerb/alias_resword.txt21
-rw-r--r--test/prism/snapshots/seattlerb/and_multi.txt26
-rw-r--r--test/prism/snapshots/seattlerb/aref_args_assocs.txt23
-rw-r--r--test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt26
-rw-r--r--test/prism/snapshots/seattlerb/args_kw_block.txt39
-rw-r--r--test/prism/snapshots/seattlerb/array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt35
-rw-r--r--test/prism/snapshots/seattlerb/assoc__bare.txt31
-rw-r--r--test/prism/snapshots/seattlerb/assoc_label.txt34
-rw-r--r--test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt23
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_array_arg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt83
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt31
-rw-r--r--test/prism/snapshots/seattlerb/backticks_interpolation_line.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bang_eq.txt24
-rw-r--r--test/prism/snapshots/seattlerb/bdot2.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bdot3.txt38
-rw-r--r--test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt16
-rw-r--r--test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt47
-rw-r--r--test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt27
-rw-r--r--test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt23
-rw-r--r--test/prism/snapshots/seattlerb/block_arg__bare.txt31
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_kwsplat.txt39
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt54
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat.txt51
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt59
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_optional.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope.txt40
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope2.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_splat_arg.txt45
-rw-r--r--test/prism/snapshots/seattlerb/block_args_kwargs.txt44
-rw-r--r--test/prism/snapshots/seattlerb/block_args_no_kwargs.txt37
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt1.txt59
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2.txt52
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2_2.txt71
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt3.txt79
-rw-r--r--test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt80
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt100
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt113
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_colon.txt54
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_dot.txt54
-rw-r--r--test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt60
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_colon.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_dot.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt52
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_splat.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_kw.txt42
-rw-r--r--test/prism/snapshots/seattlerb/block_kw__required.txt38
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar.txt50
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt61
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_arg.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat.txt48
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt56
-rw-r--r--test/prism/snapshots/seattlerb/block_optarg.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_paren_splat.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_reg_optarg.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_return.txt57
-rw-r--r--test/prism/snapshots/seattlerb/block_scope.txt29
-rw-r--r--test/prism/snapshots/seattlerb/block_splat_reg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/bug169.txt28
-rw-r--r--test/prism/snapshots/seattlerb/bug179.txt28
-rw-r--r--test/prism/snapshots/seattlerb/bug190.txt11
-rw-r--r--test/prism/snapshots/seattlerb/bug191.txt87
-rw-r--r--test/prism/snapshots/seattlerb/bug202.txt22
-rw-r--r--test/prism/snapshots/seattlerb/bug236.txt70
-rw-r--r--test/prism/snapshots/seattlerb/bug290.txt24
-rw-r--r--test/prism/snapshots/seattlerb/bug_187.txt59
-rw-r--r--test/prism/snapshots/seattlerb/bug_215.txt14
-rw-r--r--test/prism/snapshots/seattlerb/bug_249.txt86
-rw-r--r--test/prism/snapshots/seattlerb/bug_and.txt21
-rw-r--r--test/prism/snapshots/seattlerb/bug_args__19.txt58
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn.txt49
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn2.txt58
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt55
-rw-r--r--test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt110
-rw-r--r--test/prism/snapshots/seattlerb/bug_case_when_regexp.txt28
-rw-r--r--test/prism/snapshots/seattlerb/bug_comma.txt41
-rw-r--r--test/prism/snapshots/seattlerb/bug_cond_pct.txt22
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt38
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_interp_array.txt26
-rw-r--r--test/prism/snapshots/seattlerb/bug_masgn_right.txt49
-rw-r--r--test/prism/snapshots/seattlerb/bug_not_parens.txt25
-rw-r--r--test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt26
-rw-r--r--test/prism/snapshots/seattlerb/call_and.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_assoc.txt34
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt43
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_kwsplat.txt37
-rw-r--r--test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt106
-rw-r--r--test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt34
-rw-r--r--test/prism/snapshots/seattlerb/call_args_command.txt54
-rw-r--r--test/prism/snapshots/seattlerb/call_array_arg.txt38
-rw-r--r--test/prism/snapshots/seattlerb/call_array_block_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt45
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc.txt31
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new.txt34
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt58
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt31
-rw-r--r--test/prism/snapshots/seattlerb/call_bang_command_call.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_bang_squiggle.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_begin_call_block_call.txt53
-rw-r--r--test/prism/snapshots/seattlerb/call_block_arg_named.txt28
-rw-r--r--test/prism/snapshots/seattlerb/call_carat.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_colon2.txt17
-rw-r--r--test/prism/snapshots/seattlerb/call_colon_parens.txt18
-rw-r--r--test/prism/snapshots/seattlerb/call_div.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_dot_parens.txt18
-rw-r--r--test/prism/snapshots/seattlerb/call_env.txt25
-rw-r--r--test/prism/snapshots/seattlerb/call_eq3.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_gt.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_kwsplat.txt27
-rw-r--r--test/prism/snapshots/seattlerb/call_leading_dots.txt35
-rw-r--r--test/prism/snapshots/seattlerb/call_leading_dots_comment.txt35
-rw-r--r--test/prism/snapshots/seattlerb/call_lt.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_lte.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_not.txt18
-rw-r--r--test/prism/snapshots/seattlerb/call_pipe.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_rshift.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_self_brackets.txt22
-rw-r--r--test/prism/snapshots/seattlerb/call_spaceship.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt41
-rw-r--r--test/prism/snapshots/seattlerb/call_star.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_star2.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_trailing_comma.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_trailing_dots.txt35
-rw-r--r--test/prism/snapshots/seattlerb/call_unary_bang.txt18
-rw-r--r--test/prism/snapshots/seattlerb/case_in.txt976
-rw-r--r--test/prism/snapshots/seattlerb/case_in_31.txt49
-rw-r--r--test/prism/snapshots/seattlerb/case_in_37.txt58
-rw-r--r--test/prism/snapshots/seattlerb/case_in_42.txt44
-rw-r--r--test/prism/snapshots/seattlerb/case_in_42_2.txt40
-rw-r--r--test/prism/snapshots/seattlerb/case_in_47.txt52
-rw-r--r--test/prism/snapshots/seattlerb/case_in_67.txt33
-rw-r--r--test/prism/snapshots/seattlerb/case_in_86.txt51
-rw-r--r--test/prism/snapshots/seattlerb/case_in_86_2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_const.txt42
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt47
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt48
-rw-r--r--test/prism/snapshots/seattlerb/case_in_const.txt28
-rw-r--r--test/prism/snapshots/seattlerb/case_in_else.txt40
-rw-r--r--test/prism/snapshots/seattlerb/case_in_find.txt47
-rw-r--r--test/prism/snapshots/seattlerb/case_in_find_array.txt44
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat.txt68
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt86
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt51
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt47
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt55
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt42
-rw-r--r--test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt67
-rw-r--r--test/prism/snapshots/seattlerb/case_in_multiple.txt57
-rw-r--r--test/prism/snapshots/seattlerb/case_in_or.txt38
-rw-r--r--test/prism/snapshots/seattlerb/class_comments.txt31
-rw-r--r--test/prism/snapshots/seattlerb/cond_unary_minus.txt15
-rw-r--r--test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt22
-rw-r--r--test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt17
-rw-r--r--test/prism/snapshots/seattlerb/const_op_asgn_and1.txt18
-rw-r--r--test/prism/snapshots/seattlerb/const_op_asgn_and2.txt17
-rw-r--r--test/prism/snapshots/seattlerb/const_op_asgn_or.txt19
-rw-r--r--test/prism/snapshots/seattlerb/dasgn_icky2.txt61
-rw-r--r--test/prism/snapshots/seattlerb/defined_eh_parens.txt13
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt37
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_forward_args.txt49
-rw-r--r--test/prism/snapshots/seattlerb/defn_args_forward_args.txt61
-rw-r--r--test/prism/snapshots/seattlerb/defn_comments.txt18
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command.txt36
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_env.txt55
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt45
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt39
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt39
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt42
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt34
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_val.txt37
-rw-r--r--test/prism/snapshots/seattlerb/defn_no_kwargs.txt29
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner.txt47
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt47
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt30
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt30
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt158
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_last_arg.txt33
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_reg.txt36
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt43
-rw-r--r--test/prism/snapshots/seattlerb/defn_powarg.txt31
-rw-r--r--test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt44
-rw-r--r--test/prism/snapshots/seattlerb/defn_splat_arg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/defn_unary_not.txt21
-rw-r--r--test/prism/snapshots/seattlerb/defns_reserved.txt19
-rw-r--r--test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt60
-rw-r--r--test/prism/snapshots/seattlerb/defs_comments.txt19
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command.txt46
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt53
-rw-r--r--test/prism/snapshots/seattlerb/defs_kwarg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner.txt48
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt48
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt161
-rw-r--r--test/prism/snapshots/seattlerb/difficult0_.txt73
-rw-r--r--test/prism/snapshots/seattlerb/difficult1_line_numbers.txt267
-rw-r--r--test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt78
-rw-r--r--test/prism/snapshots/seattlerb/difficult2_.txt74
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_.txt52
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_2.txt42
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_3.txt47
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_4.txt38
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_5.txt48
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__10.txt52
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__11.txt46
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__12.txt49
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__6.txt55
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__7.txt49
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__8.txt52
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__9.txt49
-rw-r--r--test/prism/snapshots/seattlerb/difficult4__leading_dots.txt25
-rw-r--r--test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt16
-rw-r--r--test/prism/snapshots/seattlerb/difficult6_.txt61
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__7.txt55
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__8.txt55
-rw-r--r--test/prism/snapshots/seattlerb/difficult7_.txt93
-rw-r--r--test/prism/snapshots/seattlerb/do_bug.txt63
-rw-r--r--test/prism/snapshots/seattlerb/do_lambda.txt17
-rw-r--r--test/prism/snapshots/seattlerb/dot2_nil__26.txt20
-rw-r--r--test/prism/snapshots/seattlerb/dot3_nil__26.txt20
-rw-r--r--test/prism/snapshots/seattlerb/dstr_evstr.txt38
-rw-r--r--test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt25
-rw-r--r--test/prism/snapshots/seattlerb/dstr_lex_state.txt35
-rw-r--r--test/prism/snapshots/seattlerb/dstr_str.txt28
-rw-r--r--test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt11
-rw-r--r--test/prism/snapshots/seattlerb/dsym_to_sym.txt37
-rw-r--r--test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt11
-rw-r--r--test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt50
-rw-r--r--test/prism/snapshots/seattlerb/evstr_evstr.txt42
-rw-r--r--test/prism/snapshots/seattlerb/evstr_str.txt32
-rw-r--r--test/prism/snapshots/seattlerb/expr_not_bang.txt38
-rw-r--r--test/prism/snapshots/seattlerb/f_kw.txt34
-rw-r--r--test/prism/snapshots/seattlerb/f_kw__required.txt30
-rw-r--r--test/prism/snapshots/seattlerb/flip2_env_lvar.txt37
-rw-r--r--test/prism/snapshots/seattlerb/float_with_if_modifier.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_comma_arg.txt27
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_lineno.txt26
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_nested.txt42
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly.txt34
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt67
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt34
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt49
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt28
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt28
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt34
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt21
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_unicode.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt27
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt27
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt11
-rw-r--r--test/prism/snapshots/seattlerb/if_elsif.txt25
-rw-r--r--test/prism/snapshots/seattlerb/if_symbol.txt31
-rw-r--r--test/prism/snapshots/seattlerb/in_expr_no_case.txt17
-rw-r--r--test/prism/snapshots/seattlerb/index_0.txt38
-rw-r--r--test/prism/snapshots/seattlerb/index_0_opasgn.txt36
-rw-r--r--test/prism/snapshots/seattlerb/integer_with_if_modifier.txt18
-rw-r--r--test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_1.txt40
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_1.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_2.txt56
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_1.txt54
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_2.txt59
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_2__19.txt46
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_3.txt52
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_4.txt45
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_5.txt42
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_6.txt49
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_1.txt48
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_2.txt53
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_1.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_2.txt56
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_1.txt46
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt47
-rw-r--r--test/prism/snapshots/seattlerb/label_vs_string.txt34
-rw-r--r--test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt95
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt21
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_command.txt37
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_env.txt14
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_ivar_env.txt13
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt33
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_middle_splat.txt49
-rw-r--r--test/prism/snapshots/seattlerb/magic_encoding_comment.txt46
-rw-r--r--test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt29
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_ident.txt42
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/masgn_colon2.txt42
-rw-r--r--test/prism/snapshots/seattlerb/masgn_colon3.txt34
-rw-r--r--test/prism/snapshots/seattlerb/masgn_command_call.txt43
-rw-r--r--test/prism/snapshots/seattlerb/masgn_double_paren.txt35
-rw-r--r--test/prism/snapshots/seattlerb/masgn_lhs_splat.txt33
-rw-r--r--test/prism/snapshots/seattlerb/masgn_paren.txt39
-rw-r--r--test/prism/snapshots/seattlerb/masgn_splat_arg.txt32
-rw-r--r--test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/masgn_star.txt19
-rw-r--r--test/prism/snapshots/seattlerb/masgn_var_star_var.txt32
-rw-r--r--test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt59
-rw-r--r--test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt41
-rw-r--r--test/prism/snapshots/seattlerb/method_call_trailing_comma.txt31
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt35
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_back_splat.txt38
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt35
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_front_splat.txt38
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_keyword.txt30
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt44
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_mid_splat.txt47
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_rescue.txt36
-rw-r--r--test/prism/snapshots/seattlerb/module_comments.txt29
-rw-r--r--test/prism/snapshots/seattlerb/multiline_hash_declaration.txt95
-rw-r--r--test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt25
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_command_call.txt37
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt32
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt53
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt20
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/parse_def_special_name.txt18
-rw-r--r--test/prism/snapshots/seattlerb/parse_if_not_canonical.txt62
-rw-r--r--test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt62
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block.txt30
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt35
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt35
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt35
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt20
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt20
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_no_args.txt61
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_complex.txt67
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt31
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt29
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot2_open.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot3.txt51
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot3_open.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt21
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt21
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt37
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_hash_lit.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc.txt43
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt33
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt74
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt74
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_multiline_str.txt14
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt14
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_newlines.txt6
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_op_asgn.txt32
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_postexe.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_preexe.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_rescue.txt62
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_return.txt40
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt25
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_to_ary.txt39
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt25
-rw-r--r--test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt34
-rw-r--r--test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt24
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_019.txt33
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_044.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_051.txt47
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058.txt73
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058_2.txt67
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_069.txt48
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_076.txt58
-rw-r--r--test/prism/snapshots/seattlerb/parse_until_not_canonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_while_not_canonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/pctW_lineno.txt52
-rw-r--r--test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt11
-rw-r--r--test/prism/snapshots/seattlerb/pct_nl.txt17
-rw-r--r--test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt51
-rw-r--r--test/prism/snapshots/seattlerb/pipe_semicolon.txt39
-rw-r--r--test/prism/snapshots/seattlerb/pipe_space.txt36
-rw-r--r--test/prism/snapshots/seattlerb/qWords_space.txt10
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols.txt28
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_empty.txt10
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_empty_space.txt10
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_interp.txt57
-rw-r--r--test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt35
-rw-r--r--test/prism/snapshots/seattlerb/quoted_symbol_keys.txt25
-rw-r--r--test/prism/snapshots/seattlerb/qw_escape.txt11
-rw-r--r--test/prism/snapshots/seattlerb/qw_escape_term.txt11
-rw-r--r--test/prism/snapshots/seattlerb/qwords_empty.txt10
-rw-r--r--test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt11
-rw-r--r--test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp.txt35
-rw-r--r--test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp_esc_u.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp_escape_extended.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt17
-rw-r--r--test/prism/snapshots/seattlerb/required_kwarg_no_value.txt34
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt58
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt75
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_raised.txt52
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt79
-rw-r--r--test/prism/snapshots/seattlerb/rescue_in_block.txt47
-rw-r--r--test/prism/snapshots/seattlerb/rescue_parens.txt48
-rw-r--r--test/prism/snapshots/seattlerb/return_call_assocs.txt218
-rw-r--r--test/prism/snapshots/seattlerb/rhs_asgn.txt15
-rw-r--r--test/prism/snapshots/seattlerb/ruby21_numbers.txt27
-rw-r--r--test/prism/snapshots/seattlerb/safe_attrasgn.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_call.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_after_newline.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_dot_parens.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_newline.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_operator.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_calls.txt41
-rw-r--r--test/prism/snapshots/seattlerb/safe_op_asgn.txt41
-rw-r--r--test/prism/snapshots/seattlerb/safe_op_asgn2.txt34
-rw-r--r--test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt57
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt28
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt50
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call.txt58
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt54
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw.txt33
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw__required.txt29
-rw-r--r--test/prism/snapshots/seattlerb/stabby_proc_scope.txt31
-rw-r--r--test/prism/snapshots/seattlerb/str_backslashes.txt24
-rw-r--r--test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_double_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_double_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_evstr.txt32
-rw-r--r--test/prism/snapshots/seattlerb/str_evstr_escape.txt38
-rw-r--r--test/prism/snapshots/seattlerb/str_heredoc_interp.txt32
-rw-r--r--test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt105
-rw-r--r--test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt22
-rw-r--r--test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt14
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_Q_nested.txt38
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_nested_nested.txt42
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_q.txt11
-rw-r--r--test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_single_escaped_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_single_newline.txt34
-rw-r--r--test/prism/snapshots/seattlerb/str_str.txt28
-rw-r--r--test/prism/snapshots/seattlerb/str_str_str.txt34
-rw-r--r--test/prism/snapshots/seattlerb/super_arg.txt17
-rw-r--r--test/prism/snapshots/seattlerb/symbol_empty.txt11
-rw-r--r--test/prism/snapshots/seattlerb/symbol_list.txt50
-rw-r--r--test/prism/snapshots/seattlerb/symbols.txt28
-rw-r--r--test/prism/snapshots/seattlerb/symbols_empty.txt10
-rw-r--r--test/prism/snapshots/seattlerb/symbols_empty_space.txt10
-rw-r--r--test/prism/snapshots/seattlerb/symbols_interp.txt28
-rw-r--r--test/prism/snapshots/seattlerb/thingy.txt57
-rw-r--r--test/prism/snapshots/seattlerb/uminus_float.txt7
-rw-r--r--test/prism/snapshots/seattlerb/unary_minus.txt25
-rw-r--r--test/prism/snapshots/seattlerb/unary_plus.txt25
-rw-r--r--test/prism/snapshots/seattlerb/unary_plus_on_literal.txt21
-rw-r--r--test/prism/snapshots/seattlerb/unary_tilde.txt25
-rw-r--r--test/prism/snapshots/seattlerb/utf8_bom.txt21
-rw-r--r--test/prism/snapshots/seattlerb/when_splat.txt39
-rw-r--r--test/prism/snapshots/seattlerb/words_interp.txt30
-rw-r--r--test/prism/snapshots/seattlerb/yield_arg.txt16
-rw-r--r--test/prism/snapshots/seattlerb/yield_call_assocs.txt224
-rw-r--r--test/prism/snapshots/seattlerb/yield_empty_parens.txt10
-rw-r--r--test/prism/snapshots/single_method_call_with_bang.txt15
-rw-r--r--test/prism/snapshots/single_quote_heredocs.txt11
-rw-r--r--test/prism/snapshots/spanning_heredoc.txt413
-rw-r--r--test/prism/snapshots/spanning_heredoc_newlines.txt155
-rw-r--r--test/prism/snapshots/strings.txt534
-rw-r--r--test/prism/snapshots/super.txt132
-rw-r--r--test/prism/snapshots/symbols.txt464
-rw-r--r--test/prism/snapshots/ternary_operator.txt295
-rw-r--r--test/prism/snapshots/tilde_heredocs.txt405
-rw-r--r--test/prism/snapshots/undef.txt117
-rw-r--r--test/prism/snapshots/unescaping.txt34
-rw-r--r--test/prism/snapshots/unless.txt173
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/alias.txt29
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/assignment.txt1076
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/block.txt1402
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/case.txt446
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/class.txt226
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/def.txt1204
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defined.txt55
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defs.txt358
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/dstr.txt353
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/empty.txt5
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/empty_begin.txt9
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/flipflop.txt237
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/for.txt171
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/hookexe.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/if.txt288
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/kwbegin.txt491
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/lambda.txt151
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/literal.txt1198
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/module.txt104
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/opasgn.txt509
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/pattern.txt446
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/pragma.txt20
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/range.txt55
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/rescue.txt103
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/send.txt2190
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/27.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/30.txt88
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/31.txt90
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/32.txt156
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/singletons.txt9
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/super.txt277
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/unary.txt248
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/undef.txt29
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/variables.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/while.txt704
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/yield.txt56
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/and.txt235
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/block.txt191
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/def.txt90
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/dstr.txt598
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt259
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/literal.txt103
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/opasgn.txt69
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/send.txt163
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/undef.txt29
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/while.txt277
-rw-r--r--test/prism/snapshots/until.txt180
-rw-r--r--test/prism/snapshots/variables.txt408
-rw-r--r--test/prism/snapshots/while.txt470
-rw-r--r--test/prism/snapshots/whitequark/__ENCODING__.txt6
-rw-r--r--test/prism/snapshots/whitequark/__ENCODING___legacy_.txt6
-rw-r--r--test/prism/snapshots/whitequark/alias.txt21
-rw-r--r--test/prism/snapshots/whitequark/alias_gvar.txt21
-rw-r--r--test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt60
-rw-r--r--test/prism/snapshots/whitequark/and.txt53
-rw-r--r--test/prism/snapshots/whitequark/and_asgn.txt59
-rw-r--r--test/prism/snapshots/whitequark/and_or_masgn.txt93
-rw-r--r--test/prism/snapshots/whitequark/anonymous_blockarg.txt46
-rw-r--r--test/prism/snapshots/whitequark/arg.txt56
-rw-r--r--test/prism/snapshots/whitequark/arg_duplicate_ignored.txt59
-rw-r--r--test/prism/snapshots/whitequark/arg_label.txt115
-rw-r--r--test/prism/snapshots/whitequark/arg_scope.txt34
-rw-r--r--test/prism/snapshots/whitequark/args.txt1075
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs.txt96
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs_comma.txt54
-rw-r--r--test/prism/snapshots/whitequark/args_args_comma.txt38
-rw-r--r--test/prism/snapshots/whitequark/args_args_star.txt90
-rw-r--r--test/prism/snapshots/whitequark/args_assocs.txt195
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_comma.txt44
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_legacy.txt195
-rw-r--r--test/prism/snapshots/whitequark/args_block_pass.txt28
-rw-r--r--test/prism/snapshots/whitequark/args_cmd.txt41
-rw-r--r--test/prism/snapshots/whitequark/args_star.txt70
-rw-r--r--test/prism/snapshots/whitequark/array_assocs.txt44
-rw-r--r--test/prism/snapshots/whitequark/array_plain.txt16
-rw-r--r--test/prism/snapshots/whitequark/array_splat.txt68
-rw-r--r--test/prism/snapshots/whitequark/array_symbols.txt22
-rw-r--r--test/prism/snapshots/whitequark/array_symbols_empty.txt15
-rw-r--r--test/prism/snapshots/whitequark/array_symbols_interp.txt67
-rw-r--r--test/prism/snapshots/whitequark/array_words.txt22
-rw-r--r--test/prism/snapshots/whitequark/array_words_empty.txt15
-rw-r--r--test/prism/snapshots/whitequark/array_words_interp.txt80
-rw-r--r--test/prism/snapshots/whitequark/asgn_cmd.txt55
-rw-r--r--test/prism/snapshots/whitequark/asgn_mrhs.txt87
-rw-r--r--test/prism/snapshots/whitequark/back_ref.txt7
-rw-r--r--test/prism/snapshots/whitequark/bang.txt25
-rw-r--r--test/prism/snapshots/whitequark/bang_cmd.txt38
-rw-r--r--test/prism/snapshots/whitequark/begin_cmdarg.txt51
-rw-r--r--test/prism/snapshots/whitequark/beginless_erange_after_newline.txt23
-rw-r--r--test/prism/snapshots/whitequark/beginless_irange_after_newline.txt23
-rw-r--r--test/prism/snapshots/whitequark/beginless_range.txt21
-rw-r--r--test/prism/snapshots/whitequark/blockarg.txt31
-rw-r--r--test/prism/snapshots/whitequark/blockargs.txt1339
-rw-r--r--test/prism/snapshots/whitequark/bug_435.txt39
-rw-r--r--test/prism/snapshots/whitequark/bug_447.txt56
-rw-r--r--test/prism/snapshots/whitequark/bug_452.txt63
-rw-r--r--test/prism/snapshots/whitequark/bug_466.txt70
-rw-r--r--test/prism/snapshots/whitequark/bug_473.txt34
-rw-r--r--test/prism/snapshots/whitequark/bug_480.txt37
-rw-r--r--test/prism/snapshots/whitequark/bug_481.txt50
-rw-r--r--test/prism/snapshots/whitequark/bug_ascii_8bit_in_literal.txt11
-rw-r--r--test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt30
-rw-r--r--test/prism/snapshots/whitequark/bug_cmdarg.txt106
-rw-r--r--test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt18
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt50
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt40
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt383
-rw-r--r--test/prism/snapshots/whitequark/bug_heredoc_do.txt30
-rw-r--r--test/prism/snapshots/whitequark/bug_interp_single.txt38
-rw-r--r--test/prism/snapshots/whitequark/bug_lambda_leakage.txt38
-rw-r--r--test/prism/snapshots/whitequark/bug_regex_verification.txt11
-rw-r--r--test/prism/snapshots/whitequark/bug_rescue_empty_else.txt25
-rw-r--r--test/prism/snapshots/whitequark/bug_while_not_parens_do.txt28
-rw-r--r--test/prism/snapshots/whitequark/case_cond.txt34
-rw-r--r--test/prism/snapshots/whitequark/case_cond_else.txt46
-rw-r--r--test/prism/snapshots/whitequark/case_expr.txt44
-rw-r--r--test/prism/snapshots/whitequark/case_expr_else.txt60
-rw-r--r--test/prism/snapshots/whitequark/casgn_scoped.txt19
-rw-r--r--test/prism/snapshots/whitequark/casgn_toplevel.txt17
-rw-r--r--test/prism/snapshots/whitequark/casgn_unscoped.txt13
-rw-r--r--test/prism/snapshots/whitequark/character.txt11
-rw-r--r--test/prism/snapshots/whitequark/class.txt27
-rw-r--r--test/prism/snapshots/whitequark/class_super.txt18
-rw-r--r--test/prism/snapshots/whitequark/class_super_label.txt35
-rw-r--r--test/prism/snapshots/whitequark/comments_before_leading_dot__27.txt85
-rw-r--r--test/prism/snapshots/whitequark/complex.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_begin.txt40
-rw-r--r--test/prism/snapshots/whitequark/cond_begin_masgn.txt52
-rw-r--r--test/prism/snapshots/whitequark/cond_eflipflop.txt78
-rw-r--r--test/prism/snapshots/whitequark/cond_eflipflop_with_beginless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_eflipflop_with_endless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_iflipflop.txt78
-rw-r--r--test/prism/snapshots/whitequark/cond_iflipflop_with_beginless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_iflipflop_with_endless_range.txt27
-rw-r--r--test/prism/snapshots/whitequark/cond_match_current_line.txt34
-rw-r--r--test/prism/snapshots/whitequark/const_op_asgn.txt97
-rw-r--r--test/prism/snapshots/whitequark/const_scoped.txt12
-rw-r--r--test/prism/snapshots/whitequark/const_toplevel.txt10
-rw-r--r--test/prism/snapshots/whitequark/const_unscoped.txt7
-rw-r--r--test/prism/snapshots/whitequark/cpath.txt31
-rw-r--r--test/prism/snapshots/whitequark/cvar.txt7
-rw-r--r--test/prism/snapshots/whitequark/cvasgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/dedenting_heredoc.txt496
-rw-r--r--test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt22
-rw-r--r--test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt22
-rw-r--r--test/prism/snapshots/whitequark/def.txt83
-rw-r--r--test/prism/snapshots/whitequark/defined.txt42
-rw-r--r--test/prism/snapshots/whitequark/defs.txt90
-rw-r--r--test/prism/snapshots/whitequark/empty_stmt.txt5
-rw-r--r--test/prism/snapshots/whitequark/endless_comparison_method.txt221
-rw-r--r--test/prism/snapshots/whitequark/endless_method.txt151
-rw-r--r--test/prism/snapshots/whitequark/endless_method_command_syntax.txt394
-rw-r--r--test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt43
-rw-r--r--test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt56
-rw-r--r--test/prism/snapshots/whitequark/endless_method_without_args.txt89
-rw-r--r--test/prism/snapshots/whitequark/ensure.txt40
-rw-r--r--test/prism/snapshots/whitequark/ensure_empty.txt16
-rw-r--r--test/prism/snapshots/whitequark/false.txt6
-rw-r--r--test/prism/snapshots/whitequark/float.txt9
-rw-r--r--test/prism/snapshots/whitequark/for.txt83
-rw-r--r--test/prism/snapshots/whitequark/for_mlhs.txt56
-rw-r--r--test/prism/snapshots/whitequark/forward_arg.txt43
-rw-r--r--test/prism/snapshots/whitequark/forward_arg_with_open_args.txt404
-rw-r--r--test/prism/snapshots/whitequark/forward_args_legacy.txt99
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt58
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt55
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg.txt52
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt63
-rw-r--r--test/prism/snapshots/whitequark/forwarded_restarg.txt49
-rw-r--r--test/prism/snapshots/whitequark/gvar.txt7
-rw-r--r--test/prism/snapshots/whitequark/gvasgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/hash_empty.txt9
-rw-r--r--test/prism/snapshots/whitequark/hash_hashrocket.txt49
-rw-r--r--test/prism/snapshots/whitequark/hash_kwsplat.txt35
-rw-r--r--test/prism/snapshots/whitequark/hash_label.txt22
-rw-r--r--test/prism/snapshots/whitequark/hash_label_end.txt100
-rw-r--r--test/prism/snapshots/whitequark/hash_pair_value_omission.txt97
-rw-r--r--test/prism/snapshots/whitequark/heredoc.txt23
-rw-r--r--test/prism/snapshots/whitequark/if.txt63
-rw-r--r--test/prism/snapshots/whitequark/if_else.txt95
-rw-r--r--test/prism/snapshots/whitequark/if_elsif.txt65
-rw-r--r--test/prism/snapshots/whitequark/if_masgn__24.txt42
-rw-r--r--test/prism/snapshots/whitequark/if_mod.txt34
-rw-r--r--test/prism/snapshots/whitequark/if_nl_then.txt34
-rw-r--r--test/prism/snapshots/whitequark/int.txt14
-rw-r--r--test/prism/snapshots/whitequark/int___LINE__.txt6
-rw-r--r--test/prism/snapshots/whitequark/interp_digit_var.txt273
-rw-r--r--test/prism/snapshots/whitequark/ivar.txt7
-rw-r--r--test/prism/snapshots/whitequark/ivasgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/keyword_argument_omission.txt65
-rw-r--r--test/prism/snapshots/whitequark/kwarg.txt30
-rw-r--r--test/prism/snapshots/whitequark/kwbegin_compstmt.txt34
-rw-r--r--test/prism/snapshots/whitequark/kwnilarg.txt84
-rw-r--r--test/prism/snapshots/whitequark/kwoptarg.txt34
-rw-r--r--test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt58
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_named.txt31
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_unnamed.txt31
-rw-r--r--test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt54
-rw-r--r--test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt67
-rw-r--r--test/prism/snapshots/whitequark/lvar.txt15
-rw-r--r--test/prism/snapshots/whitequark/lvar_injecting_match.txt39
-rw-r--r--test/prism/snapshots/whitequark/lvasgn.txt17
-rw-r--r--test/prism/snapshots/whitequark/masgn.txt83
-rw-r--r--test/prism/snapshots/whitequark/masgn_attr.txt82
-rw-r--r--test/prism/snapshots/whitequark/masgn_cmd.txt35
-rw-r--r--test/prism/snapshots/whitequark/masgn_const.txt44
-rw-r--r--test/prism/snapshots/whitequark/masgn_nested.txt66
-rw-r--r--test/prism/snapshots/whitequark/masgn_splat.txt284
-rw-r--r--test/prism/snapshots/whitequark/module.txt14
-rw-r--r--test/prism/snapshots/whitequark/multiple_pattern_matches.txt173
-rw-r--r--test/prism/snapshots/whitequark/newline_in_hash_argument.txt163
-rw-r--r--test/prism/snapshots/whitequark/nil.txt6
-rw-r--r--test/prism/snapshots/whitequark/nil_expression.txt16
-rw-r--r--test/prism/snapshots/whitequark/non_lvar_injecting_match.txt44
-rw-r--r--test/prism/snapshots/whitequark/not.txt55
-rw-r--r--test/prism/snapshots/whitequark/not_cmd.txt38
-rw-r--r--test/prism/snapshots/whitequark/not_masgn__24.txt45
-rw-r--r--test/prism/snapshots/whitequark/nth_ref.txt7
-rw-r--r--test/prism/snapshots/whitequark/numbered_args_after_27.txt143
-rw-r--r--test/prism/snapshots/whitequark/numparam_outside_block.txt114
-rw-r--r--test/prism/snapshots/whitequark/numparam_ruby_bug_19025.txt49
-rw-r--r--test/prism/snapshots/whitequark/op_asgn.txt74
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_cmd.txt177
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_index.txt38
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_index_cmd.txt58
-rw-r--r--test/prism/snapshots/whitequark/optarg.txt74
-rw-r--r--test/prism/snapshots/whitequark/or.txt53
-rw-r--r--test/prism/snapshots/whitequark/or_asgn.txt59
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_272.txt42
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_490.txt106
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_507.txt36
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_518.txt18
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_525.txt65
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_604.txt57
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_640.txt22
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_645.txt35
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_830.txt11
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_989.txt11
-rw-r--r--test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt20
-rw-r--r--test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt139
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt54
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_blank_else.txt31
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_else.txt36
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_single_line.txt45
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt249
-rw-r--r--test/prism/snapshots/whitequark/postexe.txt15
-rw-r--r--test/prism/snapshots/whitequark/preexe.txt15
-rw-r--r--test/prism/snapshots/whitequark/procarg0.txt78
-rw-r--r--test/prism/snapshots/whitequark/range_exclusive.txt16
-rw-r--r--test/prism/snapshots/whitequark/range_inclusive.txt16
-rw-r--r--test/prism/snapshots/whitequark/rational.txt14
-rw-r--r--test/prism/snapshots/whitequark/regex_interp.txt38
-rw-r--r--test/prism/snapshots/whitequark/regex_plain.txt11
-rw-r--r--test/prism/snapshots/whitequark/resbody_list.txt45
-rw-r--r--test/prism/snapshots/whitequark/resbody_list_mrhs.txt55
-rw-r--r--test/prism/snapshots/whitequark/resbody_list_var.txt56
-rw-r--r--test/prism/snapshots/whitequark/resbody_var.txt86
-rw-r--r--test/prism/snapshots/whitequark/rescue.txt43
-rw-r--r--test/prism/snapshots/whitequark/rescue_else.txt59
-rw-r--r--test/prism/snapshots/whitequark/rescue_else_ensure.txt75
-rw-r--r--test/prism/snapshots/whitequark/rescue_ensure.txt59
-rw-r--r--test/prism/snapshots/whitequark/rescue_in_lambda_block.txt26
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod.txt29
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod_asgn.txt35
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod_masgn.txt44
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod_op_assign.txt36
-rw-r--r--test/prism/snapshots/whitequark/rescue_without_begin_end.txt59
-rw-r--r--test/prism/snapshots/whitequark/restarg_named.txt31
-rw-r--r--test/prism/snapshots/whitequark/restarg_unnamed.txt31
-rw-r--r--test/prism/snapshots/whitequark/return.txt60
-rw-r--r--test/prism/snapshots/whitequark/return_block.txt41
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_10279.txt32
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_10653.txt173
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11107.txt48
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11380.txt55
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873.txt767
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_a.txt1231
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_b.txt98
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11989.txt24
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11990.txt35
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12073.txt95
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12402.txt565
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12669.txt133
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12686.txt39
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_13547.txt31
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_14690.txt59
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_15789.txt120
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_9669.txt59
-rw-r--r--test/prism/snapshots/whitequark/sclass.txt25
-rw-r--r--test/prism/snapshots/whitequark/self.txt6
-rw-r--r--test/prism/snapshots/whitequark/send_attr_asgn.txt105
-rw-r--r--test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_binary_op.txt551
-rw-r--r--test/prism/snapshots/whitequark/send_block_chain_cmd.txt325
-rw-r--r--test/prism/snapshots/whitequark/send_block_conditional.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_call.txt57
-rw-r--r--test/prism/snapshots/whitequark/send_conditional.txt25
-rw-r--r--test/prism/snapshots/whitequark/send_index.txt34
-rw-r--r--test/prism/snapshots/whitequark/send_index_asgn.txt37
-rw-r--r--test/prism/snapshots/whitequark/send_index_asgn_legacy.txt37
-rw-r--r--test/prism/snapshots/whitequark/send_index_cmd.txt51
-rw-r--r--test/prism/snapshots/whitequark/send_index_legacy.txt34
-rw-r--r--test/prism/snapshots/whitequark/send_lambda.txt44
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args.txt51
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_noparen.txt57
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_shadow.txt34
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_legacy.txt12
-rw-r--r--test/prism/snapshots/whitequark/send_op_asgn_conditional.txt27
-rw-r--r--test/prism/snapshots/whitequark/send_plain.txt65
-rw-r--r--test/prism/snapshots/whitequark/send_plain_cmd.txt104
-rw-r--r--test/prism/snapshots/whitequark/send_self.txt41
-rw-r--r--test/prism/snapshots/whitequark/send_self_block.txt75
-rw-r--r--test/prism/snapshots/whitequark/send_unary_op.txt65
-rw-r--r--test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt34
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg.txt27
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_block.txt109
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_call.txt37
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_newline.txt27
-rw-r--r--test/prism/snapshots/whitequark/space_args_block.txt28
-rw-r--r--test/prism/snapshots/whitequark/space_args_cmd.txt47
-rw-r--r--test/prism/snapshots/whitequark/string___FILE__.txt8
-rw-r--r--test/prism/snapshots/whitequark/string_concat.txt32
-rw-r--r--test/prism/snapshots/whitequark/string_dvar.txt37
-rw-r--r--test/prism/snapshots/whitequark/string_interp.txt38
-rw-r--r--test/prism/snapshots/whitequark/string_plain.txt17
-rw-r--r--test/prism/snapshots/whitequark/super.txt49
-rw-r--r--test/prism/snapshots/whitequark/super_block.txt48
-rw-r--r--test/prism/snapshots/whitequark/symbol_interp.txt37
-rw-r--r--test/prism/snapshots/whitequark/symbol_plain.txt17
-rw-r--r--test/prism/snapshots/whitequark/ternary.txt36
-rw-r--r--test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt50
-rw-r--r--test/prism/snapshots/whitequark/trailing_forward_arg.txt55
-rw-r--r--test/prism/snapshots/whitequark/true.txt6
-rw-r--r--test/prism/snapshots/whitequark/unary_num_pow_precedence.txt80
-rw-r--r--test/prism/snapshots/whitequark/undef.txt39
-rw-r--r--test/prism/snapshots/whitequark/unless.txt63
-rw-r--r--test/prism/snapshots/whitequark/unless_else.txt95
-rw-r--r--test/prism/snapshots/whitequark/unless_mod.txt34
-rw-r--r--test/prism/snapshots/whitequark/until.txt61
-rw-r--r--test/prism/snapshots/whitequark/until_mod.txt33
-rw-r--r--test/prism/snapshots/whitequark/until_post.txt42
-rw-r--r--test/prism/snapshots/whitequark/var_and_asgn.txt14
-rw-r--r--test/prism/snapshots/whitequark/var_op_asgn.txt57
-rw-r--r--test/prism/snapshots/whitequark/var_op_asgn_cmd.txt28
-rw-r--r--test/prism/snapshots/whitequark/var_or_asgn.txt14
-rw-r--r--test/prism/snapshots/whitequark/when_multi.txt50
-rw-r--r--test/prism/snapshots/whitequark/when_splat.txt72
-rw-r--r--test/prism/snapshots/whitequark/when_then.txt44
-rw-r--r--test/prism/snapshots/whitequark/while.txt61
-rw-r--r--test/prism/snapshots/whitequark/while_mod.txt33
-rw-r--r--test/prism/snapshots/whitequark/while_post.txt42
-rw-r--r--test/prism/snapshots/whitequark/xstring_interp.txt37
-rw-r--r--test/prism/snapshots/whitequark/xstring_plain.txt11
-rw-r--r--test/prism/snapshots/whitequark/yield.txt51
-rw-r--r--test/prism/snapshots/whitequark/zsuper.txt7
-rw-r--r--test/prism/snapshots/xstring.txt67
-rw-r--r--test/prism/snapshots/xstring_with_backslash.txt11
-rw-r--r--test/prism/snapshots/yield.txt103
-rw-r--r--test/prism/snippets_test.rb42
-rw-r--r--test/prism/static_inspect_test.rb90
-rw-r--r--test/prism/static_literals_test.rb92
-rw-r--r--test/prism/test_helper.rb215
-rw-r--r--test/prism/unescape_test.rb7
-rw-r--r--test/prism/warnings_test.rb246
-rw-r--r--test/psych/test_scalar_scanner.rb13
-rw-r--r--test/psych/test_yaml.rb872
-rw-r--r--test/rdoc/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text2
-rw-r--r--test/rdoc/MarkdownTest_1.0.3/Tidiness.text (renamed from test/rdoc/MarkdownTest_1.0.3/Tidyness.text)0
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb2
-rw-r--r--test/rdoc/test_rdoc_markdown.rb17
-rw-r--r--test/rdoc/test_rdoc_markdown_test.rb6
-rw-r--r--test/rdoc/test_rdoc_parser.rb73
-rw-r--r--test/rdoc/test_rdoc_parser_prism_ruby.rb1997
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb2
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb2
-rw-r--r--test/reline/helper.rb33
-rw-r--r--test/reline/test_ansi_with_terminfo.rb4
-rw-r--r--test/reline/test_ansi_without_terminfo.rb4
-rw-r--r--test/reline/test_config.rb159
-rw-r--r--test/reline/test_key_actor_emacs.rb229
-rw-r--r--test/reline/test_key_actor_vi.rb56
-rw-r--r--test/reline/test_key_stroke.rb56
-rw-r--r--test/reline/test_line_editor.rb10
-rw-r--r--test/reline/test_reline.rb44
-rw-r--r--test/reline/test_reline_key.rb51
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb112
-rw-r--r--test/resolv/test_dns.rb121
-rw-r--r--test/ripper/test_lexer.rb200
-rw-r--r--test/ripper/test_parser_events.rb93
-rw-r--r--test/ripper/test_scanner_events.rb2
-rw-r--r--test/ruby/test_allocation.rb380
-rw-r--r--test/ruby/test_array.rb22
-rw-r--r--test/ruby/test_ast.rb183
-rw-r--r--test/ruby/test_autoload.rb1
-rw-r--r--test/ruby/test_bignum.rb6
-rw-r--r--test/ruby/test_call.rb72
-rw-r--r--test/ruby/test_case.rb9
-rw-r--r--test/ruby/test_class.rb9
-rw-r--r--test/ruby/test_compile_prism.rb34
-rw-r--r--test/ruby/test_complex.rb11
-rw-r--r--test/ruby/test_defined.rb35
-rw-r--r--test/ruby/test_dir.rb6
-rw-r--r--test/ruby/test_enum.rb8
-rw-r--r--test/ruby/test_eval.rb6
-rw-r--r--test/ruby/test_exception.rb2
-rw-r--r--test/ruby/test_file.rb79
-rw-r--r--test/ruby/test_file_exhaustive.rb23
-rw-r--r--test/ruby/test_float.rb16
-rw-r--r--test/ruby/test_gc.rb303
-rw-r--r--test/ruby/test_gc_compact.rb22
-rw-r--r--test/ruby/test_integer.rb20
-rw-r--r--test/ruby/test_io.rb43
-rw-r--r--test/ruby/test_iseq.rb78
-rw-r--r--test/ruby/test_iterator.rb16
-rw-r--r--test/ruby/test_keyword.rb34
-rw-r--r--test/ruby/test_lazy_enumerator.rb4
-rw-r--r--test/ruby/test_literal.rb33
-rw-r--r--test/ruby/test_m17n.rb25
-rw-r--r--test/ruby/test_method.rb31
-rw-r--r--test/ruby/test_mixed_unicode_escapes.rb2
-rw-r--r--test/ruby/test_module.rb13
-rw-r--r--test/ruby/test_objectspace.rb55
-rw-r--r--test/ruby/test_optimization.rb92
-rw-r--r--test/ruby/test_pack.rb41
-rw-r--r--test/ruby/test_parse.rb95
-rw-r--r--test/ruby/test_pattern_matching.rb2
-rw-r--r--test/ruby/test_proc.rb6
-rw-r--r--test/ruby/test_process.rb18
-rw-r--r--test/ruby/test_range.rb377
-rw-r--r--test/ruby/test_refinement.rb2
-rw-r--r--test/ruby/test_regexp.rb32
-rw-r--r--test/ruby/test_require.rb4
-rw-r--r--test/ruby/test_rubyoptions.rb76
-rw-r--r--test/ruby/test_rubyvm.rb11
-rw-r--r--test/ruby/test_settracefunc.rb40
-rw-r--r--test/ruby/test_sleep.rb17
-rw-r--r--test/ruby/test_sprintf.rb11
-rw-r--r--test/ruby/test_string.rb72
-rw-r--r--test/ruby/test_string_memory.rb38
-rw-r--r--test/ruby/test_super.rb45
-rw-r--r--test/ruby/test_symbol.rb6
-rw-r--r--test/ruby/test_syntax.rb89
-rw-r--r--test/ruby/test_thread.rb16
-rw-r--r--test/ruby/test_time.rb59
-rw-r--r--test/ruby/test_transcode.rb21
-rw-r--r--test/ruby/test_vm_dump.rb6
-rw-r--r--test/ruby/test_warning.rb32
-rw-r--r--test/ruby/test_weakkeymap.rb14
-rw-r--r--test/ruby/test_weakmap.rb9
-rw-r--r--test/ruby/test_yjit.rb82
-rw-r--r--test/rubygems/helper.rb38
-rw-r--r--test/rubygems/test_bundled_ca.rb2
-rw-r--r--test/rubygems/test_gem.rb20
-rw-r--r--test/rubygems/test_gem_bundler_version_finder.rb2
-rw-r--r--test/rubygems/test_gem_ci_detector.rb14
-rw-r--r--test/rubygems/test_gem_commands_exec_command.rb14
-rw-r--r--test/rubygems/test_gem_commands_fetch_command.rb82
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_list_command.rb29
-rw-r--r--test/rubygems/test_gem_commands_lock_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb11
-rw-r--r--test/rubygems/test_gem_commands_rebuild_command.rb13
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb23
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb57
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb12
-rw-r--r--test/rubygems/test_gem_config_file.rb71
-rw-r--r--test/rubygems/test_gem_ext_builder.rb70
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock8
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml2
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock8
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml2
-rw-r--r--test/rubygems/test_gem_installer.rb55
-rw-r--r--test/rubygems/test_gem_platform.rb67
-rw-r--r--test/rubygems/test_gem_rdoc.rb2
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb635
-rw-r--r--test/rubygems/test_gem_remote_fetcher_local_server.rb220
-rw-r--r--test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb195
-rw-r--r--test/rubygems/test_gem_remote_fetcher_s3.rb233
-rw-r--r--test/rubygems/test_gem_request_set_gem_dependency_api.rb2
-rw-r--r--test/rubygems/test_gem_resolver.rb2
-rw-r--r--test/rubygems/test_gem_resolver_best_set.rb82
-rw-r--r--test/rubygems/test_gem_safe_marshal.rb12
-rw-r--r--test/rubygems/test_gem_source.rb2
-rw-r--r--test/rubygems/test_gem_source_git.rb6
-rw-r--r--test/rubygems/test_gem_source_installed.rb5
-rw-r--r--test/rubygems/test_gem_source_local.rb5
-rw-r--r--test/rubygems/test_gem_source_specific_file.rb4
-rw-r--r--test/rubygems/test_gem_source_subpath_problem.rb2
-rw-r--r--test/rubygems/test_gem_specification.rb96
-rw-r--r--test/rubygems/test_gem_uninstaller.rb63
-rw-r--r--test/rubygems/test_require.rb34
-rw-r--r--test/socket/test_tcp.rb2
-rw-r--r--test/stringio/test_stringio.rb3
-rw-r--r--test/strscan/test_stringscanner.rb80
-rw-r--r--test/test_bundled_gems.rb35
-rw-r--r--test/test_tempfile.rb93
-rw-r--r--test/test_timeout.rb4
-rw-r--r--test/test_tmpdir.rb6
-rw-r--r--test/uri/test_common.rb30
-rw-r--r--test/uri/test_parser.rb14
-rw-r--r--test/zlib/test_zlib.rb25
1455 files changed, 16144 insertions, 96631 deletions
diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_reporter/test_bug_reporter.rb
index 76f913c275..c7b2a5b370 100644
--- a/test/-ext-/bug_reporter/test_bug_reporter.rb
+++ b/test/-ext-/bug_reporter/test_bug_reporter.rb
@@ -2,11 +2,15 @@
require 'test/unit'
require 'tmpdir'
require_relative '../../lib/jit_support'
+require_relative '../../lib/parser_support'
class TestBugReporter < Test::Unit::TestCase
def test_bug_reporter_add
+ pend "macOS 15 beta is not working with this test" if macos?(15)
+
omit "flaky with RJIT" if JITSupport.rjit_enabled?
- description = RUBY_DESCRIPTION.sub(/\+PRISM /, '')
+ description = RUBY_DESCRIPTION
+ description = description.sub(/\+PRISM /, '') unless ParserSupport.prism_enabled_in_subprocess?
description = description.sub(/\+RJIT /, '') unless JITSupport.rjit_force_enabled?
expected_stderr = [
:*,
diff --git a/test/-ext-/integer/test_my_integer.rb b/test/-ext-/integer/test_my_integer.rb
index 1b6f8489f8..0dfa234921 100644
--- a/test/-ext-/integer/test_my_integer.rb
+++ b/test/-ext-/integer/test_my_integer.rb
@@ -8,19 +8,13 @@ class Test_MyInteger < Test::Unit::TestCase
Bug::Integer::MyInteger.new.to_f
end
- begin
- Bug::Integer::MyInteger.class_eval do
- def to_f
- end
+ int = Class.new(Bug::Integer::MyInteger) do
+ def to_f
end
+ end
- assert_nothing_raised do
- Bug::Integer::MyInteger.new.to_f
- end
- ensure
- Bug::Integer::MyInteger.class_eval do
- remove_method :to_f
- end
+ assert_nothing_raised do
+ int.new.to_f
end
end
@@ -29,20 +23,14 @@ class Test_MyInteger < Test::Unit::TestCase
Bug::Integer::MyInteger.new <=> 0
end
- begin
- Bug::Integer::MyInteger.class_eval do
- def <=>(other)
- 0
- end
+ int = Class.new(Bug::Integer::MyInteger) do
+ def <=>(other)
+ 0
end
+ end
- assert_nothing_raised do
- Bug::Integer::MyInteger.new <=> 0
- end
- ensure
- Bug::Integer::MyInteger.class_eval do
- remove_method :<=>
- end
+ assert_nothing_raised do
+ int.new <=> 0
end
end
end
diff --git a/test/-ext-/required.rb b/test/-ext-/required.rb
new file mode 100644
index 0000000000..70514355ff
--- /dev/null
+++ b/test/-ext-/required.rb
@@ -0,0 +1,10 @@
+require 'continuation'
+cont = nil
+a = [*1..10].reject do |i|
+ callcc {|c| cont = c} if !cont and i == 10
+ false
+end
+if a.size < 1000
+ a.unshift(:x)
+ cont.call
+end
diff --git a/test/-ext-/string/test_capacity.rb b/test/-ext-/string/test_capacity.rb
index 2c6c51fdda..bcca64d85a 100644
--- a/test/-ext-/string/test_capacity.rb
+++ b/test/-ext-/string/test_capacity.rb
@@ -23,7 +23,7 @@ class Test_StringCapacity < Test::Unit::TestCase
def test_s_new_capacity
assert_equal("", String.new(capacity: 1000))
assert_equal(String, String.new(capacity: 1000).class)
- assert_equal(10_000 - 1, capa(String.new(capacity: 10_000))) # Real capa doesn't account for termlen
+ assert_equal(10_000, capa(String.new(capacity: 10_000)))
assert_equal("", String.new(capacity: -1000))
assert_equal(capa(String.new(capacity: -10000)), capa(String.new(capacity: -1000)))
diff --git a/test/-ext-/string/test_chilled.rb b/test/-ext-/string/test_chilled.rb
deleted file mode 100644
index dccab61ced..0000000000
--- a/test/-ext-/string/test_chilled.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'test/unit'
-require '-test-/string'
-
-class Test_String_ChilledString < Test::Unit::TestCase
- def test_rb_str_chilled_p
- str = ""
- assert_equal true, Bug::String.rb_str_chilled_p(str)
- end
-
- def test_rb_str_chilled_p_frozen
- str = "".freeze
- assert_equal false, Bug::String.rb_str_chilled_p(str)
- end
-
- def test_rb_str_chilled_p_mutable
- str = "".dup
- assert_equal false, Bug::String.rb_str_chilled_p(str)
- end
-end
diff --git a/test/-ext-/string/test_set_len.rb b/test/-ext-/string/test_set_len.rb
index e3eff75d9b..1531d76167 100644
--- a/test/-ext-/string/test_set_len.rb
+++ b/test/-ext-/string/test_set_len.rb
@@ -63,4 +63,22 @@ class Test_StrSetLen < Test::Unit::TestCase
assert_not_predicate str, :ascii_only?
assert_equal u, str
end
+
+ def test_valid_encoding_after_resized
+ s = "\0\0".force_encoding(Encoding::UTF_16BE)
+ str = Bug::String.new(s)
+ assert_predicate str, :valid_encoding?
+ str.resize(1)
+ assert_not_predicate str, :valid_encoding?
+ str.resize(2)
+ assert_predicate str, :valid_encoding?
+ str.resize(3)
+ assert_not_predicate str, :valid_encoding?
+
+ s = "\xDB\x00\xDC\x00".force_encoding(Encoding::UTF_16BE)
+ str = Bug::String.new(s)
+ assert_predicate str, :valid_encoding?
+ str.resize(2)
+ assert_not_predicate str, :valid_encoding?
+ end
end
diff --git a/test/-ext-/test_ensure_and_callcc.rb b/test/-ext-/test_ensure_and_callcc.rb
new file mode 100644
index 0000000000..9303a094ea
--- /dev/null
+++ b/test/-ext-/test_ensure_and_callcc.rb
@@ -0,0 +1,40 @@
+# -*- coding: us-ascii -*-
+# frozen_string_literal: false
+require 'test/unit'
+
+class TestEnsureAndCallcc < Test::Unit::TestCase
+ def test_bug20655_dir_chdir_using_rb_ensure
+ require 'tmpdir'
+ need_continuation
+ called = 0
+ tmp = nil
+ Dir.mktmpdir do |tmpdir|
+ Dir.chdir(tmpdir) do
+ tmp = Dir.pwd
+ cont = nil
+ callcc{|c| cont = c}
+ assert_equal(tmp, Dir.pwd, "BUG #20655: ensure called and pwd was changed unexpectedly")
+ called += 1
+ cont.call if called < 10
+ end
+ end
+ end
+
+ def test_bug20655_extension_using_rb_ensure
+ need_continuation
+ require '-test-/ensure_and_callcc'
+ EnsureAndCallcc.reset
+ assert_equal(0, EnsureAndCallcc.ensure_called)
+ EnsureAndCallcc.require_with_ensure(File.join(__dir__, 'required'))
+ assert_equal(1, EnsureAndCallcc.ensure_called,
+ "BUG #20655: ensure called unexpectedly in the required script even without exceptions")
+ end
+
+ private
+ def need_continuation
+ unless respond_to?(:callcc, true)
+ EnvUtil.suppress_warning {require 'continuation'}
+ end
+ omit 'requires callcc support' unless respond_to?(:callcc, true)
+ end
+end
diff --git a/test/-ext-/thread/test_instrumentation_api.rb b/test/-ext-/thread/test_instrumentation_api.rb
index 9a3b67fa10..663e41be53 100644
--- a/test/-ext-/thread/test_instrumentation_api.rb
+++ b/test/-ext-/thread/test_instrumentation_api.rb
@@ -54,7 +54,7 @@ class TestThreadInstrumentation < Test::Unit::TestCase
thread&.join
end
- def test_muti_thread_timeline
+ def test_multi_thread_timeline
threads = nil
full_timeline = record do
threads = threaded_cpu_bound_work(1.0)
@@ -68,7 +68,7 @@ class TestThreadInstrumentation < Test::Unit::TestCase
threads.each do |thread|
timeline = timeline_for(thread, full_timeline)
assert_consistent_timeline(timeline)
- assert timeline.count(:suspended) > 1, "Expected threads to yield suspended at least once: #{timeline.inspect}"
+ assert_operator timeline.count(:suspended), :>=, 1, "Expected threads to yield suspended at least once: #{timeline.inspect}"
end
timeline = timeline_for(Thread.current, full_timeline)
diff --git a/test/.excludes-parsey/TestBugReporter.rb b/test/.excludes-parsey/TestBugReporter.rb
new file mode 100644
index 0000000000..72357760a6
--- /dev/null
+++ b/test/.excludes-parsey/TestBugReporter.rb
@@ -0,0 +1 @@
+exclude(:test_bug_reporter_add, "unexpected +PRISM in the Ruby description")
diff --git a/test/.excludes-parsey/TestM17N.rb b/test/.excludes-parsey/TestM17N.rb
new file mode 100644
index 0000000000..7f8c44d02a
--- /dev/null
+++ b/test/.excludes-parsey/TestM17N.rb
@@ -0,0 +1 @@
+exclude(:test_regexp_usascii, "https://bugs.ruby-lang.org/issues/20504")
diff --git a/test/.excludes-parsey/TestMixedUnicodeEscape.rb b/test/.excludes-parsey/TestMixedUnicodeEscape.rb
new file mode 100644
index 0000000000..7bf964ebf1
--- /dev/null
+++ b/test/.excludes-parsey/TestMixedUnicodeEscape.rb
@@ -0,0 +1 @@
+exclude(:test_basic, "https://bugs.ruby-lang.org/issues/20504")
diff --git a/test/.excludes-parsey/TestRubyLiteral.rb b/test/.excludes-parsey/TestRubyLiteral.rb
new file mode 100644
index 0000000000..853f23a3b9
--- /dev/null
+++ b/test/.excludes-parsey/TestRubyLiteral.rb
@@ -0,0 +1 @@
+exclude(:test_dregexp, "https://bugs.ruby-lang.org/issues/20504")
diff --git a/test/.excludes-parsey/TestRubyOptions.rb b/test/.excludes-parsey/TestRubyOptions.rb
new file mode 100644
index 0000000000..f6ac8c744a
--- /dev/null
+++ b/test/.excludes-parsey/TestRubyOptions.rb
@@ -0,0 +1,10 @@
+exclude(:test_crash_report_executable_path, "unexpected +PRISM in the Ruby description")
+exclude(:test_crash_report_script_path, "unexpected +PRISM in the Ruby description")
+exclude(:test_crash_report_script, "unexpected +PRISM in the Ruby description")
+exclude(:test_crash_report, "unexpected +PRISM in the Ruby description")
+exclude(:test_rjit_disabled_version, "unexpected +PRISM in the Ruby description")
+exclude(:test_segv_loaded_features, "unexpected +PRISM in the Ruby description")
+exclude(:test_segv_setproctitle, "unexpected +PRISM in the Ruby description")
+exclude(:test_segv_test, "unexpected +PRISM in the Ruby description")
+exclude(:test_verbose, "unexpected +PRISM in the Ruby description")
+exclude(:test_version, "unexpected +PRISM in the Ruby description")
diff --git a/test/.excludes-prism/TestAssignment.rb b/test/.excludes-prism/TestAssignment.rb
deleted file mode 100644
index 23a1b4c5e7..0000000000
--- a/test/.excludes-prism/TestAssignment.rb
+++ /dev/null
@@ -1 +0,0 @@
-exclude(:test_massign_order, "https://github.com/ruby/prism/issues/2370")
diff --git a/test/.excludes-prism/TestAssignmentGen.rb b/test/.excludes-prism/TestAssignmentGen.rb
deleted file mode 100644
index 5f3bb12ef7..0000000000
--- a/test/.excludes-prism/TestAssignmentGen.rb
+++ /dev/null
@@ -1 +0,0 @@
-exclude(:test_assignment, "https://github.com/ruby/prism/issues/2370")
diff --git a/test/.excludes-prism/TestCoverage.rb b/test/.excludes-prism/TestCoverage.rb
deleted file mode 100644
index f122d6edbc..0000000000
--- a/test/.excludes-prism/TestCoverage.rb
+++ /dev/null
@@ -1 +0,0 @@
-exclude(:test_eval, "respect eval coverage setting")
diff --git a/test/.excludes-prism/TestISeq.rb b/test/.excludes-prism/TestISeq.rb
deleted file mode 100644
index ee3d92494e..0000000000
--- a/test/.excludes-prism/TestISeq.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-exclude(:test_syntax_error_message, "error message format")
-
-exclude(:test_each_child, "https://bugs.ruby-lang.org/issues/20479")
-exclude(:test_trace_points, "https://bugs.ruby-lang.org/issues/20479")
diff --git a/test/.excludes-prism/TestM17N.rb b/test/.excludes-prism/TestM17N.rb
deleted file mode 100644
index f10c9632d9..0000000000
--- a/test/.excludes-prism/TestM17N.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-exclude(:test_regexp_usascii, "x80 should raise syntax error")
-exclude(:test_string_mixed_unicode, "should raise mixed encoding error")
diff --git a/test/.excludes-prism/TestMixedUnicodeEscape.rb b/test/.excludes-prism/TestMixedUnicodeEscape.rb
deleted file mode 100644
index 753c119d14..0000000000
--- a/test/.excludes-prism/TestMixedUnicodeEscape.rb
+++ /dev/null
@@ -1 +0,0 @@
-exclude(:test_basic, "should raise mixed encoding error")
diff --git a/test/.excludes-prism/TestParse.rb b/test/.excludes-prism/TestParse.rb
deleted file mode 100644
index 7cf5f97dd2..0000000000
--- a/test/.excludes-prism/TestParse.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-exclude(:test_global_variable, "error message format")
-exclude(:test_invalid_char, "error message format")
-exclude(:test_location_of_invalid_token, "error message format")
-exclude(:test_percent, "error message format")
-exclude(:test_question, "error message format")
-exclude(:test_string, "error message format")
-exclude(:test_truncated_source_line, "truncate error message")
-exclude(:test_unexpected_eof, "error message format")
-exclude(:test_unexpected_token_after_numeric, "error message format")
-exclude(:test_void_value_in_rhs, "missing raising error for some void value expressions")
diff --git a/test/.excludes-prism/TestRegexp.rb b/test/.excludes-prism/TestRegexp.rb
deleted file mode 100644
index 5852d870ef..0000000000
--- a/test/.excludes-prism/TestRegexp.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-exclude(:test_unescape, "unescapes in regexp missing some bytes")
-exclude(:test_match_control_meta_escape, "unescapes in regexp missing some bytes")
diff --git a/test/.excludes-prism/TestRequire.rb b/test/.excludes-prism/TestRequire.rb
deleted file mode 100644
index cb35d59c60..0000000000
--- a/test/.excludes-prism/TestRequire.rb
+++ /dev/null
@@ -1 +0,0 @@
-exclude(:test_require_nonascii_path_shift_jis, "requiring non-ascii paths")
diff --git a/test/.excludes-prism/TestRubyLiteral.rb b/test/.excludes-prism/TestRubyLiteral.rb
deleted file mode 100644
index a25e1c47d9..0000000000
--- a/test/.excludes-prism/TestRubyLiteral.rb
+++ /dev/null
@@ -1 +0,0 @@
-exclude(:test_dregexp, "x80 should raise syntax error")
diff --git a/test/.excludes-prism/TestSyntax.rb b/test/.excludes-prism/TestSyntax.rb
deleted file mode 100644
index 0d312618c7..0000000000
--- a/test/.excludes-prism/TestSyntax.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-exclude(:test__END___cr, "error message format")
-exclude(:test_dedented_heredoc_continued_line, "heredoc line continuation dedent calculation")
-exclude(:test_duplicated_when, "error message format")
-exclude(:test_error_message_encoding, "syntax error message encoding")
-exclude(:test_it, "https://github.com/ruby/prism/issues/2323")
-exclude(:test_numbered_parameter, "should raise syntax error for numbered parameters in inner blocks")
-exclude(:test_syntax_error_at_newline, "error message format")
-exclude(:test_unterminated_heredoc_cr, "quoted \r heredoc terminators should not match \r\n")
-exclude(:test_warn_balanced, "missing warning for ** being interpreted as a binary operator")
-
-exclude(:test_optional_self_reference, "https://bugs.ruby-lang.org/issues/20478")
-exclude(:test_keyword_self_reference, "https://bugs.ruby-lang.org/issues/20478")
diff --git a/test/error_highlight/test_error_highlight.rb b/test/error_highlight/test_error_highlight.rb
index 2095970af1..5f4c386990 100644
--- a/test/error_highlight/test_error_highlight.rb
+++ b/test/error_highlight/test_error_highlight.rb
@@ -1,6 +1,7 @@
require "test/unit"
require "error_highlight"
+require "did_you_mean"
require "tempfile"
class ErrorHighlightTest < Test::Unit::TestCase
@@ -872,7 +873,7 @@ uninitialized constant ErrorHighlightTest::NotDefined
def test_COLON2_5
# Unfortunately, we cannot identify which `NotDefined` caused the NameError
assert_error_message(NameError, <<~END) do
-uninitialized constant ErrorHighlightTest::NotDefined
+ uninitialized constant ErrorHighlightTest::NotDefined
END
ErrorHighlightTest::NotDefined::NotDefined
@@ -1335,6 +1336,11 @@ undefined method `foo' for #{ NIL_RECV_MESSAGE }
def test_spot_with_node
omit unless RubyVM::AbstractSyntaxTree.respond_to?(:node_id_for_backtrace_location)
+ # We can't revisit instruction sequences to find node ids if the prism
+ # compiler was used instead of the parse.y compiler. In that case, we'll
+ # omit some tests.
+ omit if RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism
+
begin
raise_name_error
rescue NameError => exc
diff --git a/test/fiber/test_io.rb b/test/fiber/test_io.rb
index 0e3e086d5a..4891c607f7 100644
--- a/test/fiber/test_io.rb
+++ b/test/fiber/test_io.rb
@@ -234,4 +234,45 @@ class TestFiberIO < Test::Unit::TestCase
assert_equal "ok\n", result
end
+
+ # Tests for https://bugs.ruby-lang.org/issues/20723 which would
+ # otherwise deadlock this test.
+ def test_close_while_reading_on_thread
+ # Windows has UNIXSocket, but only with VS 2019+
+ omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
+
+ i, o = Socket.pair(:UNIX, :STREAM)
+ if RUBY_PLATFORM=~/mswin|mingw/
+ i.nonblock = true
+ o.nonblock = true
+ end
+
+ reading_thread = Thread.new do
+ Thread.current.report_on_exception = false
+ i.wait_readable
+ end
+
+ fs_thread = Thread.new do
+ # Wait until the reading thread is blocked on read:
+ Thread.pass until reading_thread.status == "sleep"
+
+ scheduler = Scheduler.new
+ Fiber.set_scheduler scheduler
+ Fiber.schedule do
+ i.close
+ end
+ end
+
+ assert_raise(IOError) { reading_thread.join }
+ refute_nil fs_thread.join(5), "expected thread to terminate within 5 seconds"
+
+ assert_predicate(i, :closed?)
+ ensure
+ fs_thread&.kill
+ fs_thread&.join rescue nil
+ reading_thread&.kill
+ reading_thread&.join rescue nil
+ i&.close
+ o&.close
+ end
end
diff --git a/test/fiddle/test_function.rb b/test/fiddle/test_function.rb
index 847df3793a..2bd67c9da1 100644
--- a/test/fiddle/test_function.rb
+++ b/test/fiddle/test_function.rb
@@ -167,6 +167,8 @@ module Fiddle
end
def test_nogvl_poll
+ require "envutil" unless defined?(EnvUtil)
+
# XXX hack to quiet down CI errors on EINTR from r64353
# [ruby-core:88360] [Misc #14937]
# Making pipes (and sockets) non-blocking by default would allow
@@ -180,13 +182,13 @@ module Fiddle
end
f = Function.new(poll, [TYPE_VOIDP, TYPE_INT, TYPE_INT], TYPE_INT)
- msec = 200
+ msec = EnvUtil.apply_timeout_scale(1000)
t0 = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
th = Thread.new { f.call(nil, 0, msec) }
n1 = f.call(nil, 0, msec)
n2 = th.value
t1 = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
- assert_in_delta(msec, t1 - t0, 180, 'slept amount of time')
+ assert_in_delta(msec, t1 - t0, EnvUtil.apply_timeout_scale(500), 'slept amount of time')
assert_equal(0, n1, perror("poll(2) in main-thread"))
assert_equal(0, n2, perror("poll(2) in sub-thread"))
end
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index 481f913d0c..d2096a04cc 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -93,12 +93,24 @@ class TestFileUtils < Test::Unit::TestCase
@@no_broken_symlink
end
+ def has_capsh?
+ !!system('capsh', '--print', out: File::NULL, err: File::NULL)
+ end
+
+ def has_root_file_capabilities?
+ !!system(
+ 'capsh', '--has-p=CAP_DAC_OVERRIDE', '--has-p=CAP_CHOWN', '--has-p=CAP_FOWNER',
+ out: File::NULL, err: File::NULL
+ )
+ end
+
def root_in_posix?
if /cygwin/ =~ RUBY_PLATFORM
# FIXME: privilege if groups include root user?
return Process.groups.include?(0)
- end
- if Process.respond_to?('uid')
+ elsif has_capsh?
+ return has_root_file_capabilities?
+ elsif Process.respond_to?('uid')
return Process.uid == 0
else
return false
diff --git a/test/io/console/test_ractor.rb b/test/io/console/test_ractor.rb
new file mode 100644
index 0000000000..b30988f47e
--- /dev/null
+++ b/test/io/console/test_ractor.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+require 'test/unit'
+require 'rbconfig'
+
+class TestIOConsoleInRactor < Test::Unit::TestCase
+ def test_ractor
+ ext = "/io/console.#{RbConfig::CONFIG['DLEXT']}"
+ path = $".find {|path| path.end_with?(ext)}
+ assert_in_out_err(%W[-r#{path}], "#{<<~"begin;"}\n#{<<~'end;'}", ["true"], [])
+ begin;
+ $VERBOSE = nil
+ r = Ractor.new do
+ $stdout.console_mode
+ rescue SystemCallError
+ true
+ rescue Ractor::UnsafeError
+ false
+ else
+ true # should not success
+ end
+ puts r.take
+ end;
+
+ assert_in_out_err(%W[-r#{path}], "#{<<~"begin;"}\n#{<<~'end;'}", ["true"], [])
+ begin;
+ console = IO.console
+ $VERBOSE = nil
+ r = Ractor.new do
+ IO.console
+ end
+ puts console.class == r.take.class
+ end;
+ end
+end if defined? Ractor
diff --git a/test/irb/command/test_cd.rb b/test/irb/command/test_cd.rb
new file mode 100644
index 0000000000..4537286f73
--- /dev/null
+++ b/test/irb/command/test_cd.rb
@@ -0,0 +1,65 @@
+require "tempfile"
+require_relative "../helper"
+
+module TestIRB
+ class CDTest < IntegrationTestCase
+ def setup
+ super
+
+ write_ruby <<~'RUBY'
+ class Foo
+ class Bar
+ def bar
+ "this is bar"
+ end
+ end
+
+ def foo
+ "this is foo"
+ end
+ end
+
+ binding.irb
+ RUBY
+ end
+
+ def test_cd
+ out = run_ruby_file do
+ type "cd Foo"
+ type "ls"
+ type "cd Bar"
+ type "ls"
+ type "cd .."
+ type "exit"
+ end
+
+ assert_match(/irb\(Foo\):002>/, out)
+ assert_match(/Foo#methods: foo/, out)
+ assert_match(/irb\(Foo::Bar\):004>/, out)
+ assert_match(/Bar#methods: bar/, out)
+ assert_match(/irb\(Foo\):006>/, out)
+ end
+
+ def test_cd_moves_top_level_with_no_args
+ out = run_ruby_file do
+ type "cd Foo"
+ type "cd Bar"
+ type "cd"
+ type "exit"
+ end
+
+ assert_match(/irb\(Foo::Bar\):003>/, out)
+ assert_match(/irb\(main\):004>/, out)
+ end
+
+ def test_cd_with_error
+ out = run_ruby_file do
+ type "cd Baz"
+ type "exit"
+ end
+
+ assert_match(/Error: uninitialized constant Baz/, out)
+ assert_match(/irb\(main\):002>/, out) # the context should not change
+ end
+ end
+end
diff --git a/test/irb/command/test_custom_command.rb b/test/irb/command/test_custom_command.rb
index 3a3ad11d5a..13f412c210 100644
--- a/test/irb/command/test_custom_command.rb
+++ b/test/irb/command/test_custom_command.rb
@@ -145,5 +145,50 @@ module TestIRB
assert_include(output, "No description provided.")
assert_not_include(output, "Maybe IRB bug")
end
+
+ def test_command_name_local_variable
+ write_ruby <<~RUBY
+ require "irb/command"
+
+ class FooBarCommand < IRB::Command::Base
+ category 'CommandTest'
+ description 'test'
+ def execute(arg)
+ puts "arg=\#{arg.inspect}"
+ end
+ end
+
+ IRB::Command.register(:foo_bar, FooBarCommand)
+
+ binding.irb
+ RUBY
+
+ output = run_ruby_file do
+ type "binding.irb"
+ type "foo_bar == 1 || 1"
+ type "foo_bar =~ /2/ || 2"
+ type "exit"
+ type "binding.irb"
+ type "foo_bar = '3'; foo_bar"
+ type "foo_bar == 4 || '4'"
+ type "foo_bar =~ /5/ || '5'"
+ type "exit"
+ type "binding.irb"
+ type "foo_bar ||= '6'; foo_bar"
+ type "foo_bar == 7 || '7'"
+ type "foo_bar =~ /8/ || '8'"
+ type "exit"
+ type "exit"
+ end
+
+ assert_include(output, 'arg="== 1 || 1"')
+ assert_include(output, 'arg="=~ /2/ || 2"')
+ assert_include(output, '=> "3"')
+ assert_include(output, '=> "4"')
+ assert_include(output, '=> "5"')
+ assert_include(output, '=> "6"')
+ assert_include(output, '=> "7"')
+ assert_include(output, '=> "8"')
+ end
end
end
diff --git a/test/irb/command/test_disable_irb.rb b/test/irb/command/test_disable_irb.rb
new file mode 100644
index 0000000000..14a20043d5
--- /dev/null
+++ b/test/irb/command/test_disable_irb.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: false
+require 'irb'
+
+require_relative "../helper"
+
+module TestIRB
+ class DisableIRBTest < IntegrationTestCase
+ def test_disable_irb_disable_further_irb_breakpoints
+ write_ruby <<~'ruby'
+ puts "First line"
+ puts "Second line"
+ binding.irb
+ puts "Third line"
+ binding.irb
+ puts "Fourth line"
+ ruby
+
+ output = run_ruby_file do
+ type "disable_irb"
+ end
+
+ assert_match(/First line\r\n/, output)
+ assert_match(/Second line\r\n/, output)
+ assert_match(/Third line\r\n/, output)
+ assert_match(/Fourth line\r\n/, output)
+ end
+ end
+end
diff --git a/test/irb/helper.rb b/test/irb/helper.rb
index acaf6277f3..ea2c6ef16a 100644
--- a/test/irb/helper.rb
+++ b/test/irb/helper.rb
@@ -49,6 +49,19 @@ module TestIRB
!Pathname(__dir__).join("../../", "irb.gemspec").exist?
end
+ def setup_envs(home:)
+ @backup_home = ENV["HOME"]
+ ENV["HOME"] = home
+ @backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
+ @backup_irbrc = ENV.delete("IRBRC")
+ end
+
+ def teardown_envs
+ ENV["HOME"] = @backup_home
+ ENV["XDG_CONFIG_HOME"] = @backup_xdg_config_home
+ ENV["IRBRC"] = @backup_irbrc
+ end
+
def save_encodings
@default_encoding = [Encoding.default_external, Encoding.default_internal]
@stdio_encodings = [STDIN, STDOUT, STDERR].map {|io| [io.external_encoding, io.internal_encoding] }
diff --git a/test/irb/test_command.rb b/test/irb/test_command.rb
index 8cb8928adb..69931e3e4f 100644
--- a/test/irb/test_command.rb
+++ b/test/irb/test_command.rb
@@ -15,9 +15,7 @@ module TestIRB
Dir.mkdir(@tmpdir)
end
Dir.chdir(@tmpdir)
- @home_backup = ENV["HOME"]
- ENV["HOME"] = @tmpdir
- @xdg_config_home_backup = ENV.delete("XDG_CONFIG_HOME")
+ setup_envs(home: @tmpdir)
save_encodings
IRB.instance_variable_get(:@CONF).clear
IRB.instance_variable_set(:@existing_rc_name_generators, nil)
@@ -25,8 +23,7 @@ module TestIRB
end
def teardown
- ENV["XDG_CONFIG_HOME"] = @xdg_config_home_backup
- ENV["HOME"] = @home_backup
+ teardown_envs
Dir.chdir(@pwd)
FileUtils.rm_rf(@tmpdir)
restore_encodings
@@ -239,7 +236,7 @@ module TestIRB
)
assert_empty err
- assert_match(/\A(TIME is added\.\n=> nil\nprocessing time: .+\n=> 3\n=> nil\n=> 3\n){2}/, out)
+ assert_match(/\A(TIME is added\.\nprocessing time: .+\n=> 3\n=> 3\n){2}/, out)
assert_empty(c.class_variables)
end
@@ -266,7 +263,7 @@ module TestIRB
)
assert_empty err
- assert_match(/\ATIME is added\.\n=> nil\nprocessing time: .+\n=> 3\nprocessing time: .+\n=> 3/, out)
+ assert_match(/\ATIME is added\.\nprocessing time: .+\n=> 3\nprocessing time: .+\n=> 3/, out)
assert_empty(c.class_variables)
end
@@ -291,7 +288,7 @@ module TestIRB
)
assert_empty err
- assert_match(/\Aprocessing time: .+\n=> 3\n=> nil\n=> 3\n/, out)
+ assert_match(/\Aprocessing time: .+\n=> 3\n=> 3\n/, out)
end
def test_measure_enabled_by_rc_with_custom
@@ -321,7 +318,7 @@ module TestIRB
conf: conf,
)
assert_empty err
- assert_match(/\Acustom processing time: .+\n=> 3\n=> nil\n=> 3\n/, out)
+ assert_match(/\Acustom processing time: .+\n=> 3\n=> 3\n/, out)
end
def test_measure_with_custom
@@ -353,7 +350,7 @@ module TestIRB
)
assert_empty err
- assert_match(/\A=> 3\nCUSTOM is added\.\n=> nil\ncustom processing time: .+\n=> 3\n=> nil\n=> 3\n/, out)
+ assert_match(/\A=> 3\nCUSTOM is added\.\ncustom processing time: .+\n=> 3\n=> 3\n/, out)
end
def test_measure_toggle
@@ -385,7 +382,7 @@ module TestIRB
)
assert_empty err
- assert_match(/\AFOO is added\.\n=> nil\nfoo\n=> 1\nBAR is added\.\n=> nil\nbar\nfoo\n=> 2\n=> nil\nbar\n=> 3\n=> nil\n=> 4\n/, out)
+ assert_match(/\AFOO is added\.\nfoo\n=> 1\nBAR is added\.\nbar\nfoo\n=> 2\nbar\n=> 3\n=> 4\n/, out)
end
def test_measure_with_proc_warning
@@ -410,7 +407,7 @@ module TestIRB
)
assert_match(/to add custom measure/, err)
- assert_match(/\A=> 3\n=> nil\n=> 3\n/, out)
+ assert_match(/\A=> 3\n=> 3\n/, out)
assert_empty(c.class_variables)
end
end
@@ -429,8 +426,7 @@ module TestIRB
/=> "bug17564"\n/,
/=> "bug17564"\n/,
/ => "hi"\n/,
- / => nil\n/,
- /=> "hi"\n/,
+ / => "hi"\n/,
], out)
end
@@ -457,8 +453,7 @@ module TestIRB
/=> "bug17564"\n/,
/=> "bug17564"\n/,
/ => "hi"\n/,
- / => nil\n/,
- /=> "bug17564"\n/,
+ / => "bug17564"\n/,
], out)
end
@@ -760,10 +755,7 @@ module TestIRB
class ShowDocTest < CommandTestCase
def test_show_doc
- out, err = execute_lines(
- "show_doc String#gsub\n",
- "\n",
- )
+ out, err = execute_lines("show_doc String#gsub")
# the former is what we'd get without document content installed, like on CI
# the latter is what we may get locally
@@ -773,18 +765,13 @@ module TestIRB
ensure
# this is the only way to reset the redefined method without coupling the test with its implementation
EnvUtil.suppress_warning { load "irb/command/help.rb" }
- end
+ end if defined?(RDoc)
def test_show_doc_without_rdoc
- out, err = without_rdoc do
- execute_lines(
- "show_doc String#gsub\n",
- "\n",
- )
+ _, err = without_rdoc do
+ execute_lines("show_doc String#gsub")
end
- # if it fails to require rdoc, it only returns the command object
- assert_match(/=> nil\n/, out)
assert_include(err, "Can't display document because `rdoc` is not installed.\n")
ensure
# this is the only way to reset the redefined method without coupling the test with its implementation
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index 5fe7952b3d..c9a0eafa3d 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -16,8 +16,14 @@ module TestIRB
class CommandCompletionTest < CompletionTest
def test_command_completion
- assert_include(IRB::RegexpCompletor.new.completion_candidates('', 'show_s', '', bind: binding), 'show_source')
- assert_not_include(IRB::RegexpCompletor.new.completion_candidates(';', 'show_s', '', bind: binding), 'show_source')
+ completor = IRB::RegexpCompletor.new
+ binding.eval("some_var = 1")
+ # completion for help command's argument should only include command names
+ assert_include(completor.completion_candidates('help ', 's', '', bind: binding), 'show_source')
+ assert_not_include(completor.completion_candidates('help ', 's', '', bind: binding), 'some_var')
+
+ assert_include(completor.completion_candidates('', 'show_s', '', bind: binding), 'show_source')
+ assert_not_include(completor.completion_candidates(';', 'show_s', '', bind: binding), 'show_source')
end
end
diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb
index cd3f2c8f62..7ad8fd2fc4 100644
--- a/test/irb/test_context.rb
+++ b/test/irb/test_context.rb
@@ -28,7 +28,6 @@ module TestIRB
restore_encodings
end
-
def test_eval_input
verbose, $VERBOSE = $VERBOSE, nil
input = TestInputMethod.new([
diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb
index 63be35fdaa..84f0438929 100644
--- a/test/irb/test_history.rb
+++ b/test/irb/test_history.rb
@@ -12,19 +12,14 @@ module TestIRB
def setup
@original_verbose, $VERBOSE = $VERBOSE, nil
@tmpdir = Dir.mktmpdir("test_irb_history_")
- @backup_home = ENV["HOME"]
- @backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
- @backup_irbrc = ENV.delete("IRBRC")
+ setup_envs(home: @tmpdir)
@backup_default_external = Encoding.default_external
- ENV["HOME"] = @tmpdir
IRB.instance_variable_set(:@existing_rc_name_generators, nil)
end
def teardown
IRB.instance_variable_set(:@existing_rc_name_generators, nil)
- ENV["HOME"] = @backup_home
- ENV["XDG_CONFIG_HOME"] = @backup_xdg_config_home
- ENV["IRBRC"] = @backup_irbrc
+ teardown_envs
Encoding.default_external = @backup_default_external
$VERBOSE = @original_verbose
FileUtils.rm_rf(@tmpdir)
diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb
index 3207c2898b..3e8d01c5ce 100644
--- a/test/irb/test_init.rb
+++ b/test/irb/test_init.rb
@@ -270,20 +270,18 @@ module TestIRB
class ConfigValidationTest < TestCase
def setup
- @original_home = ENV["HOME"]
- @original_irbrc = ENV["IRBRC"]
# To prevent the test from using the user's .irbrc file
- ENV["HOME"] = @home = Dir.mktmpdir
- IRB.instance_variable_set(:@existing_rc_name_generators, nil)
+ @home = Dir.mktmpdir
+ setup_envs(home: @home)
super
end
def teardown
super
- ENV["IRBRC"] = @original_irbrc
- ENV["HOME"] = @original_home
+ teardown_envs
File.unlink(@irbrc)
Dir.rmdir(@home)
+ IRB.instance_variable_set(:@existing_rc_name_generators, nil)
end
def test_irb_name_converts_non_string_values_to_string
diff --git a/test/irb/test_input_method.rb b/test/irb/test_input_method.rb
index ce317b4b32..bd107551df 100644
--- a/test/irb/test_input_method.rb
+++ b/test/irb/test_input_method.rb
@@ -1,13 +1,17 @@
# frozen_string_literal: false
require "irb"
-require "rdoc"
+begin
+ require "rdoc"
+rescue LoadError
+end
require_relative "helper"
module TestIRB
class InputMethodTest < TestCase
def setup
@conf_backup = IRB.conf.dup
+ IRB.init_config(nil)
IRB.conf[:LC_MESSAGES] = IRB::Locale.new
save_encodings
end
@@ -33,6 +37,23 @@ module TestIRB
assert_not_nil Reline.dig_perfect_match_proc
end
+ def test_colorize
+ IRB.conf[:USE_COLORIZE] = true
+ IRB.conf[:VERBOSE] = false
+ original_colorable = IRB::Color.method(:colorable?)
+ IRB::Color.instance_eval { undef :colorable? }
+ IRB::Color.define_singleton_method(:colorable?) { true }
+ workspace = IRB::WorkSpace.new(binding)
+ input_method = IRB::RelineInputMethod.new(IRB::RegexpCompletor.new)
+ IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new(workspace, input_method).context
+ assert_equal "\e[1m$\e[0m\e[m", Reline.output_modifier_proc.call('$', complete: false)
+ assert_equal "\e[1m$\e[0m\e[m \e[34m\e[1m1\e[0m + \e[34m\e[1m2\e[0m", Reline.output_modifier_proc.call('$ 1 + 2', complete: false)
+ assert_equal "\e[32m\e[1m$a\e[0m", Reline.output_modifier_proc.call('$a', complete: false)
+ ensure
+ IRB::Color.instance_eval { undef :colorable? }
+ IRB::Color.define_singleton_method(:colorable?, original_colorable)
+ end
+
def test_initialization_without_use_autocomplete
original_show_doc_proc = Reline.dialog_proc(:show_doc)&.dialog_proc
empty_proc = Proc.new {}
@@ -49,6 +70,7 @@ module TestIRB
end
def test_initialization_with_use_autocomplete
+ omit 'This test requires RDoc' unless defined?(RDoc)
original_show_doc_proc = Reline.dialog_proc(:show_doc)&.dialog_proc
empty_proc = Proc.new {}
Reline.add_dialog_proc(:show_doc, empty_proc)
@@ -169,5 +191,5 @@ module TestIRB
def has_rdoc_content?
File.exist?(RDoc::RI::Paths::BASE)
end
- end
+ end if defined?(RDoc)
end
diff --git a/test/irb/test_irb.rb b/test/irb/test_irb.rb
index 28be744088..2913f3d48e 100644
--- a/test/irb/test_irb.rb
+++ b/test/irb/test_irb.rb
@@ -56,12 +56,27 @@ module TestIRB
assert_include output, "=> 12"
end
+ def test_commands_dont_override_stored_last_result
+ write_ruby <<~'RUBY'
+ binding.irb
+ RUBY
+
+ output = run_ruby_file do
+ type "1 + 1"
+ type "ls"
+ type "_ + 10"
+ type "exit!"
+ end
+
+ assert_include output, "=> 12"
+ end
+
def test_evaluate_with_encoding_error_without_lineno
if RUBY_ENGINE == 'truffleruby'
omit "Remove me after https://github.com/ruby/prism/issues/2129 is addressed and adopted in TruffleRuby"
end
- if RUBY_VERSION >= "3.4."
+ if RUBY_VERSION >= "3.3."
omit "Now raises SyntaxError"
end
@@ -511,9 +526,6 @@ module TestIRB
end
def test_heredoc_with_indent
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7.0')
- pend 'This test needs Ripper::Lexer#scan to take broken tokens'
- end
input_with_correct_indents = [
[%q(<<~Q+<<~R), 0, 2, 1],
[%q(a), 2, 2, 1],
@@ -825,6 +837,13 @@ module TestIRB
end
class BacktraceFilteringTest < TestIRB::IntegrationTestCase
+ def setup
+ super
+ # These tests are sensitive to warnings, so we disable them
+ original_rubyopt = [ENV["RUBYOPT"], @envs["RUBYOPT"]].compact.join(" ")
+ @envs["RUBYOPT"] = original_rubyopt + " -W0"
+ end
+
def test_backtrace_filtering
write_ruby <<~'RUBY'
def foo
diff --git a/test/irb/test_nesting_parser.rb b/test/irb/test_nesting_parser.rb
index 2482d40081..2db3cdab57 100644
--- a/test/irb/test_nesting_parser.rb
+++ b/test/irb/test_nesting_parser.rb
@@ -319,9 +319,6 @@ module TestIRB
end
def test_case_in
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7.0')
- pend 'This test requires ruby version that supports case-in syntax'
- end
code = <<~EOS
case 1
in 1
diff --git a/test/irb/test_type_completor.rb b/test/irb/test_type_completor.rb
index 5ed8988b34..412d7c696d 100644
--- a/test/irb/test_type_completor.rb
+++ b/test/irb/test_type_completor.rb
@@ -56,6 +56,11 @@ module TestIRB
end
def test_command_completion
+ binding.eval("some_var = 1")
+ # completion for help command's argument should only include command names
+ assert_include(@completor.completion_candidates('help ', 's', '', bind: binding), 'show_source')
+ assert_not_include(@completor.completion_candidates('help ', 's', '', bind: binding), 'some_var')
+
assert_include(@completor.completion_candidates('', 'show_s', '', bind: binding), 'show_source')
assert_not_include(@completor.completion_candidates(';', 'show_s', '', bind: binding), 'show_source')
end
diff --git a/test/irb/test_workspace.rb b/test/irb/test_workspace.rb
index 199ce95a37..ad515f91df 100644
--- a/test/irb/test_workspace.rb
+++ b/test/irb/test_workspace.rb
@@ -80,7 +80,6 @@ module TestIRB
assert_equal(nil, workspace.code_around_binding)
end
-
def test_toplevel_binding_local_variables
bug17623 = '[ruby-core:102468]'
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
diff --git a/test/irb/yamatanooroti/test_rendering.rb b/test/irb/yamatanooroti/test_rendering.rb
index 44e07a3a12..834c501d5c 100644
--- a/test/irb/yamatanooroti/test_rendering.rb
+++ b/test/irb/yamatanooroti/test_rendering.rb
@@ -507,6 +507,28 @@ class IRB::RenderingTest < Yamatanooroti::TestCase
File.unlink(script) if script
end
+ def test_debug_integration_doesnt_hint_debugger_commands_in_nomultiline_mode
+ write_irbrc <<~'LINES'
+ IRB.conf[:USE_SINGLELINE] = true
+ LINES
+ script = Tempfile.create(["debug", ".rb"])
+ script.write <<~RUBY
+ puts 'start IRB'
+ binding.irb
+ RUBY
+ script.close
+ start_terminal(40, 80, %W{ruby -I#{@pwd}/lib #{script.to_path}}, startup_message: 'start IRB')
+ write("debug\n")
+ write("pp 1")
+ close
+
+ screen = result.join("\n").sub(/\n*\z/, "\n")
+ # submitted input shouldn't contain hint
+ assert_include(screen, "irb:rdbg(main):002> pp 1\n")
+ ensure
+ File.unlink(script) if script
+ end
+
private
def write_irbrc(content)
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 526bb8c1fe..19b4c7434f 100755
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb
@@ -243,7 +243,7 @@ EOT
def test_gc
if respond_to?(:assert_in_out_err) && !(RUBY_PLATFORM =~ /java/)
- assert_in_out_err(%w[-rjson], <<-EOS, [], [])
+ assert_in_out_err(%w[-rjson -Ilib -Iext], <<-EOS, [], [])
bignum_too_long_to_embed_as_string = 1234567890123456789012345
expect = bignum_too_long_to_embed_as_string.to_s
GC.stress = true
diff --git a/test/lib/parser_support.rb b/test/lib/parser_support.rb
new file mode 100644
index 0000000000..0daf45e87b
--- /dev/null
+++ b/test/lib/parser_support.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module ParserSupport
+ module_function
+
+ # Determines whether or not Prism is being used in the current process. This
+ # would have been determined by `--parser=prism` on either the command line or
+ # from within various environment variables.
+ def prism_enabled?
+ RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism
+ end
+
+ # Determines whether or not Prism would be used by a subprocess. This is
+ # necessary because some tests run in subprocesses, and we need to know if we
+ # expect Prism to be used by those tests. This happens if Prism is configured
+ # as the default parser.
+ def prism_enabled_in_subprocess?
+ EnvUtil.invoke_ruby(["-v"], "", true, false)[0].include?("+PRISM")
+ end
+end
diff --git a/test/logger/test_logger.rb b/test/logger/test_logger.rb
index 37d0f5862a..2023553a6c 100644
--- a/test/logger/test_logger.rb
+++ b/test/logger/test_logger.rb
@@ -113,6 +113,15 @@ class TestLogger < Test::Unit::TestCase
assert_raise(ArgumentError) { @logger.level = 'something_wrong' }
end
+ def test_reraise_write_errors
+ c = Object.new
+ e = Class.new(StandardError)
+ c.define_singleton_method(:write){|*| raise e}
+ c.define_singleton_method(:close){}
+ logger = Logger.new(c, :reraise_write_errors=>[e])
+ assert_raise(e) { logger.warn('foo') }
+ end
+
def test_progname
assert_nil(@logger.progname)
@logger.progname = "name"
diff --git a/test/logger/test_logperiod.rb b/test/logger/test_logperiod.rb
index 6e6e5e9533..ee38d877c6 100644
--- a/test/logger/test_logperiod.rb
+++ b/test/logger/test_logperiod.rb
@@ -1,80 +1,67 @@
# coding: US-ASCII
# frozen_string_literal: false
-require 'logger'
-require 'time'
+require "logger"
+require "time"
class TestLogPeriod < Test::Unit::TestCase
def test_next_rotate_time
time = Time.parse("2019-07-18 13:52:02")
- daily_result = Logger::Period.next_rotate_time(time, 'daily')
- next_day = Time.parse("2019-07-19 00:00:00")
- assert_equal(next_day, daily_result)
+ assert_next_rotate_time_words(time, "2019-07-19 00:00:00", ["daily", :daily])
+ assert_next_rotate_time_words(time, "2019-07-21 00:00:00", ["weekly", :weekly])
+ assert_next_rotate_time_words(time, "2019-08-01 00:00:00", ["monthly", :monthly])
- weekly_result = Logger::Period.next_rotate_time(time, 'weekly')
- next_week = Time.parse("2019-07-21 00:00:00")
- assert_equal(next_week, weekly_result)
-
- monthly_result = Logger::Period.next_rotate_time(time, 'monthly')
- next_month = Time.parse("2019-08-1 00:00:00")
- assert_equal(next_month, monthly_result)
-
- assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
+ assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, "invalid") }
end
def test_next_rotate_time_extreme_cases
# First day of Month and Saturday
time = Time.parse("2018-07-01 00:00:00")
- daily_result = Logger::Period.next_rotate_time(time, 'daily')
- next_day = Time.parse("2018-07-02 00:00:00")
- assert_equal(next_day, daily_result)
-
- weekly_result = Logger::Period.next_rotate_time(time, 'weekly')
- next_week = Time.parse("2018-07-08 00:00:00")
- assert_equal(next_week, weekly_result)
+ assert_next_rotate_time_words(time, "2018-07-02 00:00:00", ["daily", :daily])
+ assert_next_rotate_time_words(time, "2018-07-08 00:00:00", ["weekly", :weekly])
+ assert_next_rotate_time_words(time, "2018-08-01 00:00:00", ["monthly", :monthly])
- monthly_result = Logger::Period.next_rotate_time(time, 'monthly')
- next_month = Time.parse("2018-08-1 00:00:00")
- assert_equal(next_month, monthly_result)
-
- assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
+ assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, "invalid") }
end
def test_previous_period_end
time = Time.parse("2019-07-18 13:52:02")
- daily_result = Logger::Period.previous_period_end(time, 'daily')
- day_ago = Time.parse("2019-07-17 23:59:59")
- assert_equal(day_ago, daily_result)
-
- weekly_result = Logger::Period.previous_period_end(time, 'weekly')
- week_ago = Time.parse("2019-07-13 23:59:59")
- assert_equal(week_ago, weekly_result)
-
- monthly_result = Logger::Period.previous_period_end(time, 'monthly')
- month_ago = Time.parse("2019-06-30 23:59:59")
- assert_equal(month_ago, monthly_result)
+ assert_previous_period_end_words(time, "2019-07-17 23:59:59", ["daily", :daily])
+ assert_previous_period_end_words(time, "2019-07-13 23:59:59", ["weekly", :weekly])
+ assert_previous_period_end_words(time, "2019-06-30 23:59:59", ["monthly", :monthly])
- assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
+ assert_raise(ArgumentError) { Logger::Period.previous_period_end(time, "invalid") }
end
def test_previous_period_end_extreme_cases
# First day of Month and Saturday
time = Time.parse("2018-07-01 00:00:00")
+ previous_date = "2018-06-30 23:59:59"
- daily_result = Logger::Period.previous_period_end(time, 'daily')
- day_ago = Time.parse("2018-06-30 23:59:59")
- assert_equal(day_ago, daily_result)
+ assert_previous_period_end_words(time, previous_date, ["daily", :daily])
+ assert_previous_period_end_words(time, previous_date, ["weekly", :weekly])
+ assert_previous_period_end_words(time, previous_date, ["monthly", :monthly])
- weekly_result = Logger::Period.previous_period_end(time, 'weekly')
- week_ago = Time.parse("2018-06-30 23:59:59")
- assert_equal(week_ago, weekly_result)
+ assert_raise(ArgumentError) { Logger::Period.previous_period_end(time, "invalid") }
+ end
+
+ private
- monthly_result = Logger::Period.previous_period_end(time, 'monthly')
- month_ago = Time.parse("2018-06-30 23:59:59")
- assert_equal(month_ago, monthly_result)
+ def assert_next_rotate_time_words(time, next_date, words)
+ assert_time_words(:next_rotate_time, time, next_date, words)
+ end
+
+ def assert_previous_period_end_words(time, previous_date, words)
+ assert_time_words(:previous_period_end, time, previous_date, words)
+ end
- assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
+ def assert_time_words(method, time, date, words)
+ words.each do |word|
+ daily_result = Logger::Period.public_send(method, time, word)
+ expected_result = Time.parse(date)
+ assert_equal(expected_result, daily_result)
+ end
end
end
diff --git a/test/mkmf/test_flags.rb b/test/mkmf/test_flags.rb
index 6fde46adec..3d908c6bb4 100644
--- a/test/mkmf/test_flags.rb
+++ b/test/mkmf/test_flags.rb
@@ -33,7 +33,7 @@ class TestMkmfFlags < TestMkmf
end
def test_try_ldflag_invalid_opt
- assert_separately([], [], <<-'end;') #do
+ assert_separately([], [], <<-'end;', timeout: 30) #do
assert(!try_ldflags("nosuch.c"), TestMkmf::MKMFLOG)
assert(have_devel?, TestMkmf::MKMFLOG)
end;
@@ -47,7 +47,7 @@ class TestMkmfFlags < TestMkmf
end
def test_try_cppflag_invalid_opt
- assert_separately([], [], <<-'end;') #do
+ assert_separately([], [], <<-'end;', timeout: 30) #do
assert(!try_cppflags("nosuch.c"), TestMkmf::MKMFLOG)
assert(have_devel?, TestMkmf::MKMFLOG)
end;
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index f0f1bc2d8f..a49cc87e8d 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -254,6 +254,18 @@ class TestNetHTTP < Test::Unit::TestCase
end
end
+ def test_default_configuration
+ Net::HTTP.default_configuration = { open_timeout: 5 }
+ http = Net::HTTP.new 'hostname.example'
+ assert_equal 5, http.open_timeout
+ assert_equal 60, http.read_timeout
+
+ http.open_timeout = 10
+ assert_equal 10, http.open_timeout
+ ensure
+ Net::HTTP.default_configuration = nil
+ end
+
end
module TestNetHTTP_version_1_1_methods
@@ -442,7 +454,11 @@ module TestNetHTTP_version_1_1_methods
def test_post
start {|http|
_test_post__base http
+ }
+ start {|http|
_test_post__file http
+ }
+ start {|http|
_test_post__no_data http
}
end
@@ -629,10 +645,12 @@ module TestNetHTTP_version_1_2_methods
# _test_request__range http # WEBrick does not support Range: header.
_test_request__HEAD http
_test_request__POST http
- _test_request__stream_body http
_test_request__uri http
_test_request__uri_host http
}
+ start {|http|
+ _test_request__stream_body http
+ }
end
def _test_request__GET(http)
@@ -843,7 +861,13 @@ Content-Type: application/octet-stream
__EOM__
start {|http|
_test_set_form_urlencoded(http, data.reject{|k,v|!v.is_a?(String)})
+ }
+ start {|http|
+ @server.mount('/', lambda {|req, res| res.body = req.body })
_test_set_form_multipart(http, false, data, expected)
+ }
+ start {|http|
+ @server.mount('/', lambda {|req, res| res.body = req.body })
_test_set_form_multipart(http, true, data, expected)
}
}
@@ -887,6 +911,7 @@ __EOM__
expected.sub!(/<filename>/, filename)
expected.sub!(/<data>/, $test_net_http_data)
start {|http|
+ @server.mount('/', lambda {|req, res| res.body = req.body })
data.each{|k,v|v.rewind rescue nil}
req = Net::HTTP::Post.new('/')
req.set_form(data, 'multipart/form-data')
@@ -902,10 +927,11 @@ __EOM__
header)
assert_equal(expected, body)
- data.each{|k,v|v.rewind rescue nil}
- req['Transfer-Encoding'] = 'chunked'
- res = http.request req
- #assert_equal(expected, res.body)
+ # TODO: test with chunked
+ # data.each{|k,v|v.rewind rescue nil}
+ # req['Transfer-Encoding'] = 'chunked'
+ # res = http.request req
+ # assert_equal(expected, res.body)
}
}
end
@@ -984,7 +1010,7 @@ class TestNetHTTPContinue < Test::Unit::TestCase
end
def mount_proc(&block)
- @server.mount('/continue', WEBrick::HTTPServlet::ProcHandler.new(block.to_proc))
+ @server.mount('/continue', block.to_proc)
end
def test_expect_continue
@@ -1039,7 +1065,7 @@ class TestNetHTTPContinue < Test::Unit::TestCase
def test_expect_continue_error_before_body
@log_tester = nil
mount_proc {|req, res|
- raise WEBrick::HTTPStatus::Forbidden
+ raise TestNetHTTPUtils::Forbidden
}
start {|http|
uheader = {'content-type' => 'application/x-www-form-urlencoded', 'content-length' => '5', 'expect' => '100-continue'}
@@ -1084,7 +1110,7 @@ class TestNetHTTPSwitchingProtocols < Test::Unit::TestCase
end
def mount_proc(&block)
- @server.mount('/continue', WEBrick::HTTPServlet::ProcHandler.new(block.to_proc))
+ @server.mount('/continue', block.to_proc)
end
def test_info
@@ -1159,11 +1185,11 @@ class TestNetHTTPKeepAlive < Test::Unit::TestCase
end
def test_keep_alive_reset_on_new_connection
- # Using WEBrick's debug log output on accepting connection:
+ # Using debug log output on accepting connection:
#
# "[2021-04-29 20:36:46] DEBUG accept: 127.0.0.1:50674\n"
@log_tester = nil
- @server.logger.level = WEBrick::BasicLog::DEBUG
+ @logger_level = :debug
start {|http|
res = http.get('/')
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
index cf297f3755..e860c8745e 100644
--- a/test/net/http/test_https.rb
+++ b/test/net/http/test_https.rb
@@ -167,18 +167,16 @@ class TestNetHTTPS < Test::Unit::TestCase
def test_session_reuse_but_expire
# FIXME: The new_session_cb is known broken for clients in OpenSSL 1.1.0h.
omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 1.1.0h')
- omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 3.2.')
- omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 3.3.')
http = Net::HTTP.new(HOST, config("port"))
http.use_ssl = true
http.cert_store = TEST_STORE
- http.ssl_timeout = -1
+ http.ssl_timeout = 1
http.start
http.get("/")
http.finish
-
+ sleep 1.25
http.start
http.get("/")
@@ -240,27 +238,6 @@ class TestNetHTTPS < Test::Unit::TestCase
http.request_get("/") {|res| }
}
assert_match(/certificate verify failed/, ex.message)
- unless /mswin|mingw/ =~ RUBY_PLATFORM
- # on Windows, Errno::ECONNRESET will be raised, and it'll be eaten by
- # WEBrick
- @log_tester = lambda {|log|
- assert_equal(1, log.length)
- assert_match(/ERROR OpenSSL::SSL::SSLError:/, log[0])
- }
- end
- end
-
- def test_identity_verify_failure
- # the certificate's subject has CN=localhost
- http = Net::HTTP.new(HOST_IP, config("port"))
- http.use_ssl = true
- http.cert_store = TEST_STORE
- @log_tester = lambda {|_| }
- ex = assert_raise(OpenSSL::SSL::SSLError){
- http.request_get("/") {|res| }
- }
- re_msg = /certificate verify failed|hostname \"#{HOST_IP}\" does not match/
- assert_match(re_msg, ex.message)
end
def test_timeout_during_SSL_handshake
@@ -295,7 +272,7 @@ class TestNetHTTPS < Test::Unit::TestCase
end
def test_max_version
- http = Net::HTTP.new(HOST_IP, config("port"))
+ http = Net::HTTP.new(HOST, config("port"))
http.use_ssl = true
http.max_version = :SSL2
http.verify_callback = Proc.new do |preverify_ok, store_ctx|
@@ -310,3 +287,43 @@ class TestNetHTTPS < Test::Unit::TestCase
end
end if defined?(OpenSSL::SSL)
+
+class TestNetHTTPSIdentityVerifyFailure < Test::Unit::TestCase
+ include TestNetHTTPUtils
+
+ def self.read_fixture(key)
+ File.read(File.expand_path("../fixtures/#{key}", __dir__))
+ end
+
+ HOST = 'localhost'
+ HOST_IP = '127.0.0.1'
+ CA_CERT = OpenSSL::X509::Certificate.new(read_fixture("cacert.pem"))
+ SERVER_KEY = OpenSSL::PKey.read(read_fixture("server.key"))
+ SERVER_CERT = OpenSSL::X509::Certificate.new(read_fixture("server.crt"))
+ DHPARAMS = OpenSSL::PKey::DH.new(read_fixture("dhparams.pem"))
+ TEST_STORE = OpenSSL::X509::Store.new.tap {|s| s.add_cert(CA_CERT) }
+
+ CONFIG = {
+ 'host' => HOST_IP,
+ 'proxy_host' => nil,
+ 'proxy_port' => nil,
+ 'ssl_enable' => true,
+ 'ssl_certificate' => SERVER_CERT,
+ 'ssl_private_key' => SERVER_KEY,
+ 'ssl_tmp_dh_callback' => proc { DHPARAMS },
+ }
+
+ def test_identity_verify_failure
+ # the certificate's subject has CN=localhost
+ http = Net::HTTP.new(HOST_IP, config("port"))
+ http.use_ssl = true
+ http.cert_store = TEST_STORE
+ @log_tester = lambda {|_| }
+ ex = assert_raise(OpenSSL::SSL::SSLError){
+ http.request_get("/") {|res| }
+ sleep 0.5
+ }
+ re_msg = /certificate verify failed|hostname \"#{HOST_IP}\" does not match/
+ assert_match(re_msg, ex.message)
+ end
+end if defined?(OpenSSL::SSL)
diff --git a/test/net/http/test_https_proxy.rb b/test/net/http/test_https_proxy.rb
index 4c2a92ccd6..f4c6aa0b6a 100644
--- a/test/net/http/test_https_proxy.rb
+++ b/test/net/http/test_https_proxy.rb
@@ -43,5 +43,52 @@ class HTTPSProxyTest < Test::Unit::TestCase
assert_join_threads([client_thread, server_thread])
}
end
-end if defined?(OpenSSL)
+
+ def read_fixture(key)
+ File.read(File.expand_path("../fixtures/#{key}", __dir__))
+ end
+
+ def test_https_proxy_ssl_connection
+ begin
+ OpenSSL
+ rescue LoadError
+ omit 'autoload problem. see [ruby-dev:45021][Bug #5786]'
+ end
+
+ TCPServer.open("127.0.0.1", 0) {|tcpserver|
+ ctx = OpenSSL::SSL::SSLContext.new
+ ctx.key = OpenSSL::PKey.read(read_fixture("server.key"))
+ ctx.cert = OpenSSL::X509::Certificate.new(read_fixture("server.crt"))
+ serv = OpenSSL::SSL::SSLServer.new(tcpserver, ctx)
+
+ _, port, _, _ = serv.addr
+ client_thread = Thread.new {
+ proxy = Net::HTTP.Proxy("127.0.0.1", port, 'user', 'password', true)
+ http = proxy.new("foo.example.org", 8000)
+ http.use_ssl = true
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ begin
+ http.start
+ rescue EOFError
+ end
+ }
+ server_thread = Thread.new {
+ sock = serv.accept
+ begin
+ proxy_request = sock.gets("\r\n\r\n")
+ assert_equal(
+ "CONNECT foo.example.org:8000 HTTP/1.1\r\n" +
+ "Host: foo.example.org:8000\r\n" +
+ "Proxy-Authorization: Basic dXNlcjpwYXNzd29yZA==\r\n" +
+ "\r\n",
+ proxy_request,
+ "[ruby-core:96672]")
+ ensure
+ sock.close
+ end
+ }
+ assert_join_threads([client_thread, server_thread])
+ }
+ end
+end if defined?(OpenSSL)
diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb
index e343e16712..1d43497af0 100644
--- a/test/net/http/utils.rb
+++ b/test/net/http/utils.rb
@@ -1,13 +1,229 @@
# frozen_string_literal: false
-require 'webrick'
-begin
- require "webrick/https"
-rescue LoadError
- # SSL features cannot be tested
-end
-require 'webrick/httpservlet/abstract'
+require 'socket'
+require 'openssl'
module TestNetHTTPUtils
+
+ class Forbidden < StandardError; end
+
+ class HTTPServer
+ def initialize(config, &block)
+ @config = config
+ @server = TCPServer.new(@config['host'], 0)
+ @port = @server.addr[1]
+ @procs = {}
+
+ if @config['ssl_enable']
+ context = OpenSSL::SSL::SSLContext.new
+ context.cert = @config['ssl_certificate']
+ context.key = @config['ssl_private_key']
+ context.tmp_dh_callback = @config['ssl_tmp_dh_callback']
+ @ssl_server = OpenSSL::SSL::SSLServer.new(@server, context)
+ end
+
+ @block = block
+ end
+
+ def start
+ @thread = Thread.new do
+ loop do
+ socket = @ssl_server ? @ssl_server.accept : @server.accept
+ run(socket)
+ rescue
+ ensure
+ socket.close if socket
+ end
+ end
+ end
+
+ def run(socket)
+ handle_request(socket)
+ end
+
+ def shutdown
+ @thread&.kill
+ @server&.close
+ @thread&.join
+ end
+
+ def mount(path, proc)
+ @procs[path] = proc
+ end
+
+ def mount_proc(path, &block)
+ mount(path, block.to_proc)
+ end
+
+ def handle_request(socket)
+ request_line = socket.gets
+ return if request_line.nil? || request_line.strip.empty?
+
+ method, path, _version = request_line.split
+ headers = {}
+ while (line = socket.gets)
+ break if line.strip.empty?
+ key, value = line.split(': ', 2)
+ headers[key] = value.strip
+ end
+
+ if headers['Expect'] == '100-continue'
+ socket.write "HTTP/1.1 100 Continue\r\n\r\n"
+ end
+
+ req = Request.new(method, path, headers, socket)
+ if @procs.key?(req.path) || @procs.key?("#{req.path}/")
+ proc = @procs[req.path] || @procs["#{req.path}/"]
+ res = Response.new(socket)
+ begin
+ proc.call(req, res)
+ rescue Forbidden
+ res.status = 403
+ end
+ res.finish
+ else
+ @block.call(method, path, headers, socket)
+ end
+ end
+
+ def port
+ @port
+ end
+
+ class Request
+ attr_reader :method, :path, :headers, :query, :body
+ def initialize(method, path, headers, socket)
+ @method = method
+ @path, @query = parse_path_and_query(path)
+ @headers = headers
+ @socket = socket
+ if method == 'POST' && (@path == '/continue' || @headers['Content-Type'].include?('multipart/form-data'))
+ if @headers['Transfer-Encoding'] == 'chunked'
+ @body = read_chunked_body
+ else
+ @body = read_body
+ end
+ @query = @body.split('&').each_with_object({}) do |pair, hash|
+ key, value = pair.split('=')
+ hash[key] = value
+ end if @body && @body.include?('=')
+ end
+ end
+
+ def [](key)
+ @headers[key.downcase]
+ end
+
+ def []=(key, value)
+ @headers[key.downcase] = value
+ end
+
+ def continue
+ @socket.write "HTTP\/1.1 100 continue\r\n\r\n"
+ end
+
+ def remote_ip
+ @socket.peeraddr[3]
+ end
+
+ def peeraddr
+ @socket.peeraddr
+ end
+
+ private
+
+ def parse_path_and_query(path)
+ path, query_string = path.split('?', 2)
+ query = {}
+ if query_string
+ query_string.split('&').each do |pair|
+ key, value = pair.split('=', 2)
+ query[key] = value
+ end
+ end
+ [path, query]
+ end
+
+ def read_body
+ content_length = @headers['Content-Length']&.to_i
+ return unless content_length && content_length > 0
+ @socket.read(content_length)
+ end
+
+ def read_chunked_body
+ body = ""
+ while (chunk_size = @socket.gets.strip.to_i(16)) > 0
+ body << @socket.read(chunk_size)
+ @socket.read(2) # read \r\n after each chunk
+ end
+ body
+ end
+ end
+
+ class Response
+ attr_accessor :body, :headers, :status, :chunked, :cookies
+ def initialize(client)
+ @client = client
+ @body = ""
+ @headers = {}
+ @status = 200
+ @chunked = false
+ @cookies = []
+ end
+
+ def [](key)
+ @headers[key.downcase]
+ end
+
+ def []=(key, value)
+ @headers[key.downcase] = value
+ end
+
+ def write_chunk(chunk)
+ return unless @chunked
+ @client.write("#{chunk.bytesize.to_s(16)}\r\n")
+ @client.write("#{chunk}\r\n")
+ end
+
+ def finish
+ @client.write build_response_headers
+ if @chunked
+ write_chunk(@body)
+ @client.write "0\r\n\r\n"
+ else
+ @client.write @body
+ end
+ end
+
+ private
+
+ def build_response_headers
+ response = "HTTP/1.1 #{@status} #{status_message(@status)}\r\n"
+ if @chunked
+ @headers['Transfer-Encoding'] = 'chunked'
+ else
+ @headers['Content-Length'] = @body.bytesize.to_s
+ end
+ @headers.each do |key, value|
+ response << "#{key}: #{value}\r\n"
+ end
+ @cookies.each do |cookie|
+ response << "Set-Cookie: #{cookie}\r\n"
+ end
+ response << "\r\n"
+ response
+ end
+
+ def status_message(code)
+ case code
+ when 200 then 'OK'
+ when 301 then 'Moved Permanently'
+ when 403 then 'Forbidden'
+ else 'Unknown'
+ end
+ end
+ end
+ end
+
def start(&block)
new().start(&block)
end
@@ -15,7 +231,7 @@ module TestNetHTTPUtils
def new
klass = Net::HTTP::Proxy(config('proxy_host'), config('proxy_port'))
http = klass.new(config('host'), config('port'))
- http.set_debug_output logfile()
+ http.set_debug_output logfile
http
end
@@ -25,7 +241,7 @@ module TestNetHTTPUtils
end
def logfile
- $DEBUG ? $stderr : NullWriter.new
+ $stderr if $DEBUG
end
def setup
@@ -33,91 +249,94 @@ module TestNetHTTPUtils
end
def teardown
+ sleep 0.5 if @config['ssl_enable']
if @server
@server.shutdown
- @server_thread.join
- WEBrick::Utils::TimeoutHandler.terminate
end
@log_tester.call(@log) if @log_tester
- # resume global state
Net::HTTP.version_1_2
end
def spawn_server
@log = []
- @log_tester = lambda {|log| assert_equal([], log ) }
+ @log_tester = lambda {|log| assert_equal([], log) }
@config = self.class::CONFIG
- server_config = {
- :BindAddress => config('host'),
- :Port => 0,
- :Logger => WEBrick::Log.new(@log, WEBrick::BasicLog::WARN),
- :AccessLog => [],
- :ServerType => Thread,
- }
- server_config[:OutputBufferSize] = 4 if config('chunked')
- server_config[:RequestTimeout] = config('RequestTimeout') if config('RequestTimeout')
- if defined?(OpenSSL) and config('ssl_enable')
- server_config.update({
- :SSLEnable => true,
- :SSLCertificate => config('ssl_certificate'),
- :SSLPrivateKey => config('ssl_private_key'),
- :SSLTmpDhCallback => config('ssl_tmp_dh_callback'),
- })
- end
- @server = WEBrick::HTTPServer.new(server_config)
- @server.mount('/', Servlet, config('chunked'))
- @server_thread = @server.start
- @config['port'] = @server[:Port]
- end
-
- $test_net_http = nil
- $test_net_http_data = (0...256).to_a.map {|i| i.chr }.join('') * 64
- $test_net_http_data.force_encoding("ASCII-8BIT")
- $test_net_http_data_type = 'application/octet-stream'
-
- class Servlet < WEBrick::HTTPServlet::AbstractServlet
- def initialize(this, chunked = false)
- @chunked = chunked
- end
-
- def do_GET(req, res)
- if req['Accept'] != '*/*'
- res['Content-Type'] = req['Accept']
+ @server = HTTPServer.new(@config) do |method, path, headers, socket|
+ @log << "DEBUG accept: #{@config['host']}:#{socket.addr[1]}" if @logger_level == :debug
+ case method
+ when 'HEAD'
+ handle_head(path, headers, socket)
+ when 'GET'
+ handle_get(path, headers, socket)
+ when 'POST'
+ handle_post(path, headers, socket)
+ when 'PATCH'
+ handle_patch(path, headers, socket)
else
- res['Content-Type'] = $test_net_http_data_type
+ socket.print "HTTP/1.1 405 Method Not Allowed\r\nContent-Length: 0\r\n\r\n"
end
- res.body = $test_net_http_data
- res.chunked = @chunked
end
+ @server.start
+ @config['port'] = @server.port
+ end
- # echo server
- def do_POST(req, res)
- res['Content-Type'] = req['Content-Type']
- res['X-request-uri'] = req.request_uri.to_s
- res.body = req.body
- res.chunked = @chunked
+ def handle_head(path, headers, socket)
+ if headers['Accept'] != '*/*'
+ content_type = headers['Accept']
+ else
+ content_type = $test_net_http_data_type
end
+ response = "HTTP/1.1 200 OK\r\nContent-Type: #{content_type}\r\nContent-Length: #{$test_net_http_data.bytesize}"
+ socket.print(response)
+ end
- def do_PATCH(req, res)
- res['Content-Type'] = req['Content-Type']
- res.body = req.body
- res.chunked = @chunked
+ def handle_get(path, headers, socket)
+ if headers['Accept'] != '*/*'
+ content_type = headers['Accept']
+ else
+ content_type = $test_net_http_data_type
end
+ response = "HTTP/1.1 200 OK\r\nContent-Type: #{content_type}\r\nContent-Length: #{$test_net_http_data.bytesize}\r\n\r\n#{$test_net_http_data}"
+ socket.print(response)
+ end
+
+ def handle_post(path, headers, socket)
+ body = socket.read(headers['Content-Length'].to_i)
+ scheme = headers['X-Request-Scheme'] || 'http'
+ host = @config['host']
+ port = socket.addr[1]
+ charset = parse_content_type(headers['Content-Type'])[1]
+ path = "#{scheme}://#{host}:#{port}#{path}"
+ path = path.encode(charset) if charset
+ response = "HTTP/1.1 200 OK\r\nContent-Type: #{headers['Content-Type']}\r\nContent-Length: #{body.bytesize}\r\nX-request-uri: #{path}\r\n\r\n#{body}"
+ socket.print(response)
+ end
+
+ def handle_patch(path, headers, socket)
+ body = socket.read(headers['Content-Length'].to_i)
+ response = "HTTP/1.1 200 OK\r\nContent-Type: #{headers['Content-Type']}\r\nContent-Length: #{body.bytesize}\r\n\r\n#{body}"
+ socket.print(response)
end
- class NullWriter
- def <<(s) end
- def puts(*args) end
- def print(*args) end
- def printf(*args) end
+ def parse_content_type(content_type)
+ return [nil, nil] unless content_type
+ type, *params = content_type.split(';').map(&:strip)
+ charset = params.find { |param| param.start_with?('charset=') }
+ charset = charset.split('=', 2).last if charset
+ [type, charset]
end
+ $test_net_http = nil
+ $test_net_http_data = (0...256).to_a.map { |i| i.chr }.join('') * 64
+ $test_net_http_data.force_encoding("ASCII-8BIT")
+ $test_net_http_data_type = 'application/octet-stream'
+
def self.clean_http_proxy_env
orig = {
- 'http_proxy' => ENV['http_proxy'],
+ 'http_proxy' => ENV['http_proxy'],
'http_proxy_user' => ENV['http_proxy_user'],
'http_proxy_pass' => ENV['http_proxy_pass'],
- 'no_proxy' => ENV['no_proxy'],
+ 'no_proxy' => ENV['no_proxy'],
}
orig.each_key do |key|
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 17f73e4433..b54a438132 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -244,39 +244,38 @@ class TestObjSpace < Test::Unit::TestCase
def test_trace_object_allocations_start_stop_clear
ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erroneous detection for obj3
- GC.disable # suppress potential object reuse. see [Bug #11271]
- begin
- ObjectSpace.trace_object_allocations_start
+ EnvUtil.without_gc do # suppress potential object reuse. see [Bug #11271]
begin
ObjectSpace.trace_object_allocations_start
begin
ObjectSpace.trace_object_allocations_start
- obj0 = Object.new
+ begin
+ ObjectSpace.trace_object_allocations_start
+ obj0 = Object.new
+ ensure
+ ObjectSpace.trace_object_allocations_stop
+ obj1 = Object.new
+ end
ensure
ObjectSpace.trace_object_allocations_stop
- obj1 = Object.new
+ obj2 = Object.new
end
ensure
ObjectSpace.trace_object_allocations_stop
- obj2 = Object.new
+ obj3 = Object.new
end
- ensure
- ObjectSpace.trace_object_allocations_stop
- obj3 = Object.new
- end
- assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(obj0))
- assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(obj1))
- assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(obj2))
- assert_equal(nil , ObjectSpace.allocation_sourcefile(obj3)) # after tracing
+ assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(obj0))
+ assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(obj1))
+ assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(obj2))
+ assert_equal(nil , ObjectSpace.allocation_sourcefile(obj3)) # after tracing
- ObjectSpace.trace_object_allocations_clear
- assert_equal(nil, ObjectSpace.allocation_sourcefile(obj0))
- assert_equal(nil, ObjectSpace.allocation_sourcefile(obj1))
- assert_equal(nil, ObjectSpace.allocation_sourcefile(obj2))
- assert_equal(nil, ObjectSpace.allocation_sourcefile(obj3))
- ensure
- GC.enable
+ ObjectSpace.trace_object_allocations_clear
+ assert_equal(nil, ObjectSpace.allocation_sourcefile(obj0))
+ assert_equal(nil, ObjectSpace.allocation_sourcefile(obj1))
+ assert_equal(nil, ObjectSpace.allocation_sourcefile(obj2))
+ assert_equal(nil, ObjectSpace.allocation_sourcefile(obj3))
+ end
end
def test_trace_object_allocations_gc_stress
@@ -558,7 +557,7 @@ class TestObjSpace < Test::Unit::TestCase
next if obj["type"] == "SHAPE"
assert_not_nil obj["slot_size"]
- assert_equal 0, obj["slot_size"] % GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]
+ assert_equal 0, obj["slot_size"] % (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] + GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD])
}
end
end
diff --git a/test/open-uri/test_ftp.rb b/test/open-uri/test_ftp.rb
new file mode 100644
index 0000000000..9698ff2777
--- /dev/null
+++ b/test/open-uri/test_ftp.rb
@@ -0,0 +1,216 @@
+# frozen_string_literal: true
+require 'test/unit'
+require 'socket'
+require 'open-uri'
+
+class TestOpenURIFtp < Test::Unit::TestCase
+ def with_env(h)
+ begin
+ old = {}
+ h.each_key {|k| old[k] = ENV[k] }
+ h.each {|k, v| ENV[k] = v }
+ yield
+ ensure
+ h.each_key {|k| ENV[k] = old[k] }
+ end
+ end
+
+ begin
+ require 'net/ftp'
+
+ def test_ftp_invalid_request
+ assert_raise(ArgumentError) { URI("ftp://127.0.0.1/").read }
+ assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Db").read }
+ assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Ab").read }
+ assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Db/f").read }
+ assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Ab/f").read }
+ assert_nothing_raised(URI::InvalidComponentError) { URI("ftp://127.0.0.1/d/f;type=x") }
+ end
+
+ def test_ftp
+ TCPServer.open("127.0.0.1", 0) {|serv|
+ _, port, _, host = serv.addr
+ th = Thread.new {
+ s = serv.accept
+ begin
+ s.print "220 Test FTP Server\r\n"
+ assert_equal("USER anonymous\r\n", s.gets); s.print "331 name ok\r\n"
+ assert_match(/\APASS .*\r\n\z/, s.gets); s.print "230 logged in\r\n"
+ assert_equal("TYPE I\r\n", s.gets); s.print "200 type set to I\r\n"
+ assert_equal("CWD foo\r\n", s.gets); s.print "250 CWD successful\r\n"
+ assert_equal("PASV\r\n", s.gets)
+ TCPServer.open("127.0.0.1", 0) {|data_serv|
+ _, data_serv_port, _, _ = data_serv.addr
+ hi = data_serv_port >> 8
+ lo = data_serv_port & 0xff
+ s.print "227 Entering Passive Mode (127,0,0,1,#{hi},#{lo}).\r\n"
+ assert_equal("RETR bar\r\n", s.gets); s.print "150 file okay\r\n"
+ data_sock = data_serv.accept
+ begin
+ data_sock << "content"
+ ensure
+ data_sock.close
+ end
+ s.print "226 transfer complete\r\n"
+ assert_nil(s.gets)
+ }
+ ensure
+ s.close if s
+ end
+ }
+ begin
+ content = URI("ftp://#{host}:#{port}/foo/bar").read
+ assert_equal("content", content)
+ ensure
+ Thread.kill(th)
+ th.join
+ end
+ }
+ end
+
+ def test_ftp_active
+ TCPServer.open("127.0.0.1", 0) {|serv|
+ _, port, _, host = serv.addr
+ th = Thread.new {
+ s = serv.accept
+ begin
+ content = "content"
+ s.print "220 Test FTP Server\r\n"
+ assert_equal("USER anonymous\r\n", s.gets); s.print "331 name ok\r\n"
+ assert_match(/\APASS .*\r\n\z/, s.gets); s.print "230 logged in\r\n"
+ assert_equal("TYPE I\r\n", s.gets); s.print "200 type set to I\r\n"
+ assert_equal("CWD foo\r\n", s.gets); s.print "250 CWD successful\r\n"
+ assert(m = /\APORT 127,0,0,1,(\d+),(\d+)\r\n\z/.match(s.gets))
+ active_port = m[1].to_i << 8 | m[2].to_i
+ TCPSocket.open("127.0.0.1", active_port) {|data_sock|
+ s.print "200 data connection opened\r\n"
+ assert_equal("RETR bar\r\n", s.gets); s.print "150 file okay\r\n"
+ begin
+ data_sock << content
+ ensure
+ data_sock.close
+ end
+ s.print "226 transfer complete\r\n"
+ assert_nil(s.gets)
+ }
+ ensure
+ s.close if s
+ end
+ }
+ begin
+ content = URI("ftp://#{host}:#{port}/foo/bar").read(:ftp_active_mode=>true)
+ assert_equal("content", content)
+ ensure
+ Thread.kill(th)
+ th.join
+ end
+ }
+ end
+
+ def test_ftp_ascii
+ TCPServer.open("127.0.0.1", 0) {|serv|
+ _, port, _, host = serv.addr
+ th = Thread.new {
+ s = serv.accept
+ begin
+ content = "content"
+ s.print "220 Test FTP Server\r\n"
+ assert_equal("USER anonymous\r\n", s.gets); s.print "331 name ok\r\n"
+ assert_match(/\APASS .*\r\n\z/, s.gets); s.print "230 logged in\r\n"
+ assert_equal("TYPE I\r\n", s.gets); s.print "200 type set to I\r\n"
+ assert_equal("CWD /foo\r\n", s.gets); s.print "250 CWD successful\r\n"
+ assert_equal("TYPE A\r\n", s.gets); s.print "200 type set to A\r\n"
+ assert_equal("SIZE bar\r\n", s.gets); s.print "213 #{content.bytesize}\r\n"
+ assert_equal("PASV\r\n", s.gets)
+ TCPServer.open("127.0.0.1", 0) {|data_serv|
+ _, data_serv_port, _, _ = data_serv.addr
+ hi = data_serv_port >> 8
+ lo = data_serv_port & 0xff
+ s.print "227 Entering Passive Mode (127,0,0,1,#{hi},#{lo}).\r\n"
+ assert_equal("RETR bar\r\n", s.gets); s.print "150 file okay\r\n"
+ data_sock = data_serv.accept
+ begin
+ data_sock << content
+ ensure
+ data_sock.close
+ end
+ s.print "226 transfer complete\r\n"
+ assert_nil(s.gets)
+ }
+ ensure
+ s.close if s
+ end
+ }
+ begin
+ length = []
+ progress = []
+ content = URI("ftp://#{host}:#{port}/%2Ffoo/b%61r;type=a").read(
+ :content_length_proc => lambda {|n| length << n },
+ :progress_proc => lambda {|n| progress << n })
+ assert_equal("content", content)
+ assert_equal([7], length)
+ assert_equal(7, progress.inject(&:+))
+ ensure
+ Thread.kill(th)
+ th.join
+ end
+ }
+ end
+ rescue LoadError
+ # net-ftp is the bundled gems at Ruby 3.1
+ end
+
+ def test_ftp_over_http_proxy
+ TCPServer.open("127.0.0.1", 0) {|proxy_serv|
+ proxy_port = proxy_serv.addr[1]
+ th = Thread.new {
+ proxy_sock = proxy_serv.accept
+ begin
+ req = proxy_sock.gets("\r\n\r\n")
+ assert_match(%r{\AGET ftp://192.0.2.1/foo/bar }, req)
+ proxy_sock.print "HTTP/1.0 200 OK\r\n"
+ proxy_sock.print "Content-Length: 4\r\n\r\n"
+ proxy_sock.print "ab\r\n"
+ ensure
+ proxy_sock.close
+ end
+ }
+ begin
+ with_env('ftp_proxy'=>"http://127.0.0.1:#{proxy_port}") {
+ content = URI("ftp://192.0.2.1/foo/bar").read
+ assert_equal("ab\r\n", content)
+ }
+ ensure
+ Thread.kill(th)
+ th.join
+ end
+ }
+ end
+
+ def test_ftp_over_http_proxy_auth
+ TCPServer.open("127.0.0.1", 0) {|proxy_serv|
+ proxy_port = proxy_serv.addr[1]
+ th = Thread.new {
+ proxy_sock = proxy_serv.accept
+ begin
+ req = proxy_sock.gets("\r\n\r\n")
+ assert_match(%r{\AGET ftp://192.0.2.1/foo/bar }, req)
+ assert_match(%r{Proxy-Authorization: Basic #{['proxy-user:proxy-password'].pack('m').chomp}\r\n}, req)
+ proxy_sock.print "HTTP/1.0 200 OK\r\n"
+ proxy_sock.print "Content-Length: 4\r\n\r\n"
+ proxy_sock.print "ab\r\n"
+ ensure
+ proxy_sock.close
+ end
+ }
+ begin
+ content = URI("ftp://192.0.2.1/foo/bar").read(
+ :proxy_http_basic_authentication => ["http://127.0.0.1:#{proxy_port}", "proxy-user", "proxy-password"])
+ assert_equal("ab\r\n", content)
+ ensure
+ Thread.kill(th)
+ th.join
+ end
+ }
+ end
+end
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb
index 30e3b5c9c1..0679180ce9 100644
--- a/test/open-uri/test_open-uri.rb
+++ b/test/open-uri/test_open-uri.rb
@@ -1,75 +1,18 @@
# frozen_string_literal: true
require 'test/unit'
require 'open-uri'
-require 'webrick'
-require 'webrick/httpproxy'
+require 'stringio'
+require_relative 'utils'
begin
require 'zlib'
rescue LoadError
end
class TestOpenURI < Test::Unit::TestCase
-
- NullLog = Object.new
- def NullLog.<<(arg)
- #puts arg if / INFO / !~ arg
- end
-
- def with_http(log_tester=lambda {|log| assert_equal([], log) })
- log = []
- logger = WEBrick::Log.new(log, WEBrick::BasicLog::WARN)
- Dir.mktmpdir {|dr|
- srv = WEBrick::HTTPServer.new({
- :DocumentRoot => dr,
- :ServerType => Thread,
- :Logger => logger,
- :AccessLog => [[NullLog, ""]],
- :BindAddress => '127.0.0.1',
- :Port => 0})
- _, port, _, host = srv.listeners[0].addr
- server_thread = srv.start
- server_thread2 = Thread.new {
- server_thread.join
- if log_tester
- log_tester.call(log)
- end
- }
- client_thread = Thread.new {
- begin
- yield srv, dr, "http://#{host}:#{port}", server_thread, log
- ensure
- srv.shutdown
- end
- }
- assert_join_threads([client_thread, server_thread2])
- }
- ensure
- WEBrick::Utils::TimeoutHandler.terminate
- end
-
- def with_env(h)
- begin
- old = {}
- h.each_key {|k| old[k] = ENV[k] }
- h.each {|k, v| ENV[k] = v }
- yield
- ensure
- h.each_key {|k| ENV[k] = old[k] }
- end
- end
-
- def setup
- @proxies = %w[http_proxy HTTP_PROXY ftp_proxy FTP_PROXY no_proxy]
- @old_proxies = @proxies.map {|k| ENV[k] }
- @proxies.each {|k| ENV[k] = nil }
- end
-
- def teardown
- @proxies.each_with_index {|k, i| ENV[k] = @old_proxies[i] }
- end
+ include TestOpenURIUtils
def test_200_uri_open
- with_http {|srv, dr, url|
+ with_http {|srv, url|
srv.mount_proc("/urifoo200", lambda { |req, res| res.body = "urifoo200" } )
URI.open("#{url}/urifoo200") {|f|
assert_equal("200", f.status[0])
@@ -79,7 +22,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_200
- with_http {|srv, dr, url|
+ with_http {|srv, url|
srv.mount_proc("/foo200", lambda { |req, res| res.body = "foo200" } )
URI.open("#{url}/foo200") {|f|
assert_equal("200", f.status[0])
@@ -89,7 +32,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_200big
- with_http {|srv, dr, url|
+ with_http {|srv, url|
content = "foo200big"*10240
srv.mount_proc("/foo200big", lambda { |req, res| res.body = content } )
URI.open("#{url}/foo200big") {|f|
@@ -104,14 +47,14 @@ class TestOpenURI < Test::Unit::TestCase
assert_equal(1, server_log.length)
assert_match(%r{ERROR `/not-exist' not found}, server_log[0])
}
- with_http(log_tester) {|srv, dr, url, server_thread, server_log|
+ with_http(log_tester) {|srv, url, server_thread, server_log|
exc = assert_raise(OpenURI::HTTPError) { URI.open("#{url}/not-exist") {} }
assert_equal("404", exc.io.status[0])
}
end
def test_open_uri
- with_http {|srv, dr, url|
+ with_http {|srv, url|
srv.mount_proc("/foo_ou", lambda { |req, res| res.body = "foo_ou" } )
u = URI("#{url}/foo_ou")
URI.open(u) {|f|
@@ -155,7 +98,7 @@ class TestOpenURI < Test::Unit::TestCase
URI("http://example.com/").read(open_timeout: 0.000001)
end if false # avoid external resources in tests
- with_http {|srv, dr, url|
+ with_http {|srv, url|
url += '/'
srv.mount_proc('/', lambda { |_, res| res.body = 'hi' })
begin
@@ -186,7 +129,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_mode
- with_http {|srv, dr, url|
+ with_http {|srv, url|
srv.mount_proc("/mode", lambda { |req, res| res.body = "mode" } )
URI.open("#{url}/mode", "r") {|f|
assert_equal("200", f.status[0])
@@ -208,7 +151,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_without_block
- with_http {|srv, dr, url|
+ with_http {|srv, url|
srv.mount_proc("/without_block", lambda { |req, res| res.body = "without_block" } )
begin
f = URI.open("#{url}/without_block")
@@ -221,7 +164,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_close_in_block_small
- with_http {|srv, dr, url|
+ with_http {|srv, url|
srv.mount_proc("/close200", lambda { |req, res| res.body = "close200" } )
assert_nothing_raised {
URI.open("#{url}/close200") {|f|
@@ -232,7 +175,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_close_in_block_big
- with_http {|srv, dr, url|
+ with_http {|srv, url|
content = "close200big"*10240
srv.mount_proc("/close200big", lambda { |req, res| res.body = content } )
assert_nothing_raised {
@@ -246,8 +189,8 @@ class TestOpenURI < Test::Unit::TestCase
def test_header
myheader1 = 'barrrr'
myheader2 = nil
- with_http {|srv, dr, url|
- srv.mount_proc("/h/") {|req, res| myheader2 = req['myheader']; res.body = "foo" }
+ with_http {|srv, url|
+ srv.mount_proc("/h/", lambda {|req, res| myheader2 = req['myheader']; res.body = "foo" } )
URI.open("#{url}/h/", 'MyHeader'=>myheader1) {|f|
assert_equal("foo", f.read)
assert_equal(myheader1, myheader2)
@@ -267,175 +210,11 @@ class TestOpenURI < Test::Unit::TestCase
}
end
- def test_proxy
- with_http {|srv, dr, url|
- proxy_log = StringIO.new(''.dup)
- proxy_logger = WEBrick::Log.new(proxy_log, WEBrick::BasicLog::WARN)
- proxy_auth_log = ''.dup
- proxy = WEBrick::HTTPProxyServer.new({
- :ServerType => Thread,
- :Logger => proxy_logger,
- :AccessLog => [[NullLog, ""]],
- :ProxyAuthProc => lambda {|req, res|
- proxy_auth_log << req.request_line
- },
- :BindAddress => '127.0.0.1',
- :Port => 0})
- _, proxy_port, _, proxy_host = proxy.listeners[0].addr
- proxy_url = "http://#{proxy_host}:#{proxy_port}/"
- begin
- proxy_thread = proxy.start
- srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
- URI.open("#{url}/proxy", :proxy=>proxy_url) {|f|
- assert_equal("200", f.status[0])
- assert_equal("proxy", f.read)
- }
- assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
- URI.open("#{url}/proxy", :proxy=>URI(proxy_url)) {|f|
- assert_equal("200", f.status[0])
- assert_equal("proxy", f.read)
- }
- assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
- URI.open("#{url}/proxy", :proxy=>nil) {|f|
- assert_equal("200", f.status[0])
- assert_equal("proxy", f.read)
- }
- assert_equal("", proxy_auth_log); proxy_auth_log.clear
- assert_raise(ArgumentError) {
- URI.open("#{url}/proxy", :proxy=>:invalid) {}
- }
- assert_equal("", proxy_auth_log); proxy_auth_log.clear
- with_env("http_proxy"=>proxy_url) {
- # should not use proxy for 127.0.0.0/8.
- URI.open("#{url}/proxy") {|f|
- assert_equal("200", f.status[0])
- assert_equal("proxy", f.read)
- }
- }
- assert_equal("", proxy_auth_log); proxy_auth_log.clear
- ensure
- proxy.shutdown
- proxy_thread.join
- end
- assert_equal("", proxy_log.string)
- }
- end
-
- def test_proxy_http_basic_authentication_failure
- with_http {|srv, dr, url|
- proxy_log = StringIO.new(''.dup)
- proxy_logger = WEBrick::Log.new(proxy_log, WEBrick::BasicLog::WARN)
- proxy_auth_log = ''.dup
- proxy = WEBrick::HTTPProxyServer.new({
- :ServerType => Thread,
- :Logger => proxy_logger,
- :AccessLog => [[NullLog, ""]],
- :ProxyAuthProc => lambda {|req, res|
- proxy_auth_log << req.request_line
- if req["Proxy-Authorization"] != "Basic #{['user:pass'].pack('m').chomp}"
- raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
- end
- },
- :BindAddress => '127.0.0.1',
- :Port => 0})
- _, proxy_port, _, proxy_host = proxy.listeners[0].addr
- proxy_url = "http://#{proxy_host}:#{proxy_port}/"
- begin
- th = proxy.start
- srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
- exc = assert_raise(OpenURI::HTTPError) { URI.open("#{url}/proxy", :proxy=>proxy_url) {} }
- assert_equal("407", exc.io.status[0])
- assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
- ensure
- proxy.shutdown
- th.join
- end
- assert_match(/ERROR WEBrick::HTTPStatus::ProxyAuthenticationRequired/, proxy_log.string)
- }
- end
-
- def test_proxy_http_basic_authentication_success
- with_http {|srv, dr, url|
- proxy_log = StringIO.new(''.dup)
- proxy_logger = WEBrick::Log.new(proxy_log, WEBrick::BasicLog::WARN)
- proxy_auth_log = ''.dup
- proxy = WEBrick::HTTPProxyServer.new({
- :ServerType => Thread,
- :Logger => proxy_logger,
- :AccessLog => [[NullLog, ""]],
- :ProxyAuthProc => lambda {|req, res|
- proxy_auth_log << req.request_line
- if req["Proxy-Authorization"] != "Basic #{['user:pass'].pack('m').chomp}"
- raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
- end
- },
- :BindAddress => '127.0.0.1',
- :Port => 0})
- _, proxy_port, _, proxy_host = proxy.listeners[0].addr
- proxy_url = "http://#{proxy_host}:#{proxy_port}/"
- begin
- th = proxy.start
- srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
- URI.open("#{url}/proxy",
- :proxy_http_basic_authentication=>[proxy_url, "user", "pass"]) {|f|
- assert_equal("200", f.status[0])
- assert_equal("proxy", f.read)
- }
- assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
- assert_raise(ArgumentError) {
- URI.open("#{url}/proxy",
- :proxy_http_basic_authentication=>[true, "user", "pass"]) {}
- }
- assert_equal("", proxy_auth_log); proxy_auth_log.clear
- ensure
- proxy.shutdown
- th.join
- end
- assert_equal("", proxy_log.string)
- }
- end
-
- def test_authenticated_proxy_http_basic_authentication_success
- with_http {|srv, dr, url|
- proxy_log = StringIO.new(''.dup)
- proxy_logger = WEBrick::Log.new(proxy_log, WEBrick::BasicLog::WARN)
- proxy_auth_log = ''.dup
- proxy = WEBrick::HTTPProxyServer.new({
- :ServerType => Thread,
- :Logger => proxy_logger,
- :AccessLog => [[NullLog, ""]],
- :ProxyAuthProc => lambda {|req, res|
- proxy_auth_log << req.request_line
- if req["Proxy-Authorization"] != "Basic #{['user:pass'].pack('m').chomp}"
- raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
- end
- },
- :BindAddress => '127.0.0.1',
- :Port => 0})
- _, proxy_port, _, proxy_host = proxy.listeners[0].addr
- proxy_url = "http://user:pass@#{proxy_host}:#{proxy_port}/"
- begin
- th = proxy.start
- srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
- URI.open("#{url}/proxy", :proxy => proxy_url) {|f|
- assert_equal("200", f.status[0])
- assert_equal("proxy", f.read)
- }
- assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
- assert_equal("", proxy_auth_log); proxy_auth_log.clear
- ensure
- proxy.shutdown
- th.join
- end
- assert_equal("", proxy_log.string)
- }
- end
-
def test_redirect
- with_http {|srv, dr, url|
- srv.mount_proc("/r1/") {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" }
- srv.mount_proc("/r2/") {|req, res| res.body = "r2" }
- srv.mount_proc("/to-file/") {|req, res| res.status = 301; res["location"] = "file:///foo" }
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" } )
+ srv.mount_proc("/r2/", lambda {|req, res| res.body = "r2" } )
+ srv.mount_proc("/to-file/", lambda {|req, res| res.status = 301; res["location"] = "file:///foo" } )
URI.open("#{url}/r1/") {|f|
assert_equal("#{url}/r2", f.base_uri.to_s)
assert_equal("r2", f.read)
@@ -446,9 +225,9 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_redirect_loop
- with_http {|srv, dr, url|
- srv.mount_proc("/r1/") {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" }
- srv.mount_proc("/r2/") {|req, res| res.status = 301; res["location"] = "#{url}/r1"; res.body = "r2" }
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" } )
+ srv.mount_proc("/r2/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r1"; res.body = "r2" } )
assert_raise(RuntimeError) { URI.open("#{url}/r1/") {} }
}
end
@@ -513,20 +292,20 @@ class TestOpenURI < Test::Unit::TestCase
end
def setup_redirect_auth(srv, url)
- srv.mount_proc("/r1/") {|req, res|
+ srv.mount_proc("/r1/", lambda {|req, res|
res.status = 301
res["location"] = "#{url}/r2"
- }
- srv.mount_proc("/r2/") {|req, res|
+ })
+ srv.mount_proc("/r2/", lambda {|req, res|
if req["Authorization"] != "Basic #{['user:pass'].pack('m').chomp}"
- raise WEBrick::HTTPStatus::Unauthorized
+ raise Unauthorized
end
res.body = "r2"
- }
+ })
end
def test_redirect_auth_success
- with_http {|srv, dr, url|
+ with_http {|srv, url|
setup_redirect_auth(srv, url)
URI.open("#{url}/r2/", :http_basic_authentication=>['user', 'pass']) {|f|
assert_equal("r2", f.read)
@@ -537,9 +316,9 @@ class TestOpenURI < Test::Unit::TestCase
def test_redirect_auth_failure_r2
log_tester = lambda {|server_log|
assert_equal(1, server_log.length)
- assert_match(/ERROR WEBrick::HTTPStatus::Unauthorized/, server_log[0])
+ assert_match(/ERROR Unauthorized/, server_log[0])
}
- with_http(log_tester) {|srv, dr, url, server_thread, server_log|
+ with_http(log_tester) {|srv, url, server_thread, server_log|
setup_redirect_auth(srv, url)
exc = assert_raise(OpenURI::HTTPError) { URI.open("#{url}/r2/") {} }
assert_equal("401", exc.io.status[0])
@@ -549,29 +328,89 @@ class TestOpenURI < Test::Unit::TestCase
def test_redirect_auth_failure_r1
log_tester = lambda {|server_log|
assert_equal(1, server_log.length)
- assert_match(/ERROR WEBrick::HTTPStatus::Unauthorized/, server_log[0])
+ assert_match(/ERROR Unauthorized/, server_log[0])
}
- with_http(log_tester) {|srv, dr, url, server_thread, server_log|
+ with_http(log_tester) {|srv, url, server_thread, server_log|
setup_redirect_auth(srv, url)
exc = assert_raise(OpenURI::HTTPError) { URI.open("#{url}/r1/", :http_basic_authentication=>['user', 'pass']) {} }
assert_equal("401", exc.io.status[0])
}
end
+ def test_redirect_without_request_specific_fields_hash
+ authorization_header = nil
+ redirected_authorization_header = nil
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r2"; authorization_header = req["Authorization"]; } )
+ srv.mount_proc("/r2/", lambda {|req, res| redirected_authorization_header = req["Authorization"]; } )
+ URI.open("#{url}/r1/", "Authorization" => "dummy_token") {|f|
+ assert_equal("dummy_token", authorization_header)
+ assert_equal("#{url}/r2", f.base_uri.to_s)
+ assert_equal("dummy_token", redirected_authorization_header)
+ }
+ }
+ end
+
+ def test_redirect_with_request_specific_fields_hash
+ authorization_header = nil
+ redirected_authorization_header = "exposed_dummy_token"
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r2"; authorization_header = req["Authorization"]; } )
+ srv.mount_proc("/r2/", lambda {|req, res| redirected_authorization_header = req["Authorization"]; } )
+ URI.open("#{url}/r1/", request_specific_fields: {"Authorization" => "dummy_token"}) {|f|
+ assert_equal("dummy_token", authorization_header)
+ assert_equal("#{url}/r2", f.base_uri.to_s)
+ assert_equal(nil, redirected_authorization_header)
+ }
+ }
+ end
+
+ def test_redirect_with_request_specific_fields_proc
+ authorization_header = nil
+ redirected_authorization_header = nil
+
+ modify_authorization_header = Proc.new do |uri|
+ authorization_token = if uri.to_s.include?("/r1")
+ "dummy_token"
+ else
+ "masked_dummy_token"
+ end
+ { "Authorization" => authorization_token }
+ end
+
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r2"; authorization_header = req["Authorization"] } )
+ srv.mount_proc("/r2/", lambda {|req, res| redirected_authorization_header = req["Authorization"]; } )
+ URI.open("#{url}/r1/", request_specific_fields: modify_authorization_header) {|f|
+ assert_equal("dummy_token", authorization_header)
+ assert_equal("#{url}/r2", f.base_uri.to_s)
+ assert_equal("masked_dummy_token", redirected_authorization_header)
+ }
+ }
+ end
+
+ def test_redirect_with_invalid_request_specific_fields_format
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.body = "r1" } )
+ exc = assert_raise(ArgumentError) { URI.open("#{url}/r1/", request_specific_fields: "dummy_token") {} }
+ assert_equal('Invalid request_specific_fields option: "dummy_token"', exc.message)
+ }
+ end
+
def test_max_redirects_success
- with_http {|srv, dr, url|
- srv.mount_proc("/r1/") {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" }
- srv.mount_proc("/r2/") {|req, res| res.status = 301; res["location"] = "#{url}/r3"; res.body = "r2" }
- srv.mount_proc("/r3/") {|req, res| res.body = "r3" }
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" } )
+ srv.mount_proc("/r2/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r3"; res.body = "r2" } )
+ srv.mount_proc("/r3/", lambda {|req, res| res.body = "r3" } )
URI.open("#{url}/r1/", max_redirects: 2) { |f| assert_equal("r3", f.read) }
}
end
def test_max_redirects_too_many
- with_http {|srv, dr, url|
- srv.mount_proc("/r1/") {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" }
- srv.mount_proc("/r2/") {|req, res| res.status = 301; res["location"] = "#{url}/r3"; res.body = "r2" }
- srv.mount_proc("/r3/") {|req, res| res.body = "r3" }
+ with_http {|srv, url|
+ srv.mount_proc("/r1/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r2"; res.body = "r1" } )
+ srv.mount_proc("/r2/", lambda {|req, res| res.status = 301; res["location"] = "#{url}/r3"; res.body = "r2" } )
+ srv.mount_proc("/r3/", lambda {|req, res| res.body = "r3" } )
exc = assert_raise(OpenURI::TooManyRedirects) { URI.open("#{url}/r1/", max_redirects: 1) {} }
assert_equal("Too many redirects", exc.message)
}
@@ -582,9 +421,9 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_progress
- with_http {|srv, dr, url|
+ with_http {|srv, url|
content = "a" * 100000
- srv.mount_proc("/data/") {|req, res| res.body = content }
+ srv.mount_proc("/data/", lambda {|req, res| res.body = content })
length = []
progress = []
URI.open("#{url}/data/",
@@ -602,9 +441,9 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_progress_chunked
- with_http {|srv, dr, url|
+ with_http {|srv, url|
content = "a" * 100000
- srv.mount_proc("/data/") {|req, res| res.body = content; res.chunked = true }
+ srv.mount_proc("/data/", lambda {|req, res| res.body = content; res.chunked = true } )
length = []
progress = []
URI.open("#{url}/data/",
@@ -622,7 +461,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_uri_read
- with_http {|srv, dr, url|
+ with_http {|srv, url|
srv.mount_proc("/uriread", lambda { |req, res| res.body = "uriread" } )
data = URI("#{url}/uriread").read
assert_equal("200", data.status[0])
@@ -631,12 +470,12 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_encoding
- with_http {|srv, dr, url|
+ with_http {|srv, url|
content_u8 = "\u3042"
content_ej = "\xa2\xa4".dup.force_encoding("euc-jp")
- srv.mount_proc("/u8/") {|req, res| res.body = content_u8; res['content-type'] = 'text/plain; charset=utf-8' }
- srv.mount_proc("/ej/") {|req, res| res.body = content_ej; res['content-type'] = 'TEXT/PLAIN; charset=EUC-JP' }
- srv.mount_proc("/nc/") {|req, res| res.body = "aa"; res['content-type'] = 'Text/Plain' }
+ srv.mount_proc("/u8/", lambda {|req, res| res.body = content_u8; res['content-type'] = 'text/plain; charset=utf-8' } )
+ srv.mount_proc("/ej/", lambda {|req, res| res.body = content_ej; res['content-type'] = 'TEXT/PLAIN; charset=EUC-JP' } )
+ srv.mount_proc("/nc/", lambda {|req, res| res.body = "aa"; res['content-type'] = 'Text/Plain' } )
URI.open("#{url}/u8/") {|f|
assert_equal(content_u8, f.read)
assert_equal("text/plain", f.content_type)
@@ -675,9 +514,9 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_quoted_attvalue
- with_http {|srv, dr, url|
+ with_http {|srv, url|
content_u8 = "\u3042"
- srv.mount_proc("/qu8/") {|req, res| res.body = content_u8; res['content-type'] = 'text/plain; charset="utf\-8"' }
+ srv.mount_proc("/qu8/", lambda {|req, res| res.body = content_u8; res['content-type'] = 'text/plain; charset="utf\-8"' } )
URI.open("#{url}/qu8/") {|f|
assert_equal(content_u8, f.read)
assert_equal("text/plain", f.content_type)
@@ -687,8 +526,8 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_last_modified
- with_http {|srv, dr, url|
- srv.mount_proc("/data/") {|req, res| res.body = "foo"; res['last-modified'] = 'Fri, 07 Aug 2009 06:05:04 GMT' }
+ with_http {|srv, url|
+ srv.mount_proc("/data/", lambda {|req, res| res.body = "foo"; res['last-modified'] = 'Fri, 07 Aug 2009 06:05:04 GMT' } )
URI.open("#{url}/data/") {|f|
assert_equal("foo", f.read)
assert_equal(Time.utc(2009,8,7,6,5,4), f.last_modified)
@@ -697,12 +536,12 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_content_encoding
- with_http {|srv, dr, url|
+ with_http {|srv, url|
content = "abc" * 10000
Zlib::GzipWriter.wrap(StringIO.new(content_gz="".b)) {|z| z.write content }
- srv.mount_proc("/data/") {|req, res| res.body = content_gz; res['content-encoding'] = 'gzip' }
- srv.mount_proc("/data2/") {|req, res| res.body = content_gz; res['content-encoding'] = 'gzip'; res.chunked = true }
- srv.mount_proc("/noce/") {|req, res| res.body = content_gz }
+ srv.mount_proc("/data/", lambda {|req, res| res.body = content_gz; res['content-encoding'] = 'gzip' } )
+ srv.mount_proc("/data2/", lambda {|req, res| res.body = content_gz; res['content-encoding'] = 'gzip'; res.chunked = true } )
+ srv.mount_proc("/noce/", lambda {|req, res| res.body = content_gz } )
URI.open("#{url}/data/") {|f|
assert_equal [], f.content_encoding
assert_equal(content, f.read)
@@ -719,12 +558,12 @@ class TestOpenURI < Test::Unit::TestCase
end if defined?(Zlib::GzipWriter)
def test_multiple_cookies
- with_http {|srv, dr, url|
- srv.mount_proc("/mcookie/") {|req, res|
+ with_http {|srv, url|
+ srv.mount_proc("/mcookie/", lambda {|req, res|
res.cookies << "name1=value1; blabla"
res.cookies << "name2=value2; blabla"
res.body = "foo"
- }
+ })
URI.open("#{url}/mcookie/") {|f|
assert_equal("foo", f.read)
assert_equal(["name1=value1; blabla", "name2=value2; blabla"],
@@ -735,205 +574,6 @@ class TestOpenURI < Test::Unit::TestCase
# 192.0.2.0/24 is TEST-NET. [RFC3330]
- begin
- require 'net/ftp'
-
- def test_ftp_invalid_request
- assert_raise(ArgumentError) { URI("ftp://127.0.0.1/").read }
- assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Db").read }
- assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Ab").read }
- assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Db/f").read }
- assert_raise(ArgumentError) { URI("ftp://127.0.0.1/a%0Ab/f").read }
- assert_nothing_raised(URI::InvalidComponentError) { URI("ftp://127.0.0.1/d/f;type=x") }
- end
-
- def test_ftp
- TCPServer.open("127.0.0.1", 0) {|serv|
- _, port, _, host = serv.addr
- th = Thread.new {
- s = serv.accept
- begin
- s.print "220 Test FTP Server\r\n"
- assert_equal("USER anonymous\r\n", s.gets); s.print "331 name ok\r\n"
- assert_match(/\APASS .*\r\n\z/, s.gets); s.print "230 logged in\r\n"
- assert_equal("TYPE I\r\n", s.gets); s.print "200 type set to I\r\n"
- assert_equal("CWD foo\r\n", s.gets); s.print "250 CWD successful\r\n"
- assert_equal("PASV\r\n", s.gets)
- TCPServer.open("127.0.0.1", 0) {|data_serv|
- _, data_serv_port, _, _ = data_serv.addr
- hi = data_serv_port >> 8
- lo = data_serv_port & 0xff
- s.print "227 Entering Passive Mode (127,0,0,1,#{hi},#{lo}).\r\n"
- assert_equal("RETR bar\r\n", s.gets); s.print "150 file okay\r\n"
- data_sock = data_serv.accept
- begin
- data_sock << "content"
- ensure
- data_sock.close
- end
- s.print "226 transfer complete\r\n"
- assert_nil(s.gets)
- }
- ensure
- s.close if s
- end
- }
- begin
- content = URI("ftp://#{host}:#{port}/foo/bar").read
- assert_equal("content", content)
- ensure
- Thread.kill(th)
- th.join
- end
- }
- end
-
- def test_ftp_active
- TCPServer.open("127.0.0.1", 0) {|serv|
- _, port, _, host = serv.addr
- th = Thread.new {
- s = serv.accept
- begin
- content = "content"
- s.print "220 Test FTP Server\r\n"
- assert_equal("USER anonymous\r\n", s.gets); s.print "331 name ok\r\n"
- assert_match(/\APASS .*\r\n\z/, s.gets); s.print "230 logged in\r\n"
- assert_equal("TYPE I\r\n", s.gets); s.print "200 type set to I\r\n"
- assert_equal("CWD foo\r\n", s.gets); s.print "250 CWD successful\r\n"
- assert(m = /\APORT 127,0,0,1,(\d+),(\d+)\r\n\z/.match(s.gets))
- active_port = m[1].to_i << 8 | m[2].to_i
- TCPSocket.open("127.0.0.1", active_port) {|data_sock|
- s.print "200 data connection opened\r\n"
- assert_equal("RETR bar\r\n", s.gets); s.print "150 file okay\r\n"
- begin
- data_sock << content
- ensure
- data_sock.close
- end
- s.print "226 transfer complete\r\n"
- assert_nil(s.gets)
- }
- ensure
- s.close if s
- end
- }
- begin
- content = URI("ftp://#{host}:#{port}/foo/bar").read(:ftp_active_mode=>true)
- assert_equal("content", content)
- ensure
- Thread.kill(th)
- th.join
- end
- }
- end
-
- def test_ftp_ascii
- TCPServer.open("127.0.0.1", 0) {|serv|
- _, port, _, host = serv.addr
- th = Thread.new {
- s = serv.accept
- begin
- content = "content"
- s.print "220 Test FTP Server\r\n"
- assert_equal("USER anonymous\r\n", s.gets); s.print "331 name ok\r\n"
- assert_match(/\APASS .*\r\n\z/, s.gets); s.print "230 logged in\r\n"
- assert_equal("TYPE I\r\n", s.gets); s.print "200 type set to I\r\n"
- assert_equal("CWD /foo\r\n", s.gets); s.print "250 CWD successful\r\n"
- assert_equal("TYPE A\r\n", s.gets); s.print "200 type set to A\r\n"
- assert_equal("SIZE bar\r\n", s.gets); s.print "213 #{content.bytesize}\r\n"
- assert_equal("PASV\r\n", s.gets)
- TCPServer.open("127.0.0.1", 0) {|data_serv|
- _, data_serv_port, _, _ = data_serv.addr
- hi = data_serv_port >> 8
- lo = data_serv_port & 0xff
- s.print "227 Entering Passive Mode (127,0,0,1,#{hi},#{lo}).\r\n"
- assert_equal("RETR bar\r\n", s.gets); s.print "150 file okay\r\n"
- data_sock = data_serv.accept
- begin
- data_sock << content
- ensure
- data_sock.close
- end
- s.print "226 transfer complete\r\n"
- assert_nil(s.gets)
- }
- ensure
- s.close if s
- end
- }
- begin
- length = []
- progress = []
- content = URI("ftp://#{host}:#{port}/%2Ffoo/b%61r;type=a").read(
- :content_length_proc => lambda {|n| length << n },
- :progress_proc => lambda {|n| progress << n })
- assert_equal("content", content)
- assert_equal([7], length)
- assert_equal(7, progress.inject(&:+))
- ensure
- Thread.kill(th)
- th.join
- end
- }
- end
- rescue LoadError
- # net-ftp is the bundled gems at Ruby 3.1
- end
-
- def test_ftp_over_http_proxy
- TCPServer.open("127.0.0.1", 0) {|proxy_serv|
- proxy_port = proxy_serv.addr[1]
- th = Thread.new {
- proxy_sock = proxy_serv.accept
- begin
- req = proxy_sock.gets("\r\n\r\n")
- assert_match(%r{\AGET ftp://192.0.2.1/foo/bar }, req)
- proxy_sock.print "HTTP/1.0 200 OK\r\n"
- proxy_sock.print "Content-Length: 4\r\n\r\n"
- proxy_sock.print "ab\r\n"
- ensure
- proxy_sock.close
- end
- }
- begin
- with_env('ftp_proxy'=>"http://127.0.0.1:#{proxy_port}") {
- content = URI("ftp://192.0.2.1/foo/bar").read
- assert_equal("ab\r\n", content)
- }
- ensure
- Thread.kill(th)
- th.join
- end
- }
- end
-
- def test_ftp_over_http_proxy_auth
- TCPServer.open("127.0.0.1", 0) {|proxy_serv|
- proxy_port = proxy_serv.addr[1]
- th = Thread.new {
- proxy_sock = proxy_serv.accept
- begin
- req = proxy_sock.gets("\r\n\r\n")
- assert_match(%r{\AGET ftp://192.0.2.1/foo/bar }, req)
- assert_match(%r{Proxy-Authorization: Basic #{['proxy-user:proxy-password'].pack('m').chomp}\r\n}, req)
- proxy_sock.print "HTTP/1.0 200 OK\r\n"
- proxy_sock.print "Content-Length: 4\r\n\r\n"
- proxy_sock.print "ab\r\n"
- ensure
- proxy_sock.close
- end
- }
- begin
- content = URI("ftp://192.0.2.1/foo/bar").read(
- :proxy_http_basic_authentication => ["http://127.0.0.1:#{proxy_port}", "proxy-user", "proxy-password"])
- assert_equal("ab\r\n", content)
- ensure
- Thread.kill(th)
- th.join
- end
- }
- end
-
def test_meta_init_doesnt_bump_global_constant_state
omit "RubyVM.stat not defined" unless defined? RubyVM.stat
omit unless RubyVM.stat.has_key?(:global_constant_state)
diff --git a/test/open-uri/test_proxy.rb b/test/open-uri/test_proxy.rb
new file mode 100644
index 0000000000..a36a63f21f
--- /dev/null
+++ b/test/open-uri/test_proxy.rb
@@ -0,0 +1,174 @@
+# frozen_string_literal: true
+require 'test/unit'
+require 'open-uri'
+require 'stringio'
+require_relative 'utils'
+
+class TestOpenURIProxy < Test::Unit::TestCase
+ include TestOpenURIUtils
+
+ def with_env(h)
+ begin
+ old = {}
+ h.each_key {|k| old[k] = ENV[k] }
+ h.each {|k, v| ENV[k] = v }
+ yield
+ ensure
+ h.each_key {|k| ENV[k] = old[k] }
+ end
+ end
+
+ def setup
+ @proxies = %w[http_proxy HTTP_PROXY ftp_proxy FTP_PROXY no_proxy]
+ @old_proxies = @proxies.map {|k| ENV[k] }
+ @proxies.each {|k| ENV[k] = nil }
+ end
+
+ def teardown
+ @proxies.each_with_index {|k, i| ENV[k] = @old_proxies[i] }
+ end
+
+ def test_proxy
+ with_http {|srv, url|
+ proxy_log = StringIO.new(''.dup)
+ proxy_access_log = StringIO.new(''.dup)
+ proxy_auth_log = ''.dup
+ proxy_host = '127.0.0.1'
+ proxy = SimpleHTTPProxyServer.new(proxy_host, 0, lambda {|req, res|
+ proxy_auth_log << req.request_line
+ }, proxy_log, proxy_access_log)
+ proxy_port = proxy.instance_variable_get(:@server).addr[1]
+ proxy_url = "http://#{proxy_host}:#{proxy_port}/"
+ begin
+ proxy_thread = proxy.start
+ srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
+ URI.open("#{url}/proxy", :proxy=>proxy_url) {|f|
+ assert_equal("200", f.status[0])
+ assert_equal("proxy", f.read)
+ }
+ assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
+ URI.open("#{url}/proxy", :proxy=>URI(proxy_url)) {|f|
+ assert_equal("200", f.status[0])
+ assert_equal("proxy", f.read)
+ }
+ assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
+ URI.open("#{url}/proxy", :proxy=>nil) {|f|
+ assert_equal("200", f.status[0])
+ assert_equal("proxy", f.read)
+ }
+ assert_equal("", proxy_auth_log); proxy_auth_log.clear
+ assert_raise(ArgumentError) {
+ URI.open("#{url}/proxy", :proxy=>:invalid) {}
+ }
+ assert_equal("", proxy_auth_log); proxy_auth_log.clear
+ with_env("http_proxy"=>proxy_url) {
+ # should not use proxy for 127.0.0.0/8.
+ URI.open("#{url}/proxy") {|f|
+ assert_equal("200", f.status[0])
+ assert_equal("proxy", f.read)
+ }
+ }
+ assert_equal("", proxy_auth_log); proxy_auth_log.clear
+ ensure
+ proxy.shutdown
+ proxy_thread.join
+ end
+ assert_equal("", proxy_log.string)
+ }
+ end
+
+ def test_proxy_http_basic_authentication_failure
+ with_http {|srv, url|
+ proxy_log = StringIO.new(''.dup)
+ proxy_access_log = StringIO.new(''.dup)
+ proxy_auth_log = ''.dup
+ proxy_host = '127.0.0.1'
+ proxy = SimpleHTTPProxyServer.new(proxy_host, 0, lambda {|req, res|
+ proxy_auth_log << req.request_line
+ if req["Proxy-Authorization"] != "Basic #{['user:pass'].pack('m').chomp}"
+ raise ProxyAuthenticationRequired
+ end
+ }, proxy_log, proxy_access_log)
+ proxy_port = proxy.instance_variable_get(:@server).addr[1]
+ proxy_url = "http://#{proxy_host}:#{proxy_port}/"
+ begin
+ th = proxy.start
+ srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
+ exc = assert_raise(OpenURI::HTTPError) { URI.open("#{url}/proxy", :proxy=>proxy_url) {} }
+ assert_equal("407", exc.io.status[0])
+ assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
+ ensure
+ proxy.shutdown
+ th.join
+ end
+ assert_match(/ERROR ProxyAuthenticationRequired/, proxy_log.string)
+ }
+ end
+
+ def test_proxy_http_basic_authentication_success
+ with_http {|srv, url|
+ proxy_log = StringIO.new(''.dup)
+ proxy_access_log = StringIO.new(''.dup)
+ proxy_auth_log = ''.dup
+ proxy_host = '127.0.0.1'
+ proxy = SimpleHTTPProxyServer.new(proxy_host, 0, lambda {|req, res|
+ proxy_auth_log << req.request_line
+ if req["Proxy-Authorization"] != "Basic #{['user:pass'].pack('m').chomp}"
+ raise ProxyAuthenticationRequired
+ end
+ }, proxy_log, proxy_access_log)
+ proxy_port = proxy.instance_variable_get(:@server).addr[1]
+ proxy_url = "http://#{proxy_host}:#{proxy_port}/"
+ begin
+ th = proxy.start
+ srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
+ URI.open("#{url}/proxy",
+ :proxy_http_basic_authentication=>[proxy_url, "user", "pass"]) {|f|
+ assert_equal("200", f.status[0])
+ assert_equal("proxy", f.read)
+ }
+ assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
+ assert_raise(ArgumentError) {
+ URI.open("#{url}/proxy",
+ :proxy_http_basic_authentication=>[true, "user", "pass"]) {}
+ }
+ assert_equal("", proxy_auth_log); proxy_auth_log.clear
+ ensure
+ proxy.shutdown
+ th.join
+ end
+ assert_equal("", proxy_log.string)
+ }
+ end
+
+ def test_authenticated_proxy_http_basic_authentication_success
+ with_http {|srv, url|
+ proxy_log = StringIO.new(''.dup)
+ proxy_access_log = StringIO.new(''.dup)
+ proxy_auth_log = ''.dup
+ proxy_host = '127.0.0.1'
+ proxy = SimpleHTTPProxyServer.new(proxy_host, 0, lambda {|req, res|
+ proxy_auth_log << req.request_line
+ if req["Proxy-Authorization"] != "Basic #{['user:pass'].pack('m').chomp}"
+ raise ProxyAuthenticationRequired
+ end
+ }, proxy_log, proxy_access_log)
+ proxy_port = proxy.instance_variable_get(:@server).addr[1]
+ proxy_url = "http://user:pass@#{proxy_host}:#{proxy_port}/"
+ begin
+ th = proxy.start
+ srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
+ URI.open("#{url}/proxy", :proxy => proxy_url) {|f|
+ assert_equal("200", f.status[0])
+ assert_equal("proxy", f.read)
+ }
+ assert_match(/#{Regexp.quote url}/, proxy_auth_log); proxy_auth_log.clear
+ assert_equal("", proxy_auth_log); proxy_auth_log.clear
+ ensure
+ proxy.shutdown
+ th.join
+ end
+ assert_equal("", proxy_log.string)
+ }
+ end
+end
diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb
index 3f94cab40f..389391e685 100644
--- a/test/open-uri/test_ssl.rb
+++ b/test/open-uri/test_ssl.rb
@@ -1,59 +1,14 @@
# frozen_string_literal: true
require 'test/unit'
require 'open-uri'
-require 'stringio'
-require 'webrick'
+require_relative 'utils'
begin
require 'openssl'
- require 'webrick/https'
rescue LoadError
end
-require 'webrick/httpproxy'
class TestOpenURISSL < Test::Unit::TestCase
-end
-
-class TestOpenURISSL
- NullLog = Object.new
- def NullLog.<<(arg)
- end
-
- def with_https(log_tester=lambda {|log| assert_equal([], log) })
- log = []
- logger = WEBrick::Log.new(log, WEBrick::BasicLog::WARN)
- Dir.mktmpdir {|dr|
- srv = WEBrick::HTTPServer.new({
- :DocumentRoot => dr,
- :ServerType => Thread,
- :Logger => logger,
- :AccessLog => [[NullLog, ""]],
- :SSLEnable => true,
- :SSLCertificate => OpenSSL::X509::Certificate.new(SERVER_CERT),
- :SSLPrivateKey => OpenSSL::PKey::RSA.new(SERVER_KEY),
- :SSLTmpDhCallback => proc { OpenSSL::PKey::DH.new(DHPARAMS) },
- :BindAddress => '127.0.0.1',
- :Port => 0})
- _, port, _, host = srv.listeners[0].addr
- threads = []
- server_thread = srv.start
- threads << Thread.new {
- server_thread.join
- if log_tester
- log_tester.call(log)
- end
- }
- threads << Thread.new {
- begin
- yield srv, dr, "https://#{host}:#{port}", server_thread, log, threads
- ensure
- srv.shutdown
- end
- }
- assert_join_threads(threads)
- }
- ensure
- WEBrick::Utils::TimeoutHandler.terminate
- end
+ include TestOpenURIUtils
def setup
@proxies = %w[http_proxy HTTP_PROXY https_proxy HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy]
@@ -68,7 +23,9 @@ class TestOpenURISSL
def setup_validation(srv, dr)
cacert_filename = "#{dr}/cacert.pem"
URI.open(cacert_filename, "w") {|f| f << CA_CERT }
- srv.mount_proc("/data", lambda { |req, res| res.body = "ddd" } )
+ if srv.respond_to?(:mount_proc)
+ srv.mount_proc("/data", lambda { |req, res| res.body = "ddd" } )
+ end
cacert_filename
end
@@ -93,17 +50,10 @@ class TestOpenURISSL
end
def test_validation_failure
- unless /mswin|mingw/ =~ RUBY_PLATFORM
- # on Windows, Errno::ECONNRESET will be raised, and it'll be eaten by
- # WEBrick
- log_tester = lambda {|server_log|
- assert_equal(1, server_log.length)
- assert_match(/ERROR OpenSSL::SSL::SSLError:/, server_log[0])
- }
- end
- with_https(log_tester) {|srv, dr, url, server_thread, server_log|
+ with_https(nil) {|srv, dr, url|
setup_validation(srv, dr)
assert_raise(OpenSSL::SSL::SSLError) { URI.open("#{url}/data") {} }
+ sleep 0.5 unless RUBY_PLATFORM =~ /mswin|mingw/
}
end
@@ -126,39 +76,6 @@ class TestOpenURISSL
}
end
- def with_https_proxy(proxy_log_tester=lambda {|proxy_log, proxy_access_log| assert_equal([], proxy_log) })
- proxy_log = []
- proxy_logger = WEBrick::Log.new(proxy_log, WEBrick::BasicLog::WARN)
- with_https {|srv, dr, url, server_thread, server_log, threads|
- srv.mount_proc("/proxy", lambda { |req, res| res.body = "proxy" } )
- cacert_filename = "#{dr}/cacert.pem"
- open(cacert_filename, "w") {|f| f << CA_CERT }
- cacert_directory = "#{dr}/certs"
- Dir.mkdir cacert_directory
- hashed_name = "%08x.0" % OpenSSL::X509::Certificate.new(CA_CERT).subject.hash
- open("#{cacert_directory}/#{hashed_name}", "w") {|f| f << CA_CERT }
- proxy = WEBrick::HTTPProxyServer.new({
- :ServerType => Thread,
- :Logger => proxy_logger,
- :AccessLog => [[proxy_access_log=[], WEBrick::AccessLog::COMMON_LOG_FORMAT]],
- :BindAddress => '127.0.0.1',
- :Port => 0})
- _, proxy_port, _, proxy_host = proxy.listeners[0].addr
- proxy_thread = proxy.start
- threads << Thread.new {
- proxy_thread.join
- if proxy_log_tester
- proxy_log_tester.call(proxy_log, proxy_access_log)
- end
- }
- begin
- yield srv, dr, url, cacert_filename, cacert_directory, proxy_host, proxy_port
- ensure
- proxy.shutdown
- end
- }
- end
-
def test_proxy_cacert_file
url = nil
proxy_log_tester = lambda {|proxy_log, proxy_access_log|
@@ -192,341 +109,3 @@ class TestOpenURISSL
end
end if defined?(OpenSSL::SSL)
-
-if defined?(OpenSSL::SSL)
-# cp /etc/ssl/openssl.cnf . # I copied from OpenSSL 1.1.1b source
-
-# mkdir demoCA demoCA/private demoCA/newcerts
-# touch demoCA/index.txt
-# echo 00 > demoCA/serial
-# openssl genrsa -des3 -out demoCA/private/cakey.pem 2048
-# openssl req -new -key demoCA/private/cakey.pem -out demoCA/careq.pem -subj "/C=JP/ST=Tokyo/O=RubyTest/CN=Ruby Test CA"
-# # basicConstraints=CA:TRUE is required; the default openssl.cnf has it in [v3_ca]
-# openssl ca -config openssl.cnf -extensions v3_ca -out demoCA/cacert.pem -startdate 090101000000Z -enddate 491231235959Z -batch -keyfile demoCA/private/cakey.pem -selfsign -infiles demoCA/careq.pem
-
-# mkdir server
-# openssl genrsa -des3 -out server/server.key 2048
-# openssl req -new -key server/server.key -out server/csr.pem -subj "/C=JP/ST=Tokyo/O=RubyTest/CN=127.0.0.1"
-# openssl ca -config openssl.cnf -startdate 090101000000Z -enddate 491231235959Z -in server/csr.pem -keyfile demoCA/private/cakey.pem -cert demoCA/cacert.pem -out server/cert.pem
-
-# demoCA/cacert.pem => TestOpenURISSL::CA_CERT
-# server/cert.pem => TestOpenURISSL::SERVER_CERT
-# `openssl rsa -in server/server.key -text` => TestOpenURISSL::SERVER_KEY
-
-TestOpenURISSL::CA_CERT = <<'End'
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 0 (0x0)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=JP, ST=Tokyo, O=RubyTest, CN=Ruby Test CA
- Validity
- Not Before: Jan 1 00:00:00 2009 GMT
- Not After : Dec 31 23:59:59 2049 GMT
- Subject: C=JP, ST=Tokyo, O=RubyTest, CN=Ruby Test CA
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public-Key: (2048 bit)
- Modulus:
- 00:ad:f3:4d:5b:0b:01:54:cc:86:36:d1:93:6b:33:
- 56:25:90:61:d6:9a:a0:f4:24:20:ee:c8:14:ab:0f:
- 4b:89:d8:7c:bb:c0:f8:7f:fb:e9:a2:d5:1c:6b:6f:
- dc:5c:23:b1:49:aa:2c:e8:ca:43:48:64:69:4b:8a:
- bd:44:57:9b:14:d9:7a:b2:49:00:d6:c2:74:67:62:
- 52:1d:a9:32:df:fe:7a:22:20:49:83:e1:cb:3d:dc:
- 1a:2a:f0:36:20:c1:e8:c8:89:d4:51:1a:68:91:20:
- e0:ba:67:0a:b2:6b:f8:e3:8c:f5:ee:a1:36:b1:89:
- ec:23:b6:f2:39:a9:b9:2e:ea:de:d9:86:e5:42:11:
- 46:ed:10:9a:90:76:44:4e:4d:49:2d:49:e8:e3:cb:
- ff:7a:7d:80:cb:bf:c4:c3:69:ba:9c:60:4a:de:af:
- bf:26:78:b8:fb:46:d1:37:d0:89:ba:78:93:6a:37:
- a5:e9:58:e7:e2:e3:7d:7c:95:20:79:41:56:15:cd:
- b2:c6:3b:e1:b7:e7:ba:47:60:9a:05:b1:07:f3:26:
- 72:9d:3b:1b:02:18:3d:d5:de:e6:e9:30:a9:b5:8f:
- 15:1b:40:f9:64:61:54:d3:53:e8:c4:29:4a:89:f3:
- e5:0d:fd:16:61:ee:f2:6d:8a:45:a8:34:7e:53:46:
- 8e:87
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- A0:7E:0B:AD:A3:AD:37:D7:21:0B:75:6F:8A:90:5F:8C:C9:69:DF:98
- X509v3 Authority Key Identifier:
- keyid:A0:7E:0B:AD:A3:AD:37:D7:21:0B:75:6F:8A:90:5F:8C:C9:69:DF:98
-
- X509v3 Basic Constraints: critical
- CA:TRUE
- Signature Algorithm: sha256WithRSAEncryption
- 06:ea:06:02:19:9a:cb:94:a2:7e:c0:86:71:66:e7:a5:71:46:
- a2:25:55:f5:e5:58:df:d1:91:58:e6:8a:0e:91:b3:22:4c:88:
- 4d:5f:02:af:0f:73:65:0d:af:9a:f2:e4:36:f3:1f:e8:28:1d:
- 9c:74:72:5b:f7:12:e8:fa:45:d6:df:e5:f1:d3:91:f4:0e:db:
- e2:56:63:ee:82:57:6f:12:ad:d7:0d:de:5a:8c:3d:76:d2:87:
- c9:48:1c:c4:f3:89:63:3c:c2:25:e0:dd:63:a6:4c:6c:5a:07:
- 7b:86:78:62:86:02:a1:ef:0e:41:75:c5:d4:61:ab:c3:3b:9b:
- 51:0b:e6:34:6d:0b:14:5a:2d:aa:d3:58:26:43:8f:4c:d7:45:
- 73:1e:67:66:5e:f3:0c:69:70:27:a1:d5:70:f3:5a:10:98:c8:
- 4f:8a:3b:9f:ad:8e:8d:49:8f:fb:f6:36:5d:4f:70:f9:4f:54:
- 33:cf:a2:a6:1d:8c:61:b9:30:42:f2:49:d1:3d:a1:f1:eb:1e:
- 78:a6:30:f8:8a:48:89:c7:3e:bd:0d:d8:72:04:a6:00:e5:62:
- a4:13:3f:9e:b6:86:25:dc:d1:ff:3a:fc:f5:0e:e4:0e:f7:b8:
- 66:90:fe:4f:c2:54:2a:7f:61:6e:e7:4b:bf:40:7e:75:30:02:
- 5b:bb:91:1b
------BEGIN CERTIFICATE-----
-MIIDXDCCAkSgAwIBAgIBADANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJKUDEO
-MAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRUwEwYDVQQDDAxSdWJ5
-IFRlc3QgQ0EwHhcNMDkwMTAxMDAwMDAwWhcNNDkxMjMxMjM1OTU5WjBHMQswCQYD
-VQQGEwJKUDEOMAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRUwEwYD
-VQQDDAxSdWJ5IFRlc3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQCt801bCwFUzIY20ZNrM1YlkGHWmqD0JCDuyBSrD0uJ2Hy7wPh/++mi1Rxrb9xc
-I7FJqizoykNIZGlLir1EV5sU2XqySQDWwnRnYlIdqTLf/noiIEmD4cs93Boq8DYg
-wejIidRRGmiRIOC6Zwqya/jjjPXuoTaxiewjtvI5qbku6t7ZhuVCEUbtEJqQdkRO
-TUktSejjy/96fYDLv8TDabqcYErer78meLj7RtE30Im6eJNqN6XpWOfi4318lSB5
-QVYVzbLGO+G357pHYJoFsQfzJnKdOxsCGD3V3ubpMKm1jxUbQPlkYVTTU+jEKUqJ
-8+UN/RZh7vJtikWoNH5TRo6HAgMBAAGjUzBRMB0GA1UdDgQWBBSgfguto6031yEL
-dW+KkF+MyWnfmDAfBgNVHSMEGDAWgBSgfguto6031yELdW+KkF+MyWnfmDAPBgNV
-HRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAG6gYCGZrLlKJ+wIZxZuel
-cUaiJVX15Vjf0ZFY5ooOkbMiTIhNXwKvD3NlDa+a8uQ28x/oKB2cdHJb9xLo+kXW
-3+Xx05H0DtviVmPugldvEq3XDd5ajD120ofJSBzE84ljPMIl4N1jpkxsWgd7hnhi
-hgKh7w5BdcXUYavDO5tRC+Y0bQsUWi2q01gmQ49M10VzHmdmXvMMaXAnodVw81oQ
-mMhPijufrY6NSY/79jZdT3D5T1Qzz6KmHYxhuTBC8knRPaHx6x54pjD4ikiJxz69
-DdhyBKYA5WKkEz+etoYl3NH/Ovz1DuQO97hmkP5PwlQqf2Fu50u/QH51MAJbu5Eb
------END CERTIFICATE-----
-End
-
-TestOpenURISSL::SERVER_CERT = <<'End'
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 1 (0x1)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=JP, ST=Tokyo, O=RubyTest, CN=Ruby Test CA
- Validity
- Not Before: Jan 1 00:00:00 2009 GMT
- Not After : Dec 31 23:59:59 2049 GMT
- Subject: C=JP, ST=Tokyo, O=RubyTest, CN=127.0.0.1
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public-Key: (2048 bit)
- Modulus:
- 00:cb:b3:71:95:12:70:fc:db:d4:a9:a7:66:d6:d3:
- 09:dd:06:80:19:e1:f2:d6:1e:31:b6:6b:20:75:51:
- dc:a7:37:a9:ac:5b:57:5d:69:36:b6:de:1d:2c:f6:
- 44:64:f8:e8:d6:f0:da:38:6a:ba:c2:b1:9e:dc:bb:
- 79:94:e0:25:0c:ce:76:87:17:5d:79:9e:14:9e:bd:
- 4c:0d:aa:74:10:3a:96:ef:76:82:d5:72:16:b5:c1:
- ac:17:2d:90:83:73:5c:d7:a6:f5:36:0f:4c:55:f3:
- 30:5d:19:dc:01:0e:f8:e6:fe:a5:ad:52:88:59:dc:
- 4a:07:ed:a2:eb:a1:01:63:c4:8a:92:ba:06:80:9b:
- 0d:85:f2:9f:f9:70:ac:d7:ad:f0:7a:3f:b8:92:2a:
- 33:ca:69:d0:01:65:5d:31:38:1d:f6:1f:b2:17:07:
- 7e:ac:88:67:a6:c4:5f:3e:93:94:61:e6:e4:49:9d:
- ba:d4:d2:e8:e3:93:d1:66:79:c5:e3:1d:f8:5a:50:
- 54:58:3d:04:b0:fd:65:d1:b3:8a:b5:8a:30:5f:b2:
- dc:34:1a:14:f7:74:4c:03:29:97:63:5a:d7:de:bb:
- eb:7f:4a:2a:90:59:c0:2b:47:09:82:8f:75:de:14:
- 3f:bc:78:9a:69:25:80:5b:6c:a0:65:12:0d:29:61:
- ac:f9
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Basic Constraints:
- CA:FALSE
- Netscape Comment:
- OpenSSL Generated Certificate
- X509v3 Subject Key Identifier:
- EC:6B:7C:79:B8:3B:11:1D:42:F3:9A:2A:CF:9A:15:59:D7:F9:D8:C6
- X509v3 Authority Key Identifier:
- keyid:A0:7E:0B:AD:A3:AD:37:D7:21:0B:75:6F:8A:90:5F:8C:C9:69:DF:98
-
- Signature Algorithm: sha256WithRSAEncryption
- 29:14:db:71:e9:a0:86:f8:cc:4d:e4:8a:76:78:a7:ff:4e:94:
- b4:4d:92:dc:57:9a:52:64:46:27:15:8b:4f:2a:18:a7:0d:fc:
- d2:75:ce:4e:49:97:0b:46:71:57:23:e3:a5:c0:c5:71:94:fc:
- f2:1d:3b:06:93:82:03:59:56:d4:fb:09:06:08:b4:97:50:33:
- cf:58:89:dd:91:31:07:26:9a:7e:7f:8d:71:de:09:dc:4f:e5:
- 6b:a3:10:71:d4:50:24:43:a0:1c:f5:2a:d9:1a:fb:e3:d6:f1:
- bc:6b:42:67:16:b4:3b:31:f4:ec:03:7d:78:e2:64:16:57:6d:
- ba:7c:0c:e1:14:b2:7c:75:4e:2b:09:3e:86:e4:aa:cc:7e:5c:
- 2b:bd:8d:26:4d:49:36:74:86:fe:c5:a6:15:4a:af:e8:b4:4e:
- d5:f2:e1:59:c2:fb:7e:c3:c4:f1:63:d8:c2:b0:9a:ae:31:96:
- 90:c3:09:d0:ce:2e:31:90:d7:83:dd:ac:31:cc:f7:87:41:08:
- 92:33:28:52:fa:2d:9e:ad:ae:6a:9f:c3:be:ce:c1:a6:e4:16:
- 2f:69:34:40:86:b6:10:21:0e:31:69:81:9e:fc:fd:c3:06:25:
- 65:37:d3:d9:4a:20:84:aa:e7:0e:60:7c:bf:3f:88:67:ac:e5:
- 8c:e0:61:d6
------BEGIN CERTIFICATE-----
-MIIDgTCCAmmgAwIBAgIBATANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJKUDEO
-MAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRUwEwYDVQQDDAxSdWJ5
-IFRlc3QgQ0EwHhcNMDkwMTAxMDAwMDAwWhcNNDkxMjMxMjM1OTU5WjBEMQswCQYD
-VQQGEwJKUDEOMAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRIwEAYD
-VQQDDAkxMjcuMC4wLjEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDL
-s3GVEnD829Spp2bW0wndBoAZ4fLWHjG2ayB1UdynN6msW1ddaTa23h0s9kRk+OjW
-8No4arrCsZ7cu3mU4CUMznaHF115nhSevUwNqnQQOpbvdoLVcha1wawXLZCDc1zX
-pvU2D0xV8zBdGdwBDvjm/qWtUohZ3EoH7aLroQFjxIqSugaAmw2F8p/5cKzXrfB6
-P7iSKjPKadABZV0xOB32H7IXB36siGemxF8+k5Rh5uRJnbrU0ujjk9FmecXjHfha
-UFRYPQSw/WXRs4q1ijBfstw0GhT3dEwDKZdjWtfeu+t/SiqQWcArRwmCj3XeFD+8
-eJppJYBbbKBlEg0pYaz5AgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgEN
-BB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTsa3x5
-uDsRHULzmirPmhVZ1/nYxjAfBgNVHSMEGDAWgBSgfguto6031yELdW+KkF+MyWnf
-mDANBgkqhkiG9w0BAQsFAAOCAQEAKRTbcemghvjMTeSKdnin/06UtE2S3FeaUmRG
-JxWLTyoYpw380nXOTkmXC0ZxVyPjpcDFcZT88h07BpOCA1lW1PsJBgi0l1Azz1iJ
-3ZExByaafn+Ncd4J3E/la6MQcdRQJEOgHPUq2Rr749bxvGtCZxa0OzH07AN9eOJk
-FldtunwM4RSyfHVOKwk+huSqzH5cK72NJk1JNnSG/sWmFUqv6LRO1fLhWcL7fsPE
-8WPYwrCarjGWkMMJ0M4uMZDXg92sMcz3h0EIkjMoUvotnq2uap/Dvs7BpuQWL2k0
-QIa2ECEOMWmBnvz9wwYlZTfT2UoghKrnDmB8vz+IZ6zljOBh1g==
------END CERTIFICATE-----
-End
-
-TestOpenURISSL::SERVER_KEY = <<'End'
-RSA Private-Key: (2048 bit, 2 primes)
-modulus:
- 00:cb:b3:71:95:12:70:fc:db:d4:a9:a7:66:d6:d3:
- 09:dd:06:80:19:e1:f2:d6:1e:31:b6:6b:20:75:51:
- dc:a7:37:a9:ac:5b:57:5d:69:36:b6:de:1d:2c:f6:
- 44:64:f8:e8:d6:f0:da:38:6a:ba:c2:b1:9e:dc:bb:
- 79:94:e0:25:0c:ce:76:87:17:5d:79:9e:14:9e:bd:
- 4c:0d:aa:74:10:3a:96:ef:76:82:d5:72:16:b5:c1:
- ac:17:2d:90:83:73:5c:d7:a6:f5:36:0f:4c:55:f3:
- 30:5d:19:dc:01:0e:f8:e6:fe:a5:ad:52:88:59:dc:
- 4a:07:ed:a2:eb:a1:01:63:c4:8a:92:ba:06:80:9b:
- 0d:85:f2:9f:f9:70:ac:d7:ad:f0:7a:3f:b8:92:2a:
- 33:ca:69:d0:01:65:5d:31:38:1d:f6:1f:b2:17:07:
- 7e:ac:88:67:a6:c4:5f:3e:93:94:61:e6:e4:49:9d:
- ba:d4:d2:e8:e3:93:d1:66:79:c5:e3:1d:f8:5a:50:
- 54:58:3d:04:b0:fd:65:d1:b3:8a:b5:8a:30:5f:b2:
- dc:34:1a:14:f7:74:4c:03:29:97:63:5a:d7:de:bb:
- eb:7f:4a:2a:90:59:c0:2b:47:09:82:8f:75:de:14:
- 3f:bc:78:9a:69:25:80:5b:6c:a0:65:12:0d:29:61:
- ac:f9
-publicExponent: 65537 (0x10001)
-privateExponent:
- 12:be:d5:b2:01:3b:72:99:8c:4d:7c:81:43:3d:b2:
- 87:ab:84:78:5d:49:aa:98:a6:bc:81:c9:3f:e2:a3:
- aa:a3:bd:b2:85:c9:59:68:48:47:b5:d2:fb:83:42:
- 32:04:91:f0:cd:c3:57:33:c3:32:0d:84:70:0d:b4:
- 97:95:b4:f3:23:c0:d6:97:b8:db:6b:47:bc:7f:f1:
- 12:c4:df:df:6a:74:df:5e:89:95:b8:e5:0c:1e:e1:
- 86:54:84:1b:04:af:c3:8c:b2:be:21:d4:45:88:96:
- a7:ca:ac:6b:50:84:69:45:7f:db:9e:5f:bb:dd:40:
- d6:cf:f0:91:3c:84:d3:38:65:c9:15:f7:9e:37:aa:
- 1a:2e:bc:16:b6:95:be:bc:af:45:76:ba:ad:99:f6:
- ef:6a:e8:fd:f0:31:89:19:c4:04:67:a1:ec:c4:79:
- 59:08:77:ab:0b:65:88:88:02:b1:38:5c:80:4e:27:
- 78:b2:a5:bd:b5:ad:d5:9c:4c:ea:ad:db:05:56:25:
- 70:28:da:22:fb:d8:de:8c:3b:78:fe:3e:cf:ed:1b:
- f9:97:c6:b6:4a:bf:60:08:8f:dc:85:5e:b1:49:ab:
- 87:8b:68:72:f4:6a:3f:bc:db:a3:6c:f7:e8:b0:15:
- bb:4b:ba:37:49:a2:d1:7c:f8:4f:1b:05:11:22:d9:
- 81
-prime1:
- 00:fb:d2:cb:14:61:00:c1:7a:83:ba:fe:79:97:a2:
- 4d:5a:ea:40:78:96:6e:d2:be:71:5b:c6:2c:1f:c9:
- 18:48:6b:ae:20:86:87:b5:08:0b:17:69:ca:93:cd:
- 00:36:22:51:7b:d5:2d:8c:0c:0e:de:bc:86:a8:07:
- 0e:c5:57:e4:df:be:ed:7d:cc:b1:a4:d6:a8:2b:00:
- 65:2a:69:30:5e:dc:6d:6d:c4:c8:7e:20:34:eb:6f:
- 5e:cf:b3:b8:2e:8d:56:31:44:a8:17:ea:be:65:19:
- ff:da:14:e0:0c:73:56:14:08:47:4c:5b:79:51:74:
- 5d:bc:e7:fe:01:2f:55:27:69
-prime2:
- 00:cf:14:54:47:bb:5f:5d:d6:2b:2d:ed:a6:8a:6f:
- 36:fc:47:5e:9f:84:ae:aa:1f:f8:44:50:91:15:f5:
- ed:9d:29:d9:2b:2a:19:66:56:2e:96:15:b5:8e:a9:
- 7f:89:27:21:b5:57:55:7e:2a:c5:8c:93:fe:f6:0a:
- a5:17:15:91:91:b3:7d:35:1a:d5:9a:2e:b8:0d:ad:
- e6:97:6d:83:a3:27:29:ee:00:74:ef:57:34:f3:07:
- ad:12:43:37:0c:5c:b7:26:34:bc:4e:3a:43:65:6b:
- 0c:b8:23:ac:77:fd:b2:23:eb:7b:65:70:f6:96:c4:
- 17:2c:aa:24:b8:a5:5e:b7:11
-exponent1:
- 00:92:32:ae:f4:05:dd:0a:76:b6:43:b9:b9:9d:ee:
- fc:39:ec:05:c1:fc:94:1a:85:b6:0a:31:e3:2c:10:
- f3:a8:17:db:df:c6:3a:c3:3f:08:31:6f:99:cc:75:
- 17:ca:55:e2:38:a2:6a:ef:03:91:1e:7f:15:2e:37:
- ea:bb:67:6b:d8:fa:5f:a6:c9:4f:d9:03:46:5e:b0:
- bc:0b:03:46:b1:cc:07:3b:d3:23:13:16:5f:a2:cf:
- e5:9b:70:1b:5d:eb:70:3e:ea:3d:2c:a5:7c:23:f6:
- 14:33:e8:2a:ab:0f:ca:c9:96:84:ce:2f:cd:1f:1d:
- 0f:ce:bc:61:1b:0e:ff:c1:01
-exponent2:
- 00:9e:0b:f3:03:48:73:d1:e7:9a:cf:13:f9:ae:e0:
- 91:03:dc:e8:d0:30:f1:2a:30:fa:48:11:81:9a:54:
- 37:c5:62:e2:37:fa:8a:a6:3b:92:94:c3:fe:ec:e2:
- 5a:cf:70:09:5f:21:47:c3:e2:9b:21:de:f6:92:0c:
- af:d1:bd:89:7b:bd:95:0b:49:ee:cb:1d:6b:26:2d:
- 9a:b7:ea:42:b4:ec:38:29:49:39:f6:4e:05:c0:93:
- 14:39:c3:09:29:ab:3d:b1:b0:40:24:28:7d:b5:d3:
- 0d:43:21:1f:09:f9:9b:d3:a4:6f:6a:8d:db:f6:57:
- b5:24:46:bb:7e:1d:e0:fb:31
-coefficient:
- 10:93:1d:c8:33:a5:c1:d3:84:6a:22:68:e5:60:cc:
- 9c:27:0a:52:0b:58:a3:0c:83:f4:f4:46:09:0c:a1:
- 41:a6:ea:bf:80:9d:0e:5d:d8:3d:25:00:c5:a1:35:
- 7a:8c:ea:95:16:94:c3:7c:8f:2b:e0:53:ea:66:ae:
- 19:be:55:04:3d:ee:e2:4b:a8:69:1b:7e:d8:09:7f:
- ed:7c:ee:95:88:10:dc:4b:5b:bf:81:a4:e8:dc:7e:
- 4f:e5:c3:90:c4:e5:5a:90:10:32:d6:08:b5:1f:5d:
- 09:18:d8:44:28:e4:c4:c7:07:75:9b:9b:b3:80:86:
- 68:9d:fe:68:f3:4d:db:66
-writing RSA key
------BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEAy7NxlRJw/NvUqadm1tMJ3QaAGeHy1h4xtmsgdVHcpzeprFtX
-XWk2tt4dLPZEZPjo1vDaOGq6wrGe3Lt5lOAlDM52hxddeZ4Unr1MDap0EDqW73aC
-1XIWtcGsFy2Qg3Nc16b1Ng9MVfMwXRncAQ745v6lrVKIWdxKB+2i66EBY8SKkroG
-gJsNhfKf+XCs163wej+4kiozymnQAWVdMTgd9h+yFwd+rIhnpsRfPpOUYebkSZ26
-1NLo45PRZnnF4x34WlBUWD0EsP1l0bOKtYowX7LcNBoU93RMAymXY1rX3rvrf0oq
-kFnAK0cJgo913hQ/vHiaaSWAW2ygZRINKWGs+QIDAQABAoIBABK+1bIBO3KZjE18
-gUM9soerhHhdSaqYpryByT/io6qjvbKFyVloSEe10vuDQjIEkfDNw1czwzINhHAN
-tJeVtPMjwNaXuNtrR7x/8RLE399qdN9eiZW45Qwe4YZUhBsEr8OMsr4h1EWIlqfK
-rGtQhGlFf9ueX7vdQNbP8JE8hNM4ZckV9543qhouvBa2lb68r0V2uq2Z9u9q6P3w
-MYkZxARnoezEeVkId6sLZYiIArE4XIBOJ3iypb21rdWcTOqt2wVWJXAo2iL72N6M
-O3j+Ps/tG/mXxrZKv2AIj9yFXrFJq4eLaHL0aj+826Ns9+iwFbtLujdJotF8+E8b
-BREi2YECgYEA+9LLFGEAwXqDuv55l6JNWupAeJZu0r5xW8YsH8kYSGuuIIaHtQgL
-F2nKk80ANiJRe9UtjAwO3ryGqAcOxVfk377tfcyxpNaoKwBlKmkwXtxtbcTIfiA0
-629ez7O4Lo1WMUSoF+q+ZRn/2hTgDHNWFAhHTFt5UXRdvOf+AS9VJ2kCgYEAzxRU
-R7tfXdYrLe2mim82/Eden4Suqh/4RFCRFfXtnSnZKyoZZlYulhW1jql/iSchtVdV
-firFjJP+9gqlFxWRkbN9NRrVmi64Da3ml22Doycp7gB071c08wetEkM3DFy3JjS8
-TjpDZWsMuCOsd/2yI+t7ZXD2lsQXLKokuKVetxECgYEAkjKu9AXdCna2Q7m5ne78
-OewFwfyUGoW2CjHjLBDzqBfb38Y6wz8IMW+ZzHUXylXiOKJq7wORHn8VLjfqu2dr
-2PpfpslP2QNGXrC8CwNGscwHO9MjExZfos/lm3AbXetwPuo9LKV8I/YUM+gqqw/K
-yZaEzi/NHx0PzrxhGw7/wQECgYEAngvzA0hz0eeazxP5ruCRA9zo0DDxKjD6SBGB
-mlQ3xWLiN/qKpjuSlMP+7OJaz3AJXyFHw+KbId72kgyv0b2Je72VC0nuyx1rJi2a
-t+pCtOw4KUk59k4FwJMUOcMJKas9sbBAJCh9tdMNQyEfCfmb06Rvao3b9le1JEa7
-fh3g+zECgYAQkx3IM6XB04RqImjlYMycJwpSC1ijDIP09EYJDKFBpuq/gJ0OXdg9
-JQDFoTV6jOqVFpTDfI8r4FPqZq4ZvlUEPe7iS6hpG37YCX/tfO6ViBDcS1u/gaTo
-3H5P5cOQxOVakBAy1gi1H10JGNhEKOTExwd1m5uzgIZonf5o803bZg==
------END RSA PRIVATE KEY-----
-End
-
-TestOpenURISSL::DHPARAMS = <<'End'
- DH Parameters: (2048 bit)
- prime:
- 00:ec:4e:a4:06:b6:22:ca:f9:8a:00:cc:d0:ee:2f:
- 16:bf:05:64:f5:8f:fe:7f:c4:bb:b0:24:cd:ef:5d:
- 8a:90:ad:dc:a9:dd:63:84:90:d8:25:ba:d8:78:d5:
- 77:91:42:0a:84:fc:56:1e:13:9b:1c:aa:43:d5:1f:
- 38:52:92:fe:b3:66:f9:e7:e8:8c:77:a1:a6:2f:b3:
- 98:98:d2:13:fc:57:1c:2a:14:dc:bd:e6:9b:54:19:
- 99:4f:ce:81:64:a6:32:7f:8e:61:50:5f:45:3a:e5:
- 0c:f7:13:f3:b8:ad:d5:77:ca:09:42:f7:d8:30:27:
- 7b:2c:f0:b4:b5:a0:04:96:34:0b:47:81:1d:7f:c1:
- 3a:62:86:8e:7d:f8:13:7f:9a:b1:8b:09:23:9e:55:
- 59:41:cd:f0:86:09:c4:b7:d1:69:54:cb:d0:f5:e9:
- 27:c9:e1:81:e4:a1:df:6b:20:1c:df:e8:54:02:f2:
- 37:fc:2a:f7:d5:b3:6f:79:7e:70:22:78:79:18:3c:
- 75:14:68:4a:05:9f:ac:d4:7f:9a:79:db:9d:0a:6e:
- ec:0a:04:70:bf:c9:4a:59:81:a2:1f:33:9b:4a:66:
- bc:03:ce:8a:1b:e3:03:ec:ba:39:26:ab:90:dc:39:
- 41:a1:d8:f7:20:3c:8f:af:12:2f:f7:a9:6f:44:f1:
- 6d:03
- generator: 2 (0x2)
------BEGIN DH PARAMETERS-----
-MIIBCAKCAQEA7E6kBrYiyvmKAMzQ7i8WvwVk9Y/+f8S7sCTN712KkK3cqd1jhJDY
-JbrYeNV3kUIKhPxWHhObHKpD1R84UpL+s2b55+iMd6GmL7OYmNIT/FccKhTcveab
-VBmZT86BZKYyf45hUF9FOuUM9xPzuK3Vd8oJQvfYMCd7LPC0taAEljQLR4Edf8E6
-YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
-1bNveX5wInh5GDx1FGhKBZ+s1H+aedudCm7sCgRwv8lKWYGiHzObSma8A86KG+MD
-7Lo5JquQ3DlBodj3IDyPrxIv96lvRPFtAwIBAg==
------END DH PARAMETERS-----
-End
-
-end
diff --git a/test/open-uri/utils.rb b/test/open-uri/utils.rb
new file mode 100644
index 0000000000..e7ca64bd1c
--- /dev/null
+++ b/test/open-uri/utils.rb
@@ -0,0 +1,738 @@
+require 'socket'
+require 'net/http'
+begin
+ require 'openssl'
+rescue LoadError
+end
+
+class SimpleHTTPServer
+ def initialize(bind_addr, port, log)
+ @server = TCPServer.new(bind_addr, port)
+ @log = log
+ @procs = {}
+ end
+
+ def mount_proc(path, proc)
+ @procs[path] = proc
+ end
+
+ def start
+ @thread = Thread.new do
+ loop do
+ client = @server.accept
+ handle_request(client)
+ client.close
+ end
+ end
+ end
+
+ def shutdown
+ @thread.kill
+ @server.close
+ end
+
+ private
+
+ def handle_request(client)
+ request_line = client.gets
+ return if request_line.nil?
+
+ method, path, _ = request_line.split
+ headers = {}
+ while (line = client.gets) && line != "\r\n"
+ key, value = line.split(": ", 2)
+ headers[key.downcase] = value.strip
+ end
+
+ if @procs.key?(path) || @procs.key?("#{path}/")
+ proc = @procs[path] || @procs["#{path}/"]
+ req = Request.new(method, path, headers)
+ res = Response.new(client)
+ proc.call(req, res)
+ res.finish
+ else
+ @log << "ERROR `#{path}' not found"
+ client.print "HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\n\r\n"
+ end
+ rescue ::TestOpenURI::Unauthorized
+ @log << "ERROR Unauthorized"
+ client.print "HTTP/1.1 401 Unauthorized\r\nContent-Length: 0\r\n\r\n"
+ end
+
+ class Request
+ attr_reader :method, :path, :headers
+ def initialize(method, path, headers)
+ @method = method
+ @path = path
+ @headers = headers
+ parse_basic_auth
+ end
+
+ def [](key)
+ @headers[key.downcase]
+ end
+
+ def []=(key, value)
+ @headers[key.downcase] = value
+ end
+
+ private
+
+ def parse_basic_auth
+ auth = @headers['Authorization']
+ return unless auth && auth.start_with?('Basic ')
+
+ encoded_credentials = auth.split(' ', 2).last
+ decoded_credentials = [encoded_credentials].pack("m")
+ @username, @password = decoded_credentials.split(':', 2)
+ end
+ end
+
+ class Response
+ attr_accessor :body, :headers, :status, :chunked, :cookies
+ def initialize(client)
+ @client = client
+ @body = ""
+ @headers = {}
+ @status = 200
+ @chunked = false
+ @cookies = []
+ end
+
+ def [](key)
+ @headers[key.downcase]
+ end
+
+ def []=(key, value)
+ @headers[key.downcase] = value
+ end
+
+ def write_chunk(chunk)
+ return unless @chunked
+ @client.write("#{chunk.bytesize.to_s(16)}\r\n")
+ @client.write("#{chunk}\r\n")
+ end
+
+ def finish
+ @client.write build_response_headers
+ if @chunked
+ write_chunk(@body)
+ @client.write "0\r\n\r\n"
+ else
+ @client.write @body
+ end
+ end
+
+ private
+
+ def build_response_headers
+ response = "HTTP/1.1 #{@status} #{status_message(@status)}\r\n"
+ if @chunked
+ @headers['Transfer-Encoding'] = 'chunked'
+ else
+ @headers['Content-Length'] = @body.bytesize.to_s
+ end
+ @headers.each do |key, value|
+ response << "#{key}: #{value}\r\n"
+ end
+ @cookies.each do |cookie|
+ response << "Set-Cookie: #{cookie}\r\n"
+ end
+ response << "\r\n"
+ response
+ end
+
+ def status_message(code)
+ case code
+ when 200 then 'OK'
+ when 301 then 'Moved Permanently'
+ else 'Unknown'
+ end
+ end
+ end
+end
+
+class SimpleHTTPProxyServer
+ def initialize(host, port, auth_proc = nil, log, access_log)
+ @server = TCPServer.new(host, port)
+ @auth_proc = auth_proc
+ @log = log
+ @access_log = access_log
+ end
+
+ def start
+ @thread = Thread.new do
+ loop do
+ client = @server.accept
+ request_line = client.gets
+ headers = {}
+ while (line = client.gets) && (line != "\r\n")
+ key, value = line.chomp.split(/:\s*/, 2)
+ headers[key] = value
+ end
+ next unless request_line
+
+ method, path, _ = request_line.split(' ')
+ handle_request(client, method, path, request_line, headers)
+ rescue IOError
+ end
+ end
+ end
+
+ def shutdown
+ @thread.kill
+ @server.close
+ end
+
+ private
+
+ def handle_request(client, method, path, request_line, headers)
+ if @auth_proc
+ req = Request.new(method, path, request_line, headers)
+ res = Struct.new(:body, :status).new("", 200)
+ @auth_proc.call(req, res)
+ if res.status != 200
+ client.print "HTTP/1.1 #{res.status}\r\nContent-Type: text/plain\r\n\r\n#{res.body}"
+ return
+ end
+ end
+
+ if method == 'CONNECT'
+ proxy_connect(path, client)
+ else
+ proxy_request(path, client)
+ end
+ rescue TestOpenURIProxy::ProxyAuthenticationRequired
+ @log << "ERROR ProxyAuthenticationRequired"
+ client.print "HTTP/1.1 407 Proxy Authentication Required\r\nContent-Length: 0\r\n\r\n"
+ ensure
+ client.close
+ end
+
+ def proxy_connect(path, client)
+ host, port = path.split(':')
+ backend = TCPSocket.new(host, port.to_i)
+ client.puts "HTTP/1.1 200 Connection Established\r\n\r\n"
+ @access_log << "CONNECT #{path} \n"
+ begin
+ while fds = IO.select([client, backend])
+ if fds[0].include?(client)
+ data = client.readpartial(1024)
+ backend.write(data)
+ elsif fds[0].include?(backend)
+ data = backend.readpartial(1024)
+ client.write(data)
+ end
+ end
+ rescue
+ backend.close
+ end
+ end
+
+ def proxy_request(path, client)
+ path.gsub!(/\Ahttps?:\/\//, '')
+ host, path = path.split('/')
+ host, port = host.split(':')
+ Net::HTTP.start(host, port) do |http|
+ response = http.get("/#{path}")
+ client.print "HTTP/1.1 #{response.code}\r\nContent-Type: #{response.content_type}\r\n\r\n#{response.body}"
+ end
+ end
+
+ class Request
+ attr_reader :method, :path, :request_line, :headers
+ def initialize(method, path, request_line, headers)
+ @method = method
+ @path = path
+ @request_line = request_line
+ @headers = headers
+ end
+
+ def [](key)
+ @headers[key]
+ end
+ end
+end
+
+class SimpleHTTPSServer
+ def initialize(cert, key, dh, bind_addr, port, log)
+ @cert = cert
+ @key = key
+ @dh = dh
+ @bind_addr = bind_addr
+ @port = port
+ @log = log
+ @server = TCPServer.new(@bind_addr, @port)
+ context = OpenSSL::SSL::SSLContext.new
+ context.cert = @cert
+ context.key = @key
+ context.tmp_dh_callback = proc { @dh }
+ @ssl_server = OpenSSL::SSL::SSLServer.new(@server, context)
+ end
+
+ def start
+ @thread = Thread.new do
+ loop do
+ ssl_socket = @ssl_server.accept
+ handle_request(ssl_socket)
+ ssl_socket.close
+ end
+ rescue OpenSSL::SSL::SSLError
+ end
+ end
+
+ def shutdown
+ @thread.kill
+ @server.close
+ end
+
+ def handle_request(socket)
+ request_line = socket.gets
+ return if request_line.nil? || request_line.strip.empty?
+
+ _, path, _ = request_line.split
+ headers = {}
+ while (line = socket.gets)
+ break if line.strip.empty?
+ key, value = line.split(': ', 2)
+ headers[key] = value.strip
+ end
+
+ response = case path
+ when '/data'
+ "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 3\r\n\r\nddd"
+ when "/proxy"
+ "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 5\r\n\r\nproxy"
+ else
+ "HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\n\r\n"
+ end
+
+ socket.print(response)
+ end
+end
+
+module TestOpenURIUtils
+ class Unauthorized < StandardError; end
+ class ProxyAuthenticationRequired < StandardError; end
+
+ def with_http(log_tester=lambda {|log| assert_equal([], log) })
+ log = []
+ host = "127.0.0.1"
+ srv = SimpleHTTPServer.new(host, 0, log)
+
+ server_thread = srv.start
+ server_thread2 = Thread.new {
+ server_thread.join
+ if log_tester
+ log_tester.call(log)
+ end
+ }
+
+ port = srv.instance_variable_get(:@server).addr[1]
+
+ client_thread = Thread.new {
+ begin
+ yield srv, "http://#{host}:#{port}", server_thread, log
+ ensure
+ srv.shutdown
+ end
+ }
+ assert_join_threads([client_thread, server_thread2])
+ end
+
+ def with_https_proxy(proxy_log_tester=lambda {|proxy_log, proxy_access_log| assert_equal([], proxy_log) })
+ proxy_log = []
+ proxy_access_log = []
+ with_https {|srv, dr, url|
+ srv.instance_variable_get(:@server).setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true)
+ cacert_filename = "#{dr}/cacert.pem"
+ open(cacert_filename, "w") {|f| f << CA_CERT }
+ cacert_directory = "#{dr}/certs"
+ Dir.mkdir cacert_directory
+ hashed_name = "%08x.0" % OpenSSL::X509::Certificate.new(CA_CERT).subject.hash
+ open("#{cacert_directory}/#{hashed_name}", "w") {|f| f << CA_CERT }
+ proxy_host = '127.0.0.1'
+ proxy = SimpleHTTPProxyServer.new(proxy_host, 0, proxy_log, proxy_access_log)
+ proxy_port = proxy.instance_variable_get(:@server).addr[1]
+ proxy_thread = proxy.start
+ thread = Thread.new {
+ proxy_thread.join
+ if proxy_log_tester
+ proxy_log_tester.call(proxy_log, proxy_access_log)
+ end
+ }
+ begin
+ yield srv, dr, url, cacert_filename, cacert_directory, proxy_host, proxy_port
+ sleep 1
+ ensure
+ proxy.shutdown
+ end
+ assert_join_threads([thread])
+ }
+ end
+
+ if defined?(OpenSSL::SSL)
+ def with_https(log_tester=lambda {|log| assert_equal([], log) })
+ log = []
+ Dir.mktmpdir {|dr|
+ cert = OpenSSL::X509::Certificate.new(SERVER_CERT)
+ key = OpenSSL::PKey::RSA.new(SERVER_KEY)
+ dh = OpenSSL::PKey::DH.new(DHPARAMS)
+ host = '127.0.0.1'
+ srv = SimpleHTTPSServer.new(cert, key, dh, host, 0, log)
+ port = srv.instance_variable_get(:@server).addr[1]
+ threads = []
+ server_thread = srv.start
+ threads << Thread.new {
+ server_thread.join
+ if log_tester
+ log_tester.call(log)
+ end
+ }
+ threads << Thread.new {
+ begin
+ yield srv, dr, "https://#{host}:#{port}"
+ ensure
+ srv.shutdown
+ end
+ }
+ assert_join_threads(threads)
+ }
+ end
+
+ # cp /etc/ssl/openssl.cnf . # I copied from OpenSSL 1.1.1b source
+
+ # mkdir demoCA demoCA/private demoCA/newcerts
+ # touch demoCA/index.txt
+ # echo 00 > demoCA/serial
+ # openssl genrsa -des3 -out demoCA/private/cakey.pem 2048
+ # openssl req -new -key demoCA/private/cakey.pem -out demoCA/careq.pem -subj "/C=JP/ST=Tokyo/O=RubyTest/CN=Ruby Test CA"
+ # # basicConstraints=CA:TRUE is required; the default openssl.cnf has it in [v3_ca]
+ # openssl ca -config openssl.cnf -extensions v3_ca -out demoCA/cacert.pem -startdate 090101000000Z -enddate 491231235959Z -batch -keyfile demoCA/private/cakey.pem -selfsign -infiles demoCA/careq.pem
+
+ # mkdir server
+ # openssl genrsa -des3 -out server/server.key 2048
+ # openssl req -new -key server/server.key -out server/csr.pem -subj "/C=JP/ST=Tokyo/O=RubyTest/CN=127.0.0.1"
+ # openssl ca -config openssl.cnf -startdate 090101000000Z -enddate 491231235959Z -in server/csr.pem -keyfile demoCA/private/cakey.pem -cert demoCA/cacert.pem -out server/cert.pem
+
+ # demoCA/cacert.pem => TestOpenURISSL::CA_CERT
+ # server/cert.pem => TestOpenURISSL::SERVER_CERT
+ # `openssl rsa -in server/server.key -text` => TestOpenURISSL::SERVER_KEY
+
+ CA_CERT = <<'End'
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 0 (0x0)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: C=JP, ST=Tokyo, O=RubyTest, CN=Ruby Test CA
+ Validity
+ Not Before: Jan 1 00:00:00 2009 GMT
+ Not After : Dec 31 23:59:59 2049 GMT
+ Subject: C=JP, ST=Tokyo, O=RubyTest, CN=Ruby Test CA
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ RSA Public-Key: (2048 bit)
+ Modulus:
+ 00:ad:f3:4d:5b:0b:01:54:cc:86:36:d1:93:6b:33:
+ 56:25:90:61:d6:9a:a0:f4:24:20:ee:c8:14:ab:0f:
+ 4b:89:d8:7c:bb:c0:f8:7f:fb:e9:a2:d5:1c:6b:6f:
+ dc:5c:23:b1:49:aa:2c:e8:ca:43:48:64:69:4b:8a:
+ bd:44:57:9b:14:d9:7a:b2:49:00:d6:c2:74:67:62:
+ 52:1d:a9:32:df:fe:7a:22:20:49:83:e1:cb:3d:dc:
+ 1a:2a:f0:36:20:c1:e8:c8:89:d4:51:1a:68:91:20:
+ e0:ba:67:0a:b2:6b:f8:e3:8c:f5:ee:a1:36:b1:89:
+ ec:23:b6:f2:39:a9:b9:2e:ea:de:d9:86:e5:42:11:
+ 46:ed:10:9a:90:76:44:4e:4d:49:2d:49:e8:e3:cb:
+ ff:7a:7d:80:cb:bf:c4:c3:69:ba:9c:60:4a:de:af:
+ bf:26:78:b8:fb:46:d1:37:d0:89:ba:78:93:6a:37:
+ a5:e9:58:e7:e2:e3:7d:7c:95:20:79:41:56:15:cd:
+ b2:c6:3b:e1:b7:e7:ba:47:60:9a:05:b1:07:f3:26:
+ 72:9d:3b:1b:02:18:3d:d5:de:e6:e9:30:a9:b5:8f:
+ 15:1b:40:f9:64:61:54:d3:53:e8:c4:29:4a:89:f3:
+ e5:0d:fd:16:61:ee:f2:6d:8a:45:a8:34:7e:53:46:
+ 8e:87
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Subject Key Identifier:
+ A0:7E:0B:AD:A3:AD:37:D7:21:0B:75:6F:8A:90:5F:8C:C9:69:DF:98
+ X509v3 Authority Key Identifier:
+ keyid:A0:7E:0B:AD:A3:AD:37:D7:21:0B:75:6F:8A:90:5F:8C:C9:69:DF:98
+
+ X509v3 Basic Constraints: critical
+ CA:TRUE
+ Signature Algorithm: sha256WithRSAEncryption
+ 06:ea:06:02:19:9a:cb:94:a2:7e:c0:86:71:66:e7:a5:71:46:
+ a2:25:55:f5:e5:58:df:d1:91:58:e6:8a:0e:91:b3:22:4c:88:
+ 4d:5f:02:af:0f:73:65:0d:af:9a:f2:e4:36:f3:1f:e8:28:1d:
+ 9c:74:72:5b:f7:12:e8:fa:45:d6:df:e5:f1:d3:91:f4:0e:db:
+ e2:56:63:ee:82:57:6f:12:ad:d7:0d:de:5a:8c:3d:76:d2:87:
+ c9:48:1c:c4:f3:89:63:3c:c2:25:e0:dd:63:a6:4c:6c:5a:07:
+ 7b:86:78:62:86:02:a1:ef:0e:41:75:c5:d4:61:ab:c3:3b:9b:
+ 51:0b:e6:34:6d:0b:14:5a:2d:aa:d3:58:26:43:8f:4c:d7:45:
+ 73:1e:67:66:5e:f3:0c:69:70:27:a1:d5:70:f3:5a:10:98:c8:
+ 4f:8a:3b:9f:ad:8e:8d:49:8f:fb:f6:36:5d:4f:70:f9:4f:54:
+ 33:cf:a2:a6:1d:8c:61:b9:30:42:f2:49:d1:3d:a1:f1:eb:1e:
+ 78:a6:30:f8:8a:48:89:c7:3e:bd:0d:d8:72:04:a6:00:e5:62:
+ a4:13:3f:9e:b6:86:25:dc:d1:ff:3a:fc:f5:0e:e4:0e:f7:b8:
+ 66:90:fe:4f:c2:54:2a:7f:61:6e:e7:4b:bf:40:7e:75:30:02:
+ 5b:bb:91:1b
+-----BEGIN CERTIFICATE-----
+MIIDXDCCAkSgAwIBAgIBADANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJKUDEO
+MAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRUwEwYDVQQDDAxSdWJ5
+IFRlc3QgQ0EwHhcNMDkwMTAxMDAwMDAwWhcNNDkxMjMxMjM1OTU5WjBHMQswCQYD
+VQQGEwJKUDEOMAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRUwEwYD
+VQQDDAxSdWJ5IFRlc3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQCt801bCwFUzIY20ZNrM1YlkGHWmqD0JCDuyBSrD0uJ2Hy7wPh/++mi1Rxrb9xc
+I7FJqizoykNIZGlLir1EV5sU2XqySQDWwnRnYlIdqTLf/noiIEmD4cs93Boq8DYg
+wejIidRRGmiRIOC6Zwqya/jjjPXuoTaxiewjtvI5qbku6t7ZhuVCEUbtEJqQdkRO
+TUktSejjy/96fYDLv8TDabqcYErer78meLj7RtE30Im6eJNqN6XpWOfi4318lSB5
+QVYVzbLGO+G357pHYJoFsQfzJnKdOxsCGD3V3ubpMKm1jxUbQPlkYVTTU+jEKUqJ
+8+UN/RZh7vJtikWoNH5TRo6HAgMBAAGjUzBRMB0GA1UdDgQWBBSgfguto6031yEL
+dW+KkF+MyWnfmDAfBgNVHSMEGDAWgBSgfguto6031yELdW+KkF+MyWnfmDAPBgNV
+HRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAG6gYCGZrLlKJ+wIZxZuel
+cUaiJVX15Vjf0ZFY5ooOkbMiTIhNXwKvD3NlDa+a8uQ28x/oKB2cdHJb9xLo+kXW
+3+Xx05H0DtviVmPugldvEq3XDd5ajD120ofJSBzE84ljPMIl4N1jpkxsWgd7hnhi
+hgKh7w5BdcXUYavDO5tRC+Y0bQsUWi2q01gmQ49M10VzHmdmXvMMaXAnodVw81oQ
+mMhPijufrY6NSY/79jZdT3D5T1Qzz6KmHYxhuTBC8knRPaHx6x54pjD4ikiJxz69
+DdhyBKYA5WKkEz+etoYl3NH/Ovz1DuQO97hmkP5PwlQqf2Fu50u/QH51MAJbu5Eb
+-----END CERTIFICATE-----
+End
+
+ SERVER_CERT = <<'End'
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 1 (0x1)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: C=JP, ST=Tokyo, O=RubyTest, CN=Ruby Test CA
+ Validity
+ Not Before: Jan 1 00:00:00 2009 GMT
+ Not After : Dec 31 23:59:59 2049 GMT
+ Subject: C=JP, ST=Tokyo, O=RubyTest, CN=127.0.0.1
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ RSA Public-Key: (2048 bit)
+ Modulus:
+ 00:cb:b3:71:95:12:70:fc:db:d4:a9:a7:66:d6:d3:
+ 09:dd:06:80:19:e1:f2:d6:1e:31:b6:6b:20:75:51:
+ dc:a7:37:a9:ac:5b:57:5d:69:36:b6:de:1d:2c:f6:
+ 44:64:f8:e8:d6:f0:da:38:6a:ba:c2:b1:9e:dc:bb:
+ 79:94:e0:25:0c:ce:76:87:17:5d:79:9e:14:9e:bd:
+ 4c:0d:aa:74:10:3a:96:ef:76:82:d5:72:16:b5:c1:
+ ac:17:2d:90:83:73:5c:d7:a6:f5:36:0f:4c:55:f3:
+ 30:5d:19:dc:01:0e:f8:e6:fe:a5:ad:52:88:59:dc:
+ 4a:07:ed:a2:eb:a1:01:63:c4:8a:92:ba:06:80:9b:
+ 0d:85:f2:9f:f9:70:ac:d7:ad:f0:7a:3f:b8:92:2a:
+ 33:ca:69:d0:01:65:5d:31:38:1d:f6:1f:b2:17:07:
+ 7e:ac:88:67:a6:c4:5f:3e:93:94:61:e6:e4:49:9d:
+ ba:d4:d2:e8:e3:93:d1:66:79:c5:e3:1d:f8:5a:50:
+ 54:58:3d:04:b0:fd:65:d1:b3:8a:b5:8a:30:5f:b2:
+ dc:34:1a:14:f7:74:4c:03:29:97:63:5a:d7:de:bb:
+ eb:7f:4a:2a:90:59:c0:2b:47:09:82:8f:75:de:14:
+ 3f:bc:78:9a:69:25:80:5b:6c:a0:65:12:0d:29:61:
+ ac:f9
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ Netscape Comment:
+ OpenSSL Generated Certificate
+ X509v3 Subject Key Identifier:
+ EC:6B:7C:79:B8:3B:11:1D:42:F3:9A:2A:CF:9A:15:59:D7:F9:D8:C6
+ X509v3 Authority Key Identifier:
+ keyid:A0:7E:0B:AD:A3:AD:37:D7:21:0B:75:6F:8A:90:5F:8C:C9:69:DF:98
+
+ Signature Algorithm: sha256WithRSAEncryption
+ 29:14:db:71:e9:a0:86:f8:cc:4d:e4:8a:76:78:a7:ff:4e:94:
+ b4:4d:92:dc:57:9a:52:64:46:27:15:8b:4f:2a:18:a7:0d:fc:
+ d2:75:ce:4e:49:97:0b:46:71:57:23:e3:a5:c0:c5:71:94:fc:
+ f2:1d:3b:06:93:82:03:59:56:d4:fb:09:06:08:b4:97:50:33:
+ cf:58:89:dd:91:31:07:26:9a:7e:7f:8d:71:de:09:dc:4f:e5:
+ 6b:a3:10:71:d4:50:24:43:a0:1c:f5:2a:d9:1a:fb:e3:d6:f1:
+ bc:6b:42:67:16:b4:3b:31:f4:ec:03:7d:78:e2:64:16:57:6d:
+ ba:7c:0c:e1:14:b2:7c:75:4e:2b:09:3e:86:e4:aa:cc:7e:5c:
+ 2b:bd:8d:26:4d:49:36:74:86:fe:c5:a6:15:4a:af:e8:b4:4e:
+ d5:f2:e1:59:c2:fb:7e:c3:c4:f1:63:d8:c2:b0:9a:ae:31:96:
+ 90:c3:09:d0:ce:2e:31:90:d7:83:dd:ac:31:cc:f7:87:41:08:
+ 92:33:28:52:fa:2d:9e:ad:ae:6a:9f:c3:be:ce:c1:a6:e4:16:
+ 2f:69:34:40:86:b6:10:21:0e:31:69:81:9e:fc:fd:c3:06:25:
+ 65:37:d3:d9:4a:20:84:aa:e7:0e:60:7c:bf:3f:88:67:ac:e5:
+ 8c:e0:61:d6
+-----BEGIN CERTIFICATE-----
+MIIDgTCCAmmgAwIBAgIBATANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJKUDEO
+MAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRUwEwYDVQQDDAxSdWJ5
+IFRlc3QgQ0EwHhcNMDkwMTAxMDAwMDAwWhcNNDkxMjMxMjM1OTU5WjBEMQswCQYD
+VQQGEwJKUDEOMAwGA1UECAwFVG9reW8xETAPBgNVBAoMCFJ1YnlUZXN0MRIwEAYD
+VQQDDAkxMjcuMC4wLjEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDL
+s3GVEnD829Spp2bW0wndBoAZ4fLWHjG2ayB1UdynN6msW1ddaTa23h0s9kRk+OjW
+8No4arrCsZ7cu3mU4CUMznaHF115nhSevUwNqnQQOpbvdoLVcha1wawXLZCDc1zX
+pvU2D0xV8zBdGdwBDvjm/qWtUohZ3EoH7aLroQFjxIqSugaAmw2F8p/5cKzXrfB6
+P7iSKjPKadABZV0xOB32H7IXB36siGemxF8+k5Rh5uRJnbrU0ujjk9FmecXjHfha
+UFRYPQSw/WXRs4q1ijBfstw0GhT3dEwDKZdjWtfeu+t/SiqQWcArRwmCj3XeFD+8
+eJppJYBbbKBlEg0pYaz5AgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgEN
+BB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTsa3x5
+uDsRHULzmirPmhVZ1/nYxjAfBgNVHSMEGDAWgBSgfguto6031yELdW+KkF+MyWnf
+mDANBgkqhkiG9w0BAQsFAAOCAQEAKRTbcemghvjMTeSKdnin/06UtE2S3FeaUmRG
+JxWLTyoYpw380nXOTkmXC0ZxVyPjpcDFcZT88h07BpOCA1lW1PsJBgi0l1Azz1iJ
+3ZExByaafn+Ncd4J3E/la6MQcdRQJEOgHPUq2Rr749bxvGtCZxa0OzH07AN9eOJk
+FldtunwM4RSyfHVOKwk+huSqzH5cK72NJk1JNnSG/sWmFUqv6LRO1fLhWcL7fsPE
+8WPYwrCarjGWkMMJ0M4uMZDXg92sMcz3h0EIkjMoUvotnq2uap/Dvs7BpuQWL2k0
+QIa2ECEOMWmBnvz9wwYlZTfT2UoghKrnDmB8vz+IZ6zljOBh1g==
+-----END CERTIFICATE-----
+End
+
+ SERVER_KEY = <<'End'
+RSA Private-Key: (2048 bit, 2 primes)
+modulus:
+ 00:cb:b3:71:95:12:70:fc:db:d4:a9:a7:66:d6:d3:
+ 09:dd:06:80:19:e1:f2:d6:1e:31:b6:6b:20:75:51:
+ dc:a7:37:a9:ac:5b:57:5d:69:36:b6:de:1d:2c:f6:
+ 44:64:f8:e8:d6:f0:da:38:6a:ba:c2:b1:9e:dc:bb:
+ 79:94:e0:25:0c:ce:76:87:17:5d:79:9e:14:9e:bd:
+ 4c:0d:aa:74:10:3a:96:ef:76:82:d5:72:16:b5:c1:
+ ac:17:2d:90:83:73:5c:d7:a6:f5:36:0f:4c:55:f3:
+ 30:5d:19:dc:01:0e:f8:e6:fe:a5:ad:52:88:59:dc:
+ 4a:07:ed:a2:eb:a1:01:63:c4:8a:92:ba:06:80:9b:
+ 0d:85:f2:9f:f9:70:ac:d7:ad:f0:7a:3f:b8:92:2a:
+ 33:ca:69:d0:01:65:5d:31:38:1d:f6:1f:b2:17:07:
+ 7e:ac:88:67:a6:c4:5f:3e:93:94:61:e6:e4:49:9d:
+ ba:d4:d2:e8:e3:93:d1:66:79:c5:e3:1d:f8:5a:50:
+ 54:58:3d:04:b0:fd:65:d1:b3:8a:b5:8a:30:5f:b2:
+ dc:34:1a:14:f7:74:4c:03:29:97:63:5a:d7:de:bb:
+ eb:7f:4a:2a:90:59:c0:2b:47:09:82:8f:75:de:14:
+ 3f:bc:78:9a:69:25:80:5b:6c:a0:65:12:0d:29:61:
+ ac:f9
+publicExponent: 65537 (0x10001)
+privateExponent:
+ 12:be:d5:b2:01:3b:72:99:8c:4d:7c:81:43:3d:b2:
+ 87:ab:84:78:5d:49:aa:98:a6:bc:81:c9:3f:e2:a3:
+ aa:a3:bd:b2:85:c9:59:68:48:47:b5:d2:fb:83:42:
+ 32:04:91:f0:cd:c3:57:33:c3:32:0d:84:70:0d:b4:
+ 97:95:b4:f3:23:c0:d6:97:b8:db:6b:47:bc:7f:f1:
+ 12:c4:df:df:6a:74:df:5e:89:95:b8:e5:0c:1e:e1:
+ 86:54:84:1b:04:af:c3:8c:b2:be:21:d4:45:88:96:
+ a7:ca:ac:6b:50:84:69:45:7f:db:9e:5f:bb:dd:40:
+ d6:cf:f0:91:3c:84:d3:38:65:c9:15:f7:9e:37:aa:
+ 1a:2e:bc:16:b6:95:be:bc:af:45:76:ba:ad:99:f6:
+ ef:6a:e8:fd:f0:31:89:19:c4:04:67:a1:ec:c4:79:
+ 59:08:77:ab:0b:65:88:88:02:b1:38:5c:80:4e:27:
+ 78:b2:a5:bd:b5:ad:d5:9c:4c:ea:ad:db:05:56:25:
+ 70:28:da:22:fb:d8:de:8c:3b:78:fe:3e:cf:ed:1b:
+ f9:97:c6:b6:4a:bf:60:08:8f:dc:85:5e:b1:49:ab:
+ 87:8b:68:72:f4:6a:3f:bc:db:a3:6c:f7:e8:b0:15:
+ bb:4b:ba:37:49:a2:d1:7c:f8:4f:1b:05:11:22:d9:
+ 81
+prime1:
+ 00:fb:d2:cb:14:61:00:c1:7a:83:ba:fe:79:97:a2:
+ 4d:5a:ea:40:78:96:6e:d2:be:71:5b:c6:2c:1f:c9:
+ 18:48:6b:ae:20:86:87:b5:08:0b:17:69:ca:93:cd:
+ 00:36:22:51:7b:d5:2d:8c:0c:0e:de:bc:86:a8:07:
+ 0e:c5:57:e4:df:be:ed:7d:cc:b1:a4:d6:a8:2b:00:
+ 65:2a:69:30:5e:dc:6d:6d:c4:c8:7e:20:34:eb:6f:
+ 5e:cf:b3:b8:2e:8d:56:31:44:a8:17:ea:be:65:19:
+ ff:da:14:e0:0c:73:56:14:08:47:4c:5b:79:51:74:
+ 5d:bc:e7:fe:01:2f:55:27:69
+prime2:
+ 00:cf:14:54:47:bb:5f:5d:d6:2b:2d:ed:a6:8a:6f:
+ 36:fc:47:5e:9f:84:ae:aa:1f:f8:44:50:91:15:f5:
+ ed:9d:29:d9:2b:2a:19:66:56:2e:96:15:b5:8e:a9:
+ 7f:89:27:21:b5:57:55:7e:2a:c5:8c:93:fe:f6:0a:
+ a5:17:15:91:91:b3:7d:35:1a:d5:9a:2e:b8:0d:ad:
+ e6:97:6d:83:a3:27:29:ee:00:74:ef:57:34:f3:07:
+ ad:12:43:37:0c:5c:b7:26:34:bc:4e:3a:43:65:6b:
+ 0c:b8:23:ac:77:fd:b2:23:eb:7b:65:70:f6:96:c4:
+ 17:2c:aa:24:b8:a5:5e:b7:11
+exponent1:
+ 00:92:32:ae:f4:05:dd:0a:76:b6:43:b9:b9:9d:ee:
+ fc:39:ec:05:c1:fc:94:1a:85:b6:0a:31:e3:2c:10:
+ f3:a8:17:db:df:c6:3a:c3:3f:08:31:6f:99:cc:75:
+ 17:ca:55:e2:38:a2:6a:ef:03:91:1e:7f:15:2e:37:
+ ea:bb:67:6b:d8:fa:5f:a6:c9:4f:d9:03:46:5e:b0:
+ bc:0b:03:46:b1:cc:07:3b:d3:23:13:16:5f:a2:cf:
+ e5:9b:70:1b:5d:eb:70:3e:ea:3d:2c:a5:7c:23:f6:
+ 14:33:e8:2a:ab:0f:ca:c9:96:84:ce:2f:cd:1f:1d:
+ 0f:ce:bc:61:1b:0e:ff:c1:01
+exponent2:
+ 00:9e:0b:f3:03:48:73:d1:e7:9a:cf:13:f9:ae:e0:
+ 91:03:dc:e8:d0:30:f1:2a:30:fa:48:11:81:9a:54:
+ 37:c5:62:e2:37:fa:8a:a6:3b:92:94:c3:fe:ec:e2:
+ 5a:cf:70:09:5f:21:47:c3:e2:9b:21:de:f6:92:0c:
+ af:d1:bd:89:7b:bd:95:0b:49:ee:cb:1d:6b:26:2d:
+ 9a:b7:ea:42:b4:ec:38:29:49:39:f6:4e:05:c0:93:
+ 14:39:c3:09:29:ab:3d:b1:b0:40:24:28:7d:b5:d3:
+ 0d:43:21:1f:09:f9:9b:d3:a4:6f:6a:8d:db:f6:57:
+ b5:24:46:bb:7e:1d:e0:fb:31
+coefficient:
+ 10:93:1d:c8:33:a5:c1:d3:84:6a:22:68:e5:60:cc:
+ 9c:27:0a:52:0b:58:a3:0c:83:f4:f4:46:09:0c:a1:
+ 41:a6:ea:bf:80:9d:0e:5d:d8:3d:25:00:c5:a1:35:
+ 7a:8c:ea:95:16:94:c3:7c:8f:2b:e0:53:ea:66:ae:
+ 19:be:55:04:3d:ee:e2:4b:a8:69:1b:7e:d8:09:7f:
+ ed:7c:ee:95:88:10:dc:4b:5b:bf:81:a4:e8:dc:7e:
+ 4f:e5:c3:90:c4:e5:5a:90:10:32:d6:08:b5:1f:5d:
+ 09:18:d8:44:28:e4:c4:c7:07:75:9b:9b:b3:80:86:
+ 68:9d:fe:68:f3:4d:db:66
+writing RSA key
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAy7NxlRJw/NvUqadm1tMJ3QaAGeHy1h4xtmsgdVHcpzeprFtX
+XWk2tt4dLPZEZPjo1vDaOGq6wrGe3Lt5lOAlDM52hxddeZ4Unr1MDap0EDqW73aC
+1XIWtcGsFy2Qg3Nc16b1Ng9MVfMwXRncAQ745v6lrVKIWdxKB+2i66EBY8SKkroG
+gJsNhfKf+XCs163wej+4kiozymnQAWVdMTgd9h+yFwd+rIhnpsRfPpOUYebkSZ26
+1NLo45PRZnnF4x34WlBUWD0EsP1l0bOKtYowX7LcNBoU93RMAymXY1rX3rvrf0oq
+kFnAK0cJgo913hQ/vHiaaSWAW2ygZRINKWGs+QIDAQABAoIBABK+1bIBO3KZjE18
+gUM9soerhHhdSaqYpryByT/io6qjvbKFyVloSEe10vuDQjIEkfDNw1czwzINhHAN
+tJeVtPMjwNaXuNtrR7x/8RLE399qdN9eiZW45Qwe4YZUhBsEr8OMsr4h1EWIlqfK
+rGtQhGlFf9ueX7vdQNbP8JE8hNM4ZckV9543qhouvBa2lb68r0V2uq2Z9u9q6P3w
+MYkZxARnoezEeVkId6sLZYiIArE4XIBOJ3iypb21rdWcTOqt2wVWJXAo2iL72N6M
+O3j+Ps/tG/mXxrZKv2AIj9yFXrFJq4eLaHL0aj+826Ns9+iwFbtLujdJotF8+E8b
+BREi2YECgYEA+9LLFGEAwXqDuv55l6JNWupAeJZu0r5xW8YsH8kYSGuuIIaHtQgL
+F2nKk80ANiJRe9UtjAwO3ryGqAcOxVfk377tfcyxpNaoKwBlKmkwXtxtbcTIfiA0
+629ez7O4Lo1WMUSoF+q+ZRn/2hTgDHNWFAhHTFt5UXRdvOf+AS9VJ2kCgYEAzxRU
+R7tfXdYrLe2mim82/Eden4Suqh/4RFCRFfXtnSnZKyoZZlYulhW1jql/iSchtVdV
+firFjJP+9gqlFxWRkbN9NRrVmi64Da3ml22Doycp7gB071c08wetEkM3DFy3JjS8
+TjpDZWsMuCOsd/2yI+t7ZXD2lsQXLKokuKVetxECgYEAkjKu9AXdCna2Q7m5ne78
+OewFwfyUGoW2CjHjLBDzqBfb38Y6wz8IMW+ZzHUXylXiOKJq7wORHn8VLjfqu2dr
+2PpfpslP2QNGXrC8CwNGscwHO9MjExZfos/lm3AbXetwPuo9LKV8I/YUM+gqqw/K
+yZaEzi/NHx0PzrxhGw7/wQECgYEAngvzA0hz0eeazxP5ruCRA9zo0DDxKjD6SBGB
+mlQ3xWLiN/qKpjuSlMP+7OJaz3AJXyFHw+KbId72kgyv0b2Je72VC0nuyx1rJi2a
+t+pCtOw4KUk59k4FwJMUOcMJKas9sbBAJCh9tdMNQyEfCfmb06Rvao3b9le1JEa7
+fh3g+zECgYAQkx3IM6XB04RqImjlYMycJwpSC1ijDIP09EYJDKFBpuq/gJ0OXdg9
+JQDFoTV6jOqVFpTDfI8r4FPqZq4ZvlUEPe7iS6hpG37YCX/tfO6ViBDcS1u/gaTo
+3H5P5cOQxOVakBAy1gi1H10JGNhEKOTExwd1m5uzgIZonf5o803bZg==
+-----END RSA PRIVATE KEY-----
+End
+
+ DHPARAMS = <<'End'
+ DH Parameters: (2048 bit)
+ prime:
+ 00:ec:4e:a4:06:b6:22:ca:f9:8a:00:cc:d0:ee:2f:
+ 16:bf:05:64:f5:8f:fe:7f:c4:bb:b0:24:cd:ef:5d:
+ 8a:90:ad:dc:a9:dd:63:84:90:d8:25:ba:d8:78:d5:
+ 77:91:42:0a:84:fc:56:1e:13:9b:1c:aa:43:d5:1f:
+ 38:52:92:fe:b3:66:f9:e7:e8:8c:77:a1:a6:2f:b3:
+ 98:98:d2:13:fc:57:1c:2a:14:dc:bd:e6:9b:54:19:
+ 99:4f:ce:81:64:a6:32:7f:8e:61:50:5f:45:3a:e5:
+ 0c:f7:13:f3:b8:ad:d5:77:ca:09:42:f7:d8:30:27:
+ 7b:2c:f0:b4:b5:a0:04:96:34:0b:47:81:1d:7f:c1:
+ 3a:62:86:8e:7d:f8:13:7f:9a:b1:8b:09:23:9e:55:
+ 59:41:cd:f0:86:09:c4:b7:d1:69:54:cb:d0:f5:e9:
+ 27:c9:e1:81:e4:a1:df:6b:20:1c:df:e8:54:02:f2:
+ 37:fc:2a:f7:d5:b3:6f:79:7e:70:22:78:79:18:3c:
+ 75:14:68:4a:05:9f:ac:d4:7f:9a:79:db:9d:0a:6e:
+ ec:0a:04:70:bf:c9:4a:59:81:a2:1f:33:9b:4a:66:
+ bc:03:ce:8a:1b:e3:03:ec:ba:39:26:ab:90:dc:39:
+ 41:a1:d8:f7:20:3c:8f:af:12:2f:f7:a9:6f:44:f1:
+ 6d:03
+ generator: 2 (0x2)
+-----BEGIN DH PARAMETERS-----
+MIIBCAKCAQEA7E6kBrYiyvmKAMzQ7i8WvwVk9Y/+f8S7sCTN712KkK3cqd1jhJDY
+JbrYeNV3kUIKhPxWHhObHKpD1R84UpL+s2b55+iMd6GmL7OYmNIT/FccKhTcveab
+VBmZT86BZKYyf45hUF9FOuUM9xPzuK3Vd8oJQvfYMCd7LPC0taAEljQLR4Edf8E6
+YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
+1bNveX5wInh5GDx1FGhKBZ+s1H+aedudCm7sCgRwv8lKWYGiHzObSma8A86KG+MD
+7Lo5JquQ3DlBodj3IDyPrxIv96lvRPFtAwIBAg==
+-----END DH PARAMETERS-----
+End
+ end
+end
diff --git a/test/openssl/test_ossl.rb b/test/openssl/test_ossl.rb
index 979669a003..3a90ead10a 100644
--- a/test/openssl/test_ossl.rb
+++ b/test/openssl/test_ossl.rb
@@ -1,8 +1,6 @@
# frozen_string_literal: true
require_relative "utils"
-require 'benchmark'
-
if defined?(OpenSSL)
class OpenSSL::OSSL < OpenSSL::SSLTestCase
@@ -44,6 +42,12 @@ class OpenSSL::OSSL < OpenSSL::SSLTestCase
end
def test_memcmp_timing
+ begin
+ require "benchmark"
+ rescue LoadError
+ pend "Benchmark is not available in this environment. Please install it with `gem install benchmark`."
+ end
+
# Ensure using fixed_length_secure_compare takes almost exactly the same amount of time to compare two different strings.
# Regular string comparison will short-circuit on the first non-matching character, failing this test.
# NOTE: this test may be susceptible to noise if the system running the tests is otherwise under load.
diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb
index 66e36a7ab4..10942191dd 100644
--- a/test/openssl/test_pair.rb
+++ b/test/openssl/test_pair.rb
@@ -101,6 +101,27 @@ module OpenSSL::TestPairM
}
end
+ def test_getbyte
+ ssl_pair {|s1, s2|
+ s1 << "a"
+ assert_equal(97, s2.getbyte)
+ }
+ end
+
+ def test_readbyte
+ ssl_pair {|s1, s2|
+ s1 << "b"
+ assert_equal(98, s2.readbyte)
+ }
+ end
+
+ def test_readbyte_eof
+ ssl_pair {|s1, s2|
+ s2.close
+ assert_raise(EOFError) { s1.readbyte }
+ }
+ end
+
def test_gets
ssl_pair {|s1, s2|
s1 << "abc\n\n$def123ghi"
diff --git a/test/openssl/test_pkcs12.rb b/test/openssl/test_pkcs12.rb
index e6b91b52af..faf26c9e3e 100644
--- a/test/openssl/test_pkcs12.rb
+++ b/test/openssl/test_pkcs12.rb
@@ -159,7 +159,6 @@ module OpenSSL
DEFAULT_PBE_PKEYS,
DEFAULT_PBE_CERTS,
nil,
- nil,
2048
)
@@ -178,6 +177,36 @@ module OpenSSL
end
end
+ def test_create_with_keytype
+ OpenSSL::PKCS12.create(
+ "omg",
+ "hello",
+ @mykey,
+ @mycert,
+ [],
+ DEFAULT_PBE_PKEYS,
+ DEFAULT_PBE_CERTS,
+ nil,
+ nil,
+ OpenSSL::PKCS12::KEY_SIG
+ )
+
+ assert_raise(ArgumentError) do
+ OpenSSL::PKCS12.create(
+ "omg",
+ "hello",
+ @mykey,
+ @mycert,
+ [],
+ DEFAULT_PBE_PKEYS,
+ DEFAULT_PBE_CERTS,
+ nil,
+ nil,
+ 2048
+ )
+ end
+ end
+
def test_new_with_no_keys
# generated with:
# openssl pkcs12 -certpbe PBE-SHA1-3DES -in <@mycert> -nokeys -export
diff --git a/test/openssl/test_pkey.rb b/test/openssl/test_pkey.rb
index aee0546f63..811d5103d6 100644
--- a/test/openssl/test_pkey.rb
+++ b/test/openssl/test_pkey.rb
@@ -38,6 +38,12 @@ class OpenSSL::TestPKey < OpenSSL::PKeyTestCase
assert_raise(OpenSSL::PKey::PKeyError) {
OpenSSL::PKey.generate_parameters("EC", "invalid" => "option")
}
+ end
+
+ def test_s_generate_parameters_with_block
+ # DSA kengen is not FIPS-approved.
+ # https://github.com/openssl/openssl/commit/49a35f0#diff-605396c063194975af8ce31399d42690ab18186b422fb5012101cc9132660fe1R611-R614
+ omit_on_fips
# Parameter generation callback is called
if openssl?(3, 0, 0, 0) && !openssl?(3, 0, 0, 6)
@@ -144,32 +150,6 @@ class OpenSSL::TestPKey < OpenSSL::PKeyTestCase
assert_raise(OpenSSL::PKey::PKeyError) { priv.derive(pub) }
end
- def test_ed25519_not_approved_on_fips
- omit_on_non_fips
- # Ed25519 is technically allowed in the OpenSSL 3.0 code as a kind of bug.
- # So, we need to omit OpenSSL 3.0.
- #
- # See OpenSSL providers/fips/fipsprov.c PROV_NAMES_ED25519 entries with
- # FIPS_DEFAULT_PROPERTIES on openssl-3.0 branch and
- # FIPS_UNAPPROVED_PROPERTIES on openssl-3.1 branch.
- #
- # See also
- # https://github.com/openssl/openssl/issues/20758#issuecomment-1639658102
- # for details.
- unless openssl?(3, 1, 0, 0)
- omit 'Ed25519 is allowed in the OpenSSL 3.0 FIPS code as a kind of bug'
- end
-
- priv_pem = <<~EOF
- -----BEGIN PRIVATE KEY-----
- MC4CAQAwBQYDK2VwBCIEIEzNCJso/5banbbDRuwRTg9bijGfNaumJNqM9u1PuKb7
- -----END PRIVATE KEY-----
- EOF
- assert_raise(OpenSSL::PKey::PKeyError) do
- OpenSSL::PKey.read(priv_pem)
- end
- end
-
def test_x25519
# Test vector from RFC 7748 Section 6.1
alice_pem = <<~EOF
diff --git a/test/openssl/test_pkey_dsa.rb b/test/openssl/test_pkey_dsa.rb
index 4c93f2869d..3e8a83b2d0 100644
--- a/test/openssl/test_pkey_dsa.rb
+++ b/test/openssl/test_pkey_dsa.rb
@@ -4,6 +4,11 @@ require_relative 'utils'
if defined?(OpenSSL) && defined?(OpenSSL::PKey::DSA)
class OpenSSL::TestPKeyDSA < OpenSSL::PKeyTestCase
+ def setup
+ # May not be available in FIPS mode as DSA has been deprecated in FIPS 186-5
+ omit_on_fips
+ end
+
def test_private
key = Fixtures.pkey("dsa1024")
assert_equal true, key.private?
@@ -31,6 +36,11 @@ class OpenSSL::TestPKeyDSA < OpenSSL::PKeyTestCase
def test_generate
# DSA.generate used to call DSA_generate_parameters_ex(), which adjusts the
# size of q according to the size of p
+ key1024 = OpenSSL::PKey::DSA.generate(1024)
+ assert_predicate key1024, :private?
+ assert_equal 1024, key1024.p.num_bits
+ assert_equal 160, key1024.q.num_bits
+
key2048 = OpenSSL::PKey::DSA.generate(2048)
assert_equal 2048, key2048.p.num_bits
assert_equal 256, key2048.q.num_bits
@@ -42,17 +52,6 @@ class OpenSSL::TestPKeyDSA < OpenSSL::PKeyTestCase
end
end
- def test_generate_on_non_fips
- # DSA with 1024 bits is invalid on FIPS 186-4.
- # https://github.com/openssl/openssl/commit/49ed5ba8f62875074f04417189147fd3dda072ab
- omit_on_fips
-
- key1024 = OpenSSL::PKey::DSA.generate(1024)
- assert_predicate key1024, :private?
- assert_equal 1024, key1024.p.num_bits
- assert_equal 160, key1024.q.num_bits
- end
-
def test_sign_verify
# The DSA valid size is 2048 or 3072 on FIPS.
# https://github.com/openssl/openssl/blob/7649b5548e5c0352b91d9d3ed695e42a2ac1e99c/providers/common/securitycheck.c#L185-L188
@@ -135,8 +134,6 @@ class OpenSSL::TestPKeyDSA < OpenSSL::PKeyTestCase
end
def test_DSAPrivateKey_encrypted
- omit_on_fips
-
# key = abcdef
dsa512 = Fixtures.pkey("dsa512")
pem = <<~EOF
diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb
index 61c55c60b2..02693c277b 100644
--- a/test/openssl/test_pkey_rsa.rb
+++ b/test/openssl/test_pkey_rsa.rb
@@ -14,9 +14,7 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
end if !openssl?(3, 0, 0) # Impossible state in OpenSSL 3.0
def test_private
- # Generated by key size and public exponent
- key = OpenSSL::PKey::RSA.new(512, 3)
- assert(key.private?)
+ key = Fixtures.pkey("rsa2048")
# Generated by DER
key2 = OpenSSL::PKey::RSA.new(key.to_der)
@@ -46,55 +44,66 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
end
def test_new
- key = OpenSSL::PKey::RSA.new(512)
- assert_equal 512, key.n.num_bits
+ key = OpenSSL::PKey::RSA.new(2048)
+ assert_equal 2048, key.n.num_bits
assert_equal 65537, key.e
assert_not_nil key.d
+ assert(key.private?)
+ end
+
+ def test_new_public_exponent
+ # At least 2024-bits RSA key are required in FIPS.
+ omit_on_fips
# Specify public exponent
- key2 = OpenSSL::PKey::RSA.new(512, 3)
- assert_equal 512, key2.n.num_bits
- assert_equal 3, key2.e
- assert_not_nil key2.d
+ key = OpenSSL::PKey::RSA.new(512, 3)
+ assert_equal 512, key.n.num_bits
+ assert_equal 3, key.e
end
def test_s_generate
- key1 = OpenSSL::PKey::RSA.generate(512)
- assert_equal 512, key1.n.num_bits
+ key1 = OpenSSL::PKey::RSA.generate(2048)
+ assert_equal 2048, key1.n.num_bits
assert_equal 65537, key1.e
+ end
+
+ def test_s_generate_public_exponent
+ # At least 2024-bits RSA key are required in FIPS.
+ omit_on_fips
# Specify public exponent
- key2 = OpenSSL::PKey::RSA.generate(512, 3)
- assert_equal 512, key2.n.num_bits
- assert_equal 3, key2.e
- assert_not_nil key2.d
+ key = OpenSSL::PKey::RSA.generate(512, 3)
+ assert_equal 512, key.n.num_bits
+ assert_equal 3, key.e
end
def test_new_break
- assert_nil(OpenSSL::PKey::RSA.new(1024) { break })
+ assert_nil(OpenSSL::PKey::RSA.new(2048) { break })
assert_raise(RuntimeError) do
- OpenSSL::PKey::RSA.new(1024) { raise }
+ OpenSSL::PKey::RSA.new(2048) { raise }
end
end
def test_sign_verify
- rsa1024 = Fixtures.pkey("rsa1024")
+ rsa = Fixtures.pkey("rsa2048")
data = "Sign me!"
- signature = rsa1024.sign("SHA256", data)
- assert_equal true, rsa1024.verify("SHA256", signature, data)
+ signature = rsa.sign("SHA256", data)
+ assert_equal true, rsa.verify("SHA256", signature, data)
signature0 = (<<~'end;').unpack1("m")
- oLCgbprPvfhM4pjFQiDTFeWI9Sk+Og7Nh9TmIZ/xSxf2CGXQrptlwo7NQ28+
- WA6YQo8jPH4hSuyWIM4Gz4qRYiYRkl5TDMUYob94zm8Si1HxEiS9354tzvqS
- zS8MLW2BtNPuTubMxTItHGTnOzo9sUg0LAHVFt8kHG2NfKAw/gQ=
+ ooy49i8aeFtkDYUU0RPDsEugGiNw4lZxpbQPnIwtdftEkka945IqKZ/MY3YSw7wKsvBZeaTy8GqL
+ lSWLThsRFDV+UUS9zUBbQ9ygNIT8OjdV+tNL63ZpKGprczSnw4F05MQIpajNRud/8jiI9rf+Wysi
+ WwXecjMl2FlXlLJHY4PFQZU5TiametB4VCQRMcjLo1uf26u/yRpiGaYyqn5vxs0SqNtUDM1UL6x4
+ NHCAdqLjuFRQPjYp1vGLD3eSl4061pS8x1NVap3YGbYfGUyzZO4VfwFwf1jPdhp/OX/uZw4dGB2H
+ gSK+q1JiDFwEE6yym5tdKovL1g1NhFYHF6gkZg==
end;
- assert_equal true, rsa1024.verify("SHA256", signature0, data)
+ assert_equal true, rsa.verify("SHA256", signature0, data)
signature1 = signature0.succ
- assert_equal false, rsa1024.verify("SHA256", signature1, data)
+ assert_equal false, rsa.verify("SHA256", signature1, data)
end
def test_sign_verify_options
- key = Fixtures.pkey("rsa1024")
+ key = Fixtures.pkey("rsa2048")
data = "Sign me!"
pssopts = {
"rsa_padding_mode" => "pss",
@@ -102,7 +111,7 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
"rsa_mgf1_md" => "SHA1"
}
sig_pss = key.sign("SHA256", data, pssopts)
- assert_equal 128, sig_pss.bytesize
+ assert_equal 256, sig_pss.bytesize
assert_equal true, key.verify("SHA256", sig_pss, data, pssopts)
assert_equal true, key.verify_pss("SHA256", sig_pss, data,
salt_length: 20, mgf1_hash: "SHA1")
@@ -175,12 +184,12 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
end
def test_sign_verify_pss
- key = Fixtures.pkey("rsa1024")
+ key = Fixtures.pkey("rsa2048")
data = "Sign me!"
invalid_data = "Sign me?"
signature = key.sign_pss("SHA256", data, salt_length: 20, mgf1_hash: "SHA1")
- assert_equal 128, signature.bytesize
+ assert_equal 256, signature.bytesize
assert_equal true,
key.verify_pss("SHA256", signature, data, salt_length: 20, mgf1_hash: "SHA1")
assert_equal true,
@@ -196,14 +205,26 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
assert_equal false,
key.verify_pss("SHA256", signature, data, salt_length: 20, mgf1_hash: "SHA1")
- signature = key.sign_pss("SHA256", data, salt_length: :max, mgf1_hash: "SHA1")
- assert_equal true,
- key.verify_pss("SHA256", signature, data, salt_length: 94, mgf1_hash: "SHA1")
- assert_equal true,
- key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA1")
+ # The sign_pss with `salt_length: :max` raises the "invalid salt length"
+ # error in FIPS. We need to skip the tests in FIPS.
+ # According to FIPS 186-5 section 5.4, the salt length shall be between zero
+ # and the output block length of the digest function (inclusive).
+ #
+ # FIPS 186-5 section 5.4 PKCS #1
+ # https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ unless OpenSSL.fips_mode
+ signature = key.sign_pss("SHA256", data, salt_length: :max, mgf1_hash: "SHA1")
+ # Should verify on the following salt_length (sLen).
+ # sLen <= emLen (octat) - 2 - hLen (octet) = 2048 / 8 - 2 - 256 / 8 = 222
+ # https://datatracker.ietf.org/doc/html/rfc8017#section-9.1.1
+ assert_equal true,
+ key.verify_pss("SHA256", signature, data, salt_length: 222, mgf1_hash: "SHA1")
+ assert_equal true,
+ key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA1")
+ end
assert_raise(OpenSSL::PKey::RSAError) {
- key.sign_pss("SHA256", data, salt_length: 95, mgf1_hash: "SHA1")
+ key.sign_pss("SHA256", data, salt_length: 223, mgf1_hash: "SHA1")
}
end
@@ -213,8 +234,13 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
# Defaults to PKCS #1 v1.5
raw = "data"
- enc = rsapub.encrypt(raw)
- assert_equal raw, rsapriv.decrypt(enc)
+ # According to the NIST SP 800-131A Rev. 2 section 6, PKCS#1 v1.5 padding is
+ # not permitted for key agreement and key transport using RSA in FIPS.
+ # https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf
+ unless OpenSSL.fips_mode
+ enc = rsapub.encrypt(raw)
+ assert_equal raw, rsapriv.decrypt(enc)
+ end
# Invalid options
assert_raise(OpenSSL::PKey::PKeyError) {
@@ -227,11 +253,13 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
rsapub = OpenSSL::PKey.read(rsapriv.public_to_der)
# Defaults to PKCS #1 v1.5
- raw = "data"
- enc_legacy = rsapub.public_encrypt(raw)
- assert_equal raw, rsapriv.decrypt(enc_legacy)
- enc_new = rsapub.encrypt(raw)
- assert_equal raw, rsapriv.private_decrypt(enc_new)
+ unless OpenSSL.fips_mode
+ raw = "data"
+ enc_legacy = rsapub.public_encrypt(raw)
+ assert_equal raw, rsapriv.decrypt(enc_legacy)
+ enc_new = rsapub.encrypt(raw)
+ assert_equal raw, rsapriv.private_decrypt(enc_new)
+ end
# OAEP with default parameters
raw = "data"
@@ -292,53 +320,67 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
end
def test_RSAPrivateKey
- rsa1024 = Fixtures.pkey("rsa1024")
+ rsa = Fixtures.pkey("rsa2048")
asn1 = OpenSSL::ASN1::Sequence([
OpenSSL::ASN1::Integer(0),
- OpenSSL::ASN1::Integer(rsa1024.n),
- OpenSSL::ASN1::Integer(rsa1024.e),
- OpenSSL::ASN1::Integer(rsa1024.d),
- OpenSSL::ASN1::Integer(rsa1024.p),
- OpenSSL::ASN1::Integer(rsa1024.q),
- OpenSSL::ASN1::Integer(rsa1024.dmp1),
- OpenSSL::ASN1::Integer(rsa1024.dmq1),
- OpenSSL::ASN1::Integer(rsa1024.iqmp)
+ OpenSSL::ASN1::Integer(rsa.n),
+ OpenSSL::ASN1::Integer(rsa.e),
+ OpenSSL::ASN1::Integer(rsa.d),
+ OpenSSL::ASN1::Integer(rsa.p),
+ OpenSSL::ASN1::Integer(rsa.q),
+ OpenSSL::ASN1::Integer(rsa.dmp1),
+ OpenSSL::ASN1::Integer(rsa.dmq1),
+ OpenSSL::ASN1::Integer(rsa.iqmp)
])
key = OpenSSL::PKey::RSA.new(asn1.to_der)
assert_predicate key, :private?
- assert_same_rsa rsa1024, key
+ assert_same_rsa rsa, key
pem = <<~EOF
-----BEGIN RSA PRIVATE KEY-----
- MIICXgIBAAKBgQDLwsSw1ECnPtT+PkOgHhcGA71nwC2/nL85VBGnRqDxOqjVh7Cx
- aKPERYHsk4BPCkE3brtThPWc9kjHEQQ7uf9Y1rbCz0layNqHyywQEVLFmp1cpIt/
- Q3geLv8ZD9pihowKJDyMDiN6ArYUmZczvW4976MU3+l54E6lF/JfFEU5hwIDAQAB
- AoGBAKSl/MQarye1yOysqX6P8fDFQt68VvtXkNmlSiKOGuzyho0M+UVSFcs6k1L0
- maDE25AMZUiGzuWHyaU55d7RXDgeskDMakD1v6ZejYtxJkSXbETOTLDwUWTn618T
- gnb17tU1jktUtU67xK/08i/XodlgnQhs6VoHTuCh3Hu77O6RAkEA7+gxqBuZR572
- 74/akiW/SuXm0SXPEviyO1MuSRwtI87B02D0qgV8D1UHRm4AhMnJ8MCs1809kMQE
- JiQUCrp9mQJBANlt2ngBO14us6NnhuAseFDTBzCHXwUUu1YKHpMMmxpnGqaldGgX
- sOZB3lgJsT9VlGf3YGYdkLTNVbogQKlKpB8CQQDiSwkb4vyQfDe8/NpU5Not0fII
- 8jsDUCb+opWUTMmfbxWRR3FBNu8wnym/m19N4fFj8LqYzHX4KY0oVPu6qvJxAkEA
- wa5snNekFcqONLIE4G5cosrIrb74sqL8GbGb+KuTAprzj5z1K8Bm0UW9lTjVDjDi
- qRYgZfZSL+x1P/54+xTFSwJAY1FxA/N3QPCXCjPh5YqFxAMQs2VVYTfg+t0MEcJD
- dPMQD5JX6g5HKnHFg2mZtoXQrWmJSn7p8GJK8yNTopEErA==
+ MIIEpAIBAAKCAQEAuV9ht9J7k4NBs38jOXvvTKY9gW8nLICSno5EETR1cuF7i4pN
+ s9I1QJGAFAX0BEO4KbzXmuOvfCpD3CU+Slp1enenfzq/t/e/1IRW0wkJUJUFQign
+ 4CtrkJL+P07yx18UjyPlBXb81ApEmAB5mrJVSrWmqbjs07JbuS4QQGGXLc+Su96D
+ kYKmSNVjBiLxVVSpyZfAY3hD37d60uG+X8xdW5v68JkRFIhdGlb6JL8fllf/A/bl
+ NwdJOhVr9mESHhwGjwfSeTDPfd8ZLE027E5lyAVX9KZYcU00mOX+fdxOSnGqS/8J
+ DRh0EPHDL15RcJjV2J6vZjPb0rOYGDoMcH+94wIDAQABAoIBAAzsamqfYQAqwXTb
+ I0CJtGg6msUgU7HVkOM+9d3hM2L791oGHV6xBAdpXW2H8LgvZHJ8eOeSghR8+dgq
+ PIqAffo4x1Oma+FOg3A0fb0evyiACyrOk+EcBdbBeLo/LcvahBtqnDfiUMQTpy6V
+ seSoFCwuN91TSCeGIsDpRjbG1vxZgtx+uI+oH5+ytqJOmfCksRDCkMglGkzyfcl0
+ Xc5CUhIJ0my53xijEUQl19rtWdMnNnnkdbG8PT3LZlOta5Do86BElzUYka0C6dUc
+ VsBDQ0Nup0P6rEQgy7tephHoRlUGTYamsajGJaAo1F3IQVIrRSuagi7+YpSpCqsW
+ wORqorkCgYEA7RdX6MDVrbw7LePnhyuaqTiMK+055/R1TqhB1JvvxJ1CXk2rDL6G
+ 0TLHQ7oGofd5LYiemg4ZVtWdJe43BPZlVgT6lvL/iGo8JnrncB9Da6L7nrq/+Rvj
+ XGjf1qODCK+LmreZWEsaLPURIoR/Ewwxb9J2zd0CaMjeTwafJo1CZvcCgYEAyCgb
+ aqoWvUecX8VvARfuA593Lsi50t4MEArnOXXcd1RnXoZWhbx5rgO8/ATKfXr0BK/n
+ h2GF9PfKzHFm/4V6e82OL7gu/kLy2u9bXN74vOvWFL5NOrOKPM7Kg+9I131kNYOw
+ Ivnr/VtHE5s0dY7JChYWE1F3vArrOw3T00a4CXUCgYEA0SqY+dS2LvIzW4cHCe9k
+ IQqsT0yYm5TFsUEr4sA3xcPfe4cV8sZb9k/QEGYb1+SWWZ+AHPV3UW5fl8kTbSNb
+ v4ng8i8rVVQ0ANbJO9e5CUrepein2MPL0AkOATR8M7t7dGGpvYV0cFk8ZrFx0oId
+ U0PgYDotF/iueBWlbsOM430CgYEAqYI95dFyPI5/AiSkY5queeb8+mQH62sdcCCr
+ vd/w/CZA/K5sbAo4SoTj8dLk4evU6HtIa0DOP63y071eaxvRpTNqLUOgmLh+D6gS
+ Cc7TfLuFrD+WDBatBd5jZ+SoHccVrLR/4L8jeodo5FPW05A+9gnKXEXsTxY4LOUC
+ 9bS4e1kCgYAqVXZh63JsMwoaxCYmQ66eJojKa47VNrOeIZDZvd2BPVf30glBOT41
+ gBoDG3WMPZoQj9pb7uMcrnvs4APj2FIhMU8U15LcPAj59cD6S6rWnAxO8NFK7HQG
+ 4Jxg3JNNf8ErQoCHb1B3oVdXJkmbJkARoDpBKmTCgKtP8ADYLmVPQw==
-----END RSA PRIVATE KEY-----
EOF
key = OpenSSL::PKey::RSA.new(pem)
- assert_same_rsa rsa1024, key
+ assert_same_rsa rsa, key
- assert_equal asn1.to_der, rsa1024.to_der
- assert_equal pem, rsa1024.export
+ assert_equal asn1.to_der, rsa.to_der
+ assert_equal pem, rsa.export
# Unknown PEM prepended
- cert = issue_cert(OpenSSL::X509::Name.new([["CN", "nobody"]]), rsa1024, 1, [], nil, nil)
- str = cert.to_text + cert.to_pem + rsa1024.to_pem
+ cert = issue_cert(OpenSSL::X509::Name.new([["CN", "nobody"]]), rsa, 1, [], nil, nil)
+ str = cert.to_text + cert.to_pem + rsa.to_pem
key = OpenSSL::PKey::RSA.new(str)
- assert_same_rsa rsa1024, key
+ assert_same_rsa rsa, key
end
def test_RSAPrivateKey_encrypted
+ omit_on_fips
+
rsa1024 = Fixtures.pkey("rsa1024")
# key = abcdef
pem = <<~EOF
@@ -438,6 +480,8 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
end
def test_pem_passwd
+ omit_on_fips
+
key = Fixtures.pkey("rsa1024")
pem3c = key.to_pem("aes-128-cbc", "key")
assert_match (/ENCRYPTED/), pem3c
@@ -484,41 +528,54 @@ class OpenSSL::TestPKeyRSA < OpenSSL::PKeyTestCase
end
def test_private_encoding_encrypted
- rsa1024 = Fixtures.pkey("rsa1024")
- encoded = rsa1024.private_to_der("aes-128-cbc", "abcdef")
+ rsa = Fixtures.pkey("rsa2048")
+ encoded = rsa.private_to_der("aes-128-cbc", "abcdef")
asn1 = OpenSSL::ASN1.decode(encoded) # PKCS #8 EncryptedPrivateKeyInfo
assert_kind_of OpenSSL::ASN1::Sequence, asn1
assert_equal 2, asn1.value.size
- assert_not_equal rsa1024.private_to_der, encoded
- assert_same_rsa rsa1024, OpenSSL::PKey.read(encoded, "abcdef")
- assert_same_rsa rsa1024, OpenSSL::PKey.read(encoded) { "abcdef" }
+ assert_not_equal rsa.private_to_der, encoded
+ assert_same_rsa rsa, OpenSSL::PKey.read(encoded, "abcdef")
+ assert_same_rsa rsa, OpenSSL::PKey.read(encoded) { "abcdef" }
assert_raise(OpenSSL::PKey::PKeyError) { OpenSSL::PKey.read(encoded, "abcxyz") }
- encoded = rsa1024.private_to_pem("aes-128-cbc", "abcdef")
+ encoded = rsa.private_to_pem("aes-128-cbc", "abcdef")
assert_match (/BEGIN ENCRYPTED PRIVATE KEY/), encoded.lines[0]
- assert_same_rsa rsa1024, OpenSSL::PKey.read(encoded, "abcdef")
+ assert_same_rsa rsa, OpenSSL::PKey.read(encoded, "abcdef")
- # certtool --load-privkey=test/fixtures/pkey/rsa1024.pem --to-p8 --password=abcdef
+ # certtool --load-privkey=test/openssl/fixtures/pkey/rsa2048.pem --to-p8 --password=abcdef
pem = <<~EOF
-----BEGIN ENCRYPTED PRIVATE KEY-----
- MIICojAcBgoqhkiG9w0BDAEDMA4ECLqajUdSNfzwAgIEkQSCAoCDWhxr1HUrKLXA
- FsFGGQfPT0aKH4gZipaSXXQRl0KwifHwHoDtfo/mAkJVZMnUVOm1AQ4LTFS3EdTy
- JUwICGEQHb7QAiokIRoi0K2yHhOxVO8qgbnWuisWpiT6Ru1jCqTs/wcqlqF7z2jM
- oXDk/vuekKst1DDXDcHrzhDkwhCQWj6jt1r2Vwaryy0FyeqsWAgBDiK2LsnCgkGD
- 21uhNZ/iWMG6tvY9hB8MDdiBJ41YdSG/AKLulAxQ1ibJz0Tasu66TmwFvWhBlME+
- QbqfgmkgWg5buu53SvDfCA47zXihclbtdfW+U3CJ9OJkx0535TVdZbuC1QgKXvG7
- 4iKGFRMWYJqZvZM3GL4xbC75AxjXZsdCfV81VjZxjeU6ung/NRzCuCUcmBOQzo1D
- Vv6COwAa6ttQWM0Ti8oIQHdu5Qi+nuOEHDLxCxD962M37H99sEO5cESjmrGVxhEo
- 373L4+11geGSCajdp0yiAGnXQfwaKta8cL693bRObN+b1Y+vqtDKH26N9a4R3qgg
- 2XwgQ5GH5CODoXZpi0wxncXO+3YuuhGeArtzKSXLNxHzIMlY7wZX+0e9UU03zfV/
- aOe4/q5DpkNxgHePt0oEpamSKY5W3jzVi1dlFWsRjud1p/Grt2zjSWTYClBlJqG1
- A/3IeDZCu+acaePJjFyv5dFffIj2l4bAYB+LFrZlSu3F/EimO/dCDWJ9JGlMK0aF
- l9brh7786Mo+YfyklaqMMEHBbbR2Es7PR6Gt7lrcIXmzy9XSsxT6IiD1rG9KKR3i
- CQxTup6JAx9w1q+adL+Ypikoy3gGD/ccUY6TtPoCmkQwSCS+JqQnFlCiThDJbu+V
- eqqUNkZq
+ MIIFOTBjBgkqhkiG9w0BBQ0wVjA1BgkqhkiG9w0BBQwwKAQSsTIsinrhNMr4owUz
+ cwYGgB0lAgMJJ8ACARAwCgYIKoZIhvcNAgkwHQYJYIZIAWUDBAECBBDtDYqmQOLV
+ Nh0T0DslWgovBIIE0ESbJey2Pjf9brTp9/41CPnI9Ev78CGSv8Ihyuynu6G7oj7N
+ G7jUB1pVMQ7ivebF5DmM0qHAix6fDqJetB3WCnRQpMLyIdq5VrnKwFNhwGYduWA5
+ IyaAc4DHj02e6YLyBTIKpu79OSFxLrnLCRaTbvZIUQaGhyd6pB7iAhqz5YBC0rpa
+ iMK5TRlNGPYG9n2eGFOhvUsbJ4T8VDzjpVWw0VNRaukXtg4xiR6o1f0qSXqAb5d9
+ REq5DfaQfoOKTV9j7KJHDRrBQG81vkU4K+xILrCBfbcYb82aCoinwSep9LC30HaH
+ LZ0hYQOuD/k/UbgjToS2wyMnkz75MN5ZNhDMZl/mACQdsMMtIxG37Mpo1Ca33uZi
+ 71TCOEKIblZS11L1YhIni9Af8pOuHJBWwezP2zN2nPwV6OhgL7Jlax7ICQOPC6L/
+ yRGgC5eT4lDDAuTy0IdUhr0r5XrFzZR0/5Vgsq9cGfk9QkXOoETRhQVkEfUDdCs6
+ 6CK+SwUR9qh5824ShODFG0SQpsqBPIVtkGrypBSUJtICmGMOAsclB7RDN7/opJwp
+ qv/iRJ5dhWrhRgQ/DfYifvO5On7RgC2hm48gF3Pt6XCA857ryyYxLYeMY42tAUqp
+ Hmc9HL7bMYF/jl3cJ32+gLvI3PBVvrvyeAhRo6z7MFVe9I04OywV6BHUx1Us6ybF
+ qkYnSpcJZdu7HyvzXm7XWLFmt7K5BlAgnFsa/8+cI1BGPgQRc1j0SWepXsSwFZX6
+ JkNQ0dewq4uRJXbGyQgfh5I5ETpqDhSt2JfBwAoze6cx3DPC711PUamxyWMiejs+
+ mYdia4p62NxaUvyXWmCGIEOzajRwywEhf9OLAmfqTN41TIrEL4BUxqtzDyw8Nl8T
+ KB7nJEC366jFASfumNQkXXyH5yBIF+XwwSKUOObRZVn2rUzFToo51hHu9efxHoXa
+ jZlpfglWijkmOuwoIGlGHOq8gUn76oq9WbV+YO+fWm/mf4S3ECzmYzxb6a1uCTy/
+ Itkm2qOe3yTM1t+oCqZ0/MeTZ84ALQaWv5reQfjronPZ1jeNtxrYz28tJ4KwBn0U
+ bJReXbOLsHAymipncxlmaevbx4GPTduu/lbpxefoN95w+SpEdyTmVWrfaCTgAbad
+ EzcRl60my3xOMQ7CaUbRgGiwohqHDvuXzeqoZ96u6CwfAoEfy4jETmKLRH6uTtj7
+ 4jdTyoqyizjpvaM8LPspBS+oqFwLxBjpseQuScrZO1BjPxrImLy2/VRqwJ+CF4FB
+ iijEgDgDc1EMIGe5YmOAV+i22n9RqX+2IvkYp7CWXrB9/lmirLFukd7hT8DLPUGq
+ AvSZwTPbDPoZKG3DAebC3DbiC7A3x0KZp24doNRLamZ/MyKHo2Rzl0UhkzDU0ly2
+ eAnyNYsOAQck+C6L+ieD95Gksm9YJWurwttm5JragbIJwMCrsBQd4bXDkKdRhxS2
+ JpS0dT/aoDmgTzoG07x4cZk0rjBkfX1ta0j0b1lz7/PZXl9AbRvFdq5sJpmv4Ryz
+ S+OERqo4IEfJJq2WJ92WR+HLGV3Gvsdb7znZTEF1tp4pWOLAt83Pry282UJxO7Pe
+ ySf/868TEmXams06GYvH+7cMiIT2m9Dc+EFgNaPmm0uMmJ+ZjqHKSOLzrL7C
-----END ENCRYPTED PRIVATE KEY-----
EOF
- assert_same_rsa rsa1024, OpenSSL::PKey.read(pem, "abcdef")
+ assert_same_rsa rsa, OpenSSL::PKey.read(pem, "abcdef")
end
def test_dup
diff --git a/test/openssl/test_provider.rb b/test/openssl/test_provider.rb
index b0ffae9ce7..6f85c00c98 100644
--- a/test/openssl/test_provider.rb
+++ b/test/openssl/test_provider.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
require_relative 'utils'
-if defined?(OpenSSL) && defined?(OpenSSL::Provider) && !OpenSSL.fips_mode
+if defined?(OpenSSL) && defined?(OpenSSL::Provider)
class OpenSSL::TestProvider < OpenSSL::TestCase
def test_openssl_provider_name_inspect
@@ -12,14 +12,22 @@ class OpenSSL::TestProvider < OpenSSL::TestCase
end
def test_openssl_provider_names
+ # We expect the following providers are loaded in the cases:
+ # * Non-FIPS: default
+ # * FIPS: fips, base
+ # Use the null provider to test the added provider.
+ # See provider(7) - OPENSSL PROVIDERS to see the list of providers, and
+ # OSSL_PROVIDER-null(7) to check the details of the null provider.
with_openssl <<-'end;'
- base_provider = OpenSSL::Provider.load("base")
- assert_equal(2, OpenSSL::Provider.provider_names.size)
- assert_includes(OpenSSL::Provider.provider_names, "base")
+ num = OpenSSL::Provider.provider_names.size
- assert_equal(true, base_provider.unload)
- assert_equal(1, OpenSSL::Provider.provider_names.size)
- assert_not_includes(OpenSSL::Provider.provider_names, "base")
+ added_provider = OpenSSL::Provider.load("null")
+ assert_equal(num + 1, OpenSSL::Provider.provider_names.size)
+ assert_includes(OpenSSL::Provider.provider_names, "null")
+
+ assert_equal(true, added_provider.unload)
+ assert_equal(num, OpenSSL::Provider.provider_names.size)
+ assert_not_includes(OpenSSL::Provider.provider_names, "null")
end;
end
@@ -33,6 +41,9 @@ class OpenSSL::TestProvider < OpenSSL::TestCase
end
def test_openssl_legacy_provider
+ # The legacy provider is not supported on FIPS.
+ omit_on_fips
+
with_openssl(<<-'end;')
begin
OpenSSL::Provider.load("legacy")
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 1471b0cb36..f011e881e9 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -248,6 +248,19 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
}
end
+ def test_readbyte
+ start_server { |port|
+ server_connect(port) { |ssl|
+ str = +("x" * 100 + "\n")
+ ssl.syswrite(str)
+ newstr = str.bytesize.times.map { |i|
+ ssl.readbyte
+ }.pack("C*")
+ assert_equal(str, newstr)
+ }
+ }
+ end
+
def test_sync_close
start_server do |port|
begin
diff --git a/test/openssl/test_x509attr.rb b/test/openssl/test_x509attr.rb
index 2919d23d2d..bec03a1871 100644
--- a/test/openssl/test_x509attr.rb
+++ b/test/openssl/test_x509attr.rb
@@ -48,6 +48,10 @@ class OpenSSL::TestX509Attribute < OpenSSL::TestCase
assert_raise(TypeError) {
attr.value = "1234"
}
+ assert_raise(OpenSSL::X509::AttributeError) {
+ v = OpenSSL::ASN1::Set([OpenSSL::ASN1::UTF8String("1234")], 17, :EXPLICIT)
+ attr.value = v
+ }
assert_equal(test_der, attr.to_der)
assert_raise(OpenSSL::X509::AttributeError) {
attr.oid = "abc123"
diff --git a/test/openssl/test_x509cert.rb b/test/openssl/test_x509cert.rb
index 64805504de..85c978f022 100644
--- a/test/openssl/test_x509cert.rb
+++ b/test/openssl/test_x509cert.rb
@@ -222,6 +222,29 @@ class OpenSSL::TestX509Certificate < OpenSSL::TestCase
}
end
+ def test_sign_and_verify_ed25519
+ # See test_ed25519 in test_pkey.rb
+
+ # Ed25519 is not FIPS-approved.
+ omit_on_fips
+
+ begin
+ ed25519 = OpenSSL::PKey::generate_key("ED25519")
+ rescue OpenSSL::PKey::PKeyError => e
+ # OpenSSL < 1.1.1
+ #
+ pend "Ed25519 is not implemented" unless openssl?(1, 1, 1)
+
+ raise e
+ end
+
+ # See ASN1_item_sign_ctx in ChangeLog for 3.8.1: https://github.com/libressl/portable/blob/master/ChangeLog
+ pend 'ASN1 signing with Ed25519 not yet working' unless openssl? or libressl?(3, 8, 1)
+
+ cert = issue_cert(@ca, ed25519, 1, [], nil, nil, digest: nil)
+ assert_equal(true, cert.verify(ed25519))
+ end
+
def test_dsa_with_sha2
cert = issue_cert(@ca, @dsa256, 1, [], nil, nil, digest: "sha256")
assert_equal("dsa_with_SHA256", cert.signature_algorithm)
@@ -322,6 +345,15 @@ class OpenSSL::TestX509Certificate < OpenSSL::TestCase
end
end
+ def test_tbs_precert_bytes
+ pend "LibreSSL < 3.5 does not have i2d_re_X509_tbs" if libressl? && !libressl?(3, 5, 0)
+
+ cert = issue_cert(@ca, @rsa2048, 1, [], nil, nil)
+ seq = OpenSSL::ASN1.decode(cert.tbs_bytes)
+
+ assert_equal 7, seq.value.size
+ end
+
private
def certificate_error_returns_false
diff --git a/test/openssl/ut_eof.rb b/test/openssl/ut_eof.rb
index 7b18f43a79..06aa632a65 100644
--- a/test/openssl/ut_eof.rb
+++ b/test/openssl/ut_eof.rb
@@ -8,6 +8,10 @@ module OpenSSL::TestEOF
open_file("") {|f| assert_nil f.getbyte }
end
+ def test_readbyte_eof
+ open_file("") {|f| assert_raise(EOFError) { f.readbyte } }
+ end
+
def test_eof_0
open_file("") {|f|
assert_equal("", f.read(0))
diff --git a/test/optparse/test_acceptable.rb b/test/optparse/test_acceptable.rb
index c7ea2152fc..8b578effde 100644
--- a/test/optparse/test_acceptable.rb
+++ b/test/optparse/test_acceptable.rb
@@ -199,5 +199,7 @@ class TestOptionParserAcceptable < TestOptionParser
def test_array
assert_equal(%w"", no_error {@opt.parse!(%w"--array a,b,c")})
assert_equal(%w"a b c", @array)
+ assert_equal(%w"", no_error {@opt.parse!(%w"--array a")})
+ assert_equal(%w"a", @array)
end
end
diff --git a/test/optparse/test_optparse.rb b/test/optparse/test_optparse.rb
index 8d09e0f28b..7f35cb4a8a 100644
--- a/test/optparse/test_optparse.rb
+++ b/test/optparse/test_optparse.rb
@@ -74,6 +74,7 @@ class TestOptionParser < Test::Unit::TestCase
@opt.def_option "-v", "--verbose" do @verbose = true end
@opt.def_option "-q", "--quiet" do @quiet = true end
@opt.def_option "-o", "--option [OPT]" do |opt| @option = opt end
+ @opt.def_option "-a", "--array [VAL]", Array do |val| val end
result = {}
@opt.parse %w(--host localhost --port 8000 -v), into: result
assert_equal({host: "localhost", port: 8000, verbose: true}, result)
@@ -84,6 +85,18 @@ class TestOptionParser < Test::Unit::TestCase
result = {}
@opt.parse %w(--option OPTION -v), into: result
assert_equal({verbose: true, option: "OPTION"}, result)
+ result = {}
+ @opt.parse %w(-a b,c,d), into: result
+ assert_equal({array: %w(b c d)}, result)
+ result = {}
+ @opt.parse %w(--array b,c,d), into: result
+ assert_equal({array: %w(b c d)}, result)
+ result = {}
+ @opt.parse %w(-a b), into: result
+ assert_equal({array: %w(b)}, result)
+ result = {}
+ @opt.parse %w(--array b), into: result
+ assert_equal({array: %w(b)}, result)
end
def test_require_exact
diff --git a/test/prism/api/command_line_test.rb b/test/prism/api/command_line_test.rb
new file mode 100644
index 0000000000..a8c4355152
--- /dev/null
+++ b/test/prism/api/command_line_test.rb
@@ -0,0 +1,111 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class CommandLineTest < TestCase
+ def test_command_line_p
+ program = Prism.parse("1", command_line: "p").value
+ statements = program.statements.body
+
+ assert_equal 2, statements.length
+ assert_kind_of CallNode, statements.last
+ assert_equal :print, statements.last.name
+ end
+
+ def test_command_line_n
+ program = Prism.parse("1", command_line: "n").value
+ statements = program.statements.body
+
+ assert_equal 1, statements.length
+ assert_kind_of WhileNode, statements.first
+
+ predicate = statements.first.predicate
+ assert_kind_of CallNode, predicate
+ assert_equal :gets, predicate.name
+
+ arguments = predicate.arguments.arguments
+ assert_equal 1, arguments.length
+ assert_equal :$/, arguments.first.name
+ end
+
+ def test_command_line_a
+ program = Prism.parse("1", command_line: "na").value
+ statements = program.statements.body
+
+ assert_equal 1, statements.length
+ assert_kind_of WhileNode, statements.first
+
+ statement = statements.first.statements.body.first
+ assert_kind_of GlobalVariableWriteNode, statement
+ assert_equal :$F, statement.name
+ end
+
+ def test_command_line_l
+ program = Prism.parse("1", command_line: "nl").value
+ statements = program.statements.body
+
+ assert_equal 1, statements.length
+ assert_kind_of WhileNode, statements.first
+
+ predicate = statements.first.predicate
+ assert_kind_of CallNode, predicate
+ assert_equal :gets, predicate.name
+
+ arguments = predicate.arguments.arguments
+ assert_equal 2, arguments.length
+ assert_equal :$/, arguments.first.name
+ assert_equal "chomp", arguments.last.elements.first.key.unescaped
+ end
+
+ def test_command_line_e
+ result = Prism.parse("1 if 2..3")
+ assert_equal 2, result.warnings.length
+
+ result = Prism.parse("1 if 2..3", command_line: "e")
+ assert_equal 0, result.warnings.length
+ end
+
+ def test_command_line_x_implicit
+ result = Prism.parse_statement(<<~RUBY, main_script: true)
+ #!/bin/bash
+ exit 1
+
+ #!/usr/bin/env ruby
+ 1
+ RUBY
+
+ assert_kind_of IntegerNode, result
+ end
+
+ def test_command_line_x_explicit
+ result = Prism.parse_statement(<<~RUBY, command_line: "x")
+ exit 1
+
+ #!/usr/bin/env ruby
+ 1
+ RUBY
+
+ assert_kind_of IntegerNode, result
+ end
+
+ def test_command_line_x_implicit_fail
+ result = Prism.parse(<<~RUBY, main_script: true)
+ #!/bin/bash
+ exit 1
+ RUBY
+
+ assert_equal 1, result.errors.length
+ assert_equal :load, result.errors.first.level
+ end
+
+ def test_command_line_x_explicit_fail
+ result = Prism.parse(<<~RUBY, command_line: "x")
+ exit 1
+ RUBY
+
+ assert_equal 1, result.errors.length
+ assert_equal :load, result.errors.first.level
+ end
+ end
+end
diff --git a/test/prism/api/dump_test.rb b/test/prism/api/dump_test.rb
new file mode 100644
index 0000000000..941088e159
--- /dev/null
+++ b/test/prism/api/dump_test.rb
@@ -0,0 +1,56 @@
+# frozen_string_literal: true
+
+return if ENV["PRISM_BUILD_MINIMAL"]
+
+require_relative "../test_helper"
+
+module Prism
+ class DumpTest < TestCase
+ Fixture.each do |fixture|
+ define_method(fixture.test_name) { assert_dump(fixture) }
+ end
+
+ def test_dump
+ filepath = __FILE__
+ source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
+
+ assert_equal Prism.lex(source, filepath: filepath).value, Prism.lex_file(filepath).value
+ assert_equal Prism.dump(source, filepath: filepath), Prism.dump_file(filepath)
+
+ serialized = Prism.dump(source, filepath: filepath)
+ ast1 = Prism.load(source, serialized).value
+ ast2 = Prism.parse(source, filepath: filepath).value
+ ast3 = Prism.parse_file(filepath).value
+
+ assert_equal_nodes ast1, ast2
+ assert_equal_nodes ast2, ast3
+ end
+
+ def test_dump_file
+ assert_nothing_raised do
+ Prism.dump_file(__FILE__)
+ end
+
+ error = assert_raise Errno::ENOENT do
+ Prism.dump_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.dump_file(nil)
+ end
+ end
+
+ private
+
+ def assert_dump(fixture)
+ source = fixture.read
+
+ result = Prism.parse(source, filepath: fixture.path)
+ dumped = Prism.dump(source, filepath: fixture.path)
+
+ assert_equal_nodes(result.value, Prism.load(source, dumped).value)
+ end
+ end
+end
diff --git a/test/prism/api/lex_test.rb b/test/prism/api/lex_test.rb
new file mode 100644
index 0000000000..0b675b215f
--- /dev/null
+++ b/test/prism/api/lex_test.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class LexTest < TestCase
+ def test_lex_result
+ result = Prism.lex("")
+ assert_kind_of LexResult, result
+
+ result = Prism.lex_file(__FILE__)
+ assert_kind_of LexResult, result
+ end
+
+ def test_parse_lex_result
+ result = Prism.parse_lex("")
+ assert_kind_of ParseLexResult, result
+
+ result = Prism.parse_lex_file(__FILE__)
+ assert_kind_of ParseLexResult, result
+ end
+ end
+end
diff --git a/test/prism/api/parse_comments_test.rb b/test/prism/api/parse_comments_test.rb
new file mode 100644
index 0000000000..4dbcca1827
--- /dev/null
+++ b/test/prism/api/parse_comments_test.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class ParseCommentsTest < TestCase
+ def test_parse_comments
+ comments = Prism.parse_comments("# foo")
+
+ assert_kind_of Array, comments
+ assert_equal 1, comments.length
+ end
+
+ def test_parse_file_comments
+ comments = Prism.parse_file_comments(__FILE__)
+
+ assert_kind_of Array, comments
+ assert_equal 1, comments.length
+ end
+
+ def test_parse_file_comments_error
+ error = assert_raise Errno::ENOENT do
+ Prism.parse_file_comments("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.parse_file_comments(nil)
+ end
+ end
+ end
+end
diff --git a/test/prism/api/parse_stream_test.rb b/test/prism/api/parse_stream_test.rb
new file mode 100644
index 0000000000..1c068c617c
--- /dev/null
+++ b/test/prism/api/parse_stream_test.rb
@@ -0,0 +1,81 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class ParseStreamTest < TestCase
+ def test_single_line
+ io = StringIO.new("1 + 2")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_kind_of Prism::CallNode, result.statement
+ end
+
+ def test_multi_line
+ io = StringIO.new("1 + 2\n3 + 4")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_kind_of Prism::CallNode, result.statement
+ assert_kind_of Prism::CallNode, result.statement
+ end
+
+ def test_multi_read
+ io = StringIO.new("a" * 4096 * 4)
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_kind_of Prism::CallNode, result.statement
+ end
+
+ def test___END__
+ io = StringIO.new("1 + 2\n3 + 4\n__END__\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 2, result.value.statements.body.length
+ assert_equal "5 + 6", io.read
+ end
+
+ def test_false___END___in_string
+ io = StringIO.new("1 + 2\n3 + 4\n\"\n__END__\n\"\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+
+ def test_false___END___in_regexp
+ io = StringIO.new("1 + 2\n3 + 4\n/\n__END__\n/\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+
+ def test_false___END___in_list
+ io = StringIO.new("1 + 2\n3 + 4\n%w[\n__END__\n]\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+
+ def test_false___END___in_heredoc
+ io = StringIO.new("1 + 2\n3 + 4\n<<-EOF\n__END__\nEOF\n5 + 6")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 4, result.value.statements.body.length
+ end
+
+ def test_nul_bytes
+ io = StringIO.new("1 # \0\0\0 \n2 # \0\0\0\n3")
+ result = Prism.parse_stream(io)
+
+ assert result.success?
+ assert_equal 3, result.value.statements.body.length
+ end
+ end
+end
diff --git a/test/prism/api/parse_success_test.rb b/test/prism/api/parse_success_test.rb
new file mode 100644
index 0000000000..2caaa5136e
--- /dev/null
+++ b/test/prism/api/parse_success_test.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class ParseSuccessTest < TestCase
+ def test_parse_success?
+ assert Prism.parse_success?("1")
+ refute Prism.parse_success?("<>")
+ end
+
+ def test_parse_file_success?
+ assert Prism.parse_file_success?(__FILE__)
+ end
+ end
+end
diff --git a/test/prism/api/parse_test.rb b/test/prism/api/parse_test.rb
new file mode 100644
index 0000000000..ac8f8c30dc
--- /dev/null
+++ b/test/prism/api/parse_test.rb
@@ -0,0 +1,117 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class ParseTest < TestCase
+ def test_parse_result
+ result = Prism.parse("")
+ assert_kind_of ParseResult, result
+
+ result = Prism.parse_file(__FILE__)
+ assert_kind_of ParseResult, result
+ end
+
+ def test_parse_empty_string
+ result = Prism.parse("")
+ assert_equal [], result.value.statements.body
+ end
+
+ def test_parse_takes_file_path
+ filepath = "filepath.rb"
+ result = Prism.parse("def foo; __FILE__; end", filepath: filepath)
+
+ assert_equal filepath, find_source_file_node(result.value).filepath
+ end
+
+ def test_parse_takes_line
+ line = 4
+ result = Prism.parse("def foo\n __FILE__\nend", line: line)
+
+ assert_equal line, result.value.location.start_line
+ assert_equal line + 1, find_source_file_node(result.value).location.start_line
+
+ result = Prism.parse_lex("def foo\n __FILE__\nend", line: line)
+ assert_equal line, result.value.first.location.start_line
+ end
+
+ def test_parse_takes_negative_lines
+ line = -2
+ result = Prism.parse("def foo\n __FILE__\nend", line: line)
+
+ assert_equal line, result.value.location.start_line
+ assert_equal line + 1, find_source_file_node(result.value).location.start_line
+
+ result = Prism.parse_lex("def foo\n __FILE__\nend", line: line)
+ assert_equal line, result.value.first.location.start_line
+ end
+
+ def test_parse_file
+ node = Prism.parse_file(__FILE__).value
+ assert_kind_of ProgramNode, node
+
+ error = assert_raise Errno::ENOENT do
+ Prism.parse_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.parse_file(nil)
+ end
+ end
+
+ def test_parse_tempfile
+ Tempfile.create(["test_parse_tempfile", ".rb"]) do |t|
+ t.puts ["begin\n", " end\n"]
+ t.flush
+ Prism.parse_file(t.path)
+ end
+ end
+
+ if RUBY_ENGINE != "truffleruby"
+ def test_parse_nonascii
+ Dir.mktmpdir do |dir|
+ path = File.join(dir, "\u{3042 3044 3046 3048 304a}.rb".encode(Encoding::Windows_31J))
+ File.write(path, "ok")
+ Prism.parse_file(path)
+ end
+ end
+ end
+
+ def test_parse_directory
+ error = nil
+
+ begin
+ Prism.parse_file(__dir__)
+ rescue SystemCallError => error
+ end
+
+ assert_kind_of Errno::EISDIR, error
+ end
+
+ def test_partial_script
+ assert Prism.parse_failure?("break")
+ assert Prism.parse_success?("break", partial_script: true)
+
+ assert Prism.parse_failure?("next")
+ assert Prism.parse_success?("next", partial_script: true)
+
+ assert Prism.parse_failure?("redo")
+ assert Prism.parse_success?("redo", partial_script: true)
+
+ assert Prism.parse_failure?("yield")
+ assert Prism.parse_success?("yield", partial_script: true)
+ end
+
+ private
+
+ def find_source_file_node(program)
+ queue = [program]
+ while (node = queue.shift)
+ return node if node.is_a?(SourceFileNode)
+ queue.concat(node.compact_child_nodes)
+ end
+ end
+ end
+end
diff --git a/test/prism/attribute_write_test.rb b/test/prism/attribute_write_test.rb
deleted file mode 100644
index bd83d72da3..0000000000
--- a/test/prism/attribute_write_test.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class AttributeWriteTest < TestCase
- module Target
- def self.value
- 2
- end
-
- def self.value=(value)
- 2
- end
-
- def self.[]=(index, value)
- 2
- end
- end
-
- def test_named_call_with_operator
- assert_attribute_write("Target.value = 1")
- end
-
- def test_named_call_without_operator
- assert_attribute_write("Target.value=(1)")
- end
-
- def test_indexed_call_with_operator
- assert_attribute_write("Target[0] = 1")
- end
-
- def test_indexed_call_without_operator
- refute_attribute_write("Target.[]=(0, 1)")
- end
-
- def test_comparison_operators
- refute_attribute_write("Target.value == 1")
- refute_attribute_write("Target.value === 1")
- end
-
- private
-
- def parse(source)
- Prism.parse(source).value.statements.body.first
- end
-
- def assert_attribute_write(source)
- call = parse(source)
- assert(call.attribute_write?)
- assert_equal(1, eval(source))
- end
-
- def refute_attribute_write(source)
- call = parse(source)
- refute(call.attribute_write?)
- refute_equal(1, eval(source))
- end
- end
-end
diff --git a/test/prism/bom_test.rb b/test/prism/bom_test.rb
index 1525caf458..890bc4b36c 100644
--- a/test/prism/bom_test.rb
+++ b/test/prism/bom_test.rb
@@ -2,7 +2,7 @@
# Don't bother checking this on these engines, this is such a specific Ripper
# test.
-return if RUBY_ENGINE == "jruby" || RUBY_ENGINE == "truffleruby"
+return if RUBY_ENGINE != "ruby"
require_relative "test_helper"
diff --git a/test/prism/command_line_test.rb b/test/prism/command_line_test.rb
deleted file mode 100644
index 4b04c36f3a..0000000000
--- a/test/prism/command_line_test.rb
+++ /dev/null
@@ -1,111 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class CommandLineTest < TestCase
- def test_command_line_p
- program = Prism.parse("1", command_line: "p").value
- statements = program.statements.body
-
- assert_equal 2, statements.length
- assert_kind_of CallNode, statements.last
- assert_equal :print, statements.last.name
- end
-
- def test_command_line_n
- program = Prism.parse("1", command_line: "n").value
- statements = program.statements.body
-
- assert_equal 1, statements.length
- assert_kind_of WhileNode, statements.first
-
- predicate = statements.first.predicate
- assert_kind_of CallNode, predicate
- assert_equal :gets, predicate.name
-
- arguments = predicate.arguments.arguments
- assert_equal 1, arguments.length
- assert_equal :$/, arguments.first.name
- end
-
- def test_command_line_a
- program = Prism.parse("1", command_line: "na").value
- statements = program.statements.body
-
- assert_equal 1, statements.length
- assert_kind_of WhileNode, statements.first
-
- statement = statements.first.statements.body.first
- assert_kind_of GlobalVariableWriteNode, statement
- assert_equal :$F, statement.name
- end
-
- def test_command_line_l
- program = Prism.parse("1", command_line: "nl").value
- statements = program.statements.body
-
- assert_equal 1, statements.length
- assert_kind_of WhileNode, statements.first
-
- predicate = statements.first.predicate
- assert_kind_of CallNode, predicate
- assert_equal :gets, predicate.name
-
- arguments = predicate.arguments.arguments
- assert_equal 2, arguments.length
- assert_equal :$/, arguments.first.name
- assert_equal "chomp", arguments.last.elements.first.key.unescaped
- end
-
- def test_command_line_e
- result = Prism.parse("1 if 2..3")
- assert_equal 2, result.warnings.length
-
- result = Prism.parse("1 if 2..3", command_line: "e")
- assert_equal 0, result.warnings.length
- end
-
- def test_command_line_x_implicit
- result = Prism.parse(<<~RUBY)
- #!/bin/bash
- exit 1
-
- #!/usr/bin/env ruby
- 1
- RUBY
-
- assert_kind_of IntegerNode, result.value.statements.body.first
- end
-
- def test_command_line_x_explicit
- result = Prism.parse(<<~RUBY, command_line: "x")
- exit 1
-
- #!/usr/bin/env ruby
- 1
- RUBY
-
- assert_kind_of IntegerNode, result.value.statements.body.first
- end
-
- def test_command_line_x_implicit_fail
- result = Prism.parse(<<~RUBY)
- #!/bin/bash
- exit 1
- RUBY
-
- assert_equal 1, result.errors.length
- assert_equal :load, result.errors.first.level
- end
-
- def test_command_line_x_explicit_fail
- result = Prism.parse(<<~RUBY, command_line: "x")
- exit 1
- RUBY
-
- assert_equal 1, result.errors.length
- assert_equal :load, result.errors.first.level
- end
- end
-end
diff --git a/test/prism/comments_test.rb b/test/prism/comments_test.rb
deleted file mode 100644
index b99c00268c..0000000000
--- a/test/prism/comments_test.rb
+++ /dev/null
@@ -1,138 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class CommentsTest < TestCase
- def test_comment_inline
- source = "# comment"
- assert_equal [0], Debug.newlines(source)
-
- assert_comment(
- source,
- InlineComment,
- start_offset: 0,
- end_offset: 9,
- start_line: 1,
- end_line: 1,
- start_column: 0,
- end_column: 9
- )
- end
-
- def test_comment_inline_def
- source = <<~RUBY
- def foo
- # a comment
- end
- RUBY
-
- assert_comment(
- source,
- InlineComment,
- start_offset: 10,
- end_offset: 21,
- start_line: 2,
- end_line: 2,
- start_column: 2,
- end_column: 13
- )
- end
-
- def test___END__
- result = Prism.parse(<<~RUBY)
- __END__
- comment
- RUBY
-
- data_loc = result.data_loc
- assert_equal 0, data_loc.start_offset
- assert_equal 16, data_loc.end_offset
- end
-
- def test___END__crlf
- result = Prism.parse("__END__\r\ncomment\r\n")
-
- data_loc = result.data_loc
- assert_equal 0, data_loc.start_offset
- assert_equal 18, data_loc.end_offset
- end
-
- def test_comment_embedded_document
- source = <<~RUBY
- =begin
- comment
- =end
- RUBY
-
- assert_comment(
- source,
- EmbDocComment,
- start_offset: 0,
- end_offset: 20,
- start_line: 1,
- end_line: 4,
- start_column: 0,
- end_column: 0
- )
- end
-
- def test_comment_embedded_document_with_content_on_same_line
- source = <<~RUBY
- =begin other stuff
- =end
- RUBY
-
- assert_comment(
- source,
- EmbDocComment,
- start_offset: 0,
- end_offset: 24,
- start_line: 1,
- end_line: 3,
- start_column: 0,
- end_column: 0
- )
- end
-
- def test_attaching_comments
- source = <<~RUBY
- # Foo class
- class Foo
- # bar method
- def bar
- # baz invocation
- baz
- end # bar end
- end # Foo end
- RUBY
-
- result = Prism.parse(source)
- result.attach_comments!
- tree = result.value
- class_node = tree.statements.body.first
- method_node = class_node.body.body.first
- call_node = method_node.body.body.first
-
- assert_equal("# Foo class\n# Foo end", class_node.location.comments.map { |c| c.location.slice }.join("\n"))
- assert_equal("# bar method\n# bar end", method_node.location.comments.map { |c| c.location.slice }.join("\n"))
- assert_equal("# baz invocation", call_node.location.comments.map { |c| c.location.slice }.join("\n"))
- end
-
- private
-
- def assert_comment(source, type, start_offset:, end_offset:, start_line:, end_line:, start_column:, end_column:)
- result = Prism.parse(source)
- assert result.errors.empty?, result.errors.map(&:message).join("\n")
- assert_kind_of type, result.comments.first
-
- location = result.comments.first.location
- assert_equal start_offset, location.start_offset, -> { "Expected start_offset to be #{start_offset}" }
- assert_equal end_offset, location.end_offset, -> { "Expected end_offset to be #{end_offset}" }
- assert_equal start_line, location.start_line, -> { "Expected start_line to be #{start_line}" }
- assert_equal end_line, location.end_line, -> { "Expected end_line to be #{end_line}" }
- assert_equal start_column, location.start_column, -> { "Expected start_column to be #{start_column}" }
- assert_equal end_column, location.end_column, -> { "Expected end_column to be #{end_column}" }
- end
- end
-end
diff --git a/test/prism/compiler_test.rb b/test/prism/compiler_test.rb
deleted file mode 100644
index 9a326eb8d6..0000000000
--- a/test/prism/compiler_test.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-# typed: ignore
-
-require_relative "test_helper"
-
-module Prism
- class CompilerTest < TestCase
- class SExpressions < Prism::Compiler
- def visit_arguments_node(node)
- [:arguments, super]
- end
-
- def visit_call_node(node)
- [:call, super]
- end
-
- def visit_integer_node(node)
- [:integer]
- end
-
- def visit_program_node(node)
- [:program, super]
- end
- end
-
- def test_compiler
- expected = [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]]
- assert_equal expected, Prism.parse("1 + 2").value.accept(SExpressions.new)
- end
- end
-end
diff --git a/test/prism/constant_path_node_test.rb b/test/prism/constant_path_node_test.rb
deleted file mode 100644
index dffb55c0ff..0000000000
--- a/test/prism/constant_path_node_test.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class ConstantPathNodeTest < TestCase
- def test_full_name_for_constant_path
- source = <<~RUBY
- Foo:: # comment
- Bar::Baz::
- Qux
- RUBY
-
- constant_path = Prism.parse(source).value.statements.body.first
- assert_equal("Foo::Bar::Baz::Qux", constant_path.full_name)
- end
-
- def test_full_name_for_constant_path_with_self
- source = <<~RUBY
- self:: # comment
- Bar::Baz::
- Qux
- RUBY
-
- constant_path = Prism.parse(source).value.statements.body.first
- assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
- constant_path.full_name
- end
- end
-
- def test_full_name_for_constant_path_with_variable
- source = <<~RUBY
- foo:: # comment
- Bar::Baz::
- Qux
- RUBY
-
- constant_path = Prism.parse(source).value.statements.body.first
-
- assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
- constant_path.full_name
- end
- end
-
- def test_full_name_for_constant_path_target
- source = <<~RUBY
- Foo:: # comment
- Bar::Baz::
- Qux, Something = [1, 2]
- RUBY
-
- node = Prism.parse(source).value.statements.body.first
- assert_equal("Foo::Bar::Baz::Qux", node.lefts.first.full_name)
- end
-
- def test_full_name_for_constant_path_with_stovetop_start
- source = <<~RUBY
- ::Foo:: # comment
- Bar::Baz::
- Qux, Something = [1, 2]
- RUBY
-
- node = Prism.parse(source).value.statements.body.first
- assert_equal("::Foo::Bar::Baz::Qux", node.lefts.first.full_name)
- end
-
- def test_full_name_for_constant_path_target_with_non_constant_parent
- source = <<~RUBY
- self::Foo, Bar = [1, 2]
- RUBY
-
- constant_target = Prism.parse(source).value.statements.body.first
- dynamic, static = constant_target.lefts
-
- assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
- dynamic.full_name
- end
-
- assert_equal("Bar", static.full_name)
- end
-
- def test_full_name_for_constant_read_node
- source = <<~RUBY
- Bar
- RUBY
-
- constant = Prism.parse(source).value.statements.body.first
- assert_equal("Bar", constant.full_name)
- end
- end
-end
diff --git a/test/prism/desugar_compiler_test.rb b/test/prism/desugar_compiler_test.rb
deleted file mode 100644
index 1a1d580d2d..0000000000
--- a/test/prism/desugar_compiler_test.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class DesugarCompilerTest < TestCase
- def test_and_write
- assert_desugars("(AndNode (ClassVariableReadNode) (ClassVariableWriteNode (CallNode)))", "@@foo &&= bar")
- assert_not_desugared("Foo::Bar &&= baz", "Desugaring would execute Foo twice or need temporary variables")
- assert_desugars("(AndNode (ConstantReadNode) (ConstantWriteNode (CallNode)))", "Foo &&= bar")
- assert_desugars("(AndNode (GlobalVariableReadNode) (GlobalVariableWriteNode (CallNode)))", "$foo &&= bar")
- assert_desugars("(AndNode (InstanceVariableReadNode) (InstanceVariableWriteNode (CallNode)))", "@foo &&= bar")
- assert_desugars("(AndNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo &&= bar")
- assert_desugars("(AndNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo = 1; foo &&= bar")
- end
-
- def test_or_write
- assert_desugars("(IfNode (DefinedNode (ClassVariableReadNode)) (StatementsNode (ClassVariableReadNode)) (ElseNode (StatementsNode (ClassVariableWriteNode (CallNode)))))", "@@foo ||= bar")
- assert_not_desugared("Foo::Bar ||= baz", "Desugaring would execute Foo twice or need temporary variables")
- assert_desugars("(IfNode (DefinedNode (ConstantReadNode)) (StatementsNode (ConstantReadNode)) (ElseNode (StatementsNode (ConstantWriteNode (CallNode)))))", "Foo ||= bar")
- assert_desugars("(IfNode (DefinedNode (GlobalVariableReadNode)) (StatementsNode (GlobalVariableReadNode)) (ElseNode (StatementsNode (GlobalVariableWriteNode (CallNode)))))", "$foo ||= bar")
- assert_desugars("(OrNode (InstanceVariableReadNode) (InstanceVariableWriteNode (CallNode)))", "@foo ||= bar")
- assert_desugars("(OrNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo ||= bar")
- assert_desugars("(OrNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo = 1; foo ||= bar")
- end
-
- def test_operator_write
- assert_desugars("(ClassVariableWriteNode (CallNode (ClassVariableReadNode) (ArgumentsNode (CallNode))))", "@@foo += bar")
- assert_not_desugared("Foo::Bar += baz", "Desugaring would execute Foo twice or need temporary variables")
- assert_desugars("(ConstantWriteNode (CallNode (ConstantReadNode) (ArgumentsNode (CallNode))))", "Foo += bar")
- assert_desugars("(GlobalVariableWriteNode (CallNode (GlobalVariableReadNode) (ArgumentsNode (CallNode))))", "$foo += bar")
- assert_desugars("(InstanceVariableWriteNode (CallNode (InstanceVariableReadNode) (ArgumentsNode (CallNode))))", "@foo += bar")
- assert_desugars("(LocalVariableWriteNode (CallNode (LocalVariableReadNode) (ArgumentsNode (CallNode))))", "foo += bar")
- assert_desugars("(LocalVariableWriteNode (CallNode (LocalVariableReadNode) (ArgumentsNode (CallNode))))", "foo = 1; foo += bar")
- end
-
- private
-
- def ast_inspect(node)
- parts = [node.class.name.split("::").last]
-
- node.deconstruct_keys(nil).each do |_, value|
- case value
- when Node
- parts << ast_inspect(value)
- when Array
- parts.concat(value.map { |element| ast_inspect(element) })
- end
- end
-
- "(#{parts.join(" ")})"
- end
-
- # Ensure every node is only present once in the AST.
- # If the same node is present twice it would most likely indicate it is executed twice, which is invalid semantically.
- # This also acts as a sanity check that Node#child_nodes returns only nodes or nil (which caught a couple bugs).
- def ensure_every_node_once_in_ast(node, all_nodes = {}.compare_by_identity)
- if all_nodes.include?(node)
- raise "#{node.inspect} is present multiple times in the desugared AST and likely executed multiple times"
- else
- all_nodes[node] = true
- end
- node.child_nodes.each do |child|
- ensure_every_node_once_in_ast(child, all_nodes) unless child.nil?
- end
- end
-
- def assert_desugars(expected, source)
- ast = Prism.parse(source).value.accept(DesugarCompiler.new)
- assert_equal expected, ast_inspect(ast.statements.body.last)
-
- ensure_every_node_once_in_ast(ast)
- end
-
- def assert_not_desugared(source, reason)
- ast = Prism.parse(source).value
- assert_equal_nodes(ast, ast.accept(DesugarCompiler.new))
- end
- end
-end
diff --git a/test/prism/dispatcher_test.rb b/test/prism/dispatcher_test.rb
deleted file mode 100644
index 0d8a6d35e9..0000000000
--- a/test/prism/dispatcher_test.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class DispatcherTest < TestCase
- class TestListener
- attr_reader :events_received
-
- def initialize
- @events_received = []
- end
-
- def on_call_node_enter(node)
- events_received << :on_call_node_enter
- end
-
- def on_call_node_leave(node)
- events_received << :on_call_node_leave
- end
-
- def on_integer_node_enter(node)
- events_received << :on_integer_node_enter
- end
- end
-
- def test_dispatching_events
- listener = TestListener.new
- dispatcher = Dispatcher.new
- dispatcher.register(listener, :on_call_node_enter, :on_call_node_leave, :on_integer_node_enter)
-
- root = Prism.parse(<<~RUBY).value
- def foo
- something(1, 2, 3)
- end
- RUBY
-
- dispatcher.dispatch(root)
- assert_equal([:on_call_node_enter, :on_integer_node_enter, :on_integer_node_enter, :on_integer_node_enter, :on_call_node_leave], listener.events_received)
-
- listener.events_received.clear
- dispatcher.dispatch_once(root.statements.body.first.body.body.first)
- assert_equal([:on_call_node_enter, :on_call_node_leave], listener.events_received)
- end
- end
-end
diff --git a/test/prism/encoding/encodings_test.rb b/test/prism/encoding/encodings_test.rb
new file mode 100644
index 0000000000..4ad2b465cc
--- /dev/null
+++ b/test/prism/encoding/encodings_test.rb
@@ -0,0 +1,101 @@
+# frozen_string_literal: true
+
+return if RUBY_ENGINE != "ruby"
+
+require_relative "../test_helper"
+
+module Prism
+ class EncodingsTest < TestCase
+ class ConstantContext < BasicObject
+ def self.const_missing(const)
+ const
+ end
+ end
+
+ class IdentifierContext < BasicObject
+ def method_missing(name, *)
+ name
+ end
+ end
+
+ # These test that we're correctly parsing codepoints for each alias of each
+ # encoding that prism supports.
+ each_encoding do |encoding, range|
+ (encoding.names - %w[external internal filesystem locale]).each do |name|
+ define_method(:"test_encoding_#{name}") do
+ assert_encoding(encoding, name, range)
+ end
+ end
+ end
+
+ private
+
+ def assert_encoding_constant(name, character)
+ source = "# encoding: #{name}\n#{character}"
+ expected = ConstantContext.new.instance_eval(source)
+
+ result = Prism.parse(source)
+ assert result.success?
+
+ actual = result.value.statements.body.last
+ assert_kind_of ConstantReadNode, actual
+ assert_equal expected, actual.name
+ end
+
+ def assert_encoding_identifier(name, character)
+ source = "# encoding: #{name}\n#{character}"
+ expected = IdentifierContext.new.instance_eval(source)
+
+ result = Prism.parse(source)
+ assert result.success?
+
+ actual = result.value.statements.body.last
+ assert_kind_of CallNode, actual
+ assert_equal expected, actual.name
+ end
+
+ # Check that we can properly parse every codepoint in the given encoding.
+ def assert_encoding(encoding, name, range)
+ # I'm not entirely sure, but I believe these codepoints are incorrect in
+ # their parsing in CRuby. They all report as matching `[[:lower:]]` but
+ # then they are parsed as constants. This is because CRuby determines if
+ # an identifier is a constant or not by case folding it down to lowercase
+ # and checking if there is a difference. And even though they report
+ # themselves as lowercase, their case fold is different. I have reported
+ # this bug upstream.
+ case encoding
+ when Encoding::UTF_8, Encoding::UTF_8_MAC, Encoding::UTF8_DoCoMo, Encoding::UTF8_KDDI, Encoding::UTF8_SoftBank, Encoding::CESU_8
+ range = range.to_a - [
+ 0x01c5, 0x01c8, 0x01cb, 0x01f2, 0x1f88, 0x1f89, 0x1f8a, 0x1f8b,
+ 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f, 0x1f98, 0x1f99, 0x1f9a, 0x1f9b,
+ 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, 0x1fa8, 0x1fa9, 0x1faa, 0x1fab,
+ 0x1fac, 0x1fad, 0x1fae, 0x1faf, 0x1fbc, 0x1fcc, 0x1ffc,
+ ]
+ when Encoding::Windows_1253
+ range = range.to_a - [0xb5]
+ end
+
+ range.each do |codepoint|
+ character = codepoint.chr(encoding)
+
+ if character.match?(/[[:alpha:]]/)
+ if character.match?(/[[:upper:]]/)
+ assert_encoding_constant(name, character)
+ else
+ assert_encoding_identifier(name, character)
+ end
+ elsif character.match?(/[[:alnum:]]/)
+ assert_encoding_identifier(name, "_#{character}")
+ else
+ next if ["/", "{"].include?(character)
+
+ source = "# encoding: #{name}\n/(?##{character})/\n"
+ assert Prism.parse_success?(source), "Expected #{source.inspect} to parse successfully."
+ end
+ rescue RangeError
+ source = "# encoding: #{name}\n\\x#{codepoint.to_s(16)}"
+ assert Prism.parse_failure?(source)
+ end
+ end
+ end
+end
diff --git a/test/prism/encoding/regular_expression_encoding_test.rb b/test/prism/encoding/regular_expression_encoding_test.rb
new file mode 100644
index 0000000000..5d062fe59a
--- /dev/null
+++ b/test/prism/encoding/regular_expression_encoding_test.rb
@@ -0,0 +1,131 @@
+# frozen_string_literal: true
+
+return unless defined?(RubyVM::InstructionSequence)
+return if RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism
+
+require_relative "../test_helper"
+
+module Prism
+ class RegularExpressionEncodingTest < TestCase
+ each_encoding do |encoding, _|
+ define_method(:"test_regular_expression_encoding_flags_#{encoding.name}") do
+ assert_regular_expression_encoding_flags(encoding, ["/a/", "/Ä…/", "//"])
+ end
+
+ escapes = ["\\x00", "\\x7F", "\\x80", "\\xFF", "\\u{00}", "\\u{7F}", "\\u{80}", "\\M-\\C-?"]
+ escapes = escapes.concat(escapes.product(escapes).map(&:join))
+
+ define_method(:"test_regular_expression_escape_encoding_flags_#{encoding.name}") do
+ assert_regular_expression_encoding_flags(encoding, escapes.map { |e| "/#{e}/" })
+ end
+
+ ["n", "u", "e", "s"].each do |modifier|
+ define_method(:"test_regular_expression_encoding_modifiers_/#{modifier}_#{encoding.name}") do
+ regexp_sources = ["abc", "garçon", "\\x80", "gar\\xC3\\xA7on", "gar\\u{E7}on", "abc\\u{FFFFFF}", "\\x80\\u{80}" ]
+
+ assert_regular_expression_encoding_flags(
+ encoding,
+ regexp_sources.product(["n", "u", "e", "s"]).map { |r, modifier| "/#{r}/#{modifier}" }
+ )
+ end
+ end
+ end
+
+ private
+
+ def assert_regular_expression_encoding_flags(encoding, regexps)
+ regexps.each do |regexp|
+ regexp_modifier_used = regexp.end_with?("/u") || regexp.end_with?("/e") || regexp.end_with?("/s") || regexp.end_with?("/n")
+ source = "# encoding: #{encoding.name}\n#{regexp}"
+
+ encoding_errors = ["invalid multibyte char", "escaped non ASCII character in UTF-8 regexp", "differs from source encoding"]
+ skipped_errors = ["invalid multibyte escape", "incompatible character encoding", "UTF-8 character in non UTF-8 regexp", "invalid Unicode range", "invalid Unicode list"]
+
+ # TODO (nirvdrum 21-Feb-2024): Prism currently does not handle Regexp validation unless modifiers are used. So, skip processing those errors for now: https://github.com/ruby/prism/issues/2104
+ unless regexp_modifier_used
+ skipped_errors += encoding_errors
+ encoding_errors.clear
+ end
+
+ expected =
+ begin
+ eval(source).encoding
+ rescue SyntaxError => error
+ if encoding_errors.find { |e| error.message.include?(e) }
+ error.message.split("\n").map { |m| m[/: (.+?)$/, 1] }
+ elsif skipped_errors.find { |e| error.message.include?(e) }
+ next
+ else
+ raise
+ end
+ end
+
+ actual =
+ Prism.parse(source).then do |result|
+ if result.success?
+ regexp = result.statement
+
+ actual_encoding = if regexp.forced_utf8_encoding?
+ Encoding::UTF_8
+ elsif regexp.forced_binary_encoding?
+ Encoding::ASCII_8BIT
+ elsif regexp.forced_us_ascii_encoding?
+ Encoding::US_ASCII
+ elsif regexp.ascii_8bit?
+ Encoding::ASCII_8BIT
+ elsif regexp.utf_8?
+ Encoding::UTF_8
+ elsif regexp.euc_jp?
+ Encoding::EUC_JP
+ elsif regexp.windows_31j?
+ Encoding::Windows_31J
+ else
+ encoding
+ end
+
+ if regexp.utf_8? && actual_encoding != Encoding::UTF_8
+ raise "expected regexp encoding to be UTF-8 due to '/u' modifier, but got #{actual_encoding.name}"
+ elsif regexp.ascii_8bit? && (actual_encoding != Encoding::ASCII_8BIT && actual_encoding != Encoding::US_ASCII)
+ raise "expected regexp encoding to be ASCII-8BIT or US-ASCII due to '/n' modifier, but got #{actual_encoding.name}"
+ elsif regexp.euc_jp? && actual_encoding != Encoding::EUC_JP
+ raise "expected regexp encoding to be EUC-JP due to '/e' modifier, but got #{actual_encoding.name}"
+ elsif regexp.windows_31j? && actual_encoding != Encoding::Windows_31J
+ raise "expected regexp encoding to be Windows-31J due to '/s' modifier, but got #{actual_encoding.name}"
+ end
+
+ if regexp.utf_8? && regexp.forced_utf8_encoding?
+ raise "the forced_utf8 flag should not be set when the UTF-8 modifier (/u) is used"
+ elsif regexp.ascii_8bit? && regexp.forced_binary_encoding?
+ raise "the forced_ascii_8bit flag should not be set when the UTF-8 modifier (/u) is used"
+ end
+
+ actual_encoding
+ else
+ errors = result.errors.map(&:message)
+
+ if errors.last&.include?("UTF-8 mixed within")
+ nil
+ else
+ errors
+ end
+ end
+ end
+
+ # TODO (nirvdrum 22-Feb-2024): Remove this workaround once Prism better maps CRuby's error messages.
+ # This class of error message is tricky. The part not being compared is a representation of the regexp.
+ # Depending on the source encoding and any encoding modifiers being used, CRuby alters how the regexp is represented.
+ # Sometimes it's an MBC string. Other times it uses hexadecimal character escapes. And in other cases it uses
+ # the long-form Unicode escape sequences. This short-circuit checks that the error message is mostly correct.
+ if expected.is_a?(Array) && actual.is_a?(Array)
+ if expected.last.start_with?("/.../n has a non escaped non ASCII character in non ASCII-8BIT script:") &&
+ actual.last.start_with?("/.../n has a non escaped non ASCII character in non ASCII-8BIT script:")
+ expected.last.clear
+ actual.last.clear
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+ end
+end
diff --git a/test/prism/encoding/string_encoding_test.rb b/test/prism/encoding/string_encoding_test.rb
new file mode 100644
index 0000000000..6f9d86df3b
--- /dev/null
+++ b/test/prism/encoding/string_encoding_test.rb
@@ -0,0 +1,136 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class StringEncodingTest < TestCase
+ each_encoding do |encoding, _|
+ define_method(:"test_#{encoding.name}") do
+ assert_encoding(encoding)
+ end
+ end
+
+ def test_coding
+ actual = Prism.parse_statement("# coding: utf-8\n'string'").unescaped.encoding
+ assert_equal Encoding::UTF_8, actual
+ end
+
+ def test_coding_with_whitespace
+ actual = Prism.parse_statement("# coding \t \r \v : \t \v \r ascii-8bit \n'string'").unescaped.encoding
+ assert_equal Encoding::ASCII_8BIT, actual
+ end
+
+ def test_emacs_style
+ actual = Prism.parse_statement("# -*- coding: utf-8 -*-\n'string'").unescaped.encoding
+ assert_equal Encoding::UTF_8, actual
+ end
+
+ def test_utf_8_unix
+ actual = Prism.parse_statement("# coding: utf-8-unix\n'string'").unescaped.encoding
+ assert_equal Encoding::UTF_8, actual
+ end
+
+ def test_utf_8_dos
+ actual = Prism.parse_statement("# coding: utf-8-dos\n'string'").unescaped.encoding
+ assert_equal Encoding::UTF_8, actual
+ end
+
+ def test_utf_8_mac
+ actual = Prism.parse_statement("# coding: utf-8-mac\n'string'").unescaped.encoding
+ assert_equal Encoding::UTF_8, actual
+ end
+
+ def test_utf_8_star
+ actual = Prism.parse_statement("# coding: utf-8-*\n'string'").unescaped.encoding
+ assert_equal Encoding::UTF_8, actual
+ end
+
+ def test_first_lexed_token
+ encoding = Prism.lex("# encoding: ascii-8bit").value[0][0].value.encoding
+ assert_equal Encoding::ASCII_8BIT, encoding
+ end
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ # This test may be a little confusing. Basically when we use our strpbrk,
+ # it takes into account the encoding of the file.
+ def test_strpbrk_multibyte
+ result = Prism.parse(<<~RUBY)
+ # encoding: Shift_JIS
+ %w[\x81\x5c]
+ RUBY
+
+ assert(result.errors.empty?)
+ assert_equal(
+ (+"\x81\x5c").force_encoding(Encoding::Shift_JIS),
+ result.statement.elements.first.unescaped
+ )
+ end
+
+ def test_slice_encoding
+ slice = Prism.parse("# encoding: Shift_JIS\nã‚¢").value.slice
+ assert_equal (+"ã‚¢").force_encoding(Encoding::SHIFT_JIS), slice
+ assert_equal Encoding::SHIFT_JIS, slice.encoding
+ end
+
+ def test_multibyte_escapes
+ [
+ ["'", "'"],
+ ["\"", "\""],
+ ["`", "`"],
+ ["/", "/"],
+ ["<<'HERE'\n", "\nHERE"],
+ ["<<-HERE\n", "\nHERE"]
+ ].each do |opening, closing|
+ assert Prism.parse_success?("# encoding: shift_jis\n'\\\x82\xA0'\n")
+ end
+ end
+ end
+
+ private
+
+ def assert_encoding(encoding)
+ escapes = ["\\x00", "\\x7F", "\\x80", "\\xFF", "\\u{00}", "\\u{7F}", "\\u{80}", "\\M-\\C-?"]
+ escapes = escapes.concat(escapes.product(escapes).map(&:join))
+
+ escapes.each do |escaped|
+ source = "# encoding: #{encoding.name}\n\"#{escaped}\""
+
+ expected =
+ begin
+ eval(source).encoding
+ rescue SyntaxError => error
+ if error.message.include?("UTF-8 mixed within")
+ error.message[/UTF-8 mixed within .+? source/]
+ else
+ raise
+ end
+ end
+
+ actual =
+ Prism.parse(source).then do |result|
+ if result.success?
+ string = result.statement
+
+ if string.forced_utf8_encoding?
+ Encoding::UTF_8
+ elsif string.forced_binary_encoding?
+ Encoding::ASCII_8BIT
+ else
+ encoding
+ end
+ else
+ error = result.errors.first
+
+ if error.message.include?("mixed")
+ error.message
+ else
+ raise error.message
+ end
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+ end
+end
diff --git a/test/prism/encoding/symbol_encoding_test.rb b/test/prism/encoding/symbol_encoding_test.rb
new file mode 100644
index 0000000000..20c998a58b
--- /dev/null
+++ b/test/prism/encoding/symbol_encoding_test.rb
@@ -0,0 +1,108 @@
+# frozen_string_literal: true
+
+return if RUBY_ENGINE != "ruby"
+
+require_relative "../test_helper"
+
+module Prism
+ class SymbolEncodingTest < TestCase
+ each_encoding do |encoding, _|
+ define_method(:"test_symbols_#{encoding.name}") do
+ assert_symbols(encoding)
+ end
+
+ define_method(:"test_escapes_#{encoding.name}") do
+ assert_escapes(encoding)
+ end
+ end
+
+ private
+
+ def expected_encoding(source)
+ eval(source).encoding
+ end
+
+ def actual_encoding(source, encoding)
+ result = Prism.parse(source)
+
+ if result.success?
+ symbol = result.statement
+
+ if symbol.forced_utf8_encoding?
+ Encoding::UTF_8
+ elsif symbol.forced_binary_encoding?
+ Encoding::ASCII_8BIT
+ elsif symbol.forced_us_ascii_encoding?
+ Encoding::US_ASCII
+ else
+ encoding
+ end
+ else
+ raise SyntaxError.new(result.errors.map(&:message).join("\n"))
+ end
+ end
+
+ def assert_symbols(encoding)
+ [:a, :Ä…, :+].each do |symbol|
+ source = "# encoding: #{encoding.name}\n#{symbol.inspect}"
+
+ expected =
+ begin
+ expected_encoding(source)
+ rescue SyntaxError => error
+ if error.message.include?("invalid multibyte")
+ "invalid multibyte"
+ else
+ raise
+ end
+ end
+
+ actual =
+ begin
+ actual_encoding(source, encoding)
+ rescue SyntaxError => error
+ if error.message.include?("invalid multibyte")
+ "invalid multibyte"
+ else
+ raise
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+
+ def assert_escapes(encoding)
+ escapes = ["\\x00", "\\x7F", "\\x80", "\\xFF", "\\u{00}", "\\u{7F}", "\\u{80}", "\\M-\\C-?"]
+ escapes = escapes.concat(escapes.product(escapes).map(&:join))
+
+ escapes.each do |escaped|
+ source = "# encoding: #{encoding.name}\n:\"#{escaped}\""
+
+ expected =
+ begin
+ expected_encoding(source)
+ rescue SyntaxError => error
+ if error.message.include?("UTF-8 mixed within")
+ error.message[/UTF-8 mixed within .+? source/]
+ else
+ raise
+ end
+ end
+
+ actual =
+ begin
+ actual_encoding(source, encoding)
+ rescue SyntaxError => error
+ if error.message.include?("mixed")
+ error.message.split("\n", 2).first
+ else
+ raise
+ end
+ end
+
+ assert_equal expected, actual
+ end
+ end
+ end
+end
diff --git a/test/prism/encoding_test.rb b/test/prism/encoding_test.rb
deleted file mode 100644
index 2aee473ddf..0000000000
--- a/test/prism/encoding_test.rb
+++ /dev/null
@@ -1,577 +0,0 @@
-# frozen_string_literal: true
-
-return if RUBY_ENGINE != "ruby"
-
-require_relative "test_helper"
-
-module Prism
- class EncodingTest < TestCase
- codepoints_1byte = 0...0x100
- encodings = {
- Encoding::ASCII_8BIT => codepoints_1byte,
- Encoding::US_ASCII => codepoints_1byte
- }
-
- if !ENV["PRISM_BUILD_MINIMAL"]
- encodings[Encoding::Windows_1253] = codepoints_1byte
- end
-
- # By default we don't test every codepoint in these encodings because it
- # takes a very long time.
- if ENV["PRISM_TEST_ALL_ENCODINGS"]
- codepoints_2bytes = 0...0x10000
- codepoints_unicode = (0...0x110000)
-
- codepoints_eucjp = [
- *(0...0x10000),
- *(0...0x10000).map { |bytes| bytes | 0x8F0000 }
- ]
-
- codepoints_emacs_mule = [
- *(0...0x80),
- *((0x81...0x90).flat_map { |byte1| (0x90...0x100).map { |byte2| byte1 << 8 | byte2 } }),
- *((0x90...0x9C).flat_map { |byte1| (0xA0...0x100).flat_map { |byte2| (0xA0...0x100).flat_map { |byte3| byte1 << 16 | byte2 << 8 | byte3 } } }),
- *((0xF0...0xF5).flat_map { |byte2| (0xA0...0x100).flat_map { |byte3| (0xA0...0x100).flat_map { |byte4| 0x9C << 24 | byte3 << 16 | byte3 << 8 | byte4 } } }),
- ]
-
- codepoints_gb18030 = [
- *(0...0x80),
- *((0x81..0xFE).flat_map { |byte1| (0x40...0x100).map { |byte2| byte1 << 8 | byte2 } }),
- *((0x81..0xFE).flat_map { |byte1| (0x30...0x40).flat_map { |byte2| (0x81..0xFE).flat_map { |byte3| (0x2F...0x41).map { |byte4| byte1 << 24 | byte2 << 16 | byte3 << 8 | byte4 } } } }),
- ]
-
- codepoints_euc_tw = [
- *(0..0x7F),
- *(0xA1..0xFF).flat_map { |byte1| (0xA1..0xFF).map { |byte2| (byte1 << 8) | byte2 } },
- *(0xA1..0xB0).flat_map { |byte2| (0xA1..0xFF).flat_map { |byte3| (0xA1..0xFF).flat_map { |byte4| 0x8E << 24 | byte2 << 16 | byte3 << 8 | byte4 } } }
- ]
-
- encodings.merge!(
- Encoding::CP850 => codepoints_1byte,
- Encoding::CP852 => codepoints_1byte,
- Encoding::CP855 => codepoints_1byte,
- Encoding::GB1988 => codepoints_1byte,
- Encoding::IBM437 => codepoints_1byte,
- Encoding::IBM720 => codepoints_1byte,
- Encoding::IBM737 => codepoints_1byte,
- Encoding::IBM775 => codepoints_1byte,
- Encoding::IBM852 => codepoints_1byte,
- Encoding::IBM855 => codepoints_1byte,
- Encoding::IBM857 => codepoints_1byte,
- Encoding::IBM860 => codepoints_1byte,
- Encoding::IBM861 => codepoints_1byte,
- Encoding::IBM862 => codepoints_1byte,
- Encoding::IBM863 => codepoints_1byte,
- Encoding::IBM864 => codepoints_1byte,
- Encoding::IBM865 => codepoints_1byte,
- Encoding::IBM866 => codepoints_1byte,
- Encoding::IBM869 => codepoints_1byte,
- Encoding::ISO_8859_1 => codepoints_1byte,
- Encoding::ISO_8859_2 => codepoints_1byte,
- Encoding::ISO_8859_3 => codepoints_1byte,
- Encoding::ISO_8859_4 => codepoints_1byte,
- Encoding::ISO_8859_5 => codepoints_1byte,
- Encoding::ISO_8859_6 => codepoints_1byte,
- Encoding::ISO_8859_7 => codepoints_1byte,
- Encoding::ISO_8859_8 => codepoints_1byte,
- Encoding::ISO_8859_9 => codepoints_1byte,
- Encoding::ISO_8859_10 => codepoints_1byte,
- Encoding::ISO_8859_11 => codepoints_1byte,
- Encoding::ISO_8859_13 => codepoints_1byte,
- Encoding::ISO_8859_14 => codepoints_1byte,
- Encoding::ISO_8859_15 => codepoints_1byte,
- Encoding::ISO_8859_16 => codepoints_1byte,
- Encoding::KOI8_R => codepoints_1byte,
- Encoding::KOI8_U => codepoints_1byte,
- Encoding::MACCENTEURO => codepoints_1byte,
- Encoding::MACCROATIAN => codepoints_1byte,
- Encoding::MACCYRILLIC => codepoints_1byte,
- Encoding::MACGREEK => codepoints_1byte,
- Encoding::MACICELAND => codepoints_1byte,
- Encoding::MACROMAN => codepoints_1byte,
- Encoding::MACROMANIA => codepoints_1byte,
- Encoding::MACTHAI => codepoints_1byte,
- Encoding::MACTURKISH => codepoints_1byte,
- Encoding::MACUKRAINE => codepoints_1byte,
- Encoding::TIS_620 => codepoints_1byte,
- Encoding::Windows_1250 => codepoints_1byte,
- Encoding::Windows_1251 => codepoints_1byte,
- Encoding::Windows_1252 => codepoints_1byte,
- Encoding::Windows_1254 => codepoints_1byte,
- Encoding::Windows_1255 => codepoints_1byte,
- Encoding::Windows_1256 => codepoints_1byte,
- Encoding::Windows_1257 => codepoints_1byte,
- Encoding::Windows_1258 => codepoints_1byte,
- Encoding::Windows_874 => codepoints_1byte,
- Encoding::Big5 => codepoints_2bytes,
- Encoding::Big5_HKSCS => codepoints_2bytes,
- Encoding::Big5_UAO => codepoints_2bytes,
- Encoding::CP949 => codepoints_2bytes,
- Encoding::CP950 => codepoints_2bytes,
- Encoding::CP951 => codepoints_2bytes,
- Encoding::EUC_KR => codepoints_2bytes,
- Encoding::GBK => codepoints_2bytes,
- Encoding::GB12345 => codepoints_2bytes,
- Encoding::GB2312 => codepoints_2bytes,
- Encoding::MACJAPANESE => codepoints_2bytes,
- Encoding::Shift_JIS => codepoints_2bytes,
- Encoding::SJIS_DoCoMo => codepoints_2bytes,
- Encoding::SJIS_KDDI => codepoints_2bytes,
- Encoding::SJIS_SoftBank => codepoints_2bytes,
- Encoding::Windows_31J => codepoints_2bytes,
- Encoding::UTF_8 => codepoints_unicode,
- Encoding::UTF8_MAC => codepoints_unicode,
- Encoding::UTF8_DoCoMo => codepoints_unicode,
- Encoding::UTF8_KDDI => codepoints_unicode,
- Encoding::UTF8_SoftBank => codepoints_unicode,
- Encoding::CESU_8 => codepoints_unicode,
- Encoding::CP51932 => codepoints_eucjp,
- Encoding::EUC_JP => codepoints_eucjp,
- Encoding::EUCJP_MS => codepoints_eucjp,
- Encoding::EUC_JIS_2004 => codepoints_eucjp,
- Encoding::EMACS_MULE => codepoints_emacs_mule,
- Encoding::STATELESS_ISO_2022_JP => codepoints_emacs_mule,
- Encoding::STATELESS_ISO_2022_JP_KDDI => codepoints_emacs_mule,
- Encoding::GB18030 => codepoints_gb18030,
- Encoding::EUC_TW => codepoints_euc_tw
- )
- end
-
- # These test that we're correctly parsing codepoints for each alias of each
- # encoding that prism supports.
- encodings.each do |encoding, range|
- (encoding.names - %w[external internal filesystem locale]).each do |name|
- define_method(:"test_encoding_#{name}") do
- assert_encoding(encoding, name, range)
- end
- end
- end
-
- # These test that we're correctly setting the flags on strings for each
- # encoding that prism supports.
- escapes = ["\\x00", "\\x7F", "\\x80", "\\xFF", "\\u{00}", "\\u{7F}", "\\u{80}", "\\M-\\C-?"]
- escapes = escapes.concat(escapes.product(escapes).map(&:join))
- symbols = [:a, :Ä…, :+]
- regexps = [/a/, /Ä…/, //]
-
- encodings.each_key do |encoding|
- define_method(:"test_encoding_flags_#{encoding.name}") do
- assert_encoding_flags(encoding, escapes)
- end
-
- define_method(:"test_symbol_encoding_flags_#{encoding.name}") do
- assert_symbol_encoding_flags(encoding, symbols)
- end
-
- define_method(:"test_symbol_character_escape_encoding_flags_#{encoding.name}") do
- assert_symbol_character_escape_encoding_flags(encoding, escapes)
- end
-
- define_method(:"test_regular_expression_encoding_flags_#{encoding.name}") do
- assert_regular_expression_encoding_flags(encoding, regexps.map(&:inspect))
- end
-
- define_method(:"test_regular_expression_escape_encoding_flags_#{encoding.name}") do
- assert_regular_expression_encoding_flags(encoding, escapes.map { |e| "/#{e}/" })
- end
- end
-
- encoding_modifiers = { ascii_8bit: "n", utf_8: "u", euc_jp: "e", windows_31j: "s" }
- regexp_sources = ["abc", "garçon", "\\x80", "gar\\xC3\\xA7on", "gar\\u{E7}on", "abc\\u{FFFFFF}", "\\x80\\u{80}" ]
-
- encoding_modifiers.each_value do |modifier|
- encodings.each_key do |encoding|
- define_method(:"test_regular_expression_encoding_modifiers_/#{modifier}_#{encoding.name}") do
- assert_regular_expression_encoding_flags(
- encoding,
- regexp_sources.product(encoding_modifiers.values).map { |r, modifier| "/#{r}/#{modifier}" }
- )
- end
- end
- end
-
- def test_coding
- result = Prism.parse("# coding: utf-8\n'string'")
- actual = result.value.statements.body.first.unescaped.encoding
- assert_equal Encoding.find("utf-8"), actual
- end
-
- def test_coding_with_whitespace
- result = Prism.parse("# coding \t \r \v : \t \v \r ascii-8bit \n'string'")
- actual = result.value.statements.body.first.unescaped.encoding
- assert_equal Encoding.find("ascii-8bit"), actual
- end
-
- def test_emacs_style
- result = Prism.parse("# -*- coding: utf-8 -*-\n'string'")
- actual = result.value.statements.body.first.unescaped.encoding
- assert_equal Encoding.find("utf-8"), actual
- end
-
- def test_utf_8_variations
- %w[
- utf-8-unix
- utf-8-dos
- utf-8-mac
- utf-8-*
- ].each do |encoding|
- result = Prism.parse("# coding: #{encoding}\n'string'")
- actual = result.value.statements.body.first.unescaped.encoding
- assert_equal Encoding.find("utf-8"), actual
- end
- end
-
- def test_first_lexed_token
- encoding = Prism.lex("# encoding: ascii-8bit").value[0][0].value.encoding
- assert_equal Encoding.find("ascii-8bit"), encoding
- end
-
- if !ENV["PRISM_BUILD_MINIMAL"]
- # This test may be a little confusing. Basically when we use our strpbrk,
- # it takes into account the encoding of the file.
- def test_strpbrk_multibyte
- result = Prism.parse(<<~RUBY)
- # encoding: Shift_JIS
- %w[\x81\x5c]
- RUBY
-
- assert(result.errors.empty?)
- assert_equal(
- (+"\x81\x5c").force_encoding(Encoding::Shift_JIS),
- result.value.statements.body.first.elements.first.unescaped
- )
- end
-
- def test_slice_encoding
- slice = Prism.parse("# encoding: Shift_JIS\nã‚¢").value.slice
- assert_equal (+"ã‚¢").force_encoding(Encoding::SHIFT_JIS), slice
- assert_equal Encoding::SHIFT_JIS, slice.encoding
- end
-
- def test_multibyte_escapes
- [
- ["'", "'"],
- ["\"", "\""],
- ["`", "`"],
- ["/", "/"],
- ["<<'HERE'\n", "\nHERE"],
- ["<<-HERE\n", "\nHERE"]
- ].each do |opening, closing|
- assert Prism.parse_success?("# encoding: shift_jis\n'\\\x82\xA0'\n")
- end
- end
- end
-
- private
-
- class ConstantContext < BasicObject
- def self.const_missing(const)
- const
- end
- end
-
- def constant_context
- ConstantContext.new
- end
-
- class IdentifierContext < BasicObject
- def method_missing(name, *)
- name
- end
- end
-
- def identifier_context
- IdentifierContext.new
- end
-
- def assert_encoding_constant(name, character)
- source = "# encoding: #{name}\n#{character}"
- expected = constant_context.instance_eval(source)
-
- result = Prism.parse(source)
- assert result.success?
-
- actual = result.value.statements.body.last
- assert_kind_of ConstantReadNode, actual
- assert_equal expected, actual.name
- end
-
- def assert_encoding_identifier(name, character)
- source = "# encoding: #{name}\n#{character}"
- expected = identifier_context.instance_eval(source)
-
- result = Prism.parse(source)
- assert result.success?
-
- actual = result.value.statements.body.last
- assert_kind_of CallNode, actual
- assert_equal expected, actual.name
- end
-
- # Check that we can properly parse every codepoint in the given encoding.
- def assert_encoding(encoding, name, range)
- # I'm not entirely sure, but I believe these codepoints are incorrect in
- # their parsing in CRuby. They all report as matching `[[:lower:]]` but
- # then they are parsed as constants. This is because CRuby determines if
- # an identifier is a constant or not by case folding it down to lowercase
- # and checking if there is a difference. And even though they report
- # themselves as lowercase, their case fold is different. I have reported
- # this bug upstream.
- case encoding
- when Encoding::UTF_8, Encoding::UTF_8_MAC, Encoding::UTF8_DoCoMo, Encoding::UTF8_KDDI, Encoding::UTF8_SoftBank, Encoding::CESU_8
- range = range.to_a - [
- 0x01c5, 0x01c8, 0x01cb, 0x01f2, 0x1f88, 0x1f89, 0x1f8a, 0x1f8b,
- 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f, 0x1f98, 0x1f99, 0x1f9a, 0x1f9b,
- 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, 0x1fa8, 0x1fa9, 0x1faa, 0x1fab,
- 0x1fac, 0x1fad, 0x1fae, 0x1faf, 0x1fbc, 0x1fcc, 0x1ffc,
- ]
- when Encoding::Windows_1253
- range = range.to_a - [0xb5]
- end
-
- range.each do |codepoint|
- character = codepoint.chr(encoding)
-
- if character.match?(/[[:alpha:]]/)
- if character.match?(/[[:upper:]]/)
- assert_encoding_constant(name, character)
- else
- assert_encoding_identifier(name, character)
- end
- elsif character.match?(/[[:alnum:]]/)
- assert_encoding_identifier(name, "_#{character}")
- else
- next if ["/", "{"].include?(character)
-
- source = "# encoding: #{name}\n/(?##{character})/\n"
- assert Prism.parse(source).success?, "Expected #{source.inspect} to parse successfully."
- end
- rescue RangeError
- source = "# encoding: #{name}\n\\x#{codepoint.to_s(16)}"
- refute Prism.parse(source).success?
- end
- end
-
- def assert_encoding_flags(encoding, escapes)
- escapes.each do |escaped|
- source = "# encoding: #{encoding.name}\n\"#{escaped}\""
-
- expected =
- begin
- eval(source).encoding
- rescue SyntaxError => error
- if error.message.include?("UTF-8 mixed within")
- error.message[/: (.+?)\n/, 1]
- else
- raise
- end
- end
-
- actual =
- Prism.parse(source).then do |result|
- if result.success?
- string = result.value.statements.body.first
-
- if string.forced_utf8_encoding?
- Encoding::UTF_8
- elsif string.forced_binary_encoding?
- Encoding::ASCII_8BIT
- else
- encoding
- end
- else
- error = result.errors.first
-
- if error.message.include?("mixed")
- error.message
- else
- raise error.message
- end
- end
- end
-
- assert_equal expected, actual
- end
- end
-
- # Test Symbol literals without any interpolation or escape sequences.
- def assert_symbol_encoding_flags(encoding, symbols)
- symbols.each do |symbol|
- source = "# encoding: #{encoding.name}\n#{symbol.inspect}"
-
- expected =
- begin
- eval(source).encoding
- rescue SyntaxError => error
- unless error.message.include?("invalid multibyte char")
- raise
- end
- end
-
- actual =
- Prism.parse(source).then do |result|
- if result.success?
- symbol = result.value.statements.body.first
-
- if symbol.forced_utf8_encoding?
- Encoding::UTF_8
- elsif symbol.forced_binary_encoding?
- Encoding::ASCII_8BIT
- elsif symbol.forced_us_ascii_encoding?
- Encoding::US_ASCII
- else
- encoding
- end
- else
- error = result.errors.last
-
- unless error.message.include?("invalid symbol")
- raise error.message
- end
- end
- end
-
- assert_equal expected, actual
- end
- end
-
- def assert_symbol_character_escape_encoding_flags(encoding, escapes)
- escapes.each do |escaped|
- source = "# encoding: #{encoding.name}\n:\"#{escaped}\""
-
- expected =
- begin
- eval(source).encoding
- rescue SyntaxError => error
- if error.message.include?("UTF-8 mixed within")
- error.message[/: (.+?)\n/, 1]
- else
- raise
- end
- end
-
- actual =
- Prism.parse(source).then do |result|
- if result.success?
- symbol = result.value.statements.body.first
-
- if symbol.forced_utf8_encoding?
- Encoding::UTF_8
- elsif symbol.forced_binary_encoding?
- Encoding::ASCII_8BIT
- elsif symbol.forced_us_ascii_encoding?
- Encoding::US_ASCII
- else
- encoding
- end
- else
- error = result.errors.first
-
- if error.message.include?("mixed")
- error.message
- else
- raise error.message
- end
- end
- end
-
- assert_equal expected, actual
- end
- end
-
- def assert_regular_expression_encoding_flags(encoding, regexps)
- regexps.each do |regexp|
- regexp_modifier_used = regexp.end_with?("/u") || regexp.end_with?("/e") || regexp.end_with?("/s") || regexp.end_with?("/n")
- source = "# encoding: #{encoding.name}\n#{regexp}"
-
- encoding_errors = ["invalid multibyte char", "escaped non ASCII character in UTF-8 regexp", "differs from source encoding"]
- skipped_errors = ["invalid multibyte escape", "incompatible character encoding", "UTF-8 character in non UTF-8 regexp", "invalid Unicode range", "invalid Unicode list"]
-
- # TODO (nirvdrum 21-Feb-2024): Prism currently does not handle Regexp validation unless modifiers are used. So, skip processing those errors for now: https://github.com/ruby/prism/issues/2104
- unless regexp_modifier_used
- skipped_errors += encoding_errors
- encoding_errors.clear
- end
-
- expected =
- begin
- eval(source).encoding
- rescue SyntaxError => error
- if encoding_errors.find { |e| error.message.include?(e) }
- error.message.split("\n").map { |m| m[/: (.+?)$/, 1] }
- elsif skipped_errors.find { |e| error.message.include?(e) }
- next
- else
- raise
- end
- end
-
- actual =
- Prism.parse(source).then do |result|
- if result.success?
- regexp = result.value.statements.body.first
-
- actual_encoding = if regexp.forced_utf8_encoding?
- Encoding::UTF_8
- elsif regexp.forced_binary_encoding?
- Encoding::ASCII_8BIT
- elsif regexp.forced_us_ascii_encoding?
- Encoding::US_ASCII
- elsif regexp.ascii_8bit?
- Encoding::ASCII_8BIT
- elsif regexp.utf_8?
- Encoding::UTF_8
- elsif regexp.euc_jp?
- Encoding::EUC_JP
- elsif regexp.windows_31j?
- Encoding::Windows_31J
- else
- encoding
- end
-
- if regexp.utf_8? && actual_encoding != Encoding::UTF_8
- raise "expected regexp encoding to be UTF-8 due to '/u' modifier, but got #{actual_encoding.name}"
- elsif regexp.ascii_8bit? && (actual_encoding != Encoding::ASCII_8BIT && actual_encoding != Encoding::US_ASCII)
- raise "expected regexp encoding to be ASCII-8BIT or US-ASCII due to '/n' modifier, but got #{actual_encoding.name}"
- elsif regexp.euc_jp? && actual_encoding != Encoding::EUC_JP
- raise "expected regexp encoding to be EUC-JP due to '/e' modifier, but got #{actual_encoding.name}"
- elsif regexp.windows_31j? && actual_encoding != Encoding::Windows_31J
- raise "expected regexp encoding to be Windows-31J due to '/s' modifier, but got #{actual_encoding.name}"
- end
-
- if regexp.utf_8? && regexp.forced_utf8_encoding?
- raise "the forced_utf8 flag should not be set when the UTF-8 modifier (/u) is used"
- elsif regexp.ascii_8bit? && regexp.forced_binary_encoding?
- raise "the forced_ascii_8bit flag should not be set when the UTF-8 modifier (/u) is used"
- end
-
- actual_encoding
- else
- errors = result.errors.map(&:message)
-
- if errors.last&.include?("UTF-8 mixed within")
- nil
- else
- errors
- end
- end
- end
-
- # TODO (nirvdrum 22-Feb-2024): Remove this workaround once Prism better maps CRuby's error messages.
- # This class of error message is tricky. The part not being compared is a representation of the regexp.
- # Depending on the source encoding and any encoding modifiers being used, CRuby alters how the regexp is represented.
- # Sometimes it's an MBC string. Other times it uses hexadecimal character escapes. And in other cases it uses
- # the long-form Unicode escape sequences. This short-circuit checks that the error message is mostly correct.
- if expected.is_a?(Array) && actual.is_a?(Array)
- if expected.last.start_with?("/.../n has a non escaped non ASCII character in non ASCII-8BIT script:") &&
- actual.last.start_with?("/.../n has a non escaped non ASCII character in non ASCII-8BIT script:")
- expected.last.clear
- actual.last.clear
- end
- end
-
- assert_equal expected, actual
- end
- end
- end
-end
diff --git a/test/prism/errors/1_2_3.txt b/test/prism/errors/1_2_3.txt
new file mode 100644
index 0000000000..345452911f
--- /dev/null
+++ b/test/prism/errors/1_2_3.txt
@@ -0,0 +1,11 @@
+(1, 2, 3)
+ ^ unexpected ',', expecting end-of-input
+ ^ unexpected ',', ignoring it
+ ^ expected a matching `)`
+ ^ unexpected ',', expecting end-of-input
+ ^ unexpected ',', ignoring it
+ ^ unexpected ',', expecting end-of-input
+ ^ unexpected ',', ignoring it
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/aliasing_global_variable_with_global_number_variable.txt b/test/prism/errors/aliasing_global_variable_with_global_number_variable.txt
new file mode 100644
index 0000000000..2f40a6a328
--- /dev/null
+++ b/test/prism/errors/aliasing_global_variable_with_global_number_variable.txt
@@ -0,0 +1,3 @@
+alias $a $1
+ ^~ invalid argument being passed to `alias`; can't make alias for the number variables
+
diff --git a/test/prism/errors/aliasing_global_variable_with_non_global_variable.txt b/test/prism/errors/aliasing_global_variable_with_non_global_variable.txt
new file mode 100644
index 0000000000..b6f013bab5
--- /dev/null
+++ b/test/prism/errors/aliasing_global_variable_with_non_global_variable.txt
@@ -0,0 +1,3 @@
+alias $a b
+ ^ invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable
+
diff --git a/test/prism/errors/aliasing_non_global_variable_with_global_variable.txt b/test/prism/errors/aliasing_non_global_variable_with_global_variable.txt
new file mode 100644
index 0000000000..8863f342f0
--- /dev/null
+++ b/test/prism/errors/aliasing_non_global_variable_with_global_variable.txt
@@ -0,0 +1,3 @@
+alias a $b
+ ^~ invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable
+
diff --git a/test/prism/errors/alnum_delimiters.txt b/test/prism/errors/alnum_delimiters.txt
new file mode 100644
index 0000000000..c9ed06ae51
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters.txt
@@ -0,0 +1,3 @@
+%qXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_2.txt b/test/prism/errors/alnum_delimiters_2.txt
new file mode 100644
index 0000000000..3f78b434d6
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_2.txt
@@ -0,0 +1,3 @@
+%QXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_3.txt b/test/prism/errors/alnum_delimiters_3.txt
new file mode 100644
index 0000000000..55ef8d29a5
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_3.txt
@@ -0,0 +1,3 @@
+%wXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_4.txt b/test/prism/errors/alnum_delimiters_4.txt
new file mode 100644
index 0000000000..603b54debd
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_4.txt
@@ -0,0 +1,3 @@
+%WxfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_5.txt b/test/prism/errors/alnum_delimiters_5.txt
new file mode 100644
index 0000000000..31c344ea90
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_5.txt
@@ -0,0 +1,3 @@
+%iXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_6.txt b/test/prism/errors/alnum_delimiters_6.txt
new file mode 100644
index 0000000000..79ffbbb1b8
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_6.txt
@@ -0,0 +1,3 @@
+%IXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_7.txt b/test/prism/errors/alnum_delimiters_7.txt
new file mode 100644
index 0000000000..809192e031
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_7.txt
@@ -0,0 +1,3 @@
+%xXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_8.txt b/test/prism/errors/alnum_delimiters_8.txt
new file mode 100644
index 0000000000..abfcf119c0
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_8.txt
@@ -0,0 +1,3 @@
+%rXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/alnum_delimiters_9.txt b/test/prism/errors/alnum_delimiters_9.txt
new file mode 100644
index 0000000000..ae56d7be4f
--- /dev/null
+++ b/test/prism/errors/alnum_delimiters_9.txt
@@ -0,0 +1,3 @@
+%sXfooX
+^ unknown type of %string
+
diff --git a/test/prism/errors/argument_after_ellipsis.txt b/test/prism/errors/argument_after_ellipsis.txt
new file mode 100644
index 0000000000..3d708648a4
--- /dev/null
+++ b/test/prism/errors/argument_after_ellipsis.txt
@@ -0,0 +1,3 @@
+def foo(...); foo(..., 1); end
+ ^ unexpected argument after `...`
+
diff --git a/test/prism/errors/argument_forwarding_only_effects_its_own_internals.txt b/test/prism/errors/argument_forwarding_only_effects_its_own_internals.txt
new file mode 100644
index 0000000000..9c3f0ae3f7
--- /dev/null
+++ b/test/prism/errors/argument_forwarding_only_effects_its_own_internals.txt
@@ -0,0 +1,3 @@
+def a(...); b(...); end; def c(x, y, z); b(...); end
+ ^~~ unexpected ... when the parent method is not forwarding
+
diff --git a/test/prism/errors/argument_forwarding_when_parent_is_not_forwarding.txt b/test/prism/errors/argument_forwarding_when_parent_is_not_forwarding.txt
new file mode 100644
index 0000000000..017ba7eec9
--- /dev/null
+++ b/test/prism/errors/argument_forwarding_when_parent_is_not_forwarding.txt
@@ -0,0 +1,3 @@
+def a(x, y, z); b(...); end
+ ^~~ unexpected ... when the parent method is not forwarding
+
diff --git a/test/prism/errors/arguments_after_block.txt b/test/prism/errors/arguments_after_block.txt
new file mode 100644
index 0000000000..2d5e06ff77
--- /dev/null
+++ b/test/prism/errors/arguments_after_block.txt
@@ -0,0 +1,3 @@
+a(&block, foo)
+ ^~~ unexpected argument after a block argument
+
diff --git a/test/prism/errors/arguments_binding_power_for_and.txt b/test/prism/errors/arguments_binding_power_for_and.txt
new file mode 100644
index 0000000000..0585a091f4
--- /dev/null
+++ b/test/prism/errors/arguments_binding_power_for_and.txt
@@ -0,0 +1,5 @@
+foo(*bar and baz)
+ ^~~ unexpected 'and'; expected a `)` to close the arguments
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/assign_to_numbered_parameter.txt b/test/prism/errors/assign_to_numbered_parameter.txt
new file mode 100644
index 0000000000..74cc0c4032
--- /dev/null
+++ b/test/prism/errors/assign_to_numbered_parameter.txt
@@ -0,0 +1,11 @@
+a in _1
+ ^~ _1 is reserved for numbered parameters
+a => _1
+ ^~ _1 is reserved for numbered parameters
+1 => a, _1
+ ^~ _1 is reserved for numbered parameters
+1 in a, _1
+ ^~ _1 is reserved for numbered parameters
+/(?<_1>)/ =~ a
+ ^~ _1 is reserved for numbered parameters
+
diff --git a/test/prism/errors/bad_arguments.txt b/test/prism/errors/bad_arguments.txt
new file mode 100644
index 0000000000..ea19efd3c8
--- /dev/null
+++ b/test/prism/errors/bad_arguments.txt
@@ -0,0 +1,6 @@
+def foo(A, @a, $A, @@a);end
+ ^ invalid formal argument; formal argument cannot be a constant
+ ^~ invalid formal argument; formal argument cannot be an instance variable
+ ^~ invalid formal argument; formal argument cannot be a global variable
+ ^~~ invalid formal argument; formal argument cannot be a class variable
+
diff --git a/test/prism/errors/begin_at_toplevel.txt b/test/prism/errors/begin_at_toplevel.txt
new file mode 100644
index 0000000000..ce3d3b8d00
--- /dev/null
+++ b/test/prism/errors/begin_at_toplevel.txt
@@ -0,0 +1,3 @@
+def foo; BEGIN {}; end
+ ^~~~~ BEGIN is permitted only at toplevel
+
diff --git a/test/prism/errors/binary_range_with_left_unary_range.txt b/test/prism/errors/binary_range_with_left_unary_range.txt
new file mode 100644
index 0000000000..37e41f3971
--- /dev/null
+++ b/test/prism/errors/binary_range_with_left_unary_range.txt
@@ -0,0 +1,7 @@
+..1..
+ ^~ unexpected range operator; .. and ... are non-associative and cannot be chained
+...1..
+ ^~ unexpected range operator; .. and ... are non-associative and cannot be chained
+ ^~ unexpected .., expecting end-of-input
+ ^~ unexpected .., ignoring it
+
diff --git a/test/prism/errors/block_arg_and_block.txt b/test/prism/errors/block_arg_and_block.txt
new file mode 100644
index 0000000000..c355c40475
--- /dev/null
+++ b/test/prism/errors/block_arg_and_block.txt
@@ -0,0 +1,3 @@
+foo(&1) { }
+ ^~~ both block arg and actual block given; only one block is allowed
+
diff --git a/test/prism/errors/block_beginning_with_brace_and_ending_with_end.txt b/test/prism/errors/block_beginning_with_brace_and_ending_with_end.txt
new file mode 100644
index 0000000000..f0fa964c8a
--- /dev/null
+++ b/test/prism/errors/block_beginning_with_brace_and_ending_with_end.txt
@@ -0,0 +1,6 @@
+x.each { x end
+ ^~~ unexpected 'end', expecting end-of-input
+ ^~~ unexpected 'end', ignoring it
+ ^ unexpected end-of-input, assuming it is closing the parent top level context
+ ^ expected a block beginning with `{` to end with `}`
+
diff --git a/test/prism/errors/break_1.txt b/test/prism/errors/break_1.txt
new file mode 100644
index 0000000000..e7b26ad3a0
--- /dev/null
+++ b/test/prism/errors/break_1.txt
@@ -0,0 +1,4 @@
+break 1,;
+ ^ expected an argument
+^~~~~~~~ Invalid break
+
diff --git a/test/prism/errors/break_1_2_3.txt b/test/prism/errors/break_1_2_3.txt
new file mode 100644
index 0000000000..817207cbfe
--- /dev/null
+++ b/test/prism/errors/break_1_2_3.txt
@@ -0,0 +1,8 @@
+break(1, 2, 3)
+ ^ unexpected ',', expecting end-of-input
+ ^ unexpected ',', ignoring it
+ ^ expected a matching `)`
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+^~~~~~~~~~~~~ Invalid break
+
diff --git a/test/prism/errors/call_with_block_and_write.txt b/test/prism/errors/call_with_block_and_write.txt
new file mode 100644
index 0000000000..f63d94770e
--- /dev/null
+++ b/test/prism/errors/call_with_block_and_write.txt
@@ -0,0 +1,4 @@
+foo {} &&= 1
+^~~~~~ unexpected write target
+ ^~~ unexpected operator after a call with a block
+
diff --git a/test/prism/errors/call_with_block_operator_write.txt b/test/prism/errors/call_with_block_operator_write.txt
new file mode 100644
index 0000000000..3c36050b34
--- /dev/null
+++ b/test/prism/errors/call_with_block_operator_write.txt
@@ -0,0 +1,4 @@
+foo {} += 1
+^~~~~~ unexpected write target
+ ^~ unexpected operator after a call with a block
+
diff --git a/test/prism/errors/call_with_block_or_write.txt b/test/prism/errors/call_with_block_or_write.txt
new file mode 100644
index 0000000000..2cced0db75
--- /dev/null
+++ b/test/prism/errors/call_with_block_or_write.txt
@@ -0,0 +1,4 @@
+foo {} ||= 1
+^~~~~~ unexpected write target
+ ^~~ unexpected operator after a call with a block
+
diff --git a/test/prism/errors/cannot_assign_to_a_reserved_numbered_parameter.txt b/test/prism/errors/cannot_assign_to_a_reserved_numbered_parameter.txt
new file mode 100644
index 0000000000..750915fb1f
--- /dev/null
+++ b/test/prism/errors/cannot_assign_to_a_reserved_numbered_parameter.txt
@@ -0,0 +1,14 @@
+begin
+ _1=:a;_2=:a;_3=:a;_4=:a;_5=:a
+ ^~ _1 is reserved for numbered parameters
+ ^~ _2 is reserved for numbered parameters
+ ^~ _3 is reserved for numbered parameters
+ ^~ _4 is reserved for numbered parameters
+ ^~ _5 is reserved for numbered parameters
+ _6=:a;_7=:a;_8=:a;_9=:a;_10=:a
+ ^~ _6 is reserved for numbered parameters
+ ^~ _7 is reserved for numbered parameters
+ ^~ _8 is reserved for numbered parameters
+ ^~ _9 is reserved for numbered parameters
+end
+
diff --git a/test/prism/errors/case_without_clauses.txt b/test/prism/errors/case_without_clauses.txt
new file mode 100644
index 0000000000..3bbbfdd97f
--- /dev/null
+++ b/test/prism/errors/case_without_clauses.txt
@@ -0,0 +1,4 @@
+case :a
+^~~~ expected a `when` or `in` clause after `case`
+end
+
diff --git a/test/prism/errors/case_without_when_clauses_errors_on_else_clause.txt b/test/prism/errors/case_without_when_clauses_errors_on_else_clause.txt
new file mode 100644
index 0000000000..c5a1179fb9
--- /dev/null
+++ b/test/prism/errors/case_without_when_clauses_errors_on_else_clause.txt
@@ -0,0 +1,5 @@
+case :a
+^~~~ expected a `when` or `in` clause after `case`
+else
+end
+
diff --git a/test/prism/errors/check_value_expression.txt b/test/prism/errors/check_value_expression.txt
new file mode 100644
index 0000000000..33a472d94c
--- /dev/null
+++ b/test/prism/errors/check_value_expression.txt
@@ -0,0 +1,20 @@
+1 => ^(return)
+ ^~~~~~ unexpected void value expression
+while true
+ 1 => ^(break)
+ ^~~~~ unexpected void value expression
+ 1 => ^(next)
+ ^~~~ unexpected void value expression
+ 1 => ^(redo)
+ ^~~~ unexpected void value expression
+ 1 => ^(retry)
+ ^~~~~ Invalid retry without rescue
+ ^~~~~ unexpected void value expression
+ 1 => ^(2 => a)
+ ^~~~~~ unexpected void value expression
+end
+1 => ^(if 1; (return) else (return) end)
+ ^~~~~~ unexpected void value expression
+1 => ^(unless 1; (return) else (return) end)
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/class_definition_in_method_body.txt b/test/prism/errors/class_definition_in_method_body.txt
new file mode 100644
index 0000000000..fcdc5746ee
--- /dev/null
+++ b/test/prism/errors/class_definition_in_method_body.txt
@@ -0,0 +1,3 @@
+def foo;class A;end;end
+ ^~~~~ unexpected class definition in method body
+
diff --git a/test/prism/errors/class_definition_in_method_defs.txt b/test/prism/errors/class_definition_in_method_defs.txt
new file mode 100644
index 0000000000..23bee0b6fb
--- /dev/null
+++ b/test/prism/errors/class_definition_in_method_defs.txt
@@ -0,0 +1,7 @@
+def foo(bar = class A;end);end
+ ^~~~~ unexpected class definition in method body
+def foo;rescue;class A;end;end
+ ^~~~~ unexpected class definition in method body
+def foo;ensure;class A;end;end
+ ^~~~~ unexpected class definition in method body
+
diff --git a/test/prism/errors/class_name.txt b/test/prism/errors/class_name.txt
new file mode 100644
index 0000000000..8b75896ddb
--- /dev/null
+++ b/test/prism/errors/class_name.txt
@@ -0,0 +1,3 @@
+class 0.X end
+ ^~~ unexpected constant path after `class`; class/module name must be CONSTANT
+
diff --git a/test/prism/errors/command_call_in.txt b/test/prism/errors/command_call_in.txt
new file mode 100644
index 0000000000..a4357028c6
--- /dev/null
+++ b/test/prism/errors/command_call_in.txt
@@ -0,0 +1,7 @@
+foo 1 in a
+ ^ unexpected `in` keyword in arguments
+ ^ unexpected local variable or method, expecting end-of-input
+a = foo 2 in b
+ ^ unexpected `in` keyword in arguments
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls.txt b/test/prism/errors/command_calls.txt
new file mode 100644
index 0000000000..19812a1d0a
--- /dev/null
+++ b/test/prism/errors/command_calls.txt
@@ -0,0 +1,3 @@
+[a b]
+ ^ unexpected local variable or method; expected a `,` separator for the array elements
+
diff --git a/test/prism/errors/command_calls_10.txt b/test/prism/errors/command_calls_10.txt
new file mode 100644
index 0000000000..f4d9f0fabc
--- /dev/null
+++ b/test/prism/errors/command_calls_10.txt
@@ -0,0 +1,3 @@
++a b
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_11.txt b/test/prism/errors/command_calls_11.txt
new file mode 100644
index 0000000000..868476c0c3
--- /dev/null
+++ b/test/prism/errors/command_calls_11.txt
@@ -0,0 +1,3 @@
+a + b c
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_12.txt b/test/prism/errors/command_calls_12.txt
new file mode 100644
index 0000000000..50c9ae88e3
--- /dev/null
+++ b/test/prism/errors/command_calls_12.txt
@@ -0,0 +1,3 @@
+a && b c
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_13.txt b/test/prism/errors/command_calls_13.txt
new file mode 100644
index 0000000000..50dc4a84a0
--- /dev/null
+++ b/test/prism/errors/command_calls_13.txt
@@ -0,0 +1,3 @@
+a =~ b c
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_14.txt b/test/prism/errors/command_calls_14.txt
new file mode 100644
index 0000000000..1b16fd3245
--- /dev/null
+++ b/test/prism/errors/command_calls_14.txt
@@ -0,0 +1,3 @@
+a = b, c d
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_15.txt b/test/prism/errors/command_calls_15.txt
new file mode 100644
index 0000000000..d2409fd002
--- /dev/null
+++ b/test/prism/errors/command_calls_15.txt
@@ -0,0 +1,3 @@
+a = *b c
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_16.txt b/test/prism/errors/command_calls_16.txt
new file mode 100644
index 0000000000..ceb07dfe30
--- /dev/null
+++ b/test/prism/errors/command_calls_16.txt
@@ -0,0 +1,3 @@
+a, b = c = d f
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_17.txt b/test/prism/errors/command_calls_17.txt
new file mode 100644
index 0000000000..a78ac0985d
--- /dev/null
+++ b/test/prism/errors/command_calls_17.txt
@@ -0,0 +1,5 @@
+a ? b c : d e
+ ^ expected a `:` after the true expression of a ternary operator
+ ^ unexpected ':', expecting end-of-input
+ ^ unexpected ':', ignoring it
+
diff --git a/test/prism/errors/command_calls_18.txt b/test/prism/errors/command_calls_18.txt
new file mode 100644
index 0000000000..393e7e0ae6
--- /dev/null
+++ b/test/prism/errors/command_calls_18.txt
@@ -0,0 +1,3 @@
+defined? a b
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_19.txt b/test/prism/errors/command_calls_19.txt
new file mode 100644
index 0000000000..e045187f1e
--- /dev/null
+++ b/test/prism/errors/command_calls_19.txt
@@ -0,0 +1,3 @@
+! ! a b
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_2.txt b/test/prism/errors/command_calls_2.txt
new file mode 100644
index 0000000000..b0983c015b
--- /dev/null
+++ b/test/prism/errors/command_calls_2.txt
@@ -0,0 +1,6 @@
+{a: b c}
+ ^ expected a `}` to close the hash literal
+ ^ unexpected local variable or method, expecting end-of-input
+ ^ unexpected '}', expecting end-of-input
+ ^ unexpected '}', ignoring it
+
diff --git a/test/prism/errors/command_calls_20.txt b/test/prism/errors/command_calls_20.txt
new file mode 100644
index 0000000000..3058ebce96
--- /dev/null
+++ b/test/prism/errors/command_calls_20.txt
@@ -0,0 +1,3 @@
+def f a = b c; end
+ ^ expected a delimiter to close the parameters
+
diff --git a/test/prism/errors/command_calls_21.txt b/test/prism/errors/command_calls_21.txt
new file mode 100644
index 0000000000..73d8f83539
--- /dev/null
+++ b/test/prism/errors/command_calls_21.txt
@@ -0,0 +1,5 @@
+def f(a = b c); end
+ ^ unexpected local variable or method; expected a `)` to close the parameters
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/command_calls_22.txt b/test/prism/errors/command_calls_22.txt
new file mode 100644
index 0000000000..5a234e04e8
--- /dev/null
+++ b/test/prism/errors/command_calls_22.txt
@@ -0,0 +1,3 @@
+a = b rescue c d
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_23.txt b/test/prism/errors/command_calls_23.txt
new file mode 100644
index 0000000000..db85589ffd
--- /dev/null
+++ b/test/prism/errors/command_calls_23.txt
@@ -0,0 +1,3 @@
+def a = b rescue c d
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_24.txt b/test/prism/errors/command_calls_24.txt
new file mode 100644
index 0000000000..3046b36dc1
--- /dev/null
+++ b/test/prism/errors/command_calls_24.txt
@@ -0,0 +1,5 @@
+->a=b c{}
+ ^ expected a `do` keyword or a `{` to open the lambda block
+ ^ unexpected end-of-input, assuming it is closing the parent top level context
+ ^ expected a lambda block beginning with `do` to end with `end`
+
diff --git a/test/prism/errors/command_calls_25.txt b/test/prism/errors/command_calls_25.txt
new file mode 100644
index 0000000000..5fddd90fdd
--- /dev/null
+++ b/test/prism/errors/command_calls_25.txt
@@ -0,0 +1,8 @@
+->(a=b c){}
+ ^ expected a matching `)`
+ ^ expected a `do` keyword or a `{` to open the lambda block
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+ ^ unexpected end-of-input, assuming it is closing the parent top level context
+ ^ expected a lambda block beginning with `do` to end with `end`
+
diff --git a/test/prism/errors/command_calls_26.txt b/test/prism/errors/command_calls_26.txt
new file mode 100644
index 0000000000..29ed4cb903
--- /dev/null
+++ b/test/prism/errors/command_calls_26.txt
@@ -0,0 +1,3 @@
+case; when a b; end
+ ^ expected a delimiter after the predicates of a `when` clause
+
diff --git a/test/prism/errors/command_calls_27.txt b/test/prism/errors/command_calls_27.txt
new file mode 100644
index 0000000000..8d1c3ee077
--- /dev/null
+++ b/test/prism/errors/command_calls_27.txt
@@ -0,0 +1,3 @@
+case; in a if a b; end
+^~~~ expected a predicate for a case matching statement
+
diff --git a/test/prism/errors/command_calls_28.txt b/test/prism/errors/command_calls_28.txt
new file mode 100644
index 0000000000..4bfe88d67b
--- /dev/null
+++ b/test/prism/errors/command_calls_28.txt
@@ -0,0 +1,3 @@
+case; in a unless a b; end
+^~~~ expected a predicate for a case matching statement
+
diff --git a/test/prism/errors/command_calls_29.txt b/test/prism/errors/command_calls_29.txt
new file mode 100644
index 0000000000..eae012ab44
--- /dev/null
+++ b/test/prism/errors/command_calls_29.txt
@@ -0,0 +1,3 @@
+begin; rescue a b; end
+ ^ expected a closing delimiter for the `rescue` clause
+
diff --git a/test/prism/errors/command_calls_3.txt b/test/prism/errors/command_calls_3.txt
new file mode 100644
index 0000000000..77af72b904
--- /dev/null
+++ b/test/prism/errors/command_calls_3.txt
@@ -0,0 +1,3 @@
+...a b
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_30.txt b/test/prism/errors/command_calls_30.txt
new file mode 100644
index 0000000000..48e35685cb
--- /dev/null
+++ b/test/prism/errors/command_calls_30.txt
@@ -0,0 +1,3 @@
+begin; rescue a b => c; end
+ ^ expected a closing delimiter for the `rescue` clause
+
diff --git a/test/prism/errors/command_calls_4.txt b/test/prism/errors/command_calls_4.txt
new file mode 100644
index 0000000000..4be14e57e4
--- /dev/null
+++ b/test/prism/errors/command_calls_4.txt
@@ -0,0 +1,3 @@
+if ...a b; end
+ ^ expected `then` or `;` or '\n'
+
diff --git a/test/prism/errors/command_calls_5.txt b/test/prism/errors/command_calls_5.txt
new file mode 100644
index 0000000000..799a6c1136
--- /dev/null
+++ b/test/prism/errors/command_calls_5.txt
@@ -0,0 +1,3 @@
+a b, c d
+ ^ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/command_calls_6.txt b/test/prism/errors/command_calls_6.txt
new file mode 100644
index 0000000000..6f09d36e94
--- /dev/null
+++ b/test/prism/errors/command_calls_6.txt
@@ -0,0 +1,6 @@
+a(b, c d)
+ ^ unexpected local variable or method; expected a `)` to close the arguments
+ ^ unexpected local variable or method, expecting end-of-input
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/command_calls_7.txt b/test/prism/errors/command_calls_7.txt
new file mode 100644
index 0000000000..b5d74209fa
--- /dev/null
+++ b/test/prism/errors/command_calls_7.txt
@@ -0,0 +1,6 @@
+a(*b c)
+ ^ unexpected local variable or method; expected a `)` to close the arguments
+ ^ unexpected local variable or method, expecting end-of-input
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/command_calls_8.txt b/test/prism/errors/command_calls_8.txt
new file mode 100644
index 0000000000..e574063e72
--- /dev/null
+++ b/test/prism/errors/command_calls_8.txt
@@ -0,0 +1,6 @@
+a(**b c)
+ ^ unexpected local variable or method; expected a `)` to close the arguments
+ ^ unexpected local variable or method, expecting end-of-input
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/command_calls_9.txt b/test/prism/errors/command_calls_9.txt
new file mode 100644
index 0000000000..69515d959c
--- /dev/null
+++ b/test/prism/errors/command_calls_9.txt
@@ -0,0 +1,6 @@
+a(&b c)
+ ^ unexpected local variable or method; expected a `)` to close the arguments
+ ^ unexpected local variable or method, expecting end-of-input
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/conditional_predicate_closed.txt b/test/prism/errors/conditional_predicate_closed.txt
new file mode 100644
index 0000000000..6655fd2b1c
--- /dev/null
+++ b/test/prism/errors/conditional_predicate_closed.txt
@@ -0,0 +1,6 @@
+if 0 0; elsif 0 0; end
+ ^ expected `then` or `;` or '\n'
+ ^ expected `then` or `;` or '\n'
+unless 0 0; end
+ ^ expected `then` or `;` or '\n'
+
diff --git a/test/prism/errors/constant_assignment_in_method.txt b/test/prism/errors/constant_assignment_in_method.txt
new file mode 100644
index 0000000000..1ee49bffe6
--- /dev/null
+++ b/test/prism/errors/constant_assignment_in_method.txt
@@ -0,0 +1,3 @@
+def foo();A=1;end
+ ^~~ dynamic constant assignment
+
diff --git a/test/prism/errors/constant_path_with_invalid_token_after.txt b/test/prism/errors/constant_path_with_invalid_token_after.txt
new file mode 100644
index 0000000000..acb6dba30a
--- /dev/null
+++ b/test/prism/errors/constant_path_with_invalid_token_after.txt
@@ -0,0 +1,4 @@
+A::$b
+ ^ expected a constant after the `::` operator
+ ^~ unexpected global variable, expecting end-of-input
+
diff --git a/test/prism/errors/content_after_unterminated_heredoc.txt b/test/prism/errors/content_after_unterminated_heredoc.txt
new file mode 100644
index 0000000000..c0446a8c39
--- /dev/null
+++ b/test/prism/errors/content_after_unterminated_heredoc.txt
@@ -0,0 +1,4 @@
+<<~FOO.foo
+ ^~~ unterminated heredoc; can't find string "FOO" anywhere before EOF
+ ^~~ unterminated heredoc; can't find string "FOO" anywhere before EOF
+
diff --git a/test/prism/errors/cr_without_lf_in_percent_expression.txt b/test/prism/errors/cr_without_lf_in_percent_expression.txt
new file mode 100644
index 0000000000..903f8b4b4a
--- /dev/null
+++ b/test/prism/errors/cr_without_lf_in_percent_expression.txt
@@ -0,0 +1,3 @@
+%
+ ^ unterminated string meets end of file
+
diff --git a/test/prism/errors/def_with_empty_expression_receiver.txt b/test/prism/errors/def_with_empty_expression_receiver.txt
new file mode 100644
index 0000000000..153fe8a1c6
--- /dev/null
+++ b/test/prism/errors/def_with_empty_expression_receiver.txt
@@ -0,0 +1,3 @@
+def ().a; end
+ ^ expected a receiver for the method definition
+
diff --git a/test/prism/errors/def_with_expression_receiver_and_no_identifier.txt b/test/prism/errors/def_with_expression_receiver_and_no_identifier.txt
new file mode 100644
index 0000000000..1aefc07f1a
--- /dev/null
+++ b/test/prism/errors/def_with_expression_receiver_and_no_identifier.txt
@@ -0,0 +1,4 @@
+def (a); end
+ ^ expected a `.` or `::` after the receiver in a method definition
+ ^ unexpected ';'; expected a method name
+
diff --git a/test/prism/errors/def_with_multiple_statements_receiver.txt b/test/prism/errors/def_with_multiple_statements_receiver.txt
new file mode 100644
index 0000000000..80c9d4c190
--- /dev/null
+++ b/test/prism/errors/def_with_multiple_statements_receiver.txt
@@ -0,0 +1,10 @@
+def (
+a
+b
+^ expected a matching `)`
+^ expected a `.` or `::` after the receiver in a method definition
+ ^ expected a delimiter to close the parameters
+).c; end
+^ unexpected ')', ignoring it
+ ^ unexpected '.', ignoring it
+
diff --git a/test/prism/errors/defining_numbered_parameter.txt b/test/prism/errors/defining_numbered_parameter.txt
new file mode 100644
index 0000000000..2bf05d9563
--- /dev/null
+++ b/test/prism/errors/defining_numbered_parameter.txt
@@ -0,0 +1,3 @@
+def _1; end
+ ^~ _1 is reserved for numbered parameters
+
diff --git a/test/prism/errors/defining_numbered_parameter_2.txt b/test/prism/errors/defining_numbered_parameter_2.txt
new file mode 100644
index 0000000000..dc4739b126
--- /dev/null
+++ b/test/prism/errors/defining_numbered_parameter_2.txt
@@ -0,0 +1,3 @@
+def self._1; end
+ ^~ _1 is reserved for numbered parameters
+
diff --git a/test/prism/errors/do_not_allow_characters_other_than_0_9_a_f_and_A_F_in_u_Unicode_character_notation.txt b/test/prism/errors/do_not_allow_characters_other_than_0_9_a_f_and_A_F_in_u_Unicode_character_notation.txt
new file mode 100644
index 0000000000..953b9589d1
--- /dev/null
+++ b/test/prism/errors/do_not_allow_characters_other_than_0_9_a_f_and_A_F_in_u_Unicode_character_notation.txt
@@ -0,0 +1,4 @@
+"\u{000z}"
+ ^ invalid Unicode escape sequence
+ ^ unterminated Unicode escape
+
diff --git a/test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt b/test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt
new file mode 100644
index 0000000000..df49557617
--- /dev/null
+++ b/test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt
@@ -0,0 +1,3 @@
+a {|...|}
+ ^~~ unexpected ... when the parent method is not forwarding
+
diff --git a/test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt b/test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt
new file mode 100644
index 0000000000..c2405a5c66
--- /dev/null
+++ b/test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt
@@ -0,0 +1,3 @@
+->(...) {}
+ ^~~ unexpected ... when the parent method is not forwarding
+
diff --git a/test/prism/errors/do_not_allow_more_than_6_hexadecimal_digits_in_u_Unicode_character_notation.txt b/test/prism/errors/do_not_allow_more_than_6_hexadecimal_digits_in_u_Unicode_character_notation.txt
new file mode 100644
index 0000000000..50795c9353
--- /dev/null
+++ b/test/prism/errors/do_not_allow_more_than_6_hexadecimal_digits_in_u_Unicode_character_notation.txt
@@ -0,0 +1,3 @@
+"\u{0000001}"
+ ^~~~~~~ invalid Unicode escape sequence; maximum length is 6 digits
+
diff --git a/test/prism/errors/do_not_allow_multiple_codepoints_in_a_single_character_literal.txt b/test/prism/errors/do_not_allow_multiple_codepoints_in_a_single_character_literal.txt
new file mode 100644
index 0000000000..1a93dc6c69
--- /dev/null
+++ b/test/prism/errors/do_not_allow_multiple_codepoints_in_a_single_character_literal.txt
@@ -0,0 +1,3 @@
+?\u{0001 0002}
+ ^~~ invalid Unicode escape sequence; Multiple codepoints at single character literal are disallowed
+
diff --git a/test/prism/errors/do_not_allow_trailing_commas_in_lambda_parameters.txt b/test/prism/errors/do_not_allow_trailing_commas_in_lambda_parameters.txt
new file mode 100644
index 0000000000..11f23f0345
--- /dev/null
+++ b/test/prism/errors/do_not_allow_trailing_commas_in_lambda_parameters.txt
@@ -0,0 +1,3 @@
+-> (a, b, ) {}
+ ^ unexpected `,` in parameters
+
diff --git a/test/prism/errors/do_not_allow_trailing_commas_in_method_parameters.txt b/test/prism/errors/do_not_allow_trailing_commas_in_method_parameters.txt
new file mode 100644
index 0000000000..c0fec0c704
--- /dev/null
+++ b/test/prism/errors/do_not_allow_trailing_commas_in_method_parameters.txt
@@ -0,0 +1,3 @@
+def foo(a,b,c,);end
+ ^ unexpected `,` in parameters
+
diff --git a/test/prism/errors/dont_allow_return_inside_class_body.txt b/test/prism/errors/dont_allow_return_inside_class_body.txt
new file mode 100644
index 0000000000..286eba2103
--- /dev/null
+++ b/test/prism/errors/dont_allow_return_inside_class_body.txt
@@ -0,0 +1,3 @@
+class A; return; end
+ ^~~~~~ Invalid return in class/module body
+
diff --git a/test/prism/errors/dont_allow_return_inside_module_body.txt b/test/prism/errors/dont_allow_return_inside_module_body.txt
new file mode 100644
index 0000000000..85dd619a93
--- /dev/null
+++ b/test/prism/errors/dont_allow_return_inside_module_body.txt
@@ -0,0 +1,3 @@
+module A; return; end
+ ^~~~~~ Invalid return in class/module body
+
diff --git a/test/prism/errors/dont_allow_return_inside_sclass_body.txt b/test/prism/errors/dont_allow_return_inside_sclass_body.txt
new file mode 100644
index 0000000000..c29fe01728
--- /dev/null
+++ b/test/prism/errors/dont_allow_return_inside_sclass_body.txt
@@ -0,0 +1,3 @@
+class << A; return; end
+ ^~~~~~ Invalid return in class/module body
+
diff --git a/test/prism/errors/dont_allow_setting_to_back_and_nth_reference.txt b/test/prism/errors/dont_allow_setting_to_back_and_nth_reference.txt
new file mode 100644
index 0000000000..71b5b94589
--- /dev/null
+++ b/test/prism/errors/dont_allow_setting_to_back_and_nth_reference.txt
@@ -0,0 +1,7 @@
+begin
+$+ = nil
+^~ Can't set variable $+
+$1466 = nil
+^~~~~ Can't set variable $1466
+end
+
diff --git a/test/prism/errors/double_arguments_forwarding.txt b/test/prism/errors/double_arguments_forwarding.txt
new file mode 100644
index 0000000000..29c78f8c80
--- /dev/null
+++ b/test/prism/errors/double_arguments_forwarding.txt
@@ -0,0 +1,4 @@
+def foo(..., ...)
+ ^~~ unexpected parameter order
+end
+
diff --git a/test/prism/errors/double_scope_numbered_parameters.txt b/test/prism/errors/double_scope_numbered_parameters.txt
new file mode 100644
index 0000000000..0bb9df4ede
--- /dev/null
+++ b/test/prism/errors/double_scope_numbered_parameters.txt
@@ -0,0 +1,3 @@
+-> { _1 + -> { _2 } }
+ ^~ numbered parameter is already used in outer block
+
diff --git a/test/prism/errors/double_splat_followed_by_splat_argument.txt b/test/prism/errors/double_splat_followed_by_splat_argument.txt
new file mode 100644
index 0000000000..b2aec1167e
--- /dev/null
+++ b/test/prism/errors/double_splat_followed_by_splat_argument.txt
@@ -0,0 +1,3 @@
+a(**kwargs, *args)
+ ^~~~~ unexpected `*` splat argument after a `**` keyword splat argument
+
diff --git a/test/prism/errors/duplicate_pattern_capture.txt b/test/prism/errors/duplicate_pattern_capture.txt
new file mode 100644
index 0000000000..4b48fd3118
--- /dev/null
+++ b/test/prism/errors/duplicate_pattern_capture.txt
@@ -0,0 +1,17 @@
+case (); in [a, a]; end
+ ^ duplicated variable name
+case (); in [a, *a]; end
+ ^ duplicated variable name
+case (); in {a: a, b: a}; end
+ ^ duplicated variable name
+case (); in {a: a, **a}; end
+ ^ duplicated variable name
+case (); in [a, {a:}]; end
+ ^ duplicated variable name
+case (); in [a, {a: {a: {a: [a]}}}]; end
+ ^ duplicated variable name
+case (); in a => a; end
+ ^ duplicated variable name
+case (); in [A => a, {a: b => a}]; end
+ ^ duplicated variable name
+
diff --git a/test/prism/errors/duplicate_pattern_hash_key.txt b/test/prism/errors/duplicate_pattern_hash_key.txt
new file mode 100644
index 0000000000..201b51234f
--- /dev/null
+++ b/test/prism/errors/duplicate_pattern_hash_key.txt
@@ -0,0 +1,4 @@
+case (); in {a:, a:}; end
+ ^~ duplicated key name
+ ^ duplicated variable name
+
diff --git a/test/prism/errors/duplicate_pattern_hash_key_2.txt b/test/prism/errors/duplicate_pattern_hash_key_2.txt
new file mode 100644
index 0000000000..66756c454a
--- /dev/null
+++ b/test/prism/errors/duplicate_pattern_hash_key_2.txt
@@ -0,0 +1,3 @@
+case (); in {a:1, a:2}; end
+ ^~ duplicated key name
+
diff --git a/test/prism/errors/duplicated_parameter_names.txt b/test/prism/errors/duplicated_parameter_names.txt
new file mode 100644
index 0000000000..7b82685ca3
--- /dev/null
+++ b/test/prism/errors/duplicated_parameter_names.txt
@@ -0,0 +1,3 @@
+def foo(a,b,a);end
+ ^ duplicated argument name
+
diff --git a/test/prism/errors/duplicated_parameter_names_2.txt b/test/prism/errors/duplicated_parameter_names_2.txt
new file mode 100644
index 0000000000..8396993d56
--- /dev/null
+++ b/test/prism/errors/duplicated_parameter_names_2.txt
@@ -0,0 +1,3 @@
+def foo(a,b,*a);end
+ ^ duplicated argument name
+
diff --git a/test/prism/errors/duplicated_parameter_names_3.txt b/test/prism/errors/duplicated_parameter_names_3.txt
new file mode 100644
index 0000000000..437a6623c3
--- /dev/null
+++ b/test/prism/errors/duplicated_parameter_names_3.txt
@@ -0,0 +1,3 @@
+def foo(a,b,**a);end
+ ^ duplicated argument name
+
diff --git a/test/prism/errors/duplicated_parameter_names_4.txt b/test/prism/errors/duplicated_parameter_names_4.txt
new file mode 100644
index 0000000000..a420dd8a69
--- /dev/null
+++ b/test/prism/errors/duplicated_parameter_names_4.txt
@@ -0,0 +1,3 @@
+def foo(a,b,&a);end
+ ^ duplicated argument name
+
diff --git a/test/prism/errors/duplicated_parameter_names_5.txt b/test/prism/errors/duplicated_parameter_names_5.txt
new file mode 100644
index 0000000000..694d3a668c
--- /dev/null
+++ b/test/prism/errors/duplicated_parameter_names_5.txt
@@ -0,0 +1,3 @@
+def foo(a = 1,b,*c);end
+ ^ unexpected parameter `*`
+
diff --git a/test/prism/errors/ellipsis_in_no_paren_call.txt b/test/prism/errors/ellipsis_in_no_paren_call.txt
new file mode 100644
index 0000000000..87a847d192
--- /dev/null
+++ b/test/prism/errors/ellipsis_in_no_paren_call.txt
@@ -0,0 +1,3 @@
+def foo(...); foo 1, ...; end
+ ^~~ unexpected `...` in an non-parenthesized call
+
diff --git a/test/prism/errors/for_loops_index_missing.txt b/test/prism/errors/for_loops_index_missing.txt
new file mode 100644
index 0000000000..a57c22b044
--- /dev/null
+++ b/test/prism/errors/for_loops_index_missing.txt
@@ -0,0 +1,5 @@
+for in 1..10
+^~~ expected an index after `for`
+i
+end
+
diff --git a/test/prism/errors/for_loops_only_end.txt b/test/prism/errors/for_loops_only_end.txt
new file mode 100644
index 0000000000..94cc5270b5
--- /dev/null
+++ b/test/prism/errors/for_loops_only_end.txt
@@ -0,0 +1,5 @@
+for end
+^~~ expected an index after `for`
+ ^ expected an `in` after the index in a `for` statement
+ ^ expected a collection after the `in` in a `for` statement
+
diff --git a/test/prism/errors/forwarding_arg_after_keyword_rest.txt b/test/prism/errors/forwarding_arg_after_keyword_rest.txt
new file mode 100644
index 0000000000..86fe4aad93
--- /dev/null
+++ b/test/prism/errors/forwarding_arg_after_keyword_rest.txt
@@ -0,0 +1,3 @@
+def f(**,...);end
+ ^~~ unexpected parameter order
+
diff --git a/test/prism/errors/forwarding_arg_and_block.txt b/test/prism/errors/forwarding_arg_and_block.txt
new file mode 100644
index 0000000000..65c75a5d7c
--- /dev/null
+++ b/test/prism/errors/forwarding_arg_and_block.txt
@@ -0,0 +1,3 @@
+def foo(...) = foo(...) { }
+ ^~~ both block arg and actual block given; only one block is allowed
+
diff --git a/test/prism/errors/incomplete_instance_var_string.txt b/test/prism/errors/incomplete_instance_var_string.txt
new file mode 100644
index 0000000000..b28947fc0e
--- /dev/null
+++ b/test/prism/errors/incomplete_instance_var_string.txt
@@ -0,0 +1,4 @@
+%@#@@#
+ ^ '@' without identifiers is not allowed as an instance variable name
+ ^ unexpected instance variable, expecting end-of-input
+
diff --git a/test/prism/errors/index_call_with_block_and_write.txt b/test/prism/errors/index_call_with_block_and_write.txt
new file mode 100644
index 0000000000..3d92fbfea7
--- /dev/null
+++ b/test/prism/errors/index_call_with_block_and_write.txt
@@ -0,0 +1,5 @@
+foo[1] {} &&= 1
+^~~~~~~~~ unexpected write target
+ ^~~ unexpected operator after a call with arguments
+ ^~~ unexpected operator after a call with a block
+
diff --git a/test/prism/errors/index_call_with_block_operator_write.txt b/test/prism/errors/index_call_with_block_operator_write.txt
new file mode 100644
index 0000000000..96c413cd39
--- /dev/null
+++ b/test/prism/errors/index_call_with_block_operator_write.txt
@@ -0,0 +1,5 @@
+foo[1] {} += 1
+^~~~~~~~~ unexpected write target
+ ^~ unexpected operator after a call with arguments
+ ^~ unexpected operator after a call with a block
+
diff --git a/test/prism/errors/index_call_with_block_or_write.txt b/test/prism/errors/index_call_with_block_or_write.txt
new file mode 100644
index 0000000000..2d250fba06
--- /dev/null
+++ b/test/prism/errors/index_call_with_block_or_write.txt
@@ -0,0 +1,5 @@
+foo[1] {} ||= 1
+^~~~~~~~~ unexpected write target
+ ^~~ unexpected operator after a call with arguments
+ ^~~ unexpected operator after a call with a block
+
diff --git a/test/prism/errors/interpolated_regular_expression_with_unknown_regexp_options.txt b/test/prism/errors/interpolated_regular_expression_with_unknown_regexp_options.txt
new file mode 100644
index 0000000000..8e78753b1c
--- /dev/null
+++ b/test/prism/errors/interpolated_regular_expression_with_unknown_regexp_options.txt
@@ -0,0 +1,3 @@
+/#{foo}/AZaz
+ ^~~~~ unknown regexp options - AZaz
+
diff --git a/test/prism/errors/invalid_global_variable_write.txt b/test/prism/errors/invalid_global_variable_write.txt
new file mode 100644
index 0000000000..9d9018bcf1
--- /dev/null
+++ b/test/prism/errors/invalid_global_variable_write.txt
@@ -0,0 +1,4 @@
+$',
+^~ Can't set variable $'
+^~ unexpected write target
+
diff --git a/test/prism/errors/invalid_hex_escape.txt b/test/prism/errors/invalid_hex_escape.txt
new file mode 100644
index 0000000000..4fb847f6d2
--- /dev/null
+++ b/test/prism/errors/invalid_hex_escape.txt
@@ -0,0 +1,3 @@
+"\xx"
+ ^~ invalid hex escape sequence
+
diff --git a/test/prism/errors/invalid_multi_target.txt b/test/prism/errors/invalid_multi_target.txt
new file mode 100644
index 0000000000..9756278b0c
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target.txt
@@ -0,0 +1,3 @@
+foo,
+^~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_10.txt b/test/prism/errors/invalid_multi_target_10.txt
new file mode 100644
index 0000000000..0e87b67d36
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_10.txt
@@ -0,0 +1,3 @@
+Foo,
+^~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_11.txt b/test/prism/errors/invalid_multi_target_11.txt
new file mode 100644
index 0000000000..8185cde79e
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_11.txt
@@ -0,0 +1,3 @@
+::Foo,
+^~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_12.txt b/test/prism/errors/invalid_multi_target_12.txt
new file mode 100644
index 0000000000..f511a8a76f
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_12.txt
@@ -0,0 +1,3 @@
+Foo::Foo,
+^~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_13.txt b/test/prism/errors/invalid_multi_target_13.txt
new file mode 100644
index 0000000000..7c9a3fb4e1
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_13.txt
@@ -0,0 +1,3 @@
+Foo::foo,
+^~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_14.txt b/test/prism/errors/invalid_multi_target_14.txt
new file mode 100644
index 0000000000..88dc08de92
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_14.txt
@@ -0,0 +1,3 @@
+foo[foo],
+^~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_15.txt b/test/prism/errors/invalid_multi_target_15.txt
new file mode 100644
index 0000000000..c140833467
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_15.txt
@@ -0,0 +1,3 @@
+(foo, bar)
+^~~~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_16.txt b/test/prism/errors/invalid_multi_target_16.txt
new file mode 100644
index 0000000000..20ea56331f
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_16.txt
@@ -0,0 +1,3 @@
+foo((foo, bar))
+ ^~~~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_17.txt b/test/prism/errors/invalid_multi_target_17.txt
new file mode 100644
index 0000000000..da1ced0c59
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_17.txt
@@ -0,0 +1,3 @@
+foo((*))
+ ^~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_18.txt b/test/prism/errors/invalid_multi_target_18.txt
new file mode 100644
index 0000000000..2beed193b4
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_18.txt
@@ -0,0 +1,3 @@
+foo(((foo, bar), *))
+ ^~~~~~~~~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_19.txt b/test/prism/errors/invalid_multi_target_19.txt
new file mode 100644
index 0000000000..b5e3e6999a
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_19.txt
@@ -0,0 +1,3 @@
+(foo, bar) + 1
+^~~~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_2.txt b/test/prism/errors/invalid_multi_target_2.txt
new file mode 100644
index 0000000000..68a7bbc305
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_2.txt
@@ -0,0 +1,3 @@
+foo = 1; foo,
+ ^~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_20.txt b/test/prism/errors/invalid_multi_target_20.txt
new file mode 100644
index 0000000000..e800bcf204
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_20.txt
@@ -0,0 +1,3 @@
+(foo, bar) in baz
+^~~~~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_3.txt b/test/prism/errors/invalid_multi_target_3.txt
new file mode 100644
index 0000000000..51e6207603
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_3.txt
@@ -0,0 +1,3 @@
+foo.bar,
+^~~~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_4.txt b/test/prism/errors/invalid_multi_target_4.txt
new file mode 100644
index 0000000000..f4c3599ffe
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_4.txt
@@ -0,0 +1,3 @@
+*foo,
+^~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_5.txt b/test/prism/errors/invalid_multi_target_5.txt
new file mode 100644
index 0000000000..5d143a3f5d
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_5.txt
@@ -0,0 +1,3 @@
+@foo,
+^~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_6.txt b/test/prism/errors/invalid_multi_target_6.txt
new file mode 100644
index 0000000000..6d15893f57
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_6.txt
@@ -0,0 +1,3 @@
+@@foo,
+^~~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_7.txt b/test/prism/errors/invalid_multi_target_7.txt
new file mode 100644
index 0000000000..451f9f0a00
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_7.txt
@@ -0,0 +1,3 @@
+$foo,
+^~~~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_8.txt b/test/prism/errors/invalid_multi_target_8.txt
new file mode 100644
index 0000000000..fdbe272f9a
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_8.txt
@@ -0,0 +1,4 @@
+$1,
+^~ Can't set variable $1
+^~ unexpected write target
+
diff --git a/test/prism/errors/invalid_multi_target_9.txt b/test/prism/errors/invalid_multi_target_9.txt
new file mode 100644
index 0000000000..038f355c5d
--- /dev/null
+++ b/test/prism/errors/invalid_multi_target_9.txt
@@ -0,0 +1,4 @@
+$+,
+^~ Can't set variable $+
+^~ unexpected write target
+
diff --git a/test/prism/errors/invalid_number_underscores.txt b/test/prism/errors/invalid_number_underscores.txt
new file mode 100644
index 0000000000..8fc79ed7a2
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores.txt
@@ -0,0 +1,3 @@
+1__1
+ ^ invalid underscore placement in number
+
diff --git a/test/prism/errors/invalid_number_underscores_10.txt b/test/prism/errors/invalid_number_underscores_10.txt
new file mode 100644
index 0000000000..53b0cc0719
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_10.txt
@@ -0,0 +1,3 @@
+01_1_
+ ^ trailing '_' in number
+
diff --git a/test/prism/errors/invalid_number_underscores_11.txt b/test/prism/errors/invalid_number_underscores_11.txt
new file mode 100644
index 0000000000..469110f86f
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_11.txt
@@ -0,0 +1,3 @@
+0d1_1_
+ ^ trailing '_' in number
+
diff --git a/test/prism/errors/invalid_number_underscores_12.txt b/test/prism/errors/invalid_number_underscores_12.txt
new file mode 100644
index 0000000000..a9b63a4b6c
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_12.txt
@@ -0,0 +1,3 @@
+0x1_1_
+ ^ trailing '_' in number
+
diff --git a/test/prism/errors/invalid_number_underscores_2.txt b/test/prism/errors/invalid_number_underscores_2.txt
new file mode 100644
index 0000000000..2762e08790
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_2.txt
@@ -0,0 +1,3 @@
+0b1__1
+ ^ invalid underscore placement in number
+
diff --git a/test/prism/errors/invalid_number_underscores_3.txt b/test/prism/errors/invalid_number_underscores_3.txt
new file mode 100644
index 0000000000..23f1e0b10b
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_3.txt
@@ -0,0 +1,3 @@
+0o1__1
+ ^ invalid underscore placement in number
+
diff --git a/test/prism/errors/invalid_number_underscores_4.txt b/test/prism/errors/invalid_number_underscores_4.txt
new file mode 100644
index 0000000000..ced149752f
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_4.txt
@@ -0,0 +1,3 @@
+01__1
+ ^ invalid underscore placement in number
+
diff --git a/test/prism/errors/invalid_number_underscores_5.txt b/test/prism/errors/invalid_number_underscores_5.txt
new file mode 100644
index 0000000000..5e3f2bf682
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_5.txt
@@ -0,0 +1,3 @@
+0d1__1
+ ^ invalid underscore placement in number
+
diff --git a/test/prism/errors/invalid_number_underscores_6.txt b/test/prism/errors/invalid_number_underscores_6.txt
new file mode 100644
index 0000000000..225b654248
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_6.txt
@@ -0,0 +1,3 @@
+0x1__1
+ ^ invalid underscore placement in number
+
diff --git a/test/prism/errors/invalid_number_underscores_7.txt b/test/prism/errors/invalid_number_underscores_7.txt
new file mode 100644
index 0000000000..d953b4cbc4
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_7.txt
@@ -0,0 +1,3 @@
+1_1_
+ ^ trailing '_' in number
+
diff --git a/test/prism/errors/invalid_number_underscores_8.txt b/test/prism/errors/invalid_number_underscores_8.txt
new file mode 100644
index 0000000000..cbdcd95d8f
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_8.txt
@@ -0,0 +1,3 @@
+0b1_1_
+ ^ trailing '_' in number
+
diff --git a/test/prism/errors/invalid_number_underscores_9.txt b/test/prism/errors/invalid_number_underscores_9.txt
new file mode 100644
index 0000000000..173282ffb2
--- /dev/null
+++ b/test/prism/errors/invalid_number_underscores_9.txt
@@ -0,0 +1,3 @@
+0o1_1_
+ ^ trailing '_' in number
+
diff --git a/test/prism/errors/invalid_operator_write_dot.txt b/test/prism/errors/invalid_operator_write_dot.txt
new file mode 100644
index 0000000000..666817e60f
--- /dev/null
+++ b/test/prism/errors/invalid_operator_write_dot.txt
@@ -0,0 +1,3 @@
+foo.+= 1
+ ^ unexpected write target
+
diff --git a/test/prism/errors/invalid_operator_write_fcall.txt b/test/prism/errors/invalid_operator_write_fcall.txt
new file mode 100644
index 0000000000..2748bf3291
--- /dev/null
+++ b/test/prism/errors/invalid_operator_write_fcall.txt
@@ -0,0 +1,3 @@
+foo! += 1
+^~~~ unexpected write target
+
diff --git a/test/prism/errors/it_with_ordinary_parameter.txt b/test/prism/errors/it_with_ordinary_parameter.txt
new file mode 100644
index 0000000000..0fc34e9cc8
--- /dev/null
+++ b/test/prism/errors/it_with_ordinary_parameter.txt
@@ -0,0 +1,3 @@
+proc { || it }
+ ^~ `it` is not allowed when an ordinary parameter is defined
+
diff --git a/test/prism/errors/keywords_parameters_before_required_parameters.txt b/test/prism/errors/keywords_parameters_before_required_parameters.txt
new file mode 100644
index 0000000000..42d036e950
--- /dev/null
+++ b/test/prism/errors/keywords_parameters_before_required_parameters.txt
@@ -0,0 +1,4 @@
+def foo(b:, a)
+ ^ unexpected parameter order
+end
+
diff --git a/test/prism/errors/loop_conditional_is_closed.txt b/test/prism/errors/loop_conditional_is_closed.txt
new file mode 100644
index 0000000000..2be1353319
--- /dev/null
+++ b/test/prism/errors/loop_conditional_is_closed.txt
@@ -0,0 +1,4 @@
+while 0 0; foo; end; until 0 0; foo; end
+ ^ expected a predicate expression for the `while` statement
+ ^ expected a predicate expression for the `until` statement
+
diff --git a/test/prism/errors/match_plus.txt b/test/prism/errors/match_plus.txt
new file mode 100644
index 0000000000..5e349a96ad
--- /dev/null
+++ b/test/prism/errors/match_plus.txt
@@ -0,0 +1,7 @@
+a in b + c
+ ^ unexpected '+', expecting end-of-input
+ ^ unexpected '+', ignoring it
+a => b + c
+ ^ unexpected '+', expecting end-of-input
+ ^ unexpected '+', ignoring it
+
diff --git a/test/prism/errors/method_parameters_after_arguments_forwarding.txt b/test/prism/errors/method_parameters_after_arguments_forwarding.txt
new file mode 100644
index 0000000000..ec2aefda1d
--- /dev/null
+++ b/test/prism/errors/method_parameters_after_arguments_forwarding.txt
@@ -0,0 +1,4 @@
+def foo(..., a)
+ ^ unexpected parameter order
+end
+
diff --git a/test/prism/errors/method_parameters_after_block.txt b/test/prism/errors/method_parameters_after_block.txt
new file mode 100644
index 0000000000..6e2091d5d1
--- /dev/null
+++ b/test/prism/errors/method_parameters_after_block.txt
@@ -0,0 +1,4 @@
+def foo(&block, a)
+ ^ unexpected parameter order
+end
+
diff --git a/test/prism/errors/method_with_arguments_after_anonymous_block.txt b/test/prism/errors/method_with_arguments_after_anonymous_block.txt
new file mode 100644
index 0000000000..0d986b3c01
--- /dev/null
+++ b/test/prism/errors/method_with_arguments_after_anonymous_block.txt
@@ -0,0 +1,4 @@
+def foo(&, a)
+ ^ unexpected parameter order
+end
+
diff --git a/test/prism/errors/missing_terminator_in_parentheses.txt b/test/prism/errors/missing_terminator_in_parentheses.txt
new file mode 100644
index 0000000000..af4b698f0c
--- /dev/null
+++ b/test/prism/errors/missing_terminator_in_parentheses.txt
@@ -0,0 +1,3 @@
+(0 0)
+ ^ unexpected integer, expecting end-of-input
+
diff --git a/test/prism/errors/module_definition_in_method_body.txt b/test/prism/errors/module_definition_in_method_body.txt
new file mode 100644
index 0000000000..59900c96dd
--- /dev/null
+++ b/test/prism/errors/module_definition_in_method_body.txt
@@ -0,0 +1,3 @@
+def foo;module A;end;end
+ ^~~~~~ unexpected module definition in method body
+
diff --git a/test/prism/errors/module_definition_in_method_body_within_block.txt b/test/prism/errors/module_definition_in_method_body_within_block.txt
new file mode 100644
index 0000000000..204be35607
--- /dev/null
+++ b/test/prism/errors/module_definition_in_method_body_within_block.txt
@@ -0,0 +1,7 @@
+def foo
+ bar do
+ module Foo;end
+ ^~~~~~ unexpected module definition in method body
+ end
+end
+
diff --git a/test/prism/errors/module_definition_in_method_defs.txt b/test/prism/errors/module_definition_in_method_defs.txt
new file mode 100644
index 0000000000..c5a6a8a2e8
--- /dev/null
+++ b/test/prism/errors/module_definition_in_method_defs.txt
@@ -0,0 +1,7 @@
+def foo(bar = module A;end);end
+ ^~~~~~ unexpected module definition in method body
+def foo;rescue;module A;end;end
+ ^~~~~~ unexpected module definition in method body
+def foo;ensure;module A;end;end
+ ^~~~~~ unexpected module definition in method body
+
diff --git a/test/prism/errors/module_name_recoverable.txt b/test/prism/errors/module_name_recoverable.txt
new file mode 100644
index 0000000000..58a28a60c5
--- /dev/null
+++ b/test/prism/errors/module_name_recoverable.txt
@@ -0,0 +1,4 @@
+module Parent module end
+ ^~~~~~ unexpected constant path after `module`; class/module name must be CONSTANT
+ ^~~ unexpected 'end', assuming it is closing the parent module definition
+
diff --git a/test/prism/errors/multiple_error_in_parameters_order.txt b/test/prism/errors/multiple_error_in_parameters_order.txt
new file mode 100644
index 0000000000..5dae0a105a
--- /dev/null
+++ b/test/prism/errors/multiple_error_in_parameters_order.txt
@@ -0,0 +1,5 @@
+def foo(**args, a, b:)
+ ^ unexpected parameter order
+ ^~ unexpected parameter order
+end
+
diff --git a/test/prism/errors/next_1.txt b/test/prism/errors/next_1.txt
new file mode 100644
index 0000000000..b56b7f6ae6
--- /dev/null
+++ b/test/prism/errors/next_1.txt
@@ -0,0 +1,4 @@
+next 1,;
+ ^ expected an argument
+^~~~~~~ Invalid next
+
diff --git a/test/prism/errors/next_1_2_3.txt b/test/prism/errors/next_1_2_3.txt
new file mode 100644
index 0000000000..7abe577ab3
--- /dev/null
+++ b/test/prism/errors/next_1_2_3.txt
@@ -0,0 +1,8 @@
+next(1, 2, 3)
+ ^ unexpected ',', expecting end-of-input
+ ^ unexpected ',', ignoring it
+ ^ expected a matching `)`
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+^~~~~~~~~~~~ Invalid next
+
diff --git a/test/prism/errors/non_assoc_equality.txt b/test/prism/errors/non_assoc_equality.txt
new file mode 100644
index 0000000000..6ce8da88d6
--- /dev/null
+++ b/test/prism/errors/non_assoc_equality.txt
@@ -0,0 +1,19 @@
+1 == 2 == 3
+ ^~ unexpected '==', expecting end-of-input
+ ^~ unexpected '==', ignoring it
+1 != 2 != 3
+ ^~ unexpected '!=', expecting end-of-input
+ ^~ unexpected '!=', ignoring it
+1 === 2 === 3
+ ^~~ unexpected '===', expecting end-of-input
+ ^~~ unexpected '===', ignoring it
+1 =~ 2 =~ 3
+ ^~ unexpected '=~', expecting end-of-input
+ ^~ unexpected '=~', ignoring it
+1 !~ 2 !~ 3
+ ^~ unexpected '!~', expecting end-of-input
+ ^~ unexpected '!~', ignoring it
+1 <=> 2 <=> 3
+ ^~~ unexpected '<=>', expecting end-of-input
+ ^~~ unexpected '<=>', ignoring it
+
diff --git a/test/prism/errors/non_assoc_range.txt b/test/prism/errors/non_assoc_range.txt
new file mode 100644
index 0000000000..072cf6d3c6
--- /dev/null
+++ b/test/prism/errors/non_assoc_range.txt
@@ -0,0 +1,4 @@
+1....2
+ ^ unexpected '.', expecting end-of-input
+ ^ unexpected '.', ignoring it
+
diff --git a/test/prism/errors/numbered_parameters_in_block_arguments.txt b/test/prism/errors/numbered_parameters_in_block_arguments.txt
new file mode 100644
index 0000000000..d01999c53e
--- /dev/null
+++ b/test/prism/errors/numbered_parameters_in_block_arguments.txt
@@ -0,0 +1,3 @@
+foo { |_1| }
+ ^~ _1 is reserved for numbered parameters
+
diff --git a/test/prism/errors/optional_block_parameters_with_unary_operator.txt b/test/prism/errors/optional_block_parameters_with_unary_operator.txt
new file mode 100644
index 0000000000..fd45f12648
--- /dev/null
+++ b/test/prism/errors/optional_block_parameters_with_unary_operator.txt
@@ -0,0 +1,3 @@
+foo { |a = +b| }
+ ^ unexpected '+'; unary calls are not allowed in this context
+
diff --git a/test/prism/errors/optional_block_parameters_with_unary_operator_2.txt b/test/prism/errors/optional_block_parameters_with_unary_operator_2.txt
new file mode 100644
index 0000000000..ba98f36f84
--- /dev/null
+++ b/test/prism/errors/optional_block_parameters_with_unary_operator_2.txt
@@ -0,0 +1,3 @@
+foo { |a = -b| }
+ ^ unexpected '-'; unary calls are not allowed in this context
+
diff --git a/test/prism/errors/optional_block_parameters_with_unary_operator_3.txt b/test/prism/errors/optional_block_parameters_with_unary_operator_3.txt
new file mode 100644
index 0000000000..9770059891
--- /dev/null
+++ b/test/prism/errors/optional_block_parameters_with_unary_operator_3.txt
@@ -0,0 +1,3 @@
+foo { |a = !b| }
+ ^ unexpected '!'; unary calls are not allowed in this context
+
diff --git a/test/prism/errors/optional_block_parameters_with_unary_operator_4.txt b/test/prism/errors/optional_block_parameters_with_unary_operator_4.txt
new file mode 100644
index 0000000000..9bec68d7b3
--- /dev/null
+++ b/test/prism/errors/optional_block_parameters_with_unary_operator_4.txt
@@ -0,0 +1,3 @@
+foo { |a = ~b| }
+ ^ unexpected '~'; unary calls are not allowed in this context
+
diff --git a/test/prism/errors/parameter_name_ending_with_bang_or_question_mark.txt b/test/prism/errors/parameter_name_ending_with_bang_or_question_mark.txt
new file mode 100644
index 0000000000..db4fd6928a
--- /dev/null
+++ b/test/prism/errors/parameter_name_ending_with_bang_or_question_mark.txt
@@ -0,0 +1,4 @@
+def foo(x!,y?); end
+ ^~ unexpected name for a parameter
+ ^~ unexpected name for a parameter
+
diff --git a/test/prism/errors/pre_execution_context.txt b/test/prism/errors/pre_execution_context.txt
new file mode 100644
index 0000000000..18b11bae97
--- /dev/null
+++ b/test/prism/errors/pre_execution_context.txt
@@ -0,0 +1,4 @@
+BEGIN { 1 + }
+ ^ unexpected '}'; expected an expression after the operator
+ ^ unexpected '}', assuming it is closing the parent 'BEGIN' block
+
diff --git a/test/prism/errors/pre_execution_missing_brace.txt b/test/prism/errors/pre_execution_missing_brace.txt
new file mode 100644
index 0000000000..e51cd0732e
--- /dev/null
+++ b/test/prism/errors/pre_execution_missing_brace.txt
@@ -0,0 +1,3 @@
+BEGIN 1 }
+ ^ expected a `{` after `BEGIN`
+
diff --git a/test/prism/errors/range_and_bin_op.txt b/test/prism/errors/range_and_bin_op.txt
new file mode 100644
index 0000000000..4a7a396d0d
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op.txt
@@ -0,0 +1,4 @@
+1..2..3
+ ^~ unexpected .., expecting end-of-input
+ ^~ unexpected .., ignoring it
+
diff --git a/test/prism/errors/range_and_bin_op_2.txt b/test/prism/errors/range_and_bin_op_2.txt
new file mode 100644
index 0000000000..f2a31dcf82
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op_2.txt
@@ -0,0 +1,4 @@
+1..2..
+ ^~ unexpected .., expecting end-of-input
+ ^~ unexpected .., ignoring it
+
diff --git a/test/prism/errors/range_and_bin_op_3.txt b/test/prism/errors/range_and_bin_op_3.txt
new file mode 100644
index 0000000000..34390d0776
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op_3.txt
@@ -0,0 +1,3 @@
+1.. || 2
+ ^ unexpected '|'; expected an expression after the operator
+
diff --git a/test/prism/errors/range_and_bin_op_4.txt b/test/prism/errors/range_and_bin_op_4.txt
new file mode 100644
index 0000000000..56226480cf
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op_4.txt
@@ -0,0 +1,4 @@
+1.. & 2
+ ^ unexpected '&', expecting end-of-input
+ ^ unexpected '&', ignoring it
+
diff --git a/test/prism/errors/range_and_bin_op_5.txt b/test/prism/errors/range_and_bin_op_5.txt
new file mode 100644
index 0000000000..bc8b467914
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op_5.txt
@@ -0,0 +1,5 @@
+1.. * 2
+ ^ unexpected *, expecting end-of-input
+ ^ unexpected write target
+ ^~~ unexpected write target
+
diff --git a/test/prism/errors/range_and_bin_op_6.txt b/test/prism/errors/range_and_bin_op_6.txt
new file mode 100644
index 0000000000..5cdd7a4f44
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op_6.txt
@@ -0,0 +1,3 @@
+1.. / 2
+ ^ unterminated regexp meets end of file; expected a closing delimiter
+
diff --git a/test/prism/errors/range_and_bin_op_7.txt b/test/prism/errors/range_and_bin_op_7.txt
new file mode 100644
index 0000000000..3f91b5e97f
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op_7.txt
@@ -0,0 +1,3 @@
+1.. % 2
+ ^ unterminated string meets end of file
+
diff --git a/test/prism/errors/range_and_bin_op_8.txt b/test/prism/errors/range_and_bin_op_8.txt
new file mode 100644
index 0000000000..afbf3719d5
--- /dev/null
+++ b/test/prism/errors/range_and_bin_op_8.txt
@@ -0,0 +1,4 @@
+1.. ** 2
+ ^~ unexpected **, expecting end-of-input
+ ^~ unexpected **, ignoring it
+
diff --git a/test/prism/errors/rational_number_with_exponential_portion.txt b/test/prism/errors/rational_number_with_exponential_portion.txt
new file mode 100644
index 0000000000..01a03d538f
--- /dev/null
+++ b/test/prism/errors/rational_number_with_exponential_portion.txt
@@ -0,0 +1,4 @@
+1e1r; 1e1ri
+ ^ unexpected local variable or method, expecting end-of-input
+ ^~ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/regexp_unicode_too_short.txt b/test/prism/errors/regexp_unicode_too_short.txt
new file mode 100644
index 0000000000..b6504ec9f9
--- /dev/null
+++ b/test/prism/errors/regexp_unicode_too_short.txt
@@ -0,0 +1,4 @@
+/\u
+ ^~ too short escape sequence: \u
+^ unterminated regexp meets end of file; expected a closing delimiter
+
diff --git a/test/prism/errors/regular_expression_with_unknown_regexp_options.txt b/test/prism/errors/regular_expression_with_unknown_regexp_options.txt
new file mode 100644
index 0000000000..c37291ca40
--- /dev/null
+++ b/test/prism/errors/regular_expression_with_unknown_regexp_options.txt
@@ -0,0 +1,3 @@
+/foo/AZaz
+ ^~~~~ unknown regexp options - AZaz
+
diff --git a/test/prism/errors/repeated_parameter_name_in_destructured_params.txt b/test/prism/errors/repeated_parameter_name_in_destructured_params.txt
new file mode 100644
index 0000000000..766c235325
--- /dev/null
+++ b/test/prism/errors/repeated_parameter_name_in_destructured_params.txt
@@ -0,0 +1,3 @@
+def f(a, (b, (a))); end
+ ^ duplicated argument name
+
diff --git a/test/prism/errors/rest_keywords_parameters_before_required_parameters.txt b/test/prism/errors/rest_keywords_parameters_before_required_parameters.txt
new file mode 100644
index 0000000000..406f326712
--- /dev/null
+++ b/test/prism/errors/rest_keywords_parameters_before_required_parameters.txt
@@ -0,0 +1,4 @@
+def foo(**rest, b:)
+ ^~ unexpected parameter order
+end
+
diff --git a/test/prism/errors/return_1.txt b/test/prism/errors/return_1.txt
new file mode 100644
index 0000000000..b4ce8f1f2a
--- /dev/null
+++ b/test/prism/errors/return_1.txt
@@ -0,0 +1,3 @@
+return 1,;
+ ^ expected an argument
+
diff --git a/test/prism/errors/return_1_2_3.txt b/test/prism/errors/return_1_2_3.txt
new file mode 100644
index 0000000000..8f6dbaf194
--- /dev/null
+++ b/test/prism/errors/return_1_2_3.txt
@@ -0,0 +1,7 @@
+return(1, 2, 3)
+ ^ unexpected ',', expecting end-of-input
+ ^ unexpected ',', ignoring it
+ ^ expected a matching `)`
+ ^ unexpected ')', expecting end-of-input
+ ^ unexpected ')', ignoring it
+
diff --git a/test/prism/errors/returning_to_optional_parameters_multiple_times.txt b/test/prism/errors/returning_to_optional_parameters_multiple_times.txt
new file mode 100644
index 0000000000..83ca731850
--- /dev/null
+++ b/test/prism/errors/returning_to_optional_parameters_multiple_times.txt
@@ -0,0 +1,4 @@
+def foo(a, b = 1, c, d = 2, e)
+ ^ unexpected parameter order
+end
+
diff --git a/test/prism/errors/semicolon_after_inheritance_operator.txt b/test/prism/errors/semicolon_after_inheritance_operator.txt
new file mode 100644
index 0000000000..6b67e6048a
--- /dev/null
+++ b/test/prism/errors/semicolon_after_inheritance_operator.txt
@@ -0,0 +1,3 @@
+class Foo < Bar end
+ ^ unexpected `end`, expecting ';' or '\n'
+
diff --git a/test/prism/errors/setter_method_cannot_be_defined_in_an_endless_method_definition.txt b/test/prism/errors/setter_method_cannot_be_defined_in_an_endless_method_definition.txt
new file mode 100644
index 0000000000..c4440ccc7e
--- /dev/null
+++ b/test/prism/errors/setter_method_cannot_be_defined_in_an_endless_method_definition.txt
@@ -0,0 +1,3 @@
+def a=() = 42
+ ^~ invalid method name; a setter method cannot be defined in an endless method definition
+
diff --git a/test/prism/errors/shadow_args_in_block.txt b/test/prism/errors/shadow_args_in_block.txt
new file mode 100644
index 0000000000..1e7d5f9cd4
--- /dev/null
+++ b/test/prism/errors/shadow_args_in_block.txt
@@ -0,0 +1,3 @@
+tap{|a;a|}
+ ^ duplicated argument name
+
diff --git a/test/prism/errors/shadow_args_in_lambda.txt b/test/prism/errors/shadow_args_in_lambda.txt
new file mode 100644
index 0000000000..2399a0ebd5
--- /dev/null
+++ b/test/prism/errors/shadow_args_in_lambda.txt
@@ -0,0 +1,5 @@
+->a;b{}
+ ^ expected a `do` keyword or a `{` to open the lambda block
+ ^ unexpected end-of-input, assuming it is closing the parent top level context
+ ^ expected a lambda block beginning with `do` to end with `end`
+
diff --git a/test/prism/errors/singleton_method_for_literals.txt b/test/prism/errors/singleton_method_for_literals.txt
new file mode 100644
index 0000000000..6247b4f025
--- /dev/null
+++ b/test/prism/errors/singleton_method_for_literals.txt
@@ -0,0 +1,39 @@
+def (1).g; end
+ ^ cannot define singleton method for literals
+def ((a; 1)).foo; end
+ ^ cannot define singleton method for literals
+def ((return; 1)).bar; end
+ ^ cannot define singleton method for literals
+def (((1))).foo; end
+ ^ cannot define singleton method for literals
+def (__FILE__).foo; end
+ ^~~~~~~~ cannot define singleton method for literals
+def (__ENCODING__).foo; end
+ ^~~~~~~~~~~~ cannot define singleton method for literals
+def (__LINE__).foo; end
+ ^~~~~~~~ cannot define singleton method for literals
+def ("foo").foo; end
+ ^~~~~ cannot define singleton method for literals
+def (3.14).foo; end
+ ^~~~ cannot define singleton method for literals
+def (3.14i).foo; end
+ ^~~~~ cannot define singleton method for literals
+def (:foo).foo; end
+ ^~~~ cannot define singleton method for literals
+def (:'foo').foo; end
+ ^~~~~~ cannot define singleton method for literals
+def (:'f{o}').foo; end
+ ^~~~~~~ cannot define singleton method for literals
+def ('foo').foo; end
+ ^~~~~ cannot define singleton method for literals
+def ("foo").foo; end
+ ^~~~~ cannot define singleton method for literals
+def ("#{fo}o").foo; end
+ ^~~~~~~~ cannot define singleton method for literals
+def (/foo/).foo; end
+ ^~~~~ cannot define singleton method for literals
+def (/f#{oo}/).foo; end
+ ^~~~~~~~ cannot define singleton method for literals
+def ([1]).foo; end
+ ^~~ cannot define singleton method for literals
+
diff --git a/test/prism/errors/splat_argument_after_keyword_argument.txt b/test/prism/errors/splat_argument_after_keyword_argument.txt
new file mode 100644
index 0000000000..fd2dbd0003
--- /dev/null
+++ b/test/prism/errors/splat_argument_after_keyword_argument.txt
@@ -0,0 +1,3 @@
+a(foo: bar, *args)
+ ^~~~~ unexpected `*` splat argument after a `**` keyword splat argument
+
diff --git a/test/prism/errors/statement_at_non_statement.txt b/test/prism/errors/statement_at_non_statement.txt
new file mode 100644
index 0000000000..40fe7d862e
--- /dev/null
+++ b/test/prism/errors/statement_at_non_statement.txt
@@ -0,0 +1,9 @@
+foo(alias x y)
+ ^~~~~ unexpected an `alias` at a non-statement position
+foo(BEGIN { bar })
+ ^~~~~ unexpected a `BEGIN` at a non-statement position
+foo(END { bar })
+ ^~~ unexpected an `END` at a non-statement position
+foo(undef x)
+ ^~~~~ unexpected an `undef` at a non-statement position
+
diff --git a/test/prism/errors/statement_operators.txt b/test/prism/errors/statement_operators.txt
new file mode 100644
index 0000000000..04b7c57477
--- /dev/null
+++ b/test/prism/errors/statement_operators.txt
@@ -0,0 +1,25 @@
+alias x y + 1
+ ^ unexpected '+', expecting end-of-input
+ ^ unexpected '+', ignoring it
+alias x y.z
+ ^ unexpected '.', expecting end-of-input
+ ^ unexpected '.', ignoring it
+BEGIN { bar } + 1
+ ^ unexpected '+', expecting end-of-input
+ ^ unexpected '+', ignoring it
+BEGIN { bar }.z
+ ^ unexpected '.', expecting end-of-input
+ ^ unexpected '.', ignoring it
+END { bar } + 1
+ ^ unexpected '+', expecting end-of-input
+ ^ unexpected '+', ignoring it
+END { bar }.z
+ ^ unexpected '.', expecting end-of-input
+ ^ unexpected '.', ignoring it
+undef x + 1
+ ^ unexpected '+', expecting end-of-input
+ ^ unexpected '+', ignoring it
+undef x.z
+ ^ unexpected '.', expecting end-of-input
+ ^ unexpected '.', ignoring it
+
diff --git a/test/prism/errors/switching_to_named_arguments_twice.txt b/test/prism/errors/switching_to_named_arguments_twice.txt
new file mode 100644
index 0000000000..5dae0a105a
--- /dev/null
+++ b/test/prism/errors/switching_to_named_arguments_twice.txt
@@ -0,0 +1,5 @@
+def foo(**args, a, b:)
+ ^ unexpected parameter order
+ ^~ unexpected parameter order
+end
+
diff --git a/test/prism/errors/switching_to_optional_arguments_twice.txt b/test/prism/errors/switching_to_optional_arguments_twice.txt
new file mode 100644
index 0000000000..5dae0a105a
--- /dev/null
+++ b/test/prism/errors/switching_to_optional_arguments_twice.txt
@@ -0,0 +1,5 @@
+def foo(**args, a, b:)
+ ^ unexpected parameter order
+ ^~ unexpected parameter order
+end
+
diff --git a/test/prism/errors/symbol_in_hash.txt b/test/prism/errors/symbol_in_hash.txt
new file mode 100644
index 0000000000..148040aa61
--- /dev/null
+++ b/test/prism/errors/symbol_in_hash.txt
@@ -0,0 +1,3 @@
+{x:'y':}
+ ^~ unexpected label terminator, expected a string literal terminator
+
diff --git a/test/prism/errors/symbol_in_keyword_parameter.txt b/test/prism/errors/symbol_in_keyword_parameter.txt
new file mode 100644
index 0000000000..22d03cccb2
--- /dev/null
+++ b/test/prism/errors/symbol_in_keyword_parameter.txt
@@ -0,0 +1,3 @@
+def foo(x:'y':); end
+ ^~ unexpected label terminator, expected a string literal terminator
+
diff --git a/test/prism/errors/targeting_numbered_parameter.txt b/test/prism/errors/targeting_numbered_parameter.txt
new file mode 100644
index 0000000000..39c40ad7b9
--- /dev/null
+++ b/test/prism/errors/targeting_numbered_parameter.txt
@@ -0,0 +1,3 @@
+-> { _1, = 0 }
+ ^~ _1 is reserved for numbered parameters
+
diff --git a/test/prism/errors/top_level_constant_starting_with_downcased_identifier.txt b/test/prism/errors/top_level_constant_starting_with_downcased_identifier.txt
new file mode 100644
index 0000000000..b7b54dd74e
--- /dev/null
+++ b/test/prism/errors/top_level_constant_starting_with_downcased_identifier.txt
@@ -0,0 +1,4 @@
+::foo::A
+ ^ expected a constant after the `::` operator
+ ^~~ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/top_level_constant_with_downcased_identifier.txt b/test/prism/errors/top_level_constant_with_downcased_identifier.txt
new file mode 100644
index 0000000000..032bcfaebb
--- /dev/null
+++ b/test/prism/errors/top_level_constant_with_downcased_identifier.txt
@@ -0,0 +1,4 @@
+::foo
+ ^ expected a constant after the `::` operator
+ ^~~ unexpected local variable or method, expecting end-of-input
+
diff --git a/test/prism/errors/trailing_comma_in_calls.txt b/test/prism/errors/trailing_comma_in_calls.txt
new file mode 100644
index 0000000000..44e8a1f0b3
--- /dev/null
+++ b/test/prism/errors/trailing_comma_in_calls.txt
@@ -0,0 +1,3 @@
+foo 1,
+ ^ expected an argument
+
diff --git a/test/prism/errors/unexpected_block.txt b/test/prism/errors/unexpected_block.txt
new file mode 100644
index 0000000000..2c0741cd30
--- /dev/null
+++ b/test/prism/errors/unexpected_block.txt
@@ -0,0 +1,3 @@
+def foo = yield(&:+)
+ ^~~ block argument should not be given
+
diff --git a/test/prism/errors/unterminated_W_list.txt b/test/prism/errors/unterminated_W_list.txt
new file mode 100644
index 0000000000..89cab68abb
--- /dev/null
+++ b/test/prism/errors/unterminated_W_list.txt
@@ -0,0 +1,3 @@
+%w[
+^~~ unterminated list; expected a closing delimiter for the `%w`
+
diff --git a/test/prism/errors/unterminated_argument_expression.txt b/test/prism/errors/unterminated_argument_expression.txt
new file mode 100644
index 0000000000..c250a94bec
--- /dev/null
+++ b/test/prism/errors/unterminated_argument_expression.txt
@@ -0,0 +1,5 @@
+a %
+ ^ unterminated quoted string meets end of file
+ ^ unexpected end-of-input; expected an expression after the operator
+ ^ unexpected end-of-input, assuming it is closing the parent top level context
+
diff --git a/test/prism/errors/unterminated_embdoc.txt b/test/prism/errors/unterminated_embdoc.txt
new file mode 100644
index 0000000000..1dd9ea3ac4
--- /dev/null
+++ b/test/prism/errors/unterminated_embdoc.txt
@@ -0,0 +1,3 @@
+=begin
+^~~~~~ embedded document meets end of file
+
diff --git a/test/prism/errors/unterminated_embdoc_2.txt b/test/prism/errors/unterminated_embdoc_2.txt
new file mode 100644
index 0000000000..1dd9ea3ac4
--- /dev/null
+++ b/test/prism/errors/unterminated_embdoc_2.txt
@@ -0,0 +1,3 @@
+=begin
+^~~~~~ embedded document meets end of file
+
diff --git a/test/prism/errors/unterminated_empty_string.txt b/test/prism/errors/unterminated_empty_string.txt
new file mode 100644
index 0000000000..597102f7ee
--- /dev/null
+++ b/test/prism/errors/unterminated_empty_string.txt
@@ -0,0 +1,3 @@
+"
+ ^ unterminated string meets end of file
+
diff --git a/test/prism/errors/unterminated_global_variable.txt b/test/prism/errors/unterminated_global_variable.txt
new file mode 100644
index 0000000000..ce3e960b2e
--- /dev/null
+++ b/test/prism/errors/unterminated_global_variable.txt
@@ -0,0 +1,3 @@
+$
+^ '$' without identifiers is not allowed as a global variable name
+
diff --git a/test/prism/errors/unterminated_global_variable_2.txt b/test/prism/errors/unterminated_global_variable_2.txt
new file mode 100644
index 0000000000..302293b538
--- /dev/null
+++ b/test/prism/errors/unterminated_global_variable_2.txt
@@ -0,0 +1,3 @@
+$
+^ '$' without identifiers is not allowed as a global variable name
+
diff --git a/test/prism/errors/unterminated_i_list.txt b/test/prism/errors/unterminated_i_list.txt
new file mode 100644
index 0000000000..c48be9971d
--- /dev/null
+++ b/test/prism/errors/unterminated_i_list.txt
@@ -0,0 +1,3 @@
+%i[
+^~~ unterminated list; expected a closing delimiter for the `%i`
+
diff --git a/test/prism/errors/unterminated_interpolated_string.txt b/test/prism/errors/unterminated_interpolated_string.txt
new file mode 100644
index 0000000000..e74a4c9e20
--- /dev/null
+++ b/test/prism/errors/unterminated_interpolated_string.txt
@@ -0,0 +1,3 @@
+"hello
+ ^ unterminated string meets end of file
+
diff --git a/test/prism/errors/unterminated_interpolated_symbol.txt b/test/prism/errors/unterminated_interpolated_symbol.txt
new file mode 100644
index 0000000000..faa7597280
--- /dev/null
+++ b/test/prism/errors/unterminated_interpolated_symbol.txt
@@ -0,0 +1,3 @@
+:"#
+ ^ unterminated symbol; expected a closing delimiter for the interpolated symbol
+
diff --git a/test/prism/errors/unterminated_parenthesized_expression.txt b/test/prism/errors/unterminated_parenthesized_expression.txt
new file mode 100644
index 0000000000..9025eec453
--- /dev/null
+++ b/test/prism/errors/unterminated_parenthesized_expression.txt
@@ -0,0 +1,4 @@
+(1 + 2
+ ^ unexpected end-of-input, assuming it is closing the parent top level context
+ ^ expected a matching `)`
+
diff --git a/test/prism/errors/unterminated_regular_expression.txt b/test/prism/errors/unterminated_regular_expression.txt
new file mode 100644
index 0000000000..48f3a30810
--- /dev/null
+++ b/test/prism/errors/unterminated_regular_expression.txt
@@ -0,0 +1,3 @@
+/hello
+^ unterminated regexp meets end of file; expected a closing delimiter
+
diff --git a/test/prism/errors/unterminated_regular_expression_with_heredoc.txt b/test/prism/errors/unterminated_regular_expression_with_heredoc.txt
new file mode 100644
index 0000000000..d4688d6c9e
--- /dev/null
+++ b/test/prism/errors/unterminated_regular_expression_with_heredoc.txt
@@ -0,0 +1,4 @@
+<<-END + /b
+ ^ unterminated regexp meets end of file; expected a closing delimiter
+END
+
diff --git a/test/prism/errors/unterminated_s_symbol.txt b/test/prism/errors/unterminated_s_symbol.txt
new file mode 100644
index 0000000000..0f4be932b3
--- /dev/null
+++ b/test/prism/errors/unterminated_s_symbol.txt
@@ -0,0 +1,3 @@
+%s[abc
+^~~ unterminated quoted string; expected a closing delimiter for the dynamic symbol
+
diff --git a/test/prism/errors/unterminated_string.txt b/test/prism/errors/unterminated_string.txt
new file mode 100644
index 0000000000..89c0a08b3e
--- /dev/null
+++ b/test/prism/errors/unterminated_string.txt
@@ -0,0 +1,3 @@
+'hello
+^ unterminated string meets end of file
+
diff --git a/test/prism/errors/unterminated_unicode_brackets_should_be_a_syntax_error.txt b/test/prism/errors/unterminated_unicode_brackets_should_be_a_syntax_error.txt
new file mode 100644
index 0000000000..f3ac9f29ab
--- /dev/null
+++ b/test/prism/errors/unterminated_unicode_brackets_should_be_a_syntax_error.txt
@@ -0,0 +1,3 @@
+?\u{3
+ ^~~~ invalid Unicode list: \u{3
+
diff --git a/test/prism/errors/unterminated_xstring.txt b/test/prism/errors/unterminated_xstring.txt
new file mode 100644
index 0000000000..ccd529774c
--- /dev/null
+++ b/test/prism/errors/unterminated_xstring.txt
@@ -0,0 +1,3 @@
+`hello
+^ expected a closing delimiter for the `%x` or backtick string
+
diff --git a/test/prism/errors/void_value_expression_in_arguments.txt b/test/prism/errors/void_value_expression_in_arguments.txt
new file mode 100644
index 0000000000..f57aee1454
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_arguments.txt
@@ -0,0 +1,17 @@
+foo(return)
+ ^~~~~~ unexpected void value expression
+foo(1, return)
+ ^~~~~~ unexpected void value expression
+foo(*return)
+ ^~~~~~ unexpected void value expression
+foo(**return)
+ ^~~~~~ unexpected void value expression
+foo(&return)
+ ^~~~~~ unexpected void value expression
+foo(return => 1)
+ ^~~~~~ unexpected void value expression
+foo(:a => return)
+ ^~~~~~ unexpected void value expression
+foo(a: return)
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_array.txt b/test/prism/errors/void_value_expression_in_array.txt
new file mode 100644
index 0000000000..a0e86fb135
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_array.txt
@@ -0,0 +1,15 @@
+[return]
+ ^~~~~~ unexpected void value expression
+[1, return]
+ ^~~~~~ unexpected void value expression
+[ return => 1 ]
+ ^~~~~~ unexpected void value expression
+[ 1 => return ]
+ ^~~~~~ unexpected void value expression
+[ a: return ]
+ ^~~~~~ unexpected void value expression
+[ *return ]
+ ^~~~~~ unexpected void value expression
+[ **return ]
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_assignment.txt b/test/prism/errors/void_value_expression_in_assignment.txt
new file mode 100644
index 0000000000..c651d7f39e
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_assignment.txt
@@ -0,0 +1,9 @@
+a = return
+ ^~~~~~ unexpected void value expression
+a = 1, return
+ ^~~~~~ unexpected void value expression
+a, b = return, 1
+ ^~~~~~ unexpected void value expression
+a, b = 1, *return
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_begin_statement.txt b/test/prism/errors/void_value_expression_in_begin_statement.txt
new file mode 100644
index 0000000000..4ad40b684d
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_begin_statement.txt
@@ -0,0 +1,21 @@
+x = return 1
+ ^~~~~~~~ unexpected void value expression
+x = return, 1
+ ^~~~~~ unexpected void value expression
+x = 1, return
+ ^~~~~~ unexpected void value expression
+x, y = return
+ ^~~~~~ unexpected void value expression
+x = begin return ensure end
+ ^~~~~~ unexpected void value expression
+x = begin ensure return end
+ ^~~~~~ unexpected void value expression
+x = begin return ensure return end
+ ^~~~~~ unexpected void value expression
+x = begin return; rescue; return end
+ ^~~~~~ unexpected void value expression
+x = begin return; rescue; return; else return end
+ ^~~~~~ unexpected void value expression
+x = begin; return; rescue; retry; end
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_binary_call.txt b/test/prism/errors/void_value_expression_in_binary_call.txt
new file mode 100644
index 0000000000..096b42be4d
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_binary_call.txt
@@ -0,0 +1,11 @@
+1 + (return)
+ ^~~~~~ unexpected void value expression
+(return) + 1
+ ^~~~~~ unexpected void value expression
+1 and (return)
+(return) and 1
+ ^~~~~~ unexpected void value expression
+1 or (return)
+(return) or 1
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_call.txt b/test/prism/errors/void_value_expression_in_call.txt
new file mode 100644
index 0000000000..90e6481c4c
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_call.txt
@@ -0,0 +1,11 @@
+(return).foo
+ ^~~~~~ unexpected void value expression
+(return).(1)
+ ^~~~~~ unexpected void value expression
+(return)[1]
+ ^~~~~~ unexpected void value expression
+(return)[1] = 2
+ ^~~~~~ unexpected void value expression
+(return)::foo
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_constant_path.txt b/test/prism/errors/void_value_expression_in_constant_path.txt
new file mode 100644
index 0000000000..1dab6902a2
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_constant_path.txt
@@ -0,0 +1,5 @@
+(return)::A
+ ^~~~~~ unexpected void value expression
+class (return)::A; end
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_def.txt b/test/prism/errors/void_value_expression_in_def.txt
new file mode 100644
index 0000000000..fed52a6677
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_def.txt
@@ -0,0 +1,10 @@
+def (return).x
+ ^~~~~~ unexpected void value expression
+end
+def x(a = return)
+ ^~~~~~ unexpected void value expression
+end
+def x(a: return)
+ ^~~~~~ unexpected void value expression
+end
+
diff --git a/test/prism/errors/void_value_expression_in_expression.txt b/test/prism/errors/void_value_expression_in_expression.txt
new file mode 100644
index 0000000000..f6165a7ba6
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_expression.txt
@@ -0,0 +1,19 @@
+(return) ? 1 : 1
+ ^~~~~~ unexpected void value expression
+(return)..1
+ ^~~~~~ unexpected void value expression
+1..(return)
+ ^~~~~~ unexpected void value expression
+(return)...1
+ ^~~~~~ unexpected void value expression
+1...(return)
+ ^~~~~~ unexpected void value expression
+(..(return))
+ ^~~~~~ unexpected void value expression
+(...(return))
+ ^~~~~~ unexpected void value expression
+((return)..)
+ ^~~~~~ unexpected void value expression
+((return)...)
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_hash.txt b/test/prism/errors/void_value_expression_in_hash.txt
new file mode 100644
index 0000000000..7795511443
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_hash.txt
@@ -0,0 +1,9 @@
+{ return => 1 }
+ ^~~~~~ unexpected void value expression
+{ 1 => return }
+ ^~~~~~ unexpected void value expression
+{ a: return }
+ ^~~~~~ unexpected void value expression
+{ **return }
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_modifier.txt b/test/prism/errors/void_value_expression_in_modifier.txt
new file mode 100644
index 0000000000..7d7b444e33
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_modifier.txt
@@ -0,0 +1,13 @@
+1 if (return)
+ ^~~~~~ unexpected void value expression
+1 unless (return)
+ ^~~~~~ unexpected void value expression
+1 while (return)
+ ^~~~~~ unexpected void value expression
+1 until (return)
+ ^~~~~~ unexpected void value expression
+(return) => a
+ ^~~~~~ unexpected void value expression
+(return) in a
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/void_value_expression_in_statement.txt b/test/prism/errors/void_value_expression_in_statement.txt
new file mode 100644
index 0000000000..87dbfa5cc9
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_statement.txt
@@ -0,0 +1,26 @@
+if (return)
+ ^~~~~~ unexpected void value expression
+end
+unless (return)
+ ^~~~~~ unexpected void value expression
+end
+while (return)
+ ^~~~~~ unexpected void value expression
+end
+until (return)
+ ^~~~~~ unexpected void value expression
+end
+case (return)
+ ^~~~~~ unexpected void value expression
+when 1
+end
+class A < (return)
+ ^~~~~~ unexpected void value expression
+end
+class << (return)
+ ^~~~~~ unexpected void value expression
+end
+for x in (return)
+ ^~~~~~ unexpected void value expression
+end
+
diff --git a/test/prism/errors/void_value_expression_in_unary_call.txt b/test/prism/errors/void_value_expression_in_unary_call.txt
new file mode 100644
index 0000000000..61e849255c
--- /dev/null
+++ b/test/prism/errors/void_value_expression_in_unary_call.txt
@@ -0,0 +1,5 @@
++(return)
+ ^~~~~~ unexpected void value expression
+not return
+ ^~~~~~ unexpected void value expression
+
diff --git a/test/prism/errors/while_endless_method.txt b/test/prism/errors/while_endless_method.txt
new file mode 100644
index 0000000000..6f062d89d0
--- /dev/null
+++ b/test/prism/errors/while_endless_method.txt
@@ -0,0 +1,5 @@
+while def f = g do end
+ ^ expected a predicate expression for the `while` statement
+ ^ unexpected end-of-input, assuming it is closing the parent top level context
+ ^ expected an `end` to close the `while` statement
+
diff --git a/test/prism/errors/writing_numbered_parameter.txt b/test/prism/errors/writing_numbered_parameter.txt
new file mode 100644
index 0000000000..17dcc6e8f0
--- /dev/null
+++ b/test/prism/errors/writing_numbered_parameter.txt
@@ -0,0 +1,3 @@
+-> { _1 = 0 }
+ ^~ _1 is reserved for numbered parameters
+
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb
index 5d18780ddd..f46cb942a2 100644
--- a/test/prism/errors_test.rb
+++ b/test/prism/errors_test.rb
@@ -4,1952 +4,71 @@ require_relative "test_helper"
module Prism
class ErrorsTest < TestCase
- include DSL
+ base = File.expand_path("errors", __dir__)
+ filepaths = Dir["*.txt", base: base]
- def test_constant_path_with_invalid_token_after
- assert_error_messages "A::$b", [
- "expected a constant after the `::` operator",
- "unexpected global variable, expecting end-of-input"
+ if RUBY_VERSION < "3.0"
+ filepaths -= [
+ "cannot_assign_to_a_reserved_numbered_parameter.txt",
+ "writing_numbered_parameter.txt",
+ "targeting_numbered_parameter.txt",
+ "defining_numbered_parameter.txt",
+ "defining_numbered_parameter_2.txt",
+ "numbered_parameters_in_block_arguments.txt"
]
end
- def test_module_name_recoverable
- expected = ModuleNode(
- [],
- Location(),
- ConstantReadNode(:Parent),
- StatementsNode(
- [ModuleNode([], Location(), MissingNode(), nil, Location(), :"")]
- ),
- Location(),
- :Parent
- )
-
- assert_errors expected, "module Parent module end", [
- ["unexpected constant path after `module`; class/module name must be CONSTANT", 14..20],
- ["unexpected 'end', assuming it is closing the parent module definition", 21..24]
- ]
- end
-
- def test_for_loops_index_missing
- expected = ForNode(
- MissingNode(),
- expression("1..10"),
- StatementsNode([expression("i")]),
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "for in 1..10\ni\nend", [
- ["expected an index after `for`", 0..3]
- ]
- end
-
- def test_for_loops_only_end
- expected = ForNode(
- MissingNode(),
- MissingNode(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "for end", [
- ["expected an index after `for`", 0..3],
- ["expected an `in` after the index in a `for` statement", 3..3],
- ["expected a collection after the `in` in a `for` statement", 3..3]
- ]
- end
-
- def test_pre_execution_missing_brace
- expected = PreExecutionNode(
- StatementsNode([expression("1")]),
- Location(),
- Location(),
- Location()
- )
-
- assert_errors expected, "BEGIN 1 }", [
- ["expected a `{` after `BEGIN`", 5..5]
- ]
- end
-
- def test_pre_execution_context
- expected = PreExecutionNode(
- StatementsNode([
- CallNode(
- 0,
- expression("1"),
- nil,
- :+,
- Location(),
- nil,
- ArgumentsNode(0, [MissingNode()]),
- nil,
- nil
- )
- ]),
- Location(),
- Location(),
- Location()
- )
-
- assert_errors expected, "BEGIN { 1 + }", [
- ["unexpected '}'; expected an expression after the operator", 12..13],
- ["unexpected '}', assuming it is closing the parent 'BEGIN' block", 12..13]
- ]
- end
-
- def test_unterminated_embdoc
- message = "embedded document meets end of file"
- assert_error_messages "=begin", [message]
- assert_error_messages "=begin\n", [message]
-
- refute_error_messages "=begin\n=end"
- refute_error_messages "=begin\n=end\0"
- refute_error_messages "=begin\n=end\C-d"
- refute_error_messages "=begin\n=end\C-z"
- end
-
- def test_unterminated_i_list
- assert_errors expression("%i["), "%i[", [
- ["unterminated list; expected a closing delimiter for the `%i`", 0..3]
- ]
- end
-
- def test_unterminated_w_list
- assert_errors expression("%w["), "%w[", [
- ["unterminated list; expected a closing delimiter for the `%w`", 0..3]
- ]
- end
-
- def test_unterminated_W_list
- assert_errors expression("%W["), "%W[", [
- ["unterminated list; expected a closing delimiter for the `%W`", 0..3]
- ]
- end
-
- def test_unterminated_regular_expression
- assert_errors expression("/hello"), "/hello", [
- ["unterminated regexp meets end of file; expected a closing delimiter", 0..1]
- ]
- end
-
- def test_unterminated_regular_expression_with_heredoc
- source = "<<-END + /b\nEND\n"
-
- assert_errors expression(source), source, [
- ["unterminated regexp meets end of file; expected a closing delimiter", 9..10]
- ]
- end
-
- def test_unterminated_xstring
- assert_errors expression("`hello"), "`hello", [
- ["expected a closing delimiter for the `%x` or backtick string", 0..1]
- ]
- end
-
- def test_unterminated_interpolated_string
- expr = expression('"hello')
- assert_errors expr, '"hello', [
- ["unterminated string meets end of file", 6..6]
- ]
- assert_equal expr.unescaped, "hello"
- assert_equal expr.closing, ""
- end
-
- def test_unterminated_string
- expr = expression("'hello")
- assert_errors expr, "'hello", [
- ["unterminated string meets end of file", 0..1]
- ]
- assert_equal expr.unescaped, "hello"
- assert_equal expr.closing, ""
- end
-
- def test_unterminated_empty_string
- expr = expression('"')
- assert_errors expr, '"', [
- ["unterminated string meets end of file", 1..1]
- ]
- assert_equal expr.unescaped, ""
- assert_equal expr.closing, ""
- end
-
- def test_incomplete_instance_var_string
- assert_errors expression('%@#@@#'), '%@#@@#', [
- ["'@' without identifiers is not allowed as an instance variable name", 4..5],
- ["unexpected instance variable, expecting end-of-input", 4..5]
- ]
- end
-
- def test_unterminated_s_symbol
- assert_errors expression("%s[abc"), "%s[abc", [
- ["unterminated quoted string; expected a closing delimiter for the dynamic symbol", 0..3]
- ]
- end
-
- def test_unterminated_parenthesized_expression
- assert_errors expression('(1 + 2'), '(1 + 2', [
- ["unexpected end of file, expecting end-of-input", 6..6],
- ["unexpected end of file, assuming it is closing the parent top level context", 6..6],
- ["expected a matching `)`", 6..6]
- ]
- end
-
- def test_missing_terminator_in_parentheses
- assert_error_messages "(0 0)", [
- "unexpected integer, expecting end-of-input"
- ]
- end
-
- def test_unterminated_argument_expression
- assert_errors expression('a %'), 'a %', [
- ["invalid `%` token", 2..3],
- ["unexpected end of file; expected an expression after the operator", 3..3],
- ["unexpected end of file, assuming it is closing the parent top level context", 3..3]
- ]
- end
-
- def test_unterminated_interpolated_symbol
- assert_error_messages ":\"#", [
- "expected a closing delimiter for the interpolated symbol"
- ]
- end
-
- def test_cr_without_lf_in_percent_expression
- assert_errors expression("%\r"), "%\r", [
- ["invalid `%` token", 0..2],
- ]
+ if RUBY_VERSION < "3.4"
+ filepaths -= ["it_with_ordinary_parameter.txt"]
end
- def test_1_2_3
- assert_errors expression("(1, 2, 3)"), "(1, 2, 3)", [
- ["unexpected ',', expecting end-of-input", 2..3],
- ["unexpected ',', ignoring it", 2..3],
- ["expected a matching `)`", 2..2],
- ["unexpected ',', expecting end-of-input", 2..3],
- ["unexpected ',', ignoring it", 2..3],
- ["unexpected ',', expecting end-of-input", 5..6],
- ["unexpected ',', ignoring it", 5..6],
- ["unexpected ')', expecting end-of-input", 8..9],
- ["unexpected ')', ignoring it", 8..9]
- ]
- end
-
- def test_return_1_2_3
- assert_error_messages "return(1, 2, 3)", [
- "unexpected ',', expecting end-of-input",
- "unexpected ',', ignoring it",
- "expected a matching `)`",
- "unexpected ')', expecting end-of-input",
- "unexpected ')', ignoring it"
- ]
- end
-
- def test_return_1
- assert_errors expression("return 1,;"), "return 1,;", [
- ["expected an argument", 8..9]
- ]
- end
-
- def test_next_1_2_3
- assert_errors expression("next(1, 2, 3)"), "next(1, 2, 3)", [
- ["unexpected ',', expecting end-of-input", 6..7],
- ["unexpected ',', ignoring it", 6..7],
- ["expected a matching `)`", 6..6],
- ["Invalid next", 0..12],
- ["unexpected ')', expecting end-of-input", 12..13],
- ["unexpected ')', ignoring it", 12..13]
- ]
- end
-
- def test_next_1
- assert_errors expression("next 1,;"), "next 1,;", [
- ["expected an argument", 6..7],
- ["Invalid next", 0..7]
- ]
- end
-
- def test_break_1_2_3
- assert_errors expression("break(1, 2, 3)"), "break(1, 2, 3)", [
- ["unexpected ',', expecting end-of-input", 7..8],
- ["unexpected ',', ignoring it", 7..8],
- ["expected a matching `)`", 7..7],
- ["Invalid break", 0..13],
- ["unexpected ')', expecting end-of-input", 13..14],
- ["unexpected ')', ignoring it", 13..14]
- ]
- end
-
- def test_break_1
- assert_errors expression("break 1,;"), "break 1,;", [
- ["expected an argument", 7..8],
- ["Invalid break", 0..8]
- ]
- end
-
- def test_argument_forwarding_when_parent_is_not_forwarding
- assert_errors expression('def a(x, y, z); b(...); end'), 'def a(x, y, z); b(...); end', [
- ["unexpected ... when the parent method is not forwarding", 18..21]
- ]
- end
-
- def test_argument_forwarding_only_effects_its_own_internals
- assert_errors expression('def a(...); b(...); end; def c(x, y, z); b(...); end'),
- 'def a(...); b(...); end; def c(x, y, z); b(...); end', [
- ["unexpected ... when the parent method is not forwarding", 43..46]
- ]
- end
-
- def test_top_level_constant_with_downcased_identifier
- assert_error_messages "::foo", [
- "expected a constant after the `::` operator",
- "unexpected local variable or method, expecting end-of-input"
- ]
- end
-
- def test_top_level_constant_starting_with_downcased_identifier
- assert_error_messages "::foo::A", [
- "expected a constant after the `::` operator",
- "unexpected local variable or method, expecting end-of-input"
- ]
- end
-
- def test_aliasing_global_variable_with_non_global_variable
- assert_errors expression("alias $a b"), "alias $a b", [
- ["invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable", 9..10]
- ]
- end
-
- def test_aliasing_non_global_variable_with_global_variable
- assert_errors expression("alias a $b"), "alias a $b", [
- ["invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable", 8..10]
- ]
- end
-
- def test_aliasing_global_variable_with_global_number_variable
- assert_errors expression("alias $a $1"), "alias $a $1", [
- ["invalid argument being passed to `alias`; can't make alias for the number variables", 9..11]
- ]
- end
-
- def test_def_with_expression_receiver_and_no_identifier
- assert_errors expression("def (a); end"), "def (a); end", [
- ["expected a `.` or `::` after the receiver in a method definition", 7..7],
- ["unexpected ';'; expected a method name", 7..8]
- ]
- end
-
- def test_def_with_multiple_statements_receiver
- assert_errors expression("def (\na\nb\n).c; end"), "def (\na\nb\n).c; end", [
- ["expected a matching `)`", 8..8],
- ["expected a `.` or `::` after the receiver in a method definition", 8..8],
- ["expected a delimiter to close the parameters", 9..9],
- ["unexpected ')', ignoring it", 10..11],
- ["unexpected '.', ignoring it", 11..12]
- ]
- end
-
- def test_def_with_empty_expression_receiver
- assert_errors expression("def ().a; end"), "def ().a; end", [
- ["expected a receiver for the method definition", 4..5]
- ]
- end
-
- def test_block_beginning_with_brace_and_ending_with_end
- assert_error_messages "x.each { x end", [
- "unexpected 'end', expecting end-of-input",
- "unexpected 'end', ignoring it",
- "unexpected end of file, assuming it is closing the parent top level context",
- "expected a block beginning with `{` to end with `}`"
- ]
- end
-
- def test_double_splat_followed_by_splat_argument
- expected = CallNode(
- CallNodeFlags::IGNORE_VISIBILITY,
- nil,
- nil,
- :a,
- Location(),
- Location(),
- ArgumentsNode(
- ArgumentsNodeFlags::CONTAINS_KEYWORDS | ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT,
- [
- KeywordHashNode(0, [AssocSplatNode(expression("kwargs"), Location())]),
- SplatNode(Location(), expression("args"))
- ]
- ),
- Location(),
- nil
- )
-
- assert_errors expected, "a(**kwargs, *args)", [
- ["unexpected `*` splat argument after a `**` keyword splat argument", 12..17]
- ]
- end
-
- def test_arguments_after_block
- expected = CallNode(
- CallNodeFlags::IGNORE_VISIBILITY,
- nil,
- nil,
- :a,
- Location(),
- Location(),
- ArgumentsNode(0, [expression("foo")]),
- Location(),
- BlockArgumentNode(expression("block"), Location())
- )
-
- assert_errors expected, "a(&block, foo)", [
- ["unexpected argument after a block argument", 10..13]
- ]
- end
-
- def test_arguments_binding_power_for_and
- assert_error_messages "foo(*bar and baz)", [
- "unexpected 'and'; expected a `)` to close the arguments",
- "unexpected ')', expecting end-of-input",
- "unexpected ')', ignoring it"
- ]
- end
-
- def test_splat_argument_after_keyword_argument
- expected = CallNode(
- CallNodeFlags::IGNORE_VISIBILITY,
- nil,
- nil,
- :a,
- Location(),
- Location(),
- ArgumentsNode(ArgumentsNodeFlags::CONTAINS_KEYWORDS, [
- KeywordHashNode(1, [
- AssocNode(
- SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, nil, Location(), Location(), "foo"),
- expression("bar"),
- nil
- )
- ]),
- SplatNode(Location(), expression("args"))
- ]),
- Location(),
- nil
- )
-
- assert_errors expected, "a(foo: bar, *args)", [
- ["unexpected `*` splat argument after a `**` keyword splat argument", 12..17]
- ]
- end
-
- def test_module_definition_in_method_body
- expected = DefNode(
- :foo,
- Location(),
- nil,
- nil,
- StatementsNode([ModuleNode([], Location(), ConstantReadNode(:A), nil, Location(), :A)]),
- [],
- Location(),
- nil,
- nil,
- nil,
- nil,
- Location()
- )
-
- assert_errors expected, "def foo;module A;end;end", [
- ["unexpected module definition in method body", 8..14]
- ]
+ if RUBY_VERSION < "3.4" || RUBY_RELEASE_DATE < "2024-07-24"
+ filepaths -= ["dont_allow_return_inside_sclass_body.txt"]
end
- def test_module_definition_in_method_body_within_block
- expected = DefNode(
- :foo,
- Location(),
- nil,
- nil,
- StatementsNode(
- [CallNode(
- CallNodeFlags::IGNORE_VISIBILITY,
- nil,
- nil,
- :bar,
- Location(),
- nil,
- nil,
- nil,
- BlockNode(
- [],
- nil,
- StatementsNode([ModuleNode([], Location(), ConstantReadNode(:Foo), nil, Location(), :Foo)]),
- Location(),
- Location()
- )
- )]
- ),
- [],
- Location(),
- nil,
- nil,
- nil,
- nil,
- Location()
- )
-
- assert_errors expected, <<~RUBY, [["unexpected module definition in method body", 21..27]]
- def foo
- bar do
- module Foo;end
- end
- end
- RUBY
- end
-
- def test_module_definition_in_method_defs
- source = <<~RUBY
- def foo(bar = module A;end);end
- def foo;rescue;module A;end;end
- def foo;ensure;module A;end;end
- RUBY
- message = "unexpected module definition in method body"
- assert_errors expression(source), source, [
- [message, 14..20],
- [message, 47..53],
- [message, 79..85],
- ]
- end
-
- def test_class_definition_in_method_body
- expected = DefNode(
- :foo,
- Location(),
- nil,
- nil,
- StatementsNode(
- [ClassNode(
- [],
- Location(),
- ConstantReadNode(:A),
- nil,
- nil,
- nil,
- Location(),
- :A
- )]
- ),
- [],
- Location(),
- nil,
- nil,
- nil,
- nil,
- Location()
- )
-
- assert_errors expected, "def foo;class A;end;end", [
- ["unexpected class definition in method body", 8..13]
- ]
+ filepaths.each do |filepath|
+ define_method(:"test_#{File.basename(filepath, ".txt")}") do
+ assert_errors(File.join(base, filepath))
+ end
end
- def test_class_definition_in_method_defs
+ def test_embdoc_ending
source = <<~RUBY
- def foo(bar = class A;end);end
- def foo;rescue;class A;end;end
- def foo;ensure;class A;end;end
+ =begin\n=end
+ =begin\n=end\0
+ =begin\n=end\C-d
+ =begin\n=end\C-z
RUBY
- message = "unexpected class definition in method body"
- assert_errors expression(source), source, [
- [message, 14..19],
- [message, 46..51],
- [message, 77..82],
- ]
- end
-
- def test_bad_arguments
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([
- RequiredParameterNode(0, :A),
- RequiredParameterNode(0, :@a),
- RequiredParameterNode(0, :$A),
- RequiredParameterNode(0, :@@a),
- ], [], nil, [], [], nil, nil),
- nil,
- [:A, :@a, :$A, :@@a],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(A, @a, $A, @@a);end", [
- ["invalid formal argument; formal argument cannot be a constant", 8..9],
- ["invalid formal argument; formal argument cannot be an instance variable", 11..13],
- ["invalid formal argument; formal argument cannot be a global variable", 15..17],
- ["invalid formal argument; formal argument cannot be a class variable", 19..22],
- ]
- end
- if RUBY_VERSION >= "3.0"
- def test_cannot_assign_to_a_reserved_numbered_parameter
- expected = BeginNode(
- Location(),
- StatementsNode([
- LocalVariableWriteNode(:_1, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_2, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_3, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_4, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_5, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_6, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_7, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_8, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_9, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location()),
- LocalVariableWriteNode(:_10, 0, Location(), SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"), Location())
- ]),
- nil,
- nil,
- nil,
- Location()
- )
- source = <<~RUBY
- begin
- _1=:a;_2=:a;_3=:a;_4=:a;_5=:a
- _6=:a;_7=:a;_8=:a;_9=:a;_10=:a
- end
- RUBY
- assert_errors expected, source, [
- ["_1 is reserved for numbered parameters", 8..10],
- ["_2 is reserved for numbered parameters", 14..16],
- ["_3 is reserved for numbered parameters", 20..22],
- ["_4 is reserved for numbered parameters", 26..28],
- ["_5 is reserved for numbered parameters", 32..34],
- ["_6 is reserved for numbered parameters", 40..42],
- ["_7 is reserved for numbered parameters", 46..48],
- ["_8 is reserved for numbered parameters", 52..54],
- ["_9 is reserved for numbered parameters", 58..60],
- ]
+ source.each_line do |line|
+ assert_valid_syntax(source)
+ assert_predicate Prism.parse(source), :success?
end
end
- def test_do_not_allow_trailing_commas_in_method_parameters
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [RequiredParameterNode(0, :a), RequiredParameterNode(0, :b), RequiredParameterNode(0, :c)],
- [],
- nil,
- [],
- [],
- nil,
- nil
- ),
- nil,
- [:a, :b, :c],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(a,b,c,);end", [
- ["unexpected `,` in parameters", 13..14]
- ]
- end
-
- def test_do_not_allow_trailing_commas_in_lambda_parameters
- expected = LambdaNode(
- [:a, :b],
- Location(),
- Location(),
- Location(),
- BlockParametersNode(
- ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b)], [], nil, [], [], nil, nil),
- [],
- Location(),
- Location()
- ),
- nil
- )
- assert_errors expected, "-> (a, b, ) {}", [
- ["unexpected `,` in parameters", 8..9]
- ]
- end
-
- def test_do_not_allow_multiple_codepoints_in_a_single_character_literal
- expected = StringNode(StringFlags::FORCED_UTF8_ENCODING, Location(), Location(), nil, "\u0001\u0002")
-
- assert_errors expected, '?\u{0001 0002}', [
- ["invalid Unicode escape sequence; Multiple codepoints at single character literal are disallowed", 9..12]
- ]
- end
-
- def test_invalid_hex_escape
- assert_errors expression('"\\xx"'), '"\\xx"', [
- ["invalid hex escape sequence", 1..3],
- ]
- end
-
- def test_do_not_allow_more_than_6_hexadecimal_digits_in_u_Unicode_character_notation
- expected = StringNode(0, Location(), Location(), Location(), "\u0001")
-
- assert_errors expected, '"\u{0000001}"', [
- ["invalid Unicode escape sequence; maximum length is 6 digits", 4..11],
- ]
- end
-
- def test_do_not_allow_characters_other_than_0_9_a_f_and_A_F_in_u_Unicode_character_notation
- expected = StringNode(0, Location(), Location(), Location(), "\u0000z}")
-
- assert_errors expected, '"\u{000z}"', [
- ["invalid Unicode escape sequence", 7..7],
- ]
- end
-
- def test_unterminated_unicode_brackets_should_be_a_syntax_error
- assert_errors expression('?\\u{3'), '?\\u{3', [
- ["invalid Unicode escape sequence; needs closing `}`", 1..5],
- ]
- end
-
- def test_method_parameters_after_block
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [],
- [],
- nil,
- [RequiredParameterNode(0, :a)],
- [],
- nil,
- BlockParameterNode(0, :block, Location(), Location())
- ),
- nil,
- [:block, :a],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
- assert_errors expected, "def foo(&block, a)\nend", [
- ["unexpected parameter order", 16..17]
- ]
- end
-
- def test_method_with_arguments_after_anonymous_block
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([], [], nil, [RequiredParameterNode(0, :a)], [], nil, BlockParameterNode(0, nil, nil, Location())),
- nil,
- [:a],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(&, a)\nend", [
- ["unexpected parameter order", 11..12]
- ]
+ def test_unterminated_string_closing
+ statement = Prism.parse_statement("'hello")
+ assert_equal statement.unescaped, "hello"
+ assert_empty statement.closing
end
- def test_method_parameters_after_arguments_forwarding
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [],
- [],
- nil,
- [RequiredParameterNode(0, :a)],
- [],
- ForwardingParameterNode(),
- nil
- ),
- nil,
- [:a],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
- assert_errors expected, "def foo(..., a)\nend", [
- ["unexpected parameter order", 13..14]
- ]
+ def test_unterminated_interpolated_string_closing
+ statement = Prism.parse_statement('"hello')
+ assert_equal statement.unescaped, "hello"
+ assert_empty statement.closing
end
- def test_keywords_parameters_before_required_parameters
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [],
- [],
- nil,
- [RequiredParameterNode(0, :a)],
- [RequiredKeywordParameterNode(0, :b, Location())],
- nil,
- nil
- ),
- nil,
- [:b, :a],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
- assert_errors expected, "def foo(b:, a)\nend", [
- ["unexpected parameter order", 12..13]
- ]
- end
-
- def test_rest_keywords_parameters_before_required_parameters
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [],
- [],
- nil,
- [],
- [RequiredKeywordParameterNode(0, :b, Location())],
- KeywordRestParameterNode(0, :rest, Location(), Location()),
- nil
- ),
- nil,
- [:rest, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(**rest, b:)\nend", [
- ["unexpected parameter order", 16..18]
- ]
- end
-
- def test_double_arguments_forwarding
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([], [], nil, [ForwardingParameterNode()], [], ForwardingParameterNode(), nil),
- nil,
- [],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(..., ...)\nend", [
- ["unexpected parameter order", 13..16]
- ]
- end
-
- def test_multiple_error_in_parameters_order
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [],
- [],
- nil,
- [RequiredParameterNode(0, :a)],
- [RequiredKeywordParameterNode(0, :b, Location())],
- KeywordRestParameterNode(0, :args, Location(), Location()),
- nil
- ),
- nil,
- [:args, :a, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(**args, a, b:)\nend", [
- ["unexpected parameter order", 16..17],
- ["unexpected parameter order", 19..21]
- ]
- end
-
- def test_switching_to_optional_arguments_twice
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [],
- [],
- nil,
- [RequiredParameterNode(0, :a)],
- [RequiredKeywordParameterNode(0, :b, Location())],
- KeywordRestParameterNode(0, :args, Location(), Location()),
- nil
- ),
- nil,
- [:args, :a, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location(),
- )
-
- assert_errors expected, "def foo(**args, a, b:)\nend", [
- ["unexpected parameter order", 16..17],
- ["unexpected parameter order", 19..21]
- ]
- end
-
- def test_switching_to_named_arguments_twice
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [],
- [],
- nil,
- [RequiredParameterNode(0, :a)],
- [RequiredKeywordParameterNode(0, :b, Location())],
- KeywordRestParameterNode(0, :args, Location(), Location()),
- nil
- ),
- nil,
- [:args, :a, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location(),
- )
-
- assert_errors expected, "def foo(**args, a, b:)\nend", [
- ["unexpected parameter order", 16..17],
- ["unexpected parameter order", 19..21]
- ]
- end
-
- def test_returning_to_optional_parameters_multiple_times
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode(
- [RequiredParameterNode(0, :a)],
- [
- OptionalParameterNode(0, :b, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL, 1)),
- OptionalParameterNode(0, :d, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL, 2))
- ],
- nil,
- [RequiredParameterNode(0, :c), RequiredParameterNode(0, :e)],
- [],
- nil,
- nil
- ),
- nil,
- [:a, :b, :c, :d, :e],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location(),
- )
-
- assert_errors expected, "def foo(a, b = 1, c, d = 2, e)\nend", [
- ["unexpected parameter order", 23..24]
- ]
- end
-
- def test_case_without_when_clauses_errors_on_else_clause
- expected = CaseMatchNode(
- SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"),
- [],
- ElseNode(Location(), nil, Location()),
- Location(),
- Location()
- )
-
- assert_errors expected, "case :a\nelse\nend", [
- ["expected a `when` or `in` clause after `case`", 0..4]
- ]
- end
-
- def test_case_without_clauses
- expected = CaseNode(
- SymbolNode(SymbolFlags::FORCED_US_ASCII_ENCODING, Location(), Location(), nil, "a"),
- [],
- nil,
- Location(),
- Location()
- )
-
- assert_errors expected, "case :a\nend", [
- ["expected a `when` or `in` clause after `case`", 0..4]
- ]
- end
-
- def test_setter_method_cannot_be_defined_in_an_endless_method_definition
- expected = DefNode(
- :a=,
- Location(),
- nil,
- nil,
- StatementsNode([IntegerNode(IntegerBaseFlags::DECIMAL, 42)]),
- [],
- Location(),
- nil,
- Location(),
- Location(),
- Location(),
- nil
- )
-
- assert_errors expected, "def a=() = 42", [
- ["invalid method name; a setter method cannot be defined in an endless method definition", 4..6]
- ]
- end
-
- def test_do_not_allow_forward_arguments_in_lambda_literals
- expected = LambdaNode(
- [],
- Location(),
- Location(),
- Location(),
- BlockParametersNode(ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil), [], Location(), Location()),
- nil
- )
-
- assert_errors expected, "->(...) {}", [
- ["unexpected ... when the parent method is not forwarding", 3..6]
- ]
- end
-
- def test_do_not_allow_forward_arguments_in_blocks
- expected = CallNode(
- CallNodeFlags::IGNORE_VISIBILITY,
- nil,
- nil,
- :a,
- Location(),
- nil,
- nil,
- nil,
- BlockNode(
- [],
- BlockParametersNode(ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil), [], Location(), Location()),
- nil,
- Location(),
- Location()
- )
- )
-
- assert_errors expected, "a {|...|}", [
- ["unexpected ... when the parent method is not forwarding", 4..7]
- ]
- end
-
- def test_dont_allow_return_inside_class_body
- expected = ClassNode(
- [],
- Location(),
- ConstantReadNode(:A),
- nil,
- nil,
- StatementsNode([ReturnNode(0, Location(), nil)]),
- Location(),
- :A
- )
-
- assert_errors expected, "class A; return; end", [
- ["Invalid return in class/module body", 9..15]
- ]
- end
-
- def test_dont_allow_return_inside_module_body
- expected = ModuleNode(
- [],
- Location(),
- ConstantReadNode(:A),
- StatementsNode([ReturnNode(0, Location(), nil)]),
- Location(),
- :A
- )
-
- assert_errors expected, "module A; return; end", [
- ["Invalid return in class/module body", 10..16]
- ]
- end
-
- def test_dont_allow_setting_to_back_and_nth_reference
- expected = BeginNode(
- Location(),
- StatementsNode([
- GlobalVariableWriteNode(:$+, Location(), NilNode(), Location()),
- GlobalVariableWriteNode(:$1466, Location(), NilNode(), Location())
- ]),
- nil,
- nil,
- nil,
- Location()
- )
-
- assert_errors expected, "begin\n$+ = nil\n$1466 = nil\nend", [
- ["Can't set variable $+", 6..8],
- ["Can't set variable $1466", 15..20]
- ]
- end
-
- def test_duplicated_parameter_names
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b), RequiredParameterNode(ParameterFlags::REPEATED_PARAMETER, :a)], [], nil, [], [], nil, nil),
- nil,
- [:a, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(a,b,a);end", [
- ["duplicated argument name", 12..13]
- ]
-
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b)], [], RestParameterNode(ParameterFlags::REPEATED_PARAMETER, :a, Location(), Location()), [], [], nil, nil),
- nil,
- [:a, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(a,b,*a);end", [
- ["duplicated argument name", 13..14]
- ]
-
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b)], [], nil, [], [], KeywordRestParameterNode(ParameterFlags::REPEATED_PARAMETER, :a, Location(), Location()), nil),
- nil,
- [:a, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(a,b,**a);end", [
- ["duplicated argument name", 14..15]
- ]
-
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([RequiredParameterNode(0, :a), RequiredParameterNode(0, :b)], [], nil, [], [], nil, BlockParameterNode(ParameterFlags::REPEATED_PARAMETER, :a, Location(), Location())),
- nil,
- [:a, :b],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(a,b,&a);end", [
- ["duplicated argument name", 13..14]
- ]
-
- expected = DefNode(
- :foo,
- Location(),
- nil,
- ParametersNode([], [OptionalParameterNode(0, :a, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL, 1))], RestParameterNode(0, :c, Location(), Location()), [RequiredParameterNode(0, :b)], [], nil, nil),
- nil,
- [:a, :b, :c],
- Location(),
- nil,
- Location(),
- Location(),
- nil,
- Location()
- )
-
- assert_errors expected, "def foo(a = 1,b,*c);end", [["unexpected parameter `*`", 16..17]]
- end
-
- def test_content_after_unterminated_heredoc
- receiver = StringNode(0, Location(), Location(), Location(), "")
- expected = CallNode(0, receiver, Location(), :foo, Location(), nil, nil, nil, nil)
-
- assert_errors expected, "<<~FOO.foo\n", [
- ["unterminated heredoc; can't find string \"FOO\" anywhere before EOF", 3..6]
- ]
+ def test_unterminated_empty_string_closing
+ statement = Prism.parse_statement('"')
+ assert_empty statement.unescaped
+ assert_empty statement.closing
end
def test_invalid_message_name
- result = Prism.parse("+.@foo,+=foo")
- assert_equal :"", result.value.statements.body.first.write_name
- end
-
- def test_invalid_operator_write_fcall
- source = "foo! += 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 0..4]
- ]
- end
-
- def test_invalid_operator_write_dot
- source = "foo.+= 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 5..6]
- ]
+ assert_equal :"", Prism.parse_statement("+.@foo,+=foo").write_name
end
- def test_unterminated_global_variable
- message = "'$' without identifiers is not allowed as a global variable name"
-
- assert_errors expression("$"), "$", [[message, 0..1]]
- assert_errors expression("$ "), "$ ", [[message, 0..1]]
- end
-
- def test_invalid_global_variable_write
- assert_errors expression("$',"), "$',", [
- ["Can't set variable $'", 0..2],
- ["unexpected write target", 0..2]
- ]
- end
-
- def test_invalid_multi_target
- error_messages = ["unexpected write target"]
-
- assert_error_messages "foo,", error_messages
- assert_error_messages "foo = 1; foo,", error_messages
- assert_error_messages "foo.bar,", error_messages
- assert_error_messages "*foo,", error_messages
- assert_error_messages "@foo,", error_messages
- assert_error_messages "@@foo,", error_messages
- assert_error_messages "$foo,", error_messages
- assert_error_messages "$1,", ["Can't set variable $1", *error_messages]
- assert_error_messages "$+,", ["Can't set variable $+", *error_messages]
- assert_error_messages "Foo,", error_messages
- assert_error_messages "::Foo,", error_messages
- assert_error_messages "Foo::Foo,", error_messages
- assert_error_messages "Foo::foo,", error_messages
- assert_error_messages "foo[foo],", error_messages
- assert_error_messages "(foo, bar)", error_messages
- assert_error_messages "foo((foo, bar))", error_messages
- assert_error_messages "foo((*))", error_messages
- assert_error_messages "foo(((foo, bar), *))", error_messages
- assert_error_messages "(foo, bar) + 1", error_messages
- assert_error_messages "(foo, bar) in baz", error_messages
- end
-
- def test_call_with_block_and_write
- source = "foo {} &&= 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 0..6],
- ["unexpected operator after a call with a block", 7..10]
- ]
- end
-
- def test_call_with_block_or_write
- source = "foo {} ||= 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 0..6],
- ["unexpected operator after a call with a block", 7..10]
- ]
- end
-
- def test_call_with_block_operator_write
- source = "foo {} += 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 0..6],
- ["unexpected operator after a call with a block", 7..9]
- ]
- end
-
- def test_index_call_with_block_and_write
- source = "foo[1] {} &&= 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 0..9],
- ["unexpected operator after a call with arguments", 10..13],
- ["unexpected operator after a call with a block", 10..13]
- ]
- end
-
- def test_index_call_with_block_or_write
- source = "foo[1] {} ||= 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 0..9],
- ["unexpected operator after a call with arguments", 10..13],
- ["unexpected operator after a call with a block", 10..13]
- ]
- end
-
- def test_index_call_with_block_operator_write
- source = "foo[1] {} += 1"
- assert_errors expression(source), source, [
- ["unexpected write target", 0..9],
- ["unexpected operator after a call with arguments", 10..12],
- ["unexpected operator after a call with a block", 10..12]
- ]
- end
-
- if RUBY_VERSION >= "3.0"
- def test_writing_numbered_parameter
- assert_errors expression("-> { _1 = 0 }"), "-> { _1 = 0 }", [
- ["_1 is reserved for numbered parameters", 5..7]
- ]
- end
-
- def test_targeting_numbered_parameter
- assert_errors expression("-> { _1, = 0 }"), "-> { _1, = 0 }", [
- ["_1 is reserved for numbered parameters", 5..7]
- ]
- end
-
- def test_defining_numbered_parameter
- error_messages = ["_1 is reserved for numbered parameters"]
-
- assert_error_messages "def _1; end", error_messages
- assert_error_messages "def self._1; end", error_messages
- end
- end
-
- def test_double_scope_numbered_parameters
- source = "-> { _1 + -> { _2 } }"
- errors = [["numbered parameter is already used in outer scope", 15..17]]
-
- assert_errors expression(source), source, errors
- end
-
- def test_invalid_number_underscores
- error_messages = ["invalid underscore placement in number"]
- assert_error_messages "1__1", error_messages
- assert_error_messages "0b1__1", error_messages
- assert_error_messages "0o1__1", error_messages
- assert_error_messages "01__1", error_messages
- assert_error_messages "0d1__1", error_messages
- assert_error_messages "0x1__1", error_messages
-
- error_messages = ["trailing '_' in number"]
- assert_error_messages "1_1_", error_messages
- assert_error_messages "0b1_1_", error_messages
- assert_error_messages "0o1_1_", error_messages
- assert_error_messages "01_1_", error_messages
- assert_error_messages "0d1_1_", error_messages
- assert_error_messages "0x1_1_", error_messages
- end
-
- def test_alnum_delimiters
- error_messages = ["invalid `%` token"]
-
- assert_error_messages "%qXfooX", error_messages
- assert_error_messages "%QXfooX", error_messages
- assert_error_messages "%wXfooX", error_messages
- assert_error_messages "%WxfooX", error_messages
- assert_error_messages "%iXfooX", error_messages
- assert_error_messages "%IXfooX", error_messages
- assert_error_messages "%xXfooX", error_messages
- assert_error_messages "%rXfooX", error_messages
- assert_error_messages "%sXfooX", error_messages
- end
-
- def test_begin_at_toplevel
- source = "def foo; BEGIN {}; end"
- assert_errors expression(source), source, [
- ["BEGIN is permitted only at toplevel", 9..14],
- ]
- end
-
- if RUBY_VERSION >= "3.0"
- def test_numbered_parameters_in_block_arguments
- source = "foo { |_1| }"
- assert_errors expression(source), source, [
- ["_1 is reserved for numbered parameters", 7..9],
- ]
- end
- end
-
- def test_conditional_predicate_closed
- source = "if 0 0; elsif 0 0; end\nunless 0 0; end"
- assert_errors expression(source), source, [
- ["expected `then` or `;` or '\\n" + "'", 5..6],
- ["expected `then` or `;` or '\\n" + "'", 16..17],
- ["expected `then` or `;` or '\\n" + "'", 32..33],
- ]
- end
-
- def test_parameter_name_ending_with_bang_or_question_mark
- source = "def foo(x!,y?); end"
- errors = [
- ["unexpected name for a parameter", 8..10],
- ["unexpected name for a parameter", 11..13]
- ]
- assert_errors expression(source), source, errors
- end
-
- def test_class_name
- source = "class 0.X end"
- assert_errors expression(source), source, [
- ["unexpected constant path after `class`; class/module name must be CONSTANT", 6..9],
- ]
- end
-
- def test_loop_conditional_is_closed
- source = "while 0 0; foo; end; until 0 0; foo; end"
- assert_errors expression(source), source, [
- ["expected a predicate expression for the `while` statement", 7..7],
- ["expected a predicate expression for the `until` statement", 28..28],
- ]
- end
-
- def test_forwarding_arg_after_keyword_rest
- source = "def f(**,...);end"
- assert_errors expression(source), source, [
- ["unexpected parameter order", 9..12]
- ]
- end
-
- def test_semicolon_after_inheritance_operator
- source = "class Foo < Bar end"
- assert_errors expression(source), source, [
- ["unexpected `end`, expecting ';' or '\\n'", 15..15],
- ]
- end
-
- def test_shadow_args_in_lambda
- source = "->a;b{}"
-
- assert_errors expression(source), source, [
- ["expected a `do` keyword or a `{` to open the lambda block", 3..3],
- ["unexpected end of file, expecting end-of-input", 7..7],
- ["unexpected end of file, assuming it is closing the parent top level context", 7..7],
- ["expected a lambda block beginning with `do` to end with `end`", 7..7]
- ]
- end
-
- def test_shadow_args_in_block
- source = "tap{|a;a|}"
- assert_errors expression(source), source, [
- ["duplicated argument name", 7..8],
- ]
- end
-
- def test_repeated_parameter_name_in_destructured_params
- source = "def f(a, (b, (a))); end"
-
- assert_errors expression(source), source, [
- ["duplicated argument name", 14..15],
- ]
- end
-
- def test_assign_to_numbered_parameter
- source = <<~RUBY
- a in _1
- a => _1
- 1 => a, _1
- 1 in a, _1
- /(?<_1>)/ =~ a
- RUBY
-
- message = "_1 is reserved for numbered parameters"
- assert_errors expression(source), source, [
- [message, 5..7],
- [message, 13..15],
- [message, 24..26],
- [message, 35..37],
- [message, 42..44]
- ]
- end
-
- def test_symbol_in_keyword_parameter
- source = "def foo(x:'y':); end"
- assert_errors expression(source), source, [
- ["unexpected label terminator, expected a string literal terminator", 12..14]
- ]
- end
-
- def test_symbol_in_hash
- source = "{x:'y':}"
- assert_errors expression(source), source, [
- ["unexpected label terminator, expected a string literal terminator", 5..7]
- ]
- end
-
- def test_while_endless_method
- source = "while def f = g do end"
-
- assert_errors expression(source), source, [
- ["expected a predicate expression for the `while` statement", 22..22],
- ["unexpected end of file, assuming it is closing the parent top level context", 22..22],
- ["expected an `end` to close the `while` statement", 22..22]
- ]
- end
-
- def test_match_plus
- source = <<~RUBY
- a in b + c
- a => b + c
- RUBY
-
- assert_errors expression(source), source, [
- ["unexpected '+', expecting end-of-input", 7..8],
- ["unexpected '+', ignoring it", 7..8],
- ["unexpected '+', expecting end-of-input", 18..19],
- ["unexpected '+', ignoring it", 18..19]
- ]
- end
-
- def test_rational_number_with_exponential_portion
- source = '1e1r; 1e1ri'
-
- assert_errors expression(source), source, [
- ["unexpected local variable or method, expecting end-of-input", 3..4],
- ["unexpected local variable or method, expecting end-of-input", 9..11]
- ]
- end
-
- def test_check_value_expression
- source = <<~RUBY
- 1 => ^(return)
- while true
- 1 => ^(break)
- 1 => ^(next)
- 1 => ^(redo)
- 1 => ^(retry)
- 1 => ^(2 => a)
- end
- 1 => ^(if 1; (return) else (return) end)
- 1 => ^(unless 1; (return) else (return) end)
- RUBY
-
- message = "unexpected void value expression"
- assert_errors expression(source), source, [
- [message, 7..13],
- [message, 35..40],
- [message, 51..55],
- [message, 66..70],
- ["Invalid retry without rescue", 81..86],
- [message, 81..86],
- [message, 97..103],
- [message, 123..129],
- [message, 168..174],
- ]
- end
-
- def test_void_value_expression_in_statement
- source = <<~RUBY
- if (return)
- end
- unless (return)
- end
- while (return)
- end
- until (return)
- end
- case (return)
- when 1
- end
- class A < (return)
- end
- class << (return)
- end
- for x in (return)
- end
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 4..10],
- [message, 24..30],
- [message, 43..49],
- [message, 62..68],
- [message, 80..86],
- [message, 110..116],
- [message, 132..138],
- [message, 154..160],
- ]
- end
-
- def test_void_value_expression_in_def
- source = <<~RUBY
- def (return).x
- end
- def x(a = return)
- end
- def x(a: return)
- end
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 5..11],
- [message, 29..35],
- [message, 50..56],
- ]
- end
-
- def test_void_value_expression_in_assignment
- source = <<~RUBY
- a = return
- a = 1, return
- a, b = return, 1
- a, b = 1, *return
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 4..10],
- [message, 18..24],
- [message, 32..38],
- [message, 53..59],
- ]
- end
-
- def test_void_value_expression_in_modifier
- source = <<~RUBY
- 1 if (return)
- 1 unless (return)
- 1 while (return)
- 1 until (return)
- (return) => a
- (return) in a
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 6..12],
- [message, 24..30],
- [message, 41..47],
- [message, 58..64],
- [message, 67..73],
- [message, 81..87]
- ]
- end
-
- def test_void_value_expression_in_expression
- source = <<~RUBY
- (return) ? 1 : 1
- (return)..1
- 1..(return)
- (return)...1
- 1...(return)
- (..(return))
- (...(return))
- ((return)..)
- ((return)...)
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 1..7],
- [message, 18..24],
- [message, 33..39],
- [message, 42..48],
- [message, 59..65],
- [message, 71..77],
- [message, 85..91],
- [message, 96..102],
- [message, 109..115]
- ]
- end
-
- def test_void_value_expression_in_array
- source = <<~RUBY
- [return]
- [1, return]
- [ return => 1 ]
- [ 1 => return ]
- [ a: return ]
- [ *return ]
- [ **return ]
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 1..7],
- [message, 13..19],
- [message, 23..29],
- [message, 44..50],
- [message, 58..64],
- [message, 70..76],
- [message, 83..89],
- ]
- end
-
- def test_void_value_expression_in_hash
- source = <<~RUBY
- { return => 1 }
- { 1 => return }
- { a: return }
- { **return }
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 2..8],
- [message, 23..29],
- [message, 37..43],
- [message, 50..56],
- ]
- end
-
- def test_void_value_expression_in_call
- source = <<~RUBY
- (return).foo
- (return).(1)
- (return)[1]
- (return)[1] = 2
- (return)::foo
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 1..7],
- [message, 14..20],
- [message, 27..33],
- [message, 39..45],
- [message, 55..61],
- ]
- end
-
- def test_void_value_expression_in_constant_path
- source = <<~RUBY
- (return)::A
- class (return)::A; end
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 1..7],
- [message, 19..25],
- ]
- end
-
- def test_void_value_expression_in_arguments
- source = <<~RUBY
- foo(return)
- foo(1, return)
- foo(*return)
- foo(**return)
- foo(&return)
- foo(return => 1)
- foo(:a => return)
- foo(a: return)
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 4..10],
- [message, 19..25],
- [message, 32..38],
- [message, 46..52],
- [message, 59..65],
- [message, 71..77],
- [message, 94..100],
- [message, 109..115],
- ]
- end
-
- def test_void_value_expression_in_unary_call
- source = <<~RUBY
- +(return)
- not return
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 2..8],
- [message, 14..20],
- ]
- end
-
- def test_void_value_expression_in_binary_call
- source = <<~RUBY
- 1 + (return)
- (return) + 1
- 1 and (return)
- (return) and 1
- 1 or (return)
- (return) or 1
- RUBY
-
- message = 'unexpected void value expression'
- assert_errors expression(source), source, [
- [message, 5..11],
- [message, 14..20],
- [message, 42..48],
- [message, 71..77],
- ]
- end
-
- def test_trailing_comma_in_calls
- assert_errors expression("foo 1,"), "foo 1,", [
- ["expected an argument", 5..6]
- ]
- end
-
- def test_argument_after_ellipsis
- source = 'def foo(...); foo(..., 1); end'
- assert_errors expression(source), source, [
- ['unexpected argument after `...`', 23..24]
- ]
- end
-
- def test_ellipsis_in_no_paren_call
- source = 'def foo(...); foo 1, ...; end'
- assert_errors expression(source), source, [
- ['unexpected `...` in an non-parenthesized call', 21..24]
- ]
- end
-
- def test_non_assoc_range
- source = '1....2'
-
- assert_errors expression(source), source, [
- ["unexpected '.', expecting end-of-input", 4..5],
- ["unexpected '.', ignoring it", 4..5]
- ]
- end
-
- def test_upcase_end_in_def
- assert_warning_messages "def foo; END { }; end", [
- "END in method; use at_exit"
- ]
- end
-
- def test_warnings_verbosity
- warning = Prism.parse("def foo; END { }; end").warnings[0]
- assert_equal "END in method; use at_exit", warning.message
- assert_equal :default, warning.level
-
- warning = Prism.parse("foo /regexp/").warnings[0]
- assert_equal "ambiguous `/`; wrap regexp in parentheses or add a space after `/` operator", warning.message
- assert_equal :verbose, warning.level
- end
-
- def test_statement_operators
- source = <<~RUBY
- alias x y + 1
- alias x y.z
- BEGIN { bar } + 1
- BEGIN { bar }.z
- END { bar } + 1
- END { bar }.z
- undef x + 1
- undef x.z
- RUBY
-
- assert_errors expression(source), source, [
- ["unexpected '+', expecting end-of-input", 10..11],
- ["unexpected '+', ignoring it", 10..11],
- ["unexpected '.', expecting end-of-input", 23..24],
- ["unexpected '.', ignoring it", 23..24],
- ["unexpected '+', expecting end-of-input", 40..41],
- ["unexpected '+', ignoring it", 40..41],
- ["unexpected '.', expecting end-of-input", 57..58],
- ["unexpected '.', ignoring it", 57..58],
- ["unexpected '+', expecting end-of-input", 72..73],
- ["unexpected '+', ignoring it", 72..73],
- ["unexpected '.', expecting end-of-input", 87..88],
- ["unexpected '.', ignoring it", 87..88],
- ["unexpected '+', expecting end-of-input", 98..99],
- ["unexpected '+', ignoring it", 98..99],
- ["unexpected '.', expecting end-of-input", 109..110],
- ["unexpected '.', ignoring it", 109..110]
- ]
- end
-
- def test_statement_at_non_statement
- source = <<~RUBY
- foo(alias x y)
- foo(BEGIN { bar })
- foo(END { bar })
- foo(undef x)
- RUBY
- assert_errors expression(source), source, [
- ['unexpected an `alias` at a non-statement position', 4..9],
- ['unexpected a `BEGIN` at a non-statement position', 19..24],
- ['unexpected an `END` at a non-statement position', 38..41],
- ['unexpected an `undef` at a non-statement position', 55..60],
- ]
- end
-
- def test_binary_range_with_left_unary_range
- source = <<~RUBY
- ..1..
- ...1..
- RUBY
-
- assert_errors expression(source), source, [
- ["unexpected .., expecting end-of-input", 3..5],
- ["unexpected .., ignoring it", 3..5],
- ["unexpected .., expecting end-of-input", 10..12],
- ["unexpected .., ignoring it", 10..12]
- ]
- end
-
- def test_circular_param
+ def test_circular_parameters
source = <<~RUBY
def foo(bar = bar) = 42
def foo(bar: bar) = 42
@@ -1957,288 +76,26 @@ module Prism
proc { |foo: foo| }
RUBY
- assert_errors expression(source), source, [
- ["circular argument reference - bar", 8..11],
- ["circular argument reference - bar", 32..35],
- ["circular argument reference - foo", 55..58],
- ["circular argument reference - foo", 76..79]
- ]
-
- refute_error_messages("def foo(bar: bar = 1); end")
- end
-
- def test_command_calls
- sources = <<~RUBY.lines
- [a b]
- {a: b c}
- ...a b
- if ...a b; end
- a b, c d
- a(b, c d)
- a(*b c)
- a(**b c)
- a(&b c)
- +a b
- a + b c
- a && b c
- a =~ b c
- a = b, c d
- a = *b c
- a, b = c = d f
- a ? b c : d e
- defined? a b
- ! ! a b
- def f a = b c; end
- def f(a = b c); end
- a = b rescue c d
- def a = b rescue c d
- ->a=b c{}
- ->(a=b c){}
- case; when a b; end
- case; in a if a b; end
- case; in a unless a b; end
- begin; rescue a b; end
- begin; rescue a b => c; end
- RUBY
-
- sources.each do |source|
- refute_valid_syntax(source)
- assert_false(Prism.parse(source).success?)
- end
- end
-
- def test_range_and_bin_op
- sources = <<~RUBY.lines
- 1..2..3
- 1..2..
- 1.. || 2
- 1.. & 2
- 1.. * 2
- 1.. / 2
- 1.. % 2
- 1.. ** 2
- RUBY
-
- sources.each do |source|
- refute_valid_syntax(source)
- assert_false(Prism.parse(source).success?)
+ source.each_line do |line|
+ assert_predicate Prism.parse(line, version: "3.3.0"), :failure?
+ assert_predicate Prism.parse(line), :success?
end
end
- def test_command_call_in
- source = <<~RUBY
- foo 1 in a
- a = foo 2 in b
- RUBY
-
- assert_errors expression(source), source, [
- ["unexpected `in` keyword in arguments", 9..10],
- ["unexpected local variable or method, expecting end-of-input", 9..10],
- ["unexpected `in` keyword in arguments", 24..25],
- ["unexpected local variable or method, expecting end-of-input", 24..25]
- ]
- end
-
- def test_constant_assignment_in_method
- source = 'def foo();A=1;end'
- assert_errors expression(source), source, [
- ['dynamic constant assignment', 10..13]
- ]
- end
-
- def test_non_assoc_equality
- source = <<~RUBY
- 1 == 2 == 3
- 1 != 2 != 3
- 1 === 2 === 3
- 1 =~ 2 =~ 3
- 1 !~ 2 !~ 3
- 1 <=> 2 <=> 3
- RUBY
-
- assert_errors expression(source), source, [
- ["unexpected '==', expecting end-of-input", 7..9],
- ["unexpected '==', ignoring it", 7..9],
- ["unexpected '!=', expecting end-of-input", 19..21],
- ["unexpected '!=', ignoring it", 19..21],
- ["unexpected '===', expecting end-of-input", 32..35],
- ["unexpected '===', ignoring it", 32..35],
- ["unexpected '=~', expecting end-of-input", 45..47],
- ["unexpected '=~', ignoring it", 45..47],
- ["unexpected '!~', expecting end-of-input", 57..59],
- ["unexpected '!~', ignoring it", 57..59],
- ["unexpected '<=>', expecting end-of-input", 70..73],
- ["unexpected '<=>', ignoring it", 70..73]
- ]
- end
-
- def test_block_arg_and_block
- source = 'foo(&1) { }'
- assert_errors expression(source), source, [
- ["both block arg and actual block given; only one block is allowed", 8..11]
- ]
- end
-
- def test_forwarding_arg_and_block
- source = 'def foo(...) = foo(...) { }'
- assert_errors expression(source), source, [
- ['both block arg and actual block given; only one block is allowed', 24..27]
- ]
- end
-
- def test_it_with_ordinary_parameter
- source = "proc { || it }"
- errors = [["`it` is not allowed when an ordinary parameter is defined", 10..12]]
-
- assert_errors expression(source), source, errors, check_valid_syntax: RUBY_VERSION >= "3.4.0"
- end
-
- def test_regular_expression_with_unknown_regexp_options
- source = "/foo/AZaz"
- errors = [["unknown regexp options: AZaz", 4..9]]
-
- assert_errors expression(source), source, errors
- end
-
- def test_interpolated_regular_expression_with_unknown_regexp_options
- source = "/\#{foo}/AZaz"
- errors = [["unknown regexp options: AZaz", 7..12]]
-
- assert_errors expression(source), source, errors
- end
-
- def test_singleton_method_for_literals
- source = <<~'RUBY'
- def (1).g; end
- def ((a; 1)).foo; end
- def ((return; 1)).bar; end
- def (((1))).foo; end
- def (__FILE__).foo; end
- def (__ENCODING__).foo; end
- def (__LINE__).foo; end
- def ("foo").foo; end
- def (3.14).foo; end
- def (3.14i).foo; end
- def (:foo).foo; end
- def (:'foo').foo; end
- def (:'f{o}').foo; end
- def ('foo').foo; end
- def ("foo").foo; end
- def ("#{fo}o").foo; end
- def (/foo/).foo; end
- def (/f#{oo}/).foo; end
- def ([1]).foo; end
- RUBY
- errors = [
- ["cannot define singleton method for literals", 5..6],
- ["cannot define singleton method for literals", 24..25],
- ["cannot define singleton method for literals", 51..52],
- ["cannot define singleton method for literals", 71..72],
- ["cannot define singleton method for literals", 90..98],
- ["cannot define singleton method for literals", 114..126],
- ["cannot define singleton method for literals", 142..150],
- ["cannot define singleton method for literals", 166..171],
- ["cannot define singleton method for literals", 187..191],
- ["cannot define singleton method for literals", 207..212],
- ["cannot define singleton method for literals", 228..232],
- ["cannot define singleton method for literals", 248..254],
- ["cannot define singleton method for literals", 270..277],
- ["cannot define singleton method for literals", 293..298],
- ["cannot define singleton method for literals", 314..319],
- ["cannot define singleton method for literals", 335..343],
- ["cannot define singleton method for literals", 359..364],
- ["cannot define singleton method for literals", 380..388],
- ["cannot define singleton method for literals", 404..407]
- ]
- assert_errors expression(source), source, errors
- end
-
- def test_assignment_to_literal_in_conditionals
- source = <<~RUBY
- if (a = 2); end
- if ($a = 2); end
- if (@a = 2); end
- if (@@a = 2); end
- if a elsif b = 2; end
- unless (a = 2); end
- unless ($a = 2); end
- unless (@a = 2); end
- unless (@@a = 2); end
- while (a = 2); end
- while ($a = 2); end
- while (@a = 2); end
- while (@@a = 2); end
- until (a = 2); end
- until ($a = 2); end
- until (@a = 2); end
- until (@@a = 2); end
- foo if a = 2
- foo if (a, b = 2)
- (@foo = 1) ? a : b
- !(a = 2)
- not a = 2
- RUBY
- assert_warning_messages source, [
- "found '= literal' in conditional, should be =="
- ] * source.lines.count
- end
-
- def test_duplicate_pattern_capture
- source = <<~RUBY
- case (); in [a, a]; end
- case (); in [a, *a]; end
- case (); in {a: a, b: a}; end
- case (); in {a: a, **a}; end
- case (); in [a, {a:}]; end
- case (); in [a, {a: {a: {a: [a]}}}]; end
- case (); in a => a; end
- case (); in [A => a, {a: b => a}]; end
- RUBY
-
- assert_error_messages source, Array.new(source.lines.length, "duplicated variable name")
- refute_error_messages "case (); in [_a, _a]; end"
- end
-
- def test_duplicate_pattern_hash_key
- assert_error_messages "case (); in {a:, a:}; end", ["duplicated key name", "duplicated variable name"]
- assert_error_messages "case (); in {a:1, a:2}; end", ["duplicated key name"]
- refute_error_messages "case (); in [{a:1}, {a:2}]; end"
- end
-
- def test_unexpected_block
- assert_error_messages "def foo = yield(&:+)", ["block argument should not be given"]
- end
-
private
- def assert_errors(expected, source, errors, check_valid_syntax: true)
- refute_valid_syntax(source) if check_valid_syntax
+ def assert_errors(filepath)
+ expected = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
- result = Prism.parse(source)
- node = result.value.statements.body.last
-
- assert_equal_nodes(expected, node, compare_location: false)
- assert_equal(errors, result.errors.map { |e| [e.message, e.location.start_offset..e.location.end_offset] })
- end
-
- def assert_error_messages(source, errors)
+ source = expected.lines.grep_v(/^\s*\^/).join.gsub(/\n*\z/, "")
refute_valid_syntax(source)
- result = Prism.parse(source)
- assert_equal(errors, result.errors.map(&:message))
- end
-
- def refute_error_messages(source)
- assert_valid_syntax(source)
- assert Prism.parse_success?(source), "Expected #{source.inspect} to parse successfully"
- end
- def assert_warning_messages(source, warnings)
result = Prism.parse(source)
- assert_equal(warnings, result.warnings.map(&:message))
- end
+ errors = result.errors
+ refute_empty errors, "Expected errors in #{filepath}"
- def expression(source)
- Prism.parse(source).value.statements.body.last
+ actual = result.errors_format
+ assert_equal expected, actual, "Expected errors to match for #{filepath}"
end
end
end
diff --git a/test/prism/fixtures/break.txt b/test/prism/fixtures/break.txt
index 82fa45bdb4..5532322c5c 100644
--- a/test/prism/fixtures/break.txt
+++ b/test/prism/fixtures/break.txt
@@ -23,3 +23,7 @@ tap { break(1) }
foo { break 42 } == 42
foo { |a| break } == 42
+
+while _ && break; end
+
+until _ && break; end
diff --git a/test/prism/fixtures/methods.txt b/test/prism/fixtures/methods.txt
index 4bfd976eda..d59196bdfd 100644
--- a/test/prism/fixtures/methods.txt
+++ b/test/prism/fixtures/methods.txt
@@ -181,3 +181,8 @@ end
def foo(bar = (def baz(bar) = bar; 1)) = 2
def (class Foo; end).foo(bar = 1) = 2
+
+module Foo
+ def clone(opts = nil || (return self))
+ end
+end
diff --git a/test/prism/fixtures/patterns.txt b/test/prism/fixtures/patterns.txt
index 7ce3b9e4a8..29f8b4cf80 100644
--- a/test/prism/fixtures/patterns.txt
+++ b/test/prism/fixtures/patterns.txt
@@ -215,3 +215,6 @@ foo => Object[{x:}]
a,
b
) = c
+
+case (); in [_a, _a]; end
+case (); in [{a:1}, {a:2}]; end
diff --git a/test/prism/fixtures/regex.txt b/test/prism/fixtures/regex.txt
index 84b5ca0600..4623733f58 100644
--- a/test/prism/fixtures/regex.txt
+++ b/test/prism/fixtures/regex.txt
@@ -44,3 +44,5 @@ tap { /(?<a>)/ =~ to_s }
/(?<nil>)/ =~ ""
def foo(nil:) = /(?<nil>)/ =~ ""
+
+/(?-x:#)/x
diff --git a/test/prism/fixtures/regex_escape_encoding.txt b/test/prism/fixtures/regex_escape_encoding.txt
new file mode 100644
index 0000000000..74e1647d67
--- /dev/null
+++ b/test/prism/fixtures/regex_escape_encoding.txt
@@ -0,0 +1,3 @@
+# encoding: US-ASCII
+str = "hello \xFC"
+str =~ /hello \u{fc}/
diff --git a/test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt b/test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt
index d88e1fd21c..4420560d2b 100644
--- a/test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt
+++ b/test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt
@@ -1,2 +1,2 @@
-%Q{ \
+%q{ \
}
diff --git a/test/prism/fixtures/unparser/corpus/literal/unary.txt b/test/prism/fixtures/unparser/corpus/literal/unary.txt
index 77685cb71d..6992d86bb0 100644
--- a/test/prism/fixtures/unparser/corpus/literal/unary.txt
+++ b/test/prism/fixtures/unparser/corpus/literal/unary.txt
@@ -6,3 +6,4 @@
-a
+a
-(-a).foo
++(+a).foo
diff --git a/test/prism/fixtures/whitequark/method_definition_in_while_cond.txt b/test/prism/fixtures/whitequark/method_definition_in_while_cond.txt
new file mode 100644
index 0000000000..6ec38906a1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/method_definition_in_while_cond.txt
@@ -0,0 +1,7 @@
+while def foo a = tap do end; end; break; end
+
+while def foo; tap do end; end; break; end
+
+while def self.foo a = tap do end; end; break; end
+
+while def self.foo; tap do end; end; break; end
diff --git a/test/prism/fixtures_test.rb b/test/prism/fixtures_test.rb
new file mode 100644
index 0000000000..7225b4ac66
--- /dev/null
+++ b/test/prism/fixtures_test.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+return if RUBY_VERSION < "3.2.0"
+
+require_relative "test_helper"
+
+module Prism
+ class FixturesTest < TestCase
+ except = []
+
+ # Ruby < 3.3.0 cannot parse heredocs where there are leading whitespace
+ # characters in the heredoc start.
+ # Example: <<~' EOF' or <<-' EOF'
+ # https://bugs.ruby-lang.org/issues/19539
+ except << "heredocs_leading_whitespace.txt" if RUBY_VERSION < "3.3.0"
+
+ Fixture.each(except: except) do |fixture|
+ define_method(fixture.test_name) { assert_valid_syntax(fixture.read) }
+ end
+ end
+end
diff --git a/test/prism/format_errors_test.rb b/test/prism/format_errors_test.rb
deleted file mode 100644
index a1edbef2e8..0000000000
--- a/test/prism/format_errors_test.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-return if Prism::BACKEND == :FFI
-
-module Prism
- class FormatErrorsTest < TestCase
- def test_format_errors
- assert_equal <<~ERROR, Debug.format_errors("<>", false)
- > 1 | <>
- | ^ unexpected '<', ignoring it
- | ^ unexpected '>', ignoring it
- ERROR
-
- assert_equal <<~'ERROR', Debug.format_errors('"%W"\u"', false)
- > 1 | "%W"\u"
- | ^ unexpected backslash, ignoring it
- | ^ unexpected local variable or method, expecting end-of-input
- | ^ unterminated string meets end of file
- ERROR
- end
- end
-end
diff --git a/test/prism/fuzzer_test.rb b/test/prism/fuzzer_test.rb
index 511210e7ee..4927478bdc 100644
--- a/test/prism/fuzzer_test.rb
+++ b/test/prism/fuzzer_test.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-return if ENV["PRISM_BUILD_MINIMAL"]
-
require_relative "test_helper"
module Prism
@@ -9,7 +7,7 @@ module Prism
# invalid memory access.
class FuzzerTest < TestCase
def self.snippet(name, source)
- define_method(:"test_fuzzer_#{name}") { Prism.dump(source) }
+ define_method(:"test_fuzzer_#{name}") { Prism.profile(source) }
end
snippet "incomplete global variable", "$"
@@ -39,29 +37,31 @@ module Prism
snippet "escaped unicode at end of file 8", '"\\u33'
snippet "escaped unicode at end of file 9", '"\\u333'
snippet "float suffix at end of file", "1e"
+ snippet "parameter name that is zero length", "a { |b;"
snippet "statements node with multiple heredocs", <<~EOF
for <<A + <<B
A
B
EOF
+
snippet "create a binary call node with arg before receiver", <<~EOF
<<-A.g/{/
A
/, ""\\
EOF
+
snippet "regular expression with start and end out of order", <<~RUBY
<<-A.g//,
A
/{/, ''\\
RUBY
+
snippet "interpolated regular expression with start and end out of order", <<~RUBY
<<-A.g/{/,
A
a
/{/, ''\\
RUBY
-
- snippet "parameter name that is zero length", "a { |b;"
end
end
diff --git a/test/prism/heredoc_dedent_test.rb b/test/prism/heredoc_dedent_test.rb
index 9fbc4d936a..4e7a3c0a14 100644
--- a/test/prism/heredoc_dedent_test.rb
+++ b/test/prism/heredoc_dedent_test.rb
@@ -4,24 +4,131 @@ require_relative "test_helper"
module Prism
class HeredocDedentTest < TestCase
- filepath = File.expand_path("fixtures/tilde_heredocs.txt", __dir__)
+ def test_content_dedented_interpolation_content
+ assert_heredoc_dedent(
+ " a\n" "1\n" " a\n",
+ "<<~EOF\n" " a\n" "\#{1}\n" " a\n" "EOF\n"
+ )
+ end
+
+ def test_content
+ assert_heredoc_dedent(
+ "a\n",
+ "<<~EOF\n" " a\n" "EOF\n"
+ )
+ end
+
+ def test_tabs_dedent_spaces
+ assert_heredoc_dedent(
+ "\ta\n" "b\n" "\t\tc\n",
+ "<<~EOF\n" "\ta\n" " b\n" "\t\tc\n" "EOF\n"
+ )
+ end
+
+ def test_interpolation_then_content
+ assert_heredoc_dedent(
+ "1 a\n",
+ "<<~EOF\n" " \#{1} a\n" "EOF\n"
+ )
+ end
+
+ def test_content_then_interpolation
+ assert_heredoc_dedent(
+ "a 1\n",
+ "<<~EOF\n" " a \#{1}\n" "EOF\n"
+ )
+ end
+
+ def test_content_dedented_interpolation
+ assert_heredoc_dedent(
+ " a\n" "1\n",
+ "<<~EOF\n" " a\n" " \#{1}\n" "EOF\n"
+ )
+ end
+
+ def test_content_interpolation
+ assert_heredoc_dedent(
+ "a\n" "1\n",
+ "<<~EOF\n" " a\n" " \#{1}\n" "EOF\n"
+ )
+ end
- File.read(filepath).split(/(?=\n)\n(?=<)/).each_with_index do |heredoc, index|
- # The first example in this file has incorrect dedent calculated by
- # TruffleRuby so we skip it.
- next if index == 0 && RUBY_ENGINE == "truffleruby"
+ def test_content_content
+ assert_heredoc_dedent(
+ "a\n" "b\n",
+ "<<~EOF\n" " a\n" " b\n" "EOF\n"
+ )
+ end
- define_method "test_heredoc_#{index}" do
- node = Prism.parse(heredoc).value.statements.body.first
+ def test_content_indented_content
+ assert_heredoc_dedent(
+ "a\n" " b\n",
+ "<<~EOF\n" " a\n" " b\n" "EOF\n"
+ )
+ end
- if node.is_a?(StringNode)
- actual = node.unescaped
- else
- actual = node.parts.map { |part| part.is_a?(StringNode) ? part.unescaped : "1" }.join
- end
+ def test_content_dedented_content
+ assert_heredoc_dedent(
+ "\ta\n" "b\n",
+ "<<~EOF\n" "\t\t\ta\n" "\t\tb\n" "EOF\n"
+ )
+ end
- assert_equal(eval(heredoc), actual, "Expected heredocs to match.")
+ def test_single_quote
+ assert_heredoc_dedent(
+ "a \#{1}\n",
+ "<<~'EOF'\n" "a \#{1}\n" "EOF\n"
+ )
+ end
+
+ def test_mixed_indentation
+ assert_heredoc_dedent(
+ "a\n" " b\n",
+ "<<~EOF\n" "\ta\n" "\t b\n" "EOF\n"
+ )
+ end
+
+ def test_indented_content_content
+ assert_heredoc_dedent(
+ " a\n" "b\n",
+ "<<~EOF\n" "\t a\n" "\tb\n" "EOF\n"
+ )
+ end
+
+ def test_indent_size
+ assert_heredoc_dedent(
+ "a\n" " b\n",
+ "<<~EOF\n" "\ta\n" " b\n" "EOF\n"
+ )
+ end
+
+ def test_blank_lines
+ assert_heredoc_dedent(
+ "a\n" "\n" "b\n",
+ "<<~EOF\n" " a\n" "\n" " b\n" "EOF\n"
+ )
+ end
+
+ def test_many_blank_lines
+ assert_heredoc_dedent(
+ "a\n" "\n" "\n" "\n" "\n" "b\n",
+ "<<~EOF\n" " a\n" "\n" "\n" "\n" "\n" " b\n" "EOF\n"
+ )
+ end
+
+ private
+
+ def assert_heredoc_dedent(expected, source)
+ node = Prism.parse_statement(source)
+
+ if node.is_a?(StringNode)
+ actual = node.unescaped
+ else
+ actual = node.parts.map { |part| part.is_a?(StringNode) ? part.unescaped : "1" }.join
end
+
+ assert_equal(expected, actual)
+ assert_equal(eval(source), actual)
end
end
end
diff --git a/test/prism/index_write_test.rb b/test/prism/index_write_test.rb
deleted file mode 100644
index cf90eb082f..0000000000
--- a/test/prism/index_write_test.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class IndexWriteTest < TestCase
- def test_keywords_3_3
- assert_parse_success(<<~RUBY, "3.3.0")
- foo[bar: 1] = 1
- foo[bar: 1] &&= 1
- foo[bar: 1] ||= 1
- foo[bar: 1] += 1
- RUBY
-
- assert_parse_success(<<~RUBY, "3.3.0")
- def foo(**)
- bar[**] = 1
- bar[**] &&= 1
- bar[**] ||= 1
- bar[**] += 1
- end
- RUBY
- end
-
- def test_block_3_3
- assert_parse_success(<<~RUBY, "3.3.0")
- foo[&bar] = 1
- foo[&bar] &&= 1
- foo[&bar] ||= 1
- foo[&bar] += 1
- RUBY
-
- assert_parse_success(<<~RUBY, "3.3.0")
- def foo(&)
- bar[&] = 1
- bar[&] &&= 1
- bar[&] ||= 1
- bar[&] += 1
- end
- RUBY
- end
-
- def test_keywords_latest
- assert_parse_failure(<<~RUBY)
- foo[bar: 1] = 1
- foo[bar: 1] &&= 1
- foo[bar: 1] ||= 1
- foo[bar: 1] += 1
- RUBY
-
- assert_parse_failure(<<~RUBY)
- def foo(**)
- bar[**] = 1
- bar[**] &&= 1
- bar[**] ||= 1
- bar[**] += 1
- end
- RUBY
- end
-
- def test_block_latest
- assert_parse_failure(<<~RUBY)
- foo[&bar] = 1
- foo[&bar] &&= 1
- foo[&bar] ||= 1
- foo[&bar] += 1
- RUBY
-
- assert_parse_failure(<<~RUBY)
- def foo(&)
- bar[&] = 1
- bar[&] &&= 1
- bar[&] ||= 1
- bar[&] += 1
- end
- RUBY
- end
-
- private
-
- def assert_parse_success(source, version = "latest")
- assert Prism.parse_success?(source, version: version)
- end
-
- def assert_parse_failure(source, version = "latest")
- assert Prism.parse_failure?(source, version: version)
- end
- end
-end
diff --git a/test/prism/integer_parse_test.rb b/test/prism/integer_parse_test.rb
deleted file mode 100644
index f42e817e79..0000000000
--- a/test/prism/integer_parse_test.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-return if Prism::BACKEND == :FFI
-
-module Prism
- class IntegerParseTest < TestCase
- def test_integer_parse
- assert_integer_parse(1)
- assert_integer_parse(50)
- assert_integer_parse(100)
- assert_integer_parse(100, "1_0_0")
- assert_integer_parse(8, "0_1_0")
-
- assert_integer_parse(10, "0b1010")
- assert_integer_parse(10, "0B1010")
- assert_integer_parse(10, "0o12")
- assert_integer_parse(10, "0O12")
- assert_integer_parse(10, "012")
- assert_integer_parse(10, "0d10")
- assert_integer_parse(10, "0D10")
- assert_integer_parse(10, "0xA")
- assert_integer_parse(10, "0XA")
-
- assert_integer_parse(2**32)
- assert_integer_parse(2**64 + 2**32)
- assert_integer_parse(2**128 + 2**64 + 2**32)
-
- num = 99 ** 99
- assert_integer_parse(num, "0b#{num.to_s(2)}")
- assert_integer_parse(num, "0o#{num.to_s(8)}")
- assert_integer_parse(num, "0d#{num.to_s(10)}")
- assert_integer_parse(num, "0x#{num.to_s(16)}")
- end
-
- private
-
- def assert_integer_parse(expected, source = expected.to_s)
- integer, string = Debug.integer_parse(source)
- assert_equal expected, integer
- assert_equal expected.to_s, string
- end
- end
-end
diff --git a/test/prism/lex_test.rb b/test/prism/lex_test.rb
new file mode 100644
index 0000000000..7eac677ef7
--- /dev/null
+++ b/test/prism/lex_test.rb
@@ -0,0 +1,90 @@
+# frozen_string_literal: true
+
+return if !(RUBY_ENGINE == "ruby" && RUBY_VERSION >= "3.2.0")
+
+require_relative "test_helper"
+
+module Prism
+ class LexTest < TestCase
+ except = [
+ # It seems like there are some oddities with nested heredocs and ripper.
+ # Waiting for feedback on https://bugs.ruby-lang.org/issues/19838.
+ "seattlerb/heredoc_nested.txt",
+ "whitequark/dedenting_heredoc.txt",
+ # Ripper seems to have a bug that the regex portions before and after
+ # the heredoc are combined into a single token. See
+ # https://bugs.ruby-lang.org/issues/19838.
+ "spanning_heredoc.txt",
+ "spanning_heredoc_newlines.txt"
+ ]
+
+ if RUBY_VERSION < "3.3.0"
+ # This file has changed behavior in Ripper in Ruby 3.3, so we skip it if
+ # we're on an earlier version.
+ except << "seattlerb/pct_w_heredoc_interp_nested.txt"
+
+ # Ruby < 3.3.0 cannot parse heredocs where there are leading whitespace
+ # characters in the heredoc start.
+ # Example: <<~' EOF' or <<-' EOF'
+ # https://bugs.ruby-lang.org/issues/19539
+ except << "heredocs_leading_whitespace.txt"
+ end
+
+ Fixture.each(except: except) do |fixture|
+ define_method(fixture.test_name) { assert_lex(fixture) }
+ end
+
+ def test_lex_file
+ assert_nothing_raised do
+ Prism.lex_file(__FILE__)
+ end
+
+ error = assert_raise Errno::ENOENT do
+ Prism.lex_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.lex_file(nil)
+ end
+ end
+
+ def test_parse_lex
+ node, tokens = Prism.parse_lex("def foo; end").value
+
+ assert_kind_of ProgramNode, node
+ assert_equal 5, tokens.length
+ end
+
+ def test_parse_lex_file
+ node, tokens = Prism.parse_lex_file(__FILE__).value
+
+ assert_kind_of ProgramNode, node
+ refute_empty tokens
+
+ error = assert_raise Errno::ENOENT do
+ Prism.parse_lex_file("idontexist.rb")
+ end
+
+ assert_equal "No such file or directory - idontexist.rb", error.message
+
+ assert_raise TypeError do
+ Prism.parse_lex_file(nil)
+ end
+ end
+
+ private
+
+ def assert_lex(fixture)
+ source = fixture.read
+
+ result = Prism.lex_compat(source)
+ assert_equal [], result.errors
+
+ Prism.lex_ripper(source).zip(result.value).each do |(ripper, prism)|
+ assert_equal ripper, prism
+ end
+ end
+ end
+end
diff --git a/test/prism/library_symbols_test.rb b/test/prism/library_symbols_test.rb
index b10a367c18..44f225478b 100644
--- a/test/prism/library_symbols_test.rb
+++ b/test/prism/library_symbols_test.rb
@@ -3,8 +3,6 @@
require_relative "test_helper"
return if RUBY_PLATFORM !~ /linux/
-
-# TODO: determine why these symbols are incorrect on ppc64le
return if RUBY_PLATFORM =~ /powerpc64le/
module Prism
diff --git a/test/prism/locals_test.rb b/test/prism/locals_test.rb
index 0eb73f1b9c..2c0036289c 100644
--- a/test/prism/locals_test.rb
+++ b/test/prism/locals_test.rb
@@ -9,6 +9,15 @@
# to test on the most recent versions.
return if !defined?(RubyVM::InstructionSequence) || RUBY_VERSION < "3.4.0"
+# If we're on Ruby 3.4.0 and the default parser is Prism, then there is no point
+# in comparing the locals because they will be the same.
+return if RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism
+
+# In Ruby 3.4.0, the local table for method forwarding changed. But 3.4.0 can
+# refer to the dev version, so while 3.4.0 still isn't released, we need to
+# check if we have a high enough revision.
+return if RubyVM::InstructionSequence.compile("def foo(...); end").to_a[13][2][2][10].length != 1
+
# Omit tests if running on a 32-bit machine because there is a bug with how
# Ruby is handling large ISeqs on 32-bit machines
return if RUBY_PLATFORM =~ /i686/
@@ -17,14 +26,14 @@ require_relative "test_helper"
module Prism
class LocalsTest < TestCase
- base = File.join(__dir__, "fixtures")
- Dir["**/*.txt", base: base].each do |relative|
+ except = [
# Skip this fixture because it has a different number of locals because
# CRuby is eliminating dead code.
- next if relative == "whitequark/ruby_bug_10653.txt"
+ "whitequark/ruby_bug_10653.txt"
+ ]
- filepath = File.join(base, relative)
- define_method("test_#{relative}") { assert_locals(filepath) }
+ Fixture.each(except: except) do |fixture|
+ define_method(fixture.test_name) { assert_locals(fixture) }
end
def setup
@@ -38,21 +47,192 @@ module Prism
private
- def assert_locals(filepath)
- source = File.read(filepath)
+ def assert_locals(fixture)
+ source = fixture.read
- expected = Debug.cruby_locals(source)
- actual = Debug.prism_locals(source)
+ expected = cruby_locals(source)
+ actual = prism_locals(source)
assert_equal(expected, actual)
end
- def ignore_warnings
- previous_verbosity = $VERBOSE
- $VERBOSE = nil
- yield
- ensure
- $VERBOSE = previous_verbosity
+ # A wrapper around a RubyVM::InstructionSequence that provides a more
+ # convenient interface for accessing parts of the iseq.
+ class ISeq
+ attr_reader :parts
+
+ def initialize(parts)
+ @parts = parts
+ end
+
+ def type
+ parts[0]
+ end
+
+ def local_table
+ parts[10]
+ end
+
+ def instructions
+ parts[13]
+ end
+
+ def each_child
+ instructions.each do |instruction|
+ # Only look at arrays. Other instructions are line numbers or
+ # tracepoint events.
+ next unless instruction.is_a?(Array)
+
+ instruction.each do |opnd|
+ # Only look at arrays. Other operands are literals.
+ next unless opnd.is_a?(Array)
+
+ # Only look at instruction sequences. Other operands are literals.
+ next unless opnd[0] == "YARVInstructionSequence/SimpleDataFormat"
+
+ yield ISeq.new(opnd)
+ end
+ end
+ end
+ end
+
+ # Used to hold the place of a local that will be in the local table but
+ # cannot be accessed directly from the source code. For example, the
+ # iteration variable in a for loop or the positional parameter on a method
+ # definition that is destructured.
+ AnonymousLocal = Object.new
+
+ # For the given source, compiles with CRuby and returns a list of all of the
+ # sets of local variables that were encountered.
+ def cruby_locals(source)
+ locals = [] #: Array[Array[Symbol | Integer]]
+ stack = [ISeq.new(ignore_warnings { RubyVM::InstructionSequence.compile(source) }.to_a)]
+
+ while (iseq = stack.pop)
+ names = [*iseq.local_table]
+ names.map!.with_index do |name, index|
+ # When an anonymous local variable is present in the iseq's local
+ # table, it is represented as the stack offset from the top.
+ # However, when these are dumped to binary and read back in, they
+ # are replaced with the symbol :#arg_rest. To consistently handle
+ # this, we replace them here with their index.
+ if name == :"#arg_rest"
+ names.length - index + 1
+ else
+ name
+ end
+ end
+
+ locals << names
+ iseq.each_child { |child| stack << child }
+ end
+
+ locals
+ end
+
+ # For the given source, parses with prism and returns a list of all of the
+ # sets of local variables that were encountered.
+ def prism_locals(source)
+ locals = [] #: Array[Array[Symbol | Integer]]
+ stack = [Prism.parse(source).value] #: Array[Prism::node]
+
+ while (node = stack.pop)
+ case node
+ when BlockNode, DefNode, LambdaNode
+ names = node.locals
+ params =
+ if node.is_a?(DefNode)
+ node.parameters
+ elsif node.parameters.is_a?(NumberedParametersNode)
+ nil
+ else
+ node.parameters&.parameters
+ end
+
+ # prism places parameters in the same order that they appear in the
+ # source. CRuby places them in the order that they need to appear
+ # according to their own internal calling convention. We mimic that
+ # order here so that we can compare properly.
+ if params
+ sorted = [
+ *params.requireds.map do |required|
+ if required.is_a?(RequiredParameterNode)
+ required.name
+ else
+ AnonymousLocal
+ end
+ end,
+ *params.optionals.map(&:name),
+ *((params.rest.name || :*) if params.rest && !params.rest.is_a?(ImplicitRestNode)),
+ *params.posts.map do |post|
+ if post.is_a?(RequiredParameterNode)
+ post.name
+ else
+ AnonymousLocal
+ end
+ end,
+ *params.keywords.grep(RequiredKeywordParameterNode).map(&:name),
+ *params.keywords.grep(OptionalKeywordParameterNode).map(&:name),
+ ]
+
+ sorted << AnonymousLocal if params.keywords.any?
+
+ if params.keyword_rest.is_a?(ForwardingParameterNode)
+ if sorted.length == 0
+ sorted.push(:"...")
+ else
+ sorted.push(:*, :**, :&, :"...")
+ end
+ elsif params.keyword_rest.is_a?(KeywordRestParameterNode)
+ sorted << (params.keyword_rest.name || :**)
+ end
+
+ # Recurse down the parameter tree to find any destructured
+ # parameters and add them after the other parameters.
+ param_stack = params.requireds.concat(params.posts).grep(MultiTargetNode).reverse
+ while (param = param_stack.pop)
+ case param
+ when MultiTargetNode
+ param_stack.concat(param.rights.reverse)
+ param_stack << param.rest if param.rest&.expression && !sorted.include?(param.rest.expression.name)
+ param_stack.concat(param.lefts.reverse)
+ when RequiredParameterNode
+ sorted << param.name
+ when SplatNode
+ sorted << param.expression.name
+ end
+ end
+
+ if params.block
+ sorted << (params.block.name || :&)
+ end
+
+ names = sorted.concat(names - sorted)
+ end
+
+ names.map!.with_index do |name, index|
+ if name == AnonymousLocal
+ names.length - index + 1
+ else
+ name
+ end
+ end
+
+ locals << names
+ when ClassNode, ModuleNode, ProgramNode, SingletonClassNode
+ locals << node.locals
+ when ForNode
+ locals << [2]
+ when PostExecutionNode
+ locals.push([], [])
+ when InterpolatedRegularExpressionNode
+ locals << [] if node.once?
+ end
+
+ stack.concat(node.compact_child_nodes)
+ end
+
+ locals
end
end
end
diff --git a/test/prism/location_test.rb b/test/prism/location_test.rb
deleted file mode 100644
index 0724995671..0000000000
--- a/test/prism/location_test.rb
+++ /dev/null
@@ -1,946 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class LocationTest < TestCase
- def test_AliasGlobalVariableNode
- assert_location(AliasGlobalVariableNode, "alias $foo $bar")
- end
-
- def test_AliasMethodNode
- assert_location(AliasMethodNode, "alias foo bar")
- end
-
- def test_AlternationPatternNode
- assert_location(AlternationPatternNode, "foo => bar | baz", 7...16, &:pattern)
- end
-
- def test_AndNode
- assert_location(AndNode, "foo and bar")
- assert_location(AndNode, "foo && bar")
- end
-
- def test_ArgumentsNode
- assert_location(ArgumentsNode, "foo(bar, baz, qux)", 4...17, &:arguments)
- end
-
- def test_ArrayNode
- assert_location(ArrayNode, "[foo, bar, baz]")
- assert_location(ArrayNode, "%i[foo bar baz]")
- assert_location(ArrayNode, "%I[foo bar baz]")
- assert_location(ArrayNode, "%w[foo bar baz]")
- assert_location(ArrayNode, "%W[foo bar baz]")
- end
-
- def test_ArrayPatternNode
- assert_location(ArrayPatternNode, "foo => bar, baz", 7...15, &:pattern)
- assert_location(ArrayPatternNode, "foo => [bar, baz]", 7...17, &:pattern)
- assert_location(ArrayPatternNode, "foo => *bar", 7...11, &:pattern)
- assert_location(ArrayPatternNode, "foo => []", 7...9, &:pattern)
- assert_location(ArrayPatternNode, "foo => Foo[]", 7...12, &:pattern)
- assert_location(ArrayPatternNode, "foo => Foo[bar]", 7...15, &:pattern)
- end
-
- def test_AssocNode
- assert_location(AssocNode, "{ '': 1 }", 2...7) { |node| node.elements.first }
- assert_location(AssocNode, "{ foo: :bar }", 2...11) { |node| node.elements.first }
- assert_location(AssocNode, "{ :foo => :bar }", 2...14) { |node| node.elements.first }
- assert_location(AssocNode, "foo(bar: :baz)", 4...13) { |node| node.arguments.arguments.first.elements.first }
- end
-
- def test_AssocSplatNode
- assert_location(AssocSplatNode, "{ **foo }", 2...7) { |node| node.elements.first }
- assert_location(AssocSplatNode, "foo(**bar)", 4...9) { |node| node.arguments.arguments.first.elements.first }
- end
-
- def test_BackReferenceReadNode
- assert_location(BackReferenceReadNode, "$+")
- end
-
- def test_BeginNode
- assert_location(BeginNode, "begin foo end")
- assert_location(BeginNode, "begin foo rescue bar end")
- assert_location(BeginNode, "begin foo; rescue bar\nelse baz end")
- assert_location(BeginNode, "begin foo; rescue bar\nelse baz\nensure qux end")
-
- assert_location(BeginNode, "class Foo\nrescue then end", 0..25, &:body)
- assert_location(BeginNode, "module Foo\nrescue then end", 0..26, &:body)
- end
-
- def test_BlockArgumentNode
- assert_location(BlockArgumentNode, "foo(&bar)", 4...8, &:block)
- end
-
- def test_BlockLocalVariableNode
- assert_location(BlockLocalVariableNode, "foo { |;bar| }", 8...11) do |node|
- node.block.parameters.locals.first
- end
- end
-
- def test_BlockNode
- assert_location(BlockNode, "foo {}", 4...6, &:block)
- assert_location(BlockNode, "foo do end", 4...10, &:block)
- end
-
- def test_BlockParameterNode
- assert_location(BlockParameterNode, "def foo(&bar) end", 8...12) { |node| node.parameters.block }
- end
-
- def test_BlockParametersNode
- assert_location(BlockParametersNode, "foo { || }", 6...8) { |node| node.block.parameters }
- assert_location(BlockParametersNode, "foo { |bar| baz }", 6...11) { |node| node.block.parameters }
- assert_location(BlockParametersNode, "foo { |bar; baz| baz }", 6...16) { |node| node.block.parameters }
-
- assert_location(BlockParametersNode, "-> () {}", 3...5, &:parameters)
- assert_location(BlockParametersNode, "-> (bar) { baz }", 3...8, &:parameters)
- assert_location(BlockParametersNode, "-> (bar; baz) { baz }", 3...13, &:parameters)
- end
-
- def test_BreakNode
- assert_location(BreakNode, "tap { break }", 6...11) { |node| node.block.body.body.first }
- assert_location(BreakNode, "tap { break foo }", 6...15) { |node| node.block.body.body.first }
- assert_location(BreakNode, "tap { break foo, bar }", 6...20) { |node| node.block.body.body.first }
- assert_location(BreakNode, "tap { break(foo) }", 6...16) { |node| node.block.body.body.first }
- end
-
- def test_CallNode
- assert_location(CallNode, "foo")
- assert_location(CallNode, "foo?")
- assert_location(CallNode, "foo!")
-
- assert_location(CallNode, "foo()")
- assert_location(CallNode, "foo?()")
- assert_location(CallNode, "foo!()")
-
- assert_location(CallNode, "foo(bar)")
- assert_location(CallNode, "foo?(bar)")
- assert_location(CallNode, "foo!(bar)")
-
- assert_location(CallNode, "!foo")
- assert_location(CallNode, "~foo")
- assert_location(CallNode, "+foo")
- assert_location(CallNode, "-foo")
-
- assert_location(CallNode, "not foo")
- assert_location(CallNode, "not(foo)")
- assert_location(CallNode, "not()")
-
- assert_location(CallNode, "foo + bar")
- assert_location(CallNode, "foo -\n bar")
-
- assert_location(CallNode, "Foo()")
- assert_location(CallNode, "Foo(bar)")
-
- assert_location(CallNode, "Foo::Bar()")
- assert_location(CallNode, "Foo::Bar(baz)")
-
- assert_location(CallNode, "Foo::bar")
- assert_location(CallNode, "Foo::bar()")
- assert_location(CallNode, "Foo::bar(baz)")
-
- assert_location(CallNode, "Foo.bar")
- assert_location(CallNode, "Foo.bar()")
- assert_location(CallNode, "Foo.bar(baz)")
-
- assert_location(CallNode, "foo::bar")
- assert_location(CallNode, "foo::bar()")
- assert_location(CallNode, "foo::bar(baz)")
-
- assert_location(CallNode, "foo.bar")
- assert_location(CallNode, "foo.bar()")
- assert_location(CallNode, "foo.bar(baz)")
-
- assert_location(CallNode, "foo&.bar")
- assert_location(CallNode, "foo&.bar()")
- assert_location(CallNode, "foo&.bar(baz)")
-
- assert_location(CallNode, "foo[]")
- assert_location(CallNode, "foo[bar]")
- assert_location(CallNode, "foo[bar, baz]")
-
- assert_location(CallNode, "foo[] = 1")
- assert_location(CallNode, "foo[bar] = 1")
- assert_location(CallNode, "foo[bar, baz] = 1")
-
- assert_location(CallNode, "foo.()")
- assert_location(CallNode, "foo.(bar)")
-
- assert_location(CallNode, "foo&.()")
- assert_location(CallNode, "foo&.(bar)")
-
- assert_location(CallNode, "foo::()")
- assert_location(CallNode, "foo::(bar)")
- assert_location(CallNode, "foo::(bar, baz)")
-
- assert_location(CallNode, "foo bar baz")
- assert_location(CallNode, "foo bar('baz')")
-
- assert_location(CallNode, "-> { it }", 5...7, version: "3.3.0") do |node|
- node.body.body.first
- end
-
- assert_location(LocalVariableReadNode, "-> { it }", 5...7, version: "3.4.0") do |node|
- node.body.body.first
- end
- end
-
- def test_CallAndWriteNode
- assert_location(CallAndWriteNode, "foo.foo &&= bar")
- end
-
- def test_CallOperatorWriteNode
- assert_location(CallOperatorWriteNode, "foo.foo += bar")
- end
-
- def test_CallOrWriteNode
- assert_location(CallOrWriteNode, "foo.foo ||= bar")
- end
-
- def test_CallTargetNode
- assert_location(CallTargetNode, "foo.bar, = baz", 0...7) do |node|
- node.lefts.first
- end
- end
-
- def test_CapturePatternNode
- assert_location(CapturePatternNode, "case foo; in bar => baz; end", 13...23) do |node|
- node.conditions.first.pattern
- end
- end
-
- def test_CaseNode
- assert_location(CaseNode, "case foo; when bar; end")
- assert_location(CaseNode, "case foo; when bar; else; end")
- assert_location(CaseNode, "case foo; when bar; when baz; end")
- assert_location(CaseNode, "case foo; when bar; when baz; else; end")
- end
-
- def test_CaseMatchNode
- assert_location(CaseMatchNode, "case foo; in bar; end")
- assert_location(CaseMatchNode, "case foo; in bar; else; end")
- assert_location(CaseMatchNode, "case foo; in bar; in baz; end")
- assert_location(CaseMatchNode, "case foo; in bar; in baz; else; end")
- end
-
- def test_ClassNode
- assert_location(ClassNode, "class Foo end")
- assert_location(ClassNode, "class Foo < Bar; end")
- end
-
- def test_ClassVariableAndWriteNode
- assert_location(ClassVariableAndWriteNode, "@@foo &&= bar")
- end
-
- def test_ClassVariableOperatorWriteNode
- assert_location(ClassVariableOperatorWriteNode, "@@foo += bar")
- end
-
- def test_ClassVariableOrWriteNode
- assert_location(ClassVariableOrWriteNode, "@@foo ||= bar")
- end
-
- def test_ClassVariableReadNode
- assert_location(ClassVariableReadNode, "@@foo")
- end
-
- def test_ClassVariableTargetNode
- assert_location(ClassVariableTargetNode, "@@foo, @@bar = baz", 0...5) do |node|
- node.lefts.first
- end
- end
-
- def test_ClassVariableWriteNode
- assert_location(ClassVariableWriteNode, "@@foo = bar")
- end
-
- def test_ConstantPathAndWriteNode
- assert_location(ConstantPathAndWriteNode, "Parent::Child &&= bar")
- end
-
- def test_ConstantPathNode
- assert_location(ConstantPathNode, "Foo::Bar")
- assert_location(ConstantPathNode, "::Foo")
- assert_location(ConstantPathNode, "::Foo::Bar")
- end
-
- def test_ConstantPathOperatorWriteNode
- assert_location(ConstantPathOperatorWriteNode, "Parent::Child += bar")
- end
-
- def test_ConstantPathOrWriteNode
- assert_location(ConstantPathOrWriteNode, "Parent::Child ||= bar")
- end
-
- def test_ConstantPathTargetNode
- assert_location(ConstantPathTargetNode, "::Foo, ::Bar = baz", 0...5) do |node|
- node.lefts.first
- end
- end
-
- def test_ConstantPathWriteNode
- assert_location(ConstantPathWriteNode, "Foo::Bar = baz")
- assert_location(ConstantPathWriteNode, "::Foo = bar")
- assert_location(ConstantPathWriteNode, "::Foo::Bar = baz")
- end
-
- def test_ConstantAndWriteNode
- assert_location(ConstantAndWriteNode, "Foo &&= bar")
- end
-
- def test_ConstantOperatorWriteNode
- assert_location(ConstantOperatorWriteNode, "Foo += bar")
- end
-
- def test_ConstantOrWriteNode
- assert_location(ConstantOrWriteNode, "Foo ||= bar")
- end
-
- def test_ConstantReadNode
- assert_location(ConstantReadNode, "Foo")
- end
-
- def test_ConstantTargetNode
- assert_location(ConstantTargetNode, "Foo, Bar = baz", 0...3) do |node|
- node.lefts.first
- end
- end
-
- def test_ConstantWriteNode
- assert_location(ConstantWriteNode, "Foo = bar")
- end
-
- def test_DefNode
- assert_location(DefNode, "def foo; bar; end")
- assert_location(DefNode, "def foo = bar")
- assert_location(DefNode, "def foo.bar; baz; end")
- assert_location(DefNode, "def foo.bar = baz")
- end
-
- def test_DefinedNode
- assert_location(DefinedNode, "defined? foo")
- assert_location(DefinedNode, "defined?(foo)")
- end
-
- def test_ElseNode
- assert_location(ElseNode, "if foo; bar; else; baz; end", 13...27, &:consequent)
- assert_location(ElseNode, "foo ? bar : baz", 10...15, &:consequent)
- end
-
- def test_EmbeddedStatementsNode
- assert_location(EmbeddedStatementsNode, '"foo #{bar} baz"', 5...11) { |node| node.parts[1] }
- end
-
- def test_EmbeddedVariableNode
- assert_location(EmbeddedVariableNode, '"foo #@@bar baz"', 5...11) { |node| node.parts[1] }
- end
-
- def test_EnsureNode
- assert_location(EnsureNode, "begin; foo; ensure; bar; end", 12...28, &:ensure_clause)
- end
-
- def test_FalseNode
- assert_location(FalseNode, "false")
- end
-
- def test_FindPatternNode
- assert_location(FindPatternNode, "case foo; in *, bar, *; end", 13...22) do |node|
- node.conditions.first.pattern
- end
- end
-
- def test_FlipFlopNode
- assert_location(FlipFlopNode, "if foo..bar; end", 3..11, &:predicate)
- end
-
- def test_FloatNode
- assert_location(FloatNode, "0.0")
- assert_location(FloatNode, "1.0")
- assert_location(FloatNode, "1.0e10")
- assert_location(FloatNode, "1.0e-10")
- end
-
- def test_ForNode
- assert_location(ForNode, "for foo in bar; end")
- assert_location(ForNode, "for foo, bar in baz do end")
- end
-
- def test_ForwardingArgumentsNode
- assert_location(ForwardingArgumentsNode, "def foo(...); bar(...); end", 18...21) do |node|
- node.body.body.first.arguments.arguments.first
- end
- end
-
- def test_ForwardingParameterNode
- assert_location(ForwardingParameterNode, "def foo(...); end", 8...11) do |node|
- node.parameters.keyword_rest
- end
- end
-
- def test_ForwardingSuperNode
- assert_location(ForwardingSuperNode, "super")
- assert_location(ForwardingSuperNode, "super {}")
- end
-
- def test_GlobalVariableAndWriteNode
- assert_location(GlobalVariableAndWriteNode, "$foo &&= bar")
- end
-
- def test_GlobalVariableOperatorWriteNode
- assert_location(GlobalVariableOperatorWriteNode, "$foo += bar")
- end
-
- def test_GlobalVariableOrWriteNode
- assert_location(GlobalVariableOrWriteNode, "$foo ||= bar")
- end
-
- def test_GlobalVariableReadNode
- assert_location(GlobalVariableReadNode, "$foo")
- end
-
- def test_GlobalVariableTargetNode
- assert_location(GlobalVariableTargetNode, "$foo, $bar = baz", 0...4) do |node|
- node.lefts.first
- end
- end
-
- def test_GlobalVariableWriteNode
- assert_location(GlobalVariableWriteNode, "$foo = bar")
- end
-
- def test_HashNode
- assert_location(HashNode, "{ foo: 2 }")
- assert_location(HashNode, "{ \nfoo: 2, \nbar: 3 \n}")
- end
-
- def test_HashPatternNode
- assert_location(HashPatternNode, "case foo; in bar: baz; end", 13...21) do |node|
- node.conditions.first.pattern
- end
- end
-
- def test_IfNode
- assert_location(IfNode, "if type in 1;elsif type in B;end")
- end
-
- def test_ImaginaryNode
- assert_location(ImaginaryNode, "1i")
- assert_location(ImaginaryNode, "1ri")
- end
-
- def test_ImplicitNode
- assert_location(ImplicitNode, "{ foo: }", 2...6) do |node|
- node.elements.first.value
- end
-
- assert_location(ImplicitNode, "{ Foo: }", 2..6) do |node|
- node.elements.first.value
- end
-
- assert_location(ImplicitNode, "foo = 1; { foo: }", 11..15) do |node|
- node.elements.first.value
- end
- end
-
- def test_ImplicitRestNode
- assert_location(ImplicitRestNode, "foo, = bar", 3..4, &:rest)
-
- assert_location(ImplicitRestNode, "for foo, in bar do end", 7..8) do |node|
- node.index.rest
- end
-
- assert_location(ImplicitRestNode, "foo { |bar,| }", 10..11) do |node|
- node.block.parameters.parameters.rest
- end
-
- assert_location(ImplicitRestNode, "foo in [bar,]", 11..12) do |node|
- node.pattern.rest
- end
- end
-
- def test_InNode
- assert_location(InNode, "case foo; in bar; end", 10...16) do |node|
- node.conditions.first
- end
- end
-
- def test_IndexAndWriteNode
- assert_location(IndexAndWriteNode, "foo[foo] &&= bar")
- end
-
- def test_IndexOperatorWriteNode
- assert_location(IndexOperatorWriteNode, "foo[foo] += bar")
- end
-
- def test_IndexOrWriteNode
- assert_location(IndexOrWriteNode, "foo[foo] ||= bar")
- end
-
- def test_IndexTargetNode
- assert_location(IndexTargetNode, "foo[bar], = qux", 0...8) do |node|
- node.lefts.first
- end
- end
-
- def test_InstanceVariableAndWriteNode
- assert_location(InstanceVariableAndWriteNode, "@foo &&= bar")
- end
-
- def test_InstanceVariableOperatorWriteNode
- assert_location(InstanceVariableOperatorWriteNode, "@foo += bar")
- end
-
- def test_InstanceVariableOrWriteNode
- assert_location(InstanceVariableOrWriteNode, "@foo ||= bar")
- end
-
- def test_InstanceVariableReadNode
- assert_location(InstanceVariableReadNode, "@foo")
- end
-
- def test_InstanceVariableTargetNode
- assert_location(InstanceVariableTargetNode, "@foo, @bar = baz", 0...4) do |node|
- node.lefts.first
- end
- end
-
- def test_InstanceVariableWriteNode
- assert_location(InstanceVariableWriteNode, "@foo = bar")
- end
-
- def test_IntegerNode
- assert_location(IntegerNode, "0")
- assert_location(IntegerNode, "1")
- assert_location(IntegerNode, "1_000")
- assert_location(IntegerNode, "0x1")
- assert_location(IntegerNode, "0x1_000")
- assert_location(IntegerNode, "0b1")
- assert_location(IntegerNode, "0b1_000")
- assert_location(IntegerNode, "0o1")
- assert_location(IntegerNode, "0o1_000")
- end
-
- def test_InterpolatedMatchLastLineNode
- assert_location(InterpolatedMatchLastLineNode, "if /foo \#{bar}/ then end", 3...15, &:predicate)
- end
-
- def test_InterpolatedRegularExpressionNode
- assert_location(InterpolatedRegularExpressionNode, "/\#{foo}/")
- assert_location(InterpolatedRegularExpressionNode, "/\#{foo}/io")
- end
-
- def test_InterpolatedStringNode
- assert_location(InterpolatedStringNode, "\"foo \#@bar baz\"")
- assert_location(InterpolatedStringNode, "<<~A\nhello \#{1} world\nA", 0...4)
- assert_location(InterpolatedStringNode, '"foo" "bar"')
- end
-
- def test_InterpolatedSymbolNode
- assert_location(InterpolatedSymbolNode, ':"#{foo}bar"')
- end
-
- def test_InterpolatedXStringNode
- assert_location(InterpolatedXStringNode, '`foo #{bar} baz`')
- end
-
- def test_ItParametersNode
- assert_location(ItParametersNode, "-> { it }", &:parameters)
- end
-
- def test_KeywordHashNode
- assert_location(KeywordHashNode, "foo(a, b: 1)", 7...11) { |node| node.arguments.arguments[1] }
- end
-
- def test_KeywordRestParameterNode
- assert_location(KeywordRestParameterNode, "def foo(**); end", 8...10) do |node|
- node.parameters.keyword_rest
- end
-
- assert_location(KeywordRestParameterNode, "def foo(**bar); end", 8...13) do |node|
- node.parameters.keyword_rest
- end
- end
-
- def test_LambdaNode
- assert_location(LambdaNode, "-> { foo }")
- assert_location(LambdaNode, "-> do foo end")
- end
-
- def test_LocalVariableAndWriteNode
- assert_location(LocalVariableAndWriteNode, "foo &&= bar")
- assert_location(LocalVariableAndWriteNode, "foo = 1; foo &&= bar", 9...20)
- end
-
- def test_LocalVariableOperatorWriteNode
- assert_location(LocalVariableOperatorWriteNode, "foo += bar")
- assert_location(LocalVariableOperatorWriteNode, "foo = 1; foo += bar", 9...19)
- end
-
- def test_LocalVariableOrWriteNode
- assert_location(LocalVariableOrWriteNode, "foo ||= bar")
- assert_location(LocalVariableOrWriteNode, "foo = 1; foo ||= bar", 9...20)
- end
-
- def test_LocalVariableReadNode
- assert_location(LocalVariableReadNode, "foo = 1; foo", 9...12)
- assert_location(LocalVariableReadNode, "-> { it }", 5...7) do |node|
- node.body.body.first
- end
- assert_location(LocalVariableReadNode, "foo { it }", 6...8) do |node|
- node.block.body.body.first
- end
- end
-
- def test_LocalVariableTargetNode
- assert_location(LocalVariableTargetNode, "foo, bar = baz", 0...3) do |node|
- node.lefts.first
- end
- end
-
- def test_LocalVariableWriteNode
- assert_location(LocalVariableWriteNode, "foo = bar")
- end
-
- def test_MatchLastLineNode
- assert_location(MatchLastLineNode, "if /foo/ then end", 3...8, &:predicate)
- end
-
- def test_MatchPredicateNode
- assert_location(MatchPredicateNode, "foo in bar")
- end
-
- def test_MatchRequiredNode
- assert_location(MatchRequiredNode, "foo => bar")
- end
-
- def test_MatchWriteNode
- assert_location(MatchWriteNode, "/(?<foo>)/ =~ foo")
- end
-
- def test_ModuleNode
- assert_location(ModuleNode, "module Foo end")
- end
-
- def test_MultiTargetNode
- assert_location(MultiTargetNode, "for foo, bar in baz do end", 4...12, &:index)
- assert_location(MultiTargetNode, "foo, (bar, baz) = qux", 5...15) { |node| node.lefts.last }
- assert_location(MultiTargetNode, "def foo((bar)); end", 8...13) do |node|
- node.parameters.requireds.first
- end
- end
-
- def test_MultiWriteNode
- assert_location(MultiWriteNode, "foo, bar = baz")
- assert_location(MultiWriteNode, "(foo, bar) = baz")
- assert_location(MultiWriteNode, "((foo, bar)) = baz")
- end
-
- def test_NextNode
- assert_location(NextNode, "tap { next }", 6...10) { |node| node.block.body.body.first }
- assert_location(NextNode, "tap { next foo }", 6...14) { |node| node.block.body.body.first }
- assert_location(NextNode, "tap { next foo, bar }", 6...19) { |node| node.block.body.body.first }
- assert_location(NextNode, "tap { next(foo) }", 6...15) { |node| node.block.body.body.first }
- end
-
- def test_NilNode
- assert_location(NilNode, "nil")
- end
-
- def test_NoKeywordsParameterNode
- assert_location(NoKeywordsParameterNode, "def foo(**nil); end", 8...13) { |node| node.parameters.keyword_rest }
- end
-
- def test_NumberedParametersNode
- assert_location(NumberedParametersNode, "-> { _1 }", &:parameters)
- assert_location(NumberedParametersNode, "foo { _1 }", 4...10) { |node| node.block.parameters }
- end
-
- def test_NumberedReferenceReadNode
- assert_location(NumberedReferenceReadNode, "$1")
- end
-
- def test_OptionalKeywordParameterNode
- assert_location(OptionalKeywordParameterNode, "def foo(bar: nil); end", 8...16) do |node|
- node.parameters.keywords.first
- end
- end
-
- def test_OptionalParameterNode
- assert_location(OptionalParameterNode, "def foo(bar = nil); end", 8...17) do |node|
- node.parameters.optionals.first
- end
- end
-
- def test_OrNode
- assert_location(OrNode, "foo || bar")
- assert_location(OrNode, "foo or bar")
- end
-
- def test_ParametersNode
- assert_location(ParametersNode, "def foo(bar, baz); end", 8...16, &:parameters)
- end
-
- def test_ParenthesesNode
- assert_location(ParenthesesNode, "()")
- assert_location(ParenthesesNode, "(foo)")
- assert_location(ParenthesesNode, "foo (bar), baz", 4...9) { |node| node.arguments.arguments.first }
- assert_location(ParenthesesNode, "def (foo).bar; end", 4...9, &:receiver)
- end
-
- def test_PinnedExpressionNode
- assert_location(PinnedExpressionNode, "foo in ^(bar)", 7...13, &:pattern)
- end
-
- def test_PinnedVariableNode
- assert_location(PinnedVariableNode, "bar = 1; foo in ^bar", 16...20, &:pattern)
- assert_location(PinnedVariableNode, "proc { 1 in ^it }.call(1)", 12...15) do |node|
- node.receiver.block.body.body.first.pattern
- end
- end
-
- def test_PostExecutionNode
- assert_location(PostExecutionNode, "END {}")
- assert_location(PostExecutionNode, "END { foo }")
- end
-
- def test_PreExecutionNode
- assert_location(PreExecutionNode, "BEGIN {}")
- assert_location(PreExecutionNode, "BEGIN { foo }")
- end
-
- def test_RangeNode
- assert_location(RangeNode, "1..2")
- assert_location(RangeNode, "1...2")
-
- assert_location(RangeNode, "..2")
- assert_location(RangeNode, "...2")
-
- assert_location(RangeNode, "1..")
- assert_location(RangeNode, "1...")
- end
-
- def test_RationalNode
- assert_location(RationalNode, "1r")
- assert_location(RationalNode, "1.0r")
- end
-
- def test_RedoNode
- assert_location(RedoNode, "tap { redo }", 6...10) { |node| node.block.body.body.first }
- end
-
- def test_RegularExpressionNode
- assert_location(RegularExpressionNode, "/foo/")
- assert_location(RegularExpressionNode, "/foo/io")
- end
-
- def test_RequiredKeywordParameterNode
- assert_location(RequiredKeywordParameterNode, "def foo(bar:); end", 8...12) do |node|
- node.parameters.keywords.first
- end
- end
-
- def test_RequiredParameterNode
- assert_location(RequiredParameterNode, "def foo(bar); end", 8...11) do |node|
- node.parameters.requireds.first
- end
- end
-
- def test_RescueNode
- code = <<~RUBY
- begin
- body
- rescue TypeError
- rescue ArgumentError
- end
- RUBY
- assert_location(RescueNode, code, 13...50) { |node| node.rescue_clause }
- assert_location(RescueNode, code, 30...50) { |node| node.rescue_clause.consequent }
- end
-
- def test_RescueModifierNode
- assert_location(RescueModifierNode, "foo rescue bar")
- end
-
- def test_RestParameterNode
- assert_location(RestParameterNode, "def foo(*bar); end", 8...12) do |node|
- node.parameters.rest
- end
- end
-
- def test_RetryNode
- assert_location(RetryNode, "begin; rescue; retry; end", 15...20) { |node| node.rescue_clause.statements.body.first }
- end
-
- def test_ReturnNode
- assert_location(ReturnNode, "return")
- assert_location(ReturnNode, "return foo")
- assert_location(ReturnNode, "return foo, bar")
- assert_location(ReturnNode, "return(foo)")
- end
-
- def test_SelfNode
- assert_location(SelfNode, "self")
- end
-
- def test_ShareableConstantNode
- source = <<~RUBY
- # shareable_constant_value: literal
- C = { foo: 1 }
- RUBY
-
- assert_location(ShareableConstantNode, source, 36...50)
- end
-
- def test_SingletonClassNode
- assert_location(SingletonClassNode, "class << self; end")
- end
-
- def test_SourceEncodingNode
- assert_location(SourceEncodingNode, "__ENCODING__")
- end
-
- def test_SourceFileNode
- assert_location(SourceFileNode, "__FILE__")
- end
-
- def test_SourceLineNode
- assert_location(SourceLineNode, "__LINE__")
- end
-
- def test_SplatNode
- assert_location(SplatNode, "*foo = bar", 0...4, &:rest)
- end
-
- def test_StatementsNode
- assert_location(StatementsNode, "foo { 1 }", 6...7) { |node| node.block.body }
-
- assert_location(StatementsNode, "(1)", 1...2, &:body)
-
- assert_location(StatementsNode, "def foo; 1; end", 9...10, &:body)
- assert_location(StatementsNode, "def foo = 1", 10...11, &:body)
- assert_location(StatementsNode, "def foo; 1\n2; end", 9...12, &:body)
-
- assert_location(StatementsNode, "if foo; bar; end", 8...11, &:statements)
- assert_location(StatementsNode, "foo if bar", 0...3, &:statements)
-
- assert_location(StatementsNode, "if foo; foo; elsif bar; bar; end", 24...27) { |node| node.consequent.statements }
- assert_location(StatementsNode, "if foo; foo; else; bar; end", 19...22) { |node| node.consequent.statements }
-
- assert_location(StatementsNode, "unless foo; bar; end", 12...15, &:statements)
- assert_location(StatementsNode, "foo unless bar", 0...3, &:statements)
-
- assert_location(StatementsNode, "case; when foo; bar; end", 16...19) { |node| node.conditions.first.statements }
-
- assert_location(StatementsNode, "while foo; bar; end", 11...14, &:statements)
- assert_location(StatementsNode, "foo while bar", 0...3, &:statements)
-
- assert_location(StatementsNode, "until foo; bar; end", 11...14, &:statements)
- assert_location(StatementsNode, "foo until bar", 0...3, &:statements)
-
- assert_location(StatementsNode, "for foo in bar; baz; end", 16...19, &:statements)
-
- assert_location(StatementsNode, "begin; foo; end", 7...10, &:statements)
- assert_location(StatementsNode, "begin; rescue; foo; end", 15...18) { |node| node.rescue_clause.statements }
- assert_location(StatementsNode, "begin; ensure; foo; end", 15...18) { |node| node.ensure_clause.statements }
- assert_location(StatementsNode, "begin; rescue; else; foo; end", 21...24) { |node| node.else_clause.statements }
-
- assert_location(StatementsNode, "class Foo; foo; end", 11...14, &:body)
- assert_location(StatementsNode, "module Foo; foo; end", 12...15, &:body)
- assert_location(StatementsNode, "class << self; foo; end", 15...18, &:body)
-
- assert_location(StatementsNode, "-> { foo }", 5...8, &:body)
- assert_location(StatementsNode, "BEGIN { foo }", 8...11, &:statements)
- assert_location(StatementsNode, "END { foo }", 6...9, &:statements)
-
- assert_location(StatementsNode, "\"\#{foo}\"", 3...6) { |node| node.parts.first.statements }
- end
-
- def test_StringNode
- assert_location(StringNode, '"foo"')
- assert_location(StringNode, '%q[foo]')
- end
-
- def test_SuperNode
- assert_location(SuperNode, "super foo")
- assert_location(SuperNode, "super foo, bar")
-
- assert_location(SuperNode, "super()")
- assert_location(SuperNode, "super(foo)")
- assert_location(SuperNode, "super(foo, bar)")
-
- assert_location(SuperNode, "super() {}")
- end
-
- def test_SymbolNode
- assert_location(SymbolNode, ":foo")
- end
-
- def test_TrueNode
- assert_location(TrueNode, "true")
- end
-
- def test_UndefNode
- assert_location(UndefNode, "undef foo")
- assert_location(UndefNode, "undef foo, bar")
- end
-
- def test_UnlessNode
- assert_location(UnlessNode, "foo unless bar")
- assert_location(UnlessNode, "unless bar; foo; end")
- end
-
- def test_UntilNode
- assert_location(UntilNode, "foo = bar until baz")
- assert_location(UntilNode, "until bar;baz;end")
- end
-
- def test_WhenNode
- assert_location(WhenNode, "case foo; when bar; end", 10...18) { |node| node.conditions.first }
- end
-
- def test_WhileNode
- assert_location(WhileNode, "foo = bar while foo != baz")
- assert_location(WhileNode, "while a;bar;baz;end")
- end
-
- def test_XStringNode
- assert_location(XStringNode, "`foo`")
- assert_location(XStringNode, "%x[foo]")
- end
-
- def test_YieldNode
- assert_location(YieldNode, "def test; yield; end", 10...15) { |node| node.body.body.first }
- assert_location(YieldNode, "def test; yield foo; end", 10...19) { |node| node.body.body.first }
- assert_location(YieldNode, "def test; yield foo, bar; end", 10...24) { |node| node.body.body.first }
- assert_location(YieldNode, "def test; yield(foo); end", 10...20) { |node| node.body.body.first }
- end
-
- def test_all_tested
- expected = Prism.constants.grep(/.Node$/).sort - %i[MissingNode ProgramNode]
- actual = LocationTest.instance_methods(false).grep(/.Node$/).map { |name| name[5..].to_sym }.sort
- assert_equal expected, actual
- end
-
- private
-
- def assert_location(kind, source, expected = 0...source.length, **options)
- result = Prism.parse(source, **options)
- assert result.success?
-
- node = result.value.statements.body.last
- node = yield node if block_given?
-
- if expected.begin == 0
- assert_equal 0, node.location.start_column
- end
-
- if expected.end == source.length
- assert_equal source.split("\n").last.length, node.location.end_column
- end
-
- assert_kind_of kind, node
- assert_equal expected.begin, node.location.start_offset
- assert_equal expected.end, node.location.end_offset
- end
- end
-end
diff --git a/test/prism/magic_comment_test.rb b/test/prism/magic_comment_test.rb
index 9e2e92af92..14653fb0f8 100644
--- a/test/prism/magic_comment_test.rb
+++ b/test/prism/magic_comment_test.rb
@@ -2,32 +2,109 @@
require_relative "test_helper"
-return if RUBY_ENGINE != "ruby"
-
module Prism
class MagicCommentTest < TestCase
- examples = [
- "# encoding: ascii",
- "# coding: ascii",
- "# eNcOdInG: ascii",
- "# CoDiNg: ascii",
- "# \s\t\v encoding \s\t\v : \s\t\v ascii \s\t\v",
- "# -*- encoding: ascii -*-",
- "# -*- coding: ascii -*-",
- "# -*- eNcOdInG: ascii -*-",
- "# -*- CoDiNg: ascii -*-",
- "# -*- \s\t\v encoding \s\t\v : \s\t\v ascii \s\t\v -*-",
- "# -*- foo: bar; encoding: ascii -*-",
- "# coding \t \r \v : \t \v \r ascii-8bit",
- "# vim: filetype=ruby, fileencoding=windows-31j, tabsize=3, shiftwidth=3"
- ]
-
- examples.each.with_index(1) do |example, index|
- define_method(:"test_magic_comment_#{index}") do
- expected = RubyVM::InstructionSequence.compile(%Q{#{example}\n""}).eval.encoding
- actual = Prism.parse(example).encoding
+ if RUBY_ENGINE == "ruby"
+ class MagicCommentRipper < Ripper
+ attr_reader :magic_comments
+
+ def initialize(*)
+ super
+ @magic_comments = []
+ end
+
+ def on_magic_comment(key, value)
+ @magic_comments << [key, value]
+ super
+ end
+ end
+
+ Fixture.each do |fixture|
+ define_method(fixture.test_name) { assert_magic_comments(fixture) }
+ end
+ end
+
+ def test_encoding
+ assert_magic_encoding(Encoding::US_ASCII, "# encoding: ascii")
+ end
+
+ def test_coding
+ assert_magic_encoding(Encoding::US_ASCII, "# coding: ascii")
+ end
+
+ def test_eNcOdInG
+ assert_magic_encoding(Encoding::US_ASCII, "# eNcOdInG: ascii")
+ end
+
+ def test_CoDiNg
+ assert_magic_encoding(Encoding::US_ASCII, "# CoDiNg: ascii")
+ end
+
+ def test_encoding_whitespace
+ assert_magic_encoding(Encoding::US_ASCII, "# \s\t\v encoding \s\t\v : \s\t\v ascii \s\t\v")
+ end
+
+ def test_emacs_encoding
+ assert_magic_encoding(Encoding::US_ASCII, "# -*- encoding: ascii -*-")
+ end
+
+ def test_emacs_coding
+ assert_magic_encoding(Encoding::US_ASCII, "# -*- coding: ascii -*-")
+ end
+
+ def test_emacs_eNcOdInG
+ assert_magic_encoding(Encoding::US_ASCII, "# -*- eNcOdInG: ascii -*-")
+ end
+
+ def test_emacs_CoDiNg
+ assert_magic_encoding(Encoding::US_ASCII, "# -*- CoDiNg: ascii -*-")
+ end
+
+ def test_emacs_whitespace
+ assert_magic_encoding(Encoding::US_ASCII, "# -*- \s\t\v encoding \s\t\v : \s\t\v ascii \s\t\v -*-")
+ end
+
+ def test_emacs_multiple
+ assert_magic_encoding(Encoding::US_ASCII, "# -*- foo: bar; encoding: ascii -*-")
+ end
+
+ def test_coding_whitespace
+ assert_magic_encoding(Encoding::ASCII_8BIT, "# coding \t \r \v : \t \v \r ascii-8bit")
+ end
+
+ def test_vim
+ assert_magic_encoding(Encoding::Windows_31J, "# vim: filetype=ruby, fileencoding=windows-31j, tabsize=3, shiftwidth=3")
+ end
+
+ private
+
+ def assert_magic_encoding(expected, line)
+ source = %Q{#{line}\n""}
+ actual = Prism.parse(source).encoding
+
+ # Compare against our expectation.
+ assert_equal expected, actual
+
+ # Compare against Ruby's expectation.
+ if defined?(RubyVM::InstructionSequence)
+ expected = RubyVM::InstructionSequence.compile(source).eval.encoding
assert_equal expected, actual
end
end
+
+ def assert_magic_comments(fixture)
+ source = fixture.read
+
+ # Check that we get the correct number of magic comments when lexing with
+ # ripper.
+ expected = MagicCommentRipper.new(source).tap(&:parse).magic_comments
+ actual = Prism.parse(source).magic_comments
+
+ assert_equal expected.length, actual.length
+ expected.zip(actual).each do |(expected_key, expected_value), magic_comment|
+ assert_equal expected_key, magic_comment.key
+ assert_equal expected_value, magic_comment.value
+ end
+ end
end
end
diff --git a/test/prism/memsize_test.rb b/test/prism/memsize_test.rb
deleted file mode 100644
index d7e1448dbc..0000000000
--- a/test/prism/memsize_test.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-return if Prism::BACKEND == :FFI
-
-module Prism
- class MemsizeTest < TestCase
- def test_memsize
- result = Debug.memsize("2 + 3")
-
- assert_equal 5, result[:length]
- assert_kind_of Integer, result[:memsize]
- assert_equal 6, result[:node_count]
- end
- end
-end
diff --git a/test/prism/newline_offsets_test.rb b/test/prism/newline_offsets_test.rb
new file mode 100644
index 0000000000..99b808b1df
--- /dev/null
+++ b/test/prism/newline_offsets_test.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class NewlineOffsetsTest < TestCase
+ Fixture.each do |fixture|
+ define_method(fixture.test_name) { assert_newline_offsets(fixture) }
+ end
+
+ private
+
+ def assert_newline_offsets(fixture)
+ source = fixture.read
+
+ expected = [0]
+ source.b.scan("\n") { expected << $~.offset(0)[0] + 1 }
+
+ assert_equal expected, Prism.parse(source).source.offsets
+ end
+ end
+end
diff --git a/test/prism/newline_test.rb b/test/prism/newline_test.rb
index d31fb89bc6..fefe9def91 100644
--- a/test/prism/newline_test.rb
+++ b/test/prism/newline_test.rb
@@ -6,18 +6,24 @@ return unless defined?(RubyVM::InstructionSequence)
module Prism
class NewlineTest < TestCase
- base = File.expand_path("../", __FILE__)
- filepaths = Dir["*.rb", base: base] - %w[
- encoding_test.rb
+ skips = %w[
errors_test.rb
- parser_test.rb
+ locals_test.rb
regexp_test.rb
- static_literals_test.rb
+ test_helper.rb
unescape_test.rb
+ encoding/regular_expression_encoding_test.rb
+ encoding/string_encoding_test.rb
+ result/breadth_first_search_test.rb
+ result/static_literals_test.rb
+ result/warnings_test.rb
+ ruby/parser_test.rb
+ ruby/ruby_parser_test.rb
]
- filepaths.each do |relative|
- define_method("test_newline_flags_#{relative}") do
+ base = __dir__
+ (Dir["{,api/,encoding/,result/,ruby/}*.rb", base: base] - skips).each do |relative|
+ define_method(:"test_#{relative}") do
assert_newlines(base, relative)
end
end
@@ -63,14 +69,6 @@ module Prism
assert_equal expected, actual
end
- def ignore_warnings
- previous_verbosity = $VERBOSE
- $VERBOSE = nil
- yield
- ensure
- $VERBOSE = previous_verbosity
- end
-
def rubyvm_lines(source)
queue = [ignore_warnings { RubyVM::InstructionSequence.compile(source) }]
lines = []
@@ -91,7 +89,7 @@ module Prism
while node = queue.shift
queue.concat(node.compact_child_nodes)
- newlines << result.source.line(node.location.start_offset) if node&.newline?
+ newlines << result.source.line(node.location.start_offset) if node&.newline_flag?
end
newlines.sort
diff --git a/test/prism/onigmo_test.rb b/test/prism/onigmo_test.rb
new file mode 100644
index 0000000000..03f44c4e4c
--- /dev/null
+++ b/test/prism/onigmo_test.rb
@@ -0,0 +1,66 @@
+# frozen_string_literal: true
+
+return if RUBY_ENGINE != "ruby"
+
+require_relative "test_helper"
+
+begin
+ require "onigmo"
+rescue LoadError
+ # In CRuby's CI, we're not going to test against the parser gem because we
+ # don't want to have to install it. So in this case we'll just skip this test.
+ return
+end
+
+module Prism
+ class OnigmoTest < TestCase
+ def test_ONIGERR_PARSE_DEPTH_LIMIT_OVER
+ assert_error(%Q{#{"(" * 4096}a#{")" * 4096}}, "parse depth limit over")
+ end
+
+ def test_ONIGERR_EMPTY_CHAR_CLASS
+ assert_error("[]", "empty char-class")
+ end
+
+ def test_ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED
+ assert_error("*", "target of repeat operator is not specified")
+ assert_error("+", "target of repeat operator is not specified")
+ assert_error("?", "target of repeat operator is not specified")
+ end
+
+ def test_ONIGERR_EMPTY_GROUP_NAME
+ assert_error("(?<>)", "group name is empty")
+ end
+
+ def test_ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS
+ assert_error("(", "end pattern with unmatched parenthesis")
+ assert_error("(|", "end pattern with unmatched parenthesis")
+ assert_error("(?<", "end pattern with unmatched parenthesis")
+ end
+
+ def test_ONIGERR_END_PATTERN_IN_GROUP
+ assert_error("(?", "end pattern in group")
+ assert_error("(?#", "end pattern in group")
+ end
+
+ def test_ONIGERR_UNDEFINED_GROUP_OPTION
+ assert_error("(?P", "undefined group option")
+ end
+
+ def test_ONIGERR_UNMATCHED_CLOSE_PARENTHESIS
+ assert_error(")", "unmatched close parenthesis")
+ end
+
+ private
+
+ def assert_error(source, message)
+ result = Prism.parse("/#{source}/")
+
+ assert result.failure?, "Expected #{source.inspect} to error"
+ assert_equal message, result.errors.first.message
+
+ error = assert_raise(ArgumentError) { Onigmo.parse(source) }
+ assert_equal message, error.message
+ end
+ end
+end
diff --git a/test/prism/parameters_signature_test.rb b/test/prism/parameters_signature_test.rb
deleted file mode 100644
index 0eed8d993d..0000000000
--- a/test/prism/parameters_signature_test.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-return if RUBY_VERSION < "3.2"
-
-module Prism
- class ParametersSignatureTest < TestCase
- def test_req
- assert_parameters([[:req, :a]], "a")
- end
-
- def test_req_destructure
- assert_parameters([[:req]], "(a, b)")
- end
-
- def test_opt
- assert_parameters([[:opt, :a]], "a = 1")
- end
-
- def test_rest
- assert_parameters([[:rest, :a]], "*a")
- end
-
- def test_rest_anonymous
- assert_parameters([[:rest, :*]], "*")
- end
-
- def test_post
- assert_parameters([[:rest, :a], [:req, :b]], "*a, b")
- end
-
- def test_post_destructure
- assert_parameters([[:rest, :a], [:req]], "*a, (b, c)")
- end
-
- def test_keyreq
- assert_parameters([[:keyreq, :a]], "a:")
- end
-
- def test_key
- assert_parameters([[:key, :a]], "a: 1")
- end
-
- def test_keyrest
- assert_parameters([[:keyrest, :a]], "**a")
- end
-
- def test_nokey
- assert_parameters([[:nokey]], "**nil")
- end
-
- def test_keyrest_anonymous
- assert_parameters([[:keyrest, :**]], "**")
- end
-
- def test_key_ordering
- omit("TruffleRuby returns keys in order they were declared") if RUBY_ENGINE == "truffleruby"
-
- assert_parameters([[:keyreq, :a], [:keyreq, :b], [:key, :c], [:key, :d]], "a:, c: 1, b:, d: 2")
- end
-
- def test_block
- assert_parameters([[:block, :a]], "&a")
- end
-
- def test_block_anonymous
- assert_parameters([[:block, :&]], "&")
- end
-
- def test_forwarding
- assert_parameters([[:rest, :*], [:keyrest, :**], [:block, :&]], "...")
- end
-
- private
-
- def assert_parameters(expected, source)
- eval("def self.m(#{source}); end")
-
- begin
- assert_equal(expected, method(:m).parameters)
- assert_equal(expected, signature(source))
- ensure
- singleton_class.undef_method(:m)
- end
- end
-
- def signature(source)
- program = Prism.parse("def m(#{source}); end").value
- program.statements.body.first.parameters.signature
- end
- end
-end
diff --git a/test/prism/parse_comments_test.rb b/test/prism/parse_comments_test.rb
deleted file mode 100644
index 30086e3155..0000000000
--- a/test/prism/parse_comments_test.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class ParseCommentsTest < TestCase
- def test_parse_comments
- comments = Prism.parse_comments("# foo")
-
- assert_kind_of Array, comments
- assert_equal 1, comments.length
- end
-
- def test_parse_file_comments
- comments = Prism.parse_file_comments(__FILE__)
-
- assert_kind_of Array, comments
- assert_equal 1, comments.length
- end
- end
-end
diff --git a/test/prism/parse_stream_test.rb b/test/prism/parse_stream_test.rb
deleted file mode 100644
index 9e6347b92b..0000000000
--- a/test/prism/parse_stream_test.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-require "stringio"
-
-module Prism
- class ParseStreamTest < TestCase
- def test_single_line
- io = StringIO.new("1 + 2")
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_kind_of Prism::CallNode, result.value.statements.body.first
- end
-
- def test_multi_line
- io = StringIO.new("1 + 2\n3 + 4")
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_kind_of Prism::CallNode, result.value.statements.body.first
- assert_kind_of Prism::CallNode, result.value.statements.body.last
- end
-
- def test_multi_read
- io = StringIO.new("a" * 4096 * 4)
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_kind_of Prism::CallNode, result.value.statements.body.first
- end
-
- def test___END__
- io = StringIO.new("1 + 2\n3 + 4\n__END__\n5 + 6")
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_equal 2, result.value.statements.body.length
- assert_equal "5 + 6", io.read
- end
-
- def test_false___END___in_string
- io = StringIO.new("1 + 2\n3 + 4\n\"\n__END__\n\"\n5 + 6")
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_equal 4, result.value.statements.body.length
- end
-
- def test_false___END___in_regexp
- io = StringIO.new("1 + 2\n3 + 4\n/\n__END__\n/\n5 + 6")
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_equal 4, result.value.statements.body.length
- end
-
- def test_false___END___in_list
- io = StringIO.new("1 + 2\n3 + 4\n%w[\n__END__\n]\n5 + 6")
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_equal 4, result.value.statements.body.length
- end
-
- def test_false___END___in_heredoc
- io = StringIO.new("1 + 2\n3 + 4\n<<-EOF\n__END__\nEOF\n5 + 6")
- result = Prism.parse_stream(io)
-
- assert result.success?
- assert_equal 4, result.value.statements.body.length
- end
- end
-end
diff --git a/test/prism/parse_test.rb b/test/prism/parse_test.rb
deleted file mode 100644
index afb53e0668..0000000000
--- a/test/prism/parse_test.rb
+++ /dev/null
@@ -1,371 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class ParseTest < TestCase
- # A subclass of Ripper that extracts out magic comments.
- class MagicCommentRipper < Ripper
- attr_reader :magic_comments
-
- def initialize(*)
- super
- @magic_comments = []
- end
-
- def on_magic_comment(key, value)
- @magic_comments << [key, value]
- super
- end
- end
-
- # When we pretty-print the trees to compare against the snapshots, we want to
- # be certain that we print with the same external encoding. This is because
- # methods like Symbol#inspect take into account external encoding and it could
- # change how the snapshot is generated. On machines with certain settings
- # (like LANG=C or -Eascii-8bit) this could have been changed. So here we're
- # going to force it to be UTF-8 to keep the snapshots consistent.
- def setup
- @previous_default_external = Encoding.default_external
- ignore_warnings { Encoding.default_external = Encoding::UTF_8 }
- end
-
- def teardown
- ignore_warnings { Encoding.default_external = @previous_default_external }
- end
-
- def test_empty_string
- result = Prism.parse("")
- assert_equal [], result.value.statements.body
- end
-
- def test_parse_takes_file_path
- filepath = "filepath.rb"
- result = Prism.parse("def foo; __FILE__; end", filepath: filepath)
-
- assert_equal filepath, find_source_file_node(result.value).filepath
- end
-
- def test_parse_takes_line
- line = 4
- result = Prism.parse("def foo\n __FILE__\nend", line: line)
-
- assert_equal line, result.value.location.start_line
- assert_equal line + 1, find_source_file_node(result.value).location.start_line
-
- result = Prism.parse_lex("def foo\n __FILE__\nend", line: line)
- assert_equal line, result.value.first.location.start_line
- end
-
- def test_parse_takes_negative_lines
- line = -2
- result = Prism.parse("def foo\n __FILE__\nend", line: line)
-
- assert_equal line, result.value.location.start_line
- assert_equal line + 1, find_source_file_node(result.value).location.start_line
-
- result = Prism.parse_lex("def foo\n __FILE__\nend", line: line)
- assert_equal line, result.value.first.location.start_line
- end
-
- def test_parse_lex
- node, tokens = Prism.parse_lex("def foo; end").value
-
- assert_kind_of ProgramNode, node
- assert_equal 5, tokens.length
- end
-
- if !ENV["PRISM_BUILD_MINIMAL"]
- def test_dump_file
- assert_nothing_raised do
- Prism.dump_file(__FILE__)
- end
-
- error = assert_raise Errno::ENOENT do
- Prism.dump_file("idontexist.rb")
- end
-
- assert_equal "No such file or directory - idontexist.rb", error.message
-
- assert_raise TypeError do
- Prism.dump_file(nil)
- end
- end
- end
-
- def test_lex_file
- assert_nothing_raised do
- Prism.lex_file(__FILE__)
- end
-
- error = assert_raise Errno::ENOENT do
- Prism.lex_file("idontexist.rb")
- end
-
- assert_equal "No such file or directory - idontexist.rb", error.message
-
- assert_raise TypeError do
- Prism.lex_file(nil)
- end
- end
-
- def test_parse_lex_file
- node, tokens = Prism.parse_lex_file(__FILE__).value
-
- assert_kind_of ProgramNode, node
- refute_empty tokens
-
- error = assert_raise Errno::ENOENT do
- Prism.parse_lex_file("idontexist.rb")
- end
-
- assert_equal "No such file or directory - idontexist.rb", error.message
-
- assert_raise TypeError do
- Prism.parse_lex_file(nil)
- end
- end
-
- def test_parse_file
- node = Prism.parse_file(__FILE__).value
- assert_kind_of ProgramNode, node
-
- error = assert_raise Errno::ENOENT do
- Prism.parse_file("idontexist.rb")
- end
-
- assert_equal "No such file or directory - idontexist.rb", error.message
-
- assert_raise TypeError do
- Prism.parse_file(nil)
- end
- end
-
- def test_parse_file_success
- assert_predicate Prism.parse_file_comments(__FILE__), :any?
-
- error = assert_raise Errno::ENOENT do
- Prism.parse_file_comments("idontexist.rb")
- end
-
- assert_equal "No such file or directory - idontexist.rb", error.message
-
- assert_raise TypeError do
- Prism.parse_file_comments(nil)
- end
- end
-
- def test_parse_file_comments
- assert_predicate Prism.parse_file_comments(__FILE__), :any?
-
- error = assert_raise Errno::ENOENT do
- Prism.parse_file_comments("idontexist.rb")
- end
-
- assert_equal "No such file or directory - idontexist.rb", error.message
-
- assert_raise TypeError do
- Prism.parse_file_comments(nil)
- end
- end
-
- # To accurately compare against Ripper, we need to make sure that we're
- # running on CRuby 3.2+.
- ripper_enabled = RUBY_ENGINE == "ruby" && RUBY_VERSION >= "3.2.0"
-
- # The FOCUS environment variable allows you to specify one particular fixture
- # to test, instead of all of them.
- base = File.join(__dir__, "fixtures")
- relatives = ENV["FOCUS"] ? [ENV["FOCUS"]] : Dir["**/*.txt", base: base]
-
- relatives.each do |relative|
- # These fail on TruffleRuby due to a difference in Symbol#inspect: :测试 vs :"测试"
- next if RUBY_ENGINE == "truffleruby" and %w[emoji_method_calls.txt seattlerb/bug202.txt seattlerb/magic_encoding_comment.txt].include?(relative)
-
- filepath = File.join(base, relative)
- snapshot = File.expand_path(File.join("snapshots", relative), __dir__)
-
- directory = File.dirname(snapshot)
- FileUtils.mkdir_p(directory) unless File.directory?(directory)
-
- ripper_should_match = ripper_enabled
- check_valid_syntax = RUBY_VERSION >= "3.2.0"
-
- case relative
- when "seattlerb/pct_w_heredoc_interp_nested.txt"
- # This file has changed behavior in Ripper in Ruby 3.3, so we skip it if
- # we're on an earlier version.
- ripper_should_match = false if RUBY_VERSION < "3.3.0"
- when "seattlerb/heredoc_nested.txt", "whitequark/dedenting_heredoc.txt"
- # It seems like there are some oddities with nested heredocs and ripper.
- # Waiting for feedback on https://bugs.ruby-lang.org/issues/19838.
- ripper_should_match = false
- when "spanning_heredoc.txt", "spanning_heredoc_newlines.txt"
- # Ripper seems to have a bug that the regex portions before and after
- # the heredoc are combined into a single token. See
- # https://bugs.ruby-lang.org/issues/19838.
- ripper_should_match = false
- when "heredocs_leading_whitespace.txt"
- # Ruby < 3.3.0 cannot parse heredocs where there are leading whitespace
- # characters in the heredoc start.
- # Example: <<~' EOF' or <<-' EOF'
- # https://bugs.ruby-lang.org/issues/19539
- if RUBY_VERSION < "3.3.0"
- ripper_should_match = false
- check_valid_syntax = false
- end
- end
-
- define_method "test_filepath_#{relative}" do
- # First, read the source from the filepath. Use binmode to avoid
- # converting CRLF on Windows, and explicitly set the external encoding
- # to UTF-8 to override the binmode default.
- source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
-
- # Make sure that the given source is valid syntax, otherwise we have an
- # invalid fixture.
- assert_valid_syntax(source) if check_valid_syntax
-
- # Next, assert that there were no errors during parsing.
- result = Prism.parse(source, filepath: relative)
- assert_empty result.errors
-
- # Next, pretty print the source.
- printed = PP.pp(result.value, +"", 79)
-
- if File.exist?(snapshot)
- saved = File.read(snapshot)
-
- # If the snapshot file exists, but the printed value does not match the
- # snapshot, then update the snapshot file.
- if printed != saved
- File.write(snapshot, printed)
- warn("Updated snapshot at #{snapshot}.")
- end
-
- # If the snapshot file exists, then assert that the printed value
- # matches the snapshot.
- assert_equal(saved, printed)
- else
- # If the snapshot file does not yet exist, then write it out now.
- File.write(snapshot, printed)
- warn("Created snapshot at #{snapshot}.")
- end
-
- if !ENV["PRISM_BUILD_MINIMAL"]
- # Next, assert that the value can be serialized and deserialized
- # without changing the shape of the tree.
- assert_equal_nodes(result.value, Prism.load(source, Prism.dump(source, filepath: relative)).value)
- end
-
- # Next, check that the location ranges of each node in the tree are a
- # superset of their respective child nodes.
- assert_non_overlapping_locations(result.value)
-
- # Next, assert that the newlines are in the expected places.
- expected_newlines = [0]
- source.b.scan("\n") { expected_newlines << $~.offset(0)[0] + 1 }
- assert_equal expected_newlines, Debug.newlines(source)
-
- if ripper_should_match
- # Finally, assert that we can lex the source and get the same tokens as
- # Ripper.
- lex_result = Prism.lex_compat(source)
- assert_equal [], lex_result.errors
- tokens = lex_result.value
-
- begin
- Prism.lex_ripper(source).zip(tokens).each do |(ripper, prism)|
- assert_equal ripper, prism
- end
- rescue SyntaxError
- raise ArgumentError, "Test file has invalid syntax #{filepath}"
- end
-
- # Next, check that we get the correct number of magic comments when
- # lexing with ripper.
- expected = MagicCommentRipper.new(source).tap(&:parse).magic_comments
- actual = result.magic_comments
-
- assert_equal expected.length, actual.length
- expected.zip(actual).each do |(expected_key, expected_value), magic_comment|
- assert_equal expected_key, magic_comment.key
- assert_equal expected_value, magic_comment.value
- end
- end
- end
- end
-
- Dir["*.txt", base: base].each do |relative|
- next if relative == "newline_terminated.txt" || relative == "spanning_heredoc_newlines.txt"
-
- # We test every snippet (separated by \n\n) in isolation
- # to ensure the parser does not try to read bytes further than the end of each snippet
- define_method "test_individual_snippets_#{relative}" do
- filepath = File.join(base, relative)
-
- # First, read the source from the filepath. Use binmode to avoid converting CRLF on Windows,
- # and explicitly set the external encoding to UTF-8 to override the binmode default.
- file_contents = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
-
- file_contents.split(/(?<=\S)\n\n(?=\S)/).each do |snippet|
- snippet = snippet.rstrip
- result = Prism.parse(snippet, filepath: relative)
- assert_empty result.errors
-
- if !ENV["PRISM_BUILD_MINIMAL"]
- assert_equal_nodes(result.value, Prism.load(snippet, Prism.dump(snippet, filepath: relative)).value)
- end
- end
- end
- end
-
- private
-
- # Check that the location ranges of each node in the tree are a superset of
- # their respective child nodes.
- def assert_non_overlapping_locations(node)
- queue = [node]
-
- while (current = queue.shift)
- # We only want to compare parent/child location overlap in the case that
- # we are not looking at a heredoc. That's because heredoc locations are
- # special in that they only use the declaration of the heredoc.
- compare = !(current.is_a?(StringNode) ||
- current.is_a?(XStringNode) ||
- current.is_a?(InterpolatedStringNode) ||
- current.is_a?(InterpolatedXStringNode)) ||
- !current.opening&.start_with?("<<")
-
- current.child_nodes.each do |child|
- # child_nodes can return nil values, so we need to skip those.
- next unless child
-
- # Now that we know we have a child node, add that to the queue.
- queue << child
-
- if compare
- assert_operator current.location.start_offset, :<=, child.location.start_offset
- assert_operator current.location.end_offset, :>=, child.location.end_offset
- end
- end
- end
- end
-
- def find_source_file_node(program)
- queue = [program]
- while (node = queue.shift)
- return node if node.is_a?(SourceFileNode)
- queue.concat(node.compact_child_nodes)
- end
- end
-
- def ignore_warnings
- previous_verbosity = $VERBOSE
- $VERBOSE = nil
- yield
- ensure
- $VERBOSE = previous_verbosity
- end
- end
-end
diff --git a/test/prism/parser_test.rb b/test/prism/parser_test.rb
deleted file mode 100644
index 79b65cf75b..0000000000
--- a/test/prism/parser_test.rb
+++ /dev/null
@@ -1,186 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-begin
- verbose, $VERBOSE = $VERBOSE, nil
- require "parser/ruby33"
- require "prism/translation/parser33"
-rescue LoadError
- # In CRuby's CI, we're not going to test against the parser gem because we
- # don't want to have to install it. So in this case we'll just skip this test.
- return
-ensure
- $VERBOSE = verbose
-end
-
-# First, opt in to every AST feature.
-Parser::Builders::Default.modernize
-
-# Modify the source map == check so that it doesn't check against the node
-# itself so we don't get into a recursive loop.
-Parser::Source::Map.prepend(
- Module.new {
- def ==(other)
- self.class == other.class &&
- (instance_variables - %i[@node]).map do |ivar|
- instance_variable_get(ivar) == other.instance_variable_get(ivar)
- end.reduce(:&)
- end
- }
-)
-
-# Next, ensure that we're comparing the nodes and also comparing the source
-# ranges so that we're getting all of the necessary information.
-Parser::AST::Node.prepend(
- Module.new {
- def ==(other)
- super && (location == other.location)
- end
- }
-)
-
-module Prism
- class ParserTest < TestCase
- base = File.join(__dir__, "fixtures")
-
- # These files are erroring because of the parser gem being wrong.
- skip_incorrect = [
- "embdoc_no_newline_at_end.txt"
- ]
-
- # These files are either failing to parse or failing to translate, so we'll
- # skip them for now.
- skip_all = skip_incorrect | [
- "dash_heredocs.txt",
- "dos_endings.txt",
- "heredocs_with_ignored_newlines.txt",
- "regex.txt",
- "regex_char_width.txt",
- "spanning_heredoc.txt",
- "spanning_heredoc_newlines.txt",
- "unescaping.txt"
- ]
-
- # Not sure why these files are failing on JRuby, but skipping them for now.
- if RUBY_ENGINE == "jruby"
- skip_all.push("emoji_method_calls.txt", "symbols.txt")
- end
-
- # These files are failing to translate their lexer output into the lexer
- # output expected by the parser gem, so we'll skip them for now.
- skip_tokens = [
- "comments.txt",
- "heredoc_with_comment.txt",
- "indented_file_end.txt",
- "methods.txt",
- "strings.txt",
- "tilde_heredocs.txt",
- "xstring_with_backslash.txt"
- ]
-
- Dir["*.txt", base: base].each do |name|
- next if skip_all.include?(name)
-
- define_method("test_#{name}") do
- assert_equal_parses(File.join(base, name), compare_tokens: !skip_tokens.include?(name))
- end
- end
-
- private
-
- def assert_equal_parses(filepath, compare_tokens: true)
- buffer = Parser::Source::Buffer.new(filepath, 1)
- buffer.source = File.read(filepath)
-
- parser = Parser::Ruby33.new
- parser.diagnostics.consumer = ->(*) {}
- parser.diagnostics.all_errors_are_fatal = true
-
- expected_ast, expected_comments, expected_tokens =
- begin
- parser.tokenize(buffer)
- rescue ArgumentError, Parser::SyntaxError
- return
- end
-
- actual_ast, actual_comments, actual_tokens =
- Prism::Translation::Parser33.new.tokenize(buffer)
-
- assert_equal expected_ast, actual_ast, -> { assert_equal_asts_message(expected_ast, actual_ast) }
- assert_equal_tokens(expected_tokens, actual_tokens) if compare_tokens
- assert_equal_comments(expected_comments, actual_comments)
- end
-
- def assert_equal_asts_message(expected_ast, actual_ast)
- queue = [[expected_ast, actual_ast]]
-
- while (left, right = queue.shift)
- if left.type != right.type
- return "expected: #{left.type}\nactual: #{right.type}"
- end
-
- if left.location != right.location
- return "expected:\n#{left.inspect}\n#{left.location.inspect}\nactual:\n#{right.inspect}\n#{right.location.inspect}"
- end
-
- if left.type == :str && left.children[0] != right.children[0]
- return "expected: #{left.inspect}\nactual: #{right.inspect}"
- end
-
- left.children.zip(right.children).each do |left_child, right_child|
- queue << [left_child, right_child] if left_child.is_a?(Parser::AST::Node)
- end
- end
-
- "expected: #{expected_ast.inspect}\nactual: #{actual_ast.inspect}"
- end
-
- def assert_equal_tokens(expected_tokens, actual_tokens)
- if expected_tokens != actual_tokens
- expected_index = 0
- actual_index = 0
-
- while expected_index < expected_tokens.length
- expected_token = expected_tokens[expected_index]
- actual_token = actual_tokens[actual_index]
-
- expected_index += 1
- actual_index += 1
-
- # The parser gem always has a space before a string end in list
- # literals, but we don't. So we'll skip over the space.
- if expected_token[0] == :tSPACE && actual_token[0] == :tSTRING_END
- expected_index += 1
- next
- end
-
- # There are a lot of tokens that have very specific meaning according
- # to the context of the parser. We don't expose that information in
- # prism, so we need to normalize these tokens a bit.
- case actual_token[0]
- when :kDO
- actual_token[0] = expected_token[0] if %i[kDO_BLOCK kDO_LAMBDA].include?(expected_token[0])
- when :tLPAREN
- actual_token[0] = expected_token[0] if expected_token[0] == :tLPAREN2
- when :tPOW
- actual_token[0] = expected_token[0] if expected_token[0] == :tDSTAR
- end
-
- # Now we can assert that the tokens are actually equal.
- assert_equal expected_token, actual_token, -> {
- "expected: #{expected_token.inspect}\n" \
- "actual: #{actual_token.inspect}"
- }
- end
- end
- end
-
- def assert_equal_comments(expected_comments, actual_comments)
- assert_equal expected_comments, actual_comments, -> {
- "expected: #{expected_comments.inspect}\n" \
- "actual: #{actual_comments.inspect}"
- }
- end
- end
-end
diff --git a/test/prism/pattern_test.rb b/test/prism/pattern_test.rb
deleted file mode 100644
index e0aa079cb9..0000000000
--- a/test/prism/pattern_test.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class PatternTest < TestCase
- def test_invalid_syntax
- assert_raise(Pattern::CompilationError) { scan("", "<>") }
- end
-
- def test_invalid_constant
- assert_raise(Pattern::CompilationError) { scan("", "Foo") }
- end
-
- def test_invalid_nested_constant
- assert_raise(Pattern::CompilationError) { scan("", "Foo::Bar") }
- end
-
- def test_regexp_with_interpolation
- assert_raise(Pattern::CompilationError) { scan("", "/\#{foo}/") }
- end
-
- def test_string_with_interpolation
- assert_raise(Pattern::CompilationError) { scan("", '"#{foo}"') }
- end
-
- def test_symbol_with_interpolation
- assert_raise(Pattern::CompilationError) { scan("", ":\"\#{foo}\"") }
- end
-
- def test_invalid_node
- assert_raise(Pattern::CompilationError) { scan("", "IntegerNode[^foo]") }
- end
-
- def test_self
- assert_raise(Pattern::CompilationError) { scan("", "self") }
- end
-
- def test_array_pattern_no_constant
- results = scan("1 + 2", "[IntegerNode]")
-
- assert_equal 1, results.length
- end
-
- def test_array_pattern
- results = scan("1 + 2", "CallNode[name: :+, receiver: IntegerNode, arguments: [IntegerNode]]")
-
- assert_equal 1, results.length
- end
-
- def test_alternation_pattern
- results = scan("Foo + Bar + 1", "ConstantReadNode | IntegerNode")
-
- assert_equal 3, results.length
- assert_equal 1, results.grep(IntegerNode).first.value
- end
-
- def test_constant_read_node
- results = scan("Foo + Bar + Baz", "ConstantReadNode")
-
- assert_equal 3, results.length
- assert_equal %w[Bar Baz Foo], results.map(&:slice).sort
- end
-
- def test_object_const
- results = scan("1 + 2 + 3", "IntegerNode[]")
-
- assert_equal 3, results.length
- end
-
- def test_constant_path
- results = scan("Foo + Bar + Baz", "Prism::ConstantReadNode")
-
- assert_equal 3, results.length
- end
-
- def test_hash_pattern_no_constant
- results = scan("Foo + Bar + Baz", "{ name: :+ }")
-
- assert_equal 2, results.length
- end
-
- def test_hash_pattern_regexp
- results = scan("Foo + Bar + Baz", "{ name: /^[[:punct:]]$/ }")
-
- assert_equal 2, results.length
- assert_equal ["Prism::CallNode"], results.map { |node| node.class.name }.uniq
- end
-
- def test_nil
- results = scan("foo", "{ receiver: nil }")
-
- assert_equal 1, results.length
- end
-
- def test_regexp_options
- results = scan("@foo + @bar + @baz", "InstanceVariableReadNode[name: /^@B/i]")
-
- assert_equal 2, results.length
- end
-
- def test_string_empty
- results = scan("", "''")
-
- assert_empty results
- end
-
- def test_symbol_empty
- results = scan("", ":''")
-
- assert_empty results
- end
-
- def test_symbol_plain
- results = scan("@foo", "{ name: :\"@foo\" }")
-
- assert_equal 1, results.length
- end
-
- def test_symbol
- results = scan("@foo", "{ name: :@foo }")
-
- assert_equal 1, results.length
- end
-
- private
-
- def scan(source, query)
- Prism::Pattern.new(query).scan(Prism.parse(source).value).to_a
- end
- end
-end
diff --git a/test/prism/redundant_return_test.rb b/test/prism/redundant_return_test.rb
deleted file mode 100644
index c668169245..0000000000
--- a/test/prism/redundant_return_test.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class RedundantReturnTest < TestCase
- def test_statements
- assert_redundant_return("def foo; return; end")
- refute_redundant_return("def foo; return; 1; end")
- end
-
- def test_begin_implicit
- assert_redundant_return("def foo; return; rescue; end")
- refute_redundant_return("def foo; return; 1; rescue; end")
- refute_redundant_return("def foo; return; rescue; else; end")
- end
-
- def test_begin_explicit
- assert_redundant_return("def foo; begin; return; rescue; end; end")
- refute_redundant_return("def foo; begin; return; 1; rescue; end; end")
- refute_redundant_return("def foo; begin; return; rescue; else; end; end")
- end
-
- def test_if
- assert_redundant_return("def foo; return if bar; end")
- end
-
- def test_unless
- assert_redundant_return("def foo; return unless bar; end")
- end
-
- def test_else
- assert_redundant_return("def foo; if bar; baz; else; return; end; end")
- end
-
- def test_case_when
- assert_redundant_return("def foo; case bar; when baz; return; end; end")
- end
-
- def test_case_else
- assert_redundant_return("def foo; case bar; when baz; else; return; end; end")
- end
-
- def test_case_match_in
- assert_redundant_return("def foo; case bar; in baz; return; end; end")
- end
-
- def test_case_match_else
- assert_redundant_return("def foo; case bar; in baz; else; return; end; end")
- end
-
- private
-
- def assert_redundant_return(source)
- assert find_return(source).redundant?
- end
-
- def refute_redundant_return(source)
- refute find_return(source).redundant?
- end
-
- def find_return(source)
- queue = [Prism.parse(source).value]
-
- while (current = queue.shift)
- return current if current.is_a?(ReturnNode)
- queue.concat(current.compact_child_nodes)
- end
-
- flunk "Could not find return node in #{node.inspect}"
- end
- end
-end
diff --git a/test/prism/reflection_test.rb b/test/prism/reflection_test.rb
deleted file mode 100644
index 869b68b1f8..0000000000
--- a/test/prism/reflection_test.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class ReflectionTest < TestCase
- def test_fields_for
- fields = Reflection.fields_for(CallNode)
- methods = CallNode.instance_methods(false)
-
- fields.each do |field|
- if field.is_a?(Reflection::FlagsField)
- field.flags.each do |flag|
- assert_includes methods, flag
- end
- else
- assert_includes methods, field.name
- end
- end
- end
- end
-end
diff --git a/test/prism/regexp_test.rb b/test/prism/regexp_test.rb
index 0a5fc2b4fc..297020fc72 100644
--- a/test/prism/regexp_test.rb
+++ b/test/prism/regexp_test.rb
@@ -2,78 +2,84 @@
require_relative "test_helper"
-return if Prism::BACKEND == :FFI
-
module Prism
class RegexpTest < TestCase
- ##############################################################################
+ ############################################################################
# These tests test the actual use case of extracting named capture groups
- ##############################################################################
+ ############################################################################
def test_named_captures_with_arrows
- assert_equal(["foo"], named_captures("(?<foo>bar)"))
+ assert_equal([:foo], named_captures("(?<foo>bar)"))
end
def test_named_captures_with_single_quotes
- assert_equal(["foo"], named_captures("(?'foo'bar)"))
+ assert_equal([:foo], named_captures("(?'foo'bar)"))
end
def test_nested_named_captures_with_arrows
- assert_equal(["foo", "bar"], named_captures("(?<foo>(?<bar>baz))"))
+ assert_equal([:foo, :bar], named_captures("(?<foo>(?<bar>baz))"))
end
def test_nested_named_captures_with_single_quotes
- assert_equal(["foo", "bar"], named_captures("(?'foo'(?'bar'baz))"))
+ assert_equal([:foo, :bar], named_captures("(?'foo'(?'bar'baz))"))
end
def test_allows_duplicate_named_captures
- assert_equal(["foo", "foo"], named_captures("(?<foo>bar)(?<foo>baz)"))
+ assert_equal([:foo], named_captures("(?<foo>bar)(?<foo>baz)"))
end
def test_named_capture_inside_fake_range_quantifier
- assert_equal(["foo"], named_captures("foo{1, (?<foo>2)}"))
+ assert_equal([:foo], named_captures("foo{1, (?<foo>2)}"))
+ end
+
+ def test_fake_named_captures_inside_character_sets
+ assert_equal([], named_captures("[a-z(?<foo>)]"))
end
- ##############################################################################
+ def test_fake_named_capture_inside_character_set_with_escaped_ending
+ assert_equal([], named_captures("[a-z\\](?<foo>)]"))
+ end
+
+ ############################################################################
# These tests test the rest of the AST. They are not exhaustive, but they
# should cover the most common cases. We test these to make sure we don't
# accidentally regress and stop being able to extract named captures.
- ##############################################################################
+ ############################################################################
def test_alternation
- refute_nil(named_captures("foo|bar"))
+ assert_valid_regexp("foo|bar")
end
def test_anchors
- refute_nil(named_captures("^foo$"))
+ assert_valid_regexp("^foo$")
end
def test_any
- refute_nil(named_captures("."))
+ assert_valid_regexp(".")
end
def test_posix_character_classes
- refute_nil(named_captures("[[:digit:]]"))
+ assert_valid_regexp("[[:digit:]]")
end
def test_negated_posix_character_classes
- refute_nil(named_captures("[[:^digit:]]"))
+ assert_valid_regexp("[[:^digit:]]")
end
def test_invalid_posix_character_classes_should_fall_back_to_regular_classes
- refute_nil(named_captures("[[:foo]]"))
+ assert_valid_regexp("[[:foo]]")
end
def test_character_sets
- refute_nil(named_captures("[abc]"))
+ assert_valid_regexp("[abc]")
end
def test_nested_character_sets
- refute_nil(named_captures("[[abc]]"))
+ assert_valid_regexp("[[abc]]")
end
def test_nested_character_sets_with_operators
- refute_nil(named_captures("[[abc] && [def]]"))
+ assert_valid_regexp("[[abc] && [def]]")
end
def test_named_capture_inside_nested_character_set
@@ -81,120 +87,108 @@ module Prism
end
def test_negated_character_sets
- refute_nil(named_captures("[^abc]"))
+ assert_valid_regexp("[^abc]")
end
def test_character_ranges
- refute_nil(named_captures("[a-z]"))
+ assert_valid_regexp("[a-z]")
end
def test_negated_character_ranges
- refute_nil(named_captures("[^a-z]"))
- end
-
- def test_fake_named_captures_inside_character_sets
- assert_equal([], named_captures("[a-z(?<foo>)]"))
- end
-
- def test_fake_named_capture_inside_character_set_with_escaped_ending
- assert_equal([], named_captures("[a-z\\](?<foo>)]"))
+ assert_valid_regexp("[^a-z]")
end
def test_comments
- refute_nil(named_captures("(?#foo)"))
+ assert_valid_regexp("(?#foo)")
end
def test_comments_with_escaped_parentheses
- refute_nil(named_captures("(?#foo\\)\\))"))
+ assert_valid_regexp("(?#foo\\)\\))")
end
def test_non_capturing_groups
- refute_nil(named_captures("(?:foo)"))
+ assert_valid_regexp("(?:foo)")
end
def test_positive_lookaheads
- refute_nil(named_captures("(?=foo)"))
+ assert_valid_regexp("(?=foo)")
end
def test_negative_lookaheads
- refute_nil(named_captures("(?!foo)"))
+ assert_valid_regexp("(?!foo)")
end
def test_positive_lookbehinds
- refute_nil(named_captures("(?<=foo)"))
+ assert_valid_regexp("(?<=foo)")
end
def test_negative_lookbehinds
- refute_nil(named_captures("(?<!foo)"))
+ assert_valid_regexp("(?<!foo)")
end
def test_atomic_groups
- refute_nil(named_captures("(?>foo)"))
+ assert_valid_regexp("(?>foo)")
end
def test_absence_operator
- refute_nil(named_captures("(?~foo)"))
+ assert_valid_regexp("(?~foo)")
end
def test_conditional_expression_with_index
- refute_nil(named_captures("(?(1)foo)"))
+ assert_valid_regexp("(?(1)foo)")
end
def test_conditional_expression_with_name
- refute_nil(named_captures("(?(foo)bar)"))
+ assert_valid_regexp("(?(foo)bar)")
end
def test_conditional_expression_with_group
- refute_nil(named_captures("(?(<foo>)bar)"))
+ assert_valid_regexp("(?(<foo>)bar)")
end
def test_options_on_groups
- refute_nil(named_captures("(?imxdau:foo)"))
- end
-
- def test_options_on_groups_with_invalid_options
- assert_nil(named_captures("(?z:bar)"))
+ assert_valid_regexp("(?imxdau:foo)")
end
def test_options_on_groups_getting_turned_off
- refute_nil(named_captures("(?-imx:foo)"))
+ assert_valid_regexp("(?-imx:foo)")
end
def test_options_on_groups_some_getting_turned_on_some_getting_turned_off
- refute_nil(named_captures("(?im-x:foo)"))
+ assert_valid_regexp("(?im-x:foo)")
end
def test_star_quantifier
- refute_nil(named_captures("foo*"))
+ assert_valid_regexp("foo*")
end
def test_plus_quantifier
- refute_nil(named_captures("foo+"))
+ assert_valid_regexp("foo+")
end
def test_question_mark_quantifier
- refute_nil(named_captures("foo?"))
+ assert_valid_regexp("foo?")
end
def test_endless_range_quantifier
- refute_nil(named_captures("foo{1,}"))
+ assert_valid_regexp("foo{1,}")
end
def test_beginless_range_quantifier
- refute_nil(named_captures("foo{,1}"))
+ assert_valid_regexp("foo{,1}")
end
def test_range_quantifier
- refute_nil(named_captures("foo{1,2}"))
+ assert_valid_regexp("foo{1,2}")
end
def test_fake_range_quantifier_because_of_spaces
- refute_nil(named_captures("foo{1, 2}"))
+ assert_valid_regexp("foo{1, 2}")
end
- ##############################################################################
+ ############################################################################
# These test that flag values are correct.
- ##############################################################################
+ ############################################################################
def test_flag_ignorecase
assert_equal(Regexp::IGNORECASE, options("i"))
@@ -229,26 +223,30 @@ module Prism
def test_last_encoding_option_wins
regex = "/foo/nu"
- option = Prism.parse(regex).value.statements.body.first.options
+ option = Prism.parse_statement(regex).options
assert_equal Regexp::FIXEDENCODING, option
regex = "/foo/un"
- option = Prism.parse(regex).value.statements.body.first.options
+ option = Prism.parse_statement(regex).options
assert_equal Regexp::NOENCODING, option
end
private
+ def assert_valid_regexp(source)
+ assert Prism.parse_success?("/#{source}/ =~ \"\"")
+ end
+
def named_captures(source)
- Debug.named_captures(source)
+ Prism.parse("/#{source}/ =~ \"\"").value.locals
end
def options(flags)
options =
["/foo/#{flags}", "/foo\#{1}/#{flags}"].map do |source|
- Prism.parse(source).value.statements.body.first.options
+ Prism.parse_statement(source).options
end
# Check that we get the same set of options from both regular expressions
diff --git a/test/prism/result/attribute_write_test.rb b/test/prism/result/attribute_write_test.rb
new file mode 100644
index 0000000000..8f2e352738
--- /dev/null
+++ b/test/prism/result/attribute_write_test.rb
@@ -0,0 +1,56 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class AttributeWriteTest < TestCase
+ module Target
+ def self.value
+ 2
+ end
+
+ def self.value=(value)
+ 2
+ end
+
+ def self.[]=(index, value)
+ 2
+ end
+ end
+
+ def test_named_call_with_operator
+ assert_attribute_write("Target.value = 1")
+ end
+
+ def test_named_call_without_operator
+ assert_attribute_write("Target.value=(1)")
+ end
+
+ def test_indexed_call_with_operator
+ assert_attribute_write("Target[0] = 1")
+ end
+
+ def test_indexed_call_without_operator
+ refute_attribute_write("Target.[]=(0, 1)")
+ end
+
+ def test_comparison_operators
+ refute_attribute_write("Target.value == 1")
+ refute_attribute_write("Target.value === 1")
+ end
+
+ private
+
+ def assert_attribute_write(source)
+ call = Prism.parse_statement(source)
+ assert(call.attribute_write?)
+ assert_equal(1, eval(source))
+ end
+
+ def refute_attribute_write(source)
+ call = Prism.parse_statement(source)
+ refute(call.attribute_write?)
+ refute_equal(1, eval(source))
+ end
+ end
+end
diff --git a/test/prism/result/breadth_first_search_test.rb b/test/prism/result/breadth_first_search_test.rb
new file mode 100644
index 0000000000..e2e043a902
--- /dev/null
+++ b/test/prism/result/breadth_first_search_test.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class BreadthFirstSearchTest < TestCase
+ def test_breadth_first_search
+ result = Prism.parse("[1 + 2, 2]")
+ found =
+ result.value.breadth_first_search do |node|
+ node.is_a?(IntegerNode) && node.value == 2
+ end
+
+ refute_nil found
+ assert_equal 8, found.start_offset
+ end
+ end
+end
diff --git a/test/prism/result/comments_test.rb b/test/prism/result/comments_test.rb
new file mode 100644
index 0000000000..178623a75f
--- /dev/null
+++ b/test/prism/result/comments_test.rb
@@ -0,0 +1,138 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class CommentsTest < TestCase
+ def test_comment_inline
+ source = "# comment"
+ assert_equal [0], Prism.parse(source).source.offsets
+
+ assert_comment(
+ source,
+ InlineComment,
+ start_offset: 0,
+ end_offset: 9,
+ start_line: 1,
+ end_line: 1,
+ start_column: 0,
+ end_column: 9
+ )
+ end
+
+ def test_comment_inline_def
+ source = <<~RUBY
+ def foo
+ # a comment
+ end
+ RUBY
+
+ assert_comment(
+ source,
+ InlineComment,
+ start_offset: 10,
+ end_offset: 21,
+ start_line: 2,
+ end_line: 2,
+ start_column: 2,
+ end_column: 13
+ )
+ end
+
+ def test___END__
+ result = Prism.parse(<<~RUBY)
+ __END__
+ comment
+ RUBY
+
+ data_loc = result.data_loc
+ assert_equal 0, data_loc.start_offset
+ assert_equal 16, data_loc.end_offset
+ end
+
+ def test___END__crlf
+ result = Prism.parse("__END__\r\ncomment\r\n")
+
+ data_loc = result.data_loc
+ assert_equal 0, data_loc.start_offset
+ assert_equal 18, data_loc.end_offset
+ end
+
+ def test_comment_embedded_document
+ source = <<~RUBY
+ =begin
+ comment
+ =end
+ RUBY
+
+ assert_comment(
+ source,
+ EmbDocComment,
+ start_offset: 0,
+ end_offset: 20,
+ start_line: 1,
+ end_line: 4,
+ start_column: 0,
+ end_column: 0
+ )
+ end
+
+ def test_comment_embedded_document_with_content_on_same_line
+ source = <<~RUBY
+ =begin other stuff
+ =end
+ RUBY
+
+ assert_comment(
+ source,
+ EmbDocComment,
+ start_offset: 0,
+ end_offset: 24,
+ start_line: 1,
+ end_line: 3,
+ start_column: 0,
+ end_column: 0
+ )
+ end
+
+ def test_attaching_comments
+ source = <<~RUBY
+ # Foo class
+ class Foo
+ # bar method
+ def bar
+ # baz invocation
+ baz
+ end # bar end
+ end # Foo end
+ RUBY
+
+ result = Prism.parse(source)
+ result.attach_comments!
+ tree = result.value
+ class_node = tree.statements.body.first
+ method_node = class_node.body.body.first
+ call_node = method_node.body.body.first
+
+ assert_equal("# Foo class\n# Foo end", class_node.location.comments.map { |c| c.location.slice }.join("\n"))
+ assert_equal("# bar method\n# bar end", method_node.location.comments.map { |c| c.location.slice }.join("\n"))
+ assert_equal("# baz invocation", call_node.location.comments.map { |c| c.location.slice }.join("\n"))
+ end
+
+ private
+
+ def assert_comment(source, type, start_offset:, end_offset:, start_line:, end_line:, start_column:, end_column:)
+ result = Prism.parse(source)
+ assert result.errors.empty?, result.errors.map(&:message).join("\n")
+ assert_kind_of type, result.comments.first
+
+ location = result.comments.first.location
+ assert_equal start_offset, location.start_offset, -> { "Expected start_offset to be #{start_offset}" }
+ assert_equal end_offset, location.end_offset, -> { "Expected end_offset to be #{end_offset}" }
+ assert_equal start_line, location.start_line, -> { "Expected start_line to be #{start_line}" }
+ assert_equal end_line, location.end_line, -> { "Expected end_line to be #{end_line}" }
+ assert_equal start_column, location.start_column, -> { "Expected start_column to be #{start_column}" }
+ assert_equal end_column, location.end_column, -> { "Expected end_column to be #{end_column}" }
+ end
+ end
+end
diff --git a/test/prism/result/constant_path_node_test.rb b/test/prism/result/constant_path_node_test.rb
new file mode 100644
index 0000000000..75925600ca
--- /dev/null
+++ b/test/prism/result/constant_path_node_test.rb
@@ -0,0 +1,91 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class ConstantPathNodeTest < TestCase
+ def test_full_name_for_constant_path
+ source = <<~RUBY
+ Foo:: # comment
+ Bar::Baz::
+ Qux
+ RUBY
+
+ constant_path = Prism.parse_statement(source)
+ assert_equal("Foo::Bar::Baz::Qux", constant_path.full_name)
+ end
+
+ def test_full_name_for_constant_path_with_self
+ source = <<~RUBY
+ self:: # comment
+ Bar::Baz::
+ Qux
+ RUBY
+
+ constant_path = Prism.parse_statement(source)
+ assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
+ constant_path.full_name
+ end
+ end
+
+ def test_full_name_for_constant_path_with_variable
+ source = <<~RUBY
+ foo:: # comment
+ Bar::Baz::
+ Qux
+ RUBY
+
+ constant_path = Prism.parse_statement(source)
+
+ assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
+ constant_path.full_name
+ end
+ end
+
+ def test_full_name_for_constant_path_target
+ source = <<~RUBY
+ Foo:: # comment
+ Bar::Baz::
+ Qux, Something = [1, 2]
+ RUBY
+
+ node = Prism.parse_statement(source)
+ assert_equal("Foo::Bar::Baz::Qux", node.lefts.first.full_name)
+ end
+
+ def test_full_name_for_constant_path_with_stovetop_start
+ source = <<~RUBY
+ ::Foo:: # comment
+ Bar::Baz::
+ Qux, Something = [1, 2]
+ RUBY
+
+ node = Prism.parse_statement(source)
+ assert_equal("::Foo::Bar::Baz::Qux", node.lefts.first.full_name)
+ end
+
+ def test_full_name_for_constant_path_target_with_non_constant_parent
+ source = <<~RUBY
+ self::Foo, Bar = [1, 2]
+ RUBY
+
+ constant_target = Prism.parse_statement(source)
+ dynamic, static = constant_target.lefts
+
+ assert_raise(ConstantPathNode::DynamicPartsInConstantPathError) do
+ dynamic.full_name
+ end
+
+ assert_equal("Bar", static.full_name)
+ end
+
+ def test_full_name_for_constant_read_node
+ source = <<~RUBY
+ Bar
+ RUBY
+
+ constant = Prism.parse_statement(source)
+ assert_equal("Bar", constant.full_name)
+ end
+ end
+end
diff --git a/test/prism/result/equality_test.rb b/test/prism/result/equality_test.rb
new file mode 100644
index 0000000000..4f6e665a88
--- /dev/null
+++ b/test/prism/result/equality_test.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class EqualityTest < TestCase
+ def test_equality
+ assert_operator Prism.parse_statement("1"), :===, Prism.parse_statement("1")
+ assert_operator Prism.parse("1").value, :===, Prism.parse("1").value
+
+ complex_source = "class Something; @var = something.else { _1 }; end"
+ assert_operator Prism.parse_statement(complex_source), :===, Prism.parse_statement(complex_source)
+
+ refute_operator Prism.parse_statement("1"), :===, Prism.parse_statement("2")
+ refute_operator Prism.parse_statement("1"), :===, Prism.parse_statement("0x1")
+
+ complex_source_1 = "class Something; @var = something.else { _1 }; end"
+ complex_source_2 = "class Something; @var = something.else { _2 }; end"
+ refute_operator Prism.parse_statement(complex_source_1), :===, Prism.parse_statement(complex_source_2)
+ end
+ end
+end
diff --git a/test/prism/result/heredoc_test.rb b/test/prism/result/heredoc_test.rb
new file mode 100644
index 0000000000..7913c04a88
--- /dev/null
+++ b/test/prism/result/heredoc_test.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class HeredocTest < TestCase
+ def test_heredoc?
+ refute Prism.parse_statement("\"foo\"").heredoc?
+ refute Prism.parse_statement("\"foo \#{1}\"").heredoc?
+ refute Prism.parse_statement("`foo`").heredoc?
+ refute Prism.parse_statement("`foo \#{1}`").heredoc?
+
+ assert Prism.parse_statement("<<~HERE\nfoo\nHERE\n").heredoc?
+ assert Prism.parse_statement("<<~HERE\nfoo \#{1}\nHERE\n").heredoc?
+ assert Prism.parse_statement("<<~`HERE`\nfoo\nHERE\n").heredoc?
+ assert Prism.parse_statement("<<~`HERE`\nfoo \#{1}\nHERE\n").heredoc?
+ end
+ end
+end
diff --git a/test/prism/result/implicit_array_test.rb b/test/prism/result/implicit_array_test.rb
new file mode 100644
index 0000000000..e7ddde70aa
--- /dev/null
+++ b/test/prism/result/implicit_array_test.rb
@@ -0,0 +1,59 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class ImplicitArrayTest < TestCase
+ def test_call_node
+ assert_implicit_array("a.a = *b")
+ assert_implicit_array("a.a = 1, 2, 3")
+ assert_implicit_array("a[a] = *b")
+ assert_implicit_array("a[a] = 1, 2, 3")
+ end
+
+ def test_class_variable_write_node
+ assert_implicit_array("@@a = *b")
+ assert_implicit_array("@@a = 1, 2, 3")
+ end
+
+ def test_constant_path_write_node
+ assert_implicit_array("A::A = *b")
+ assert_implicit_array("A::A = 1, 2, 3")
+ end
+
+ def test_constant_write_node
+ assert_implicit_array("A = *b")
+ assert_implicit_array("A = 1, 2, 3")
+ end
+
+ def test_global_variable_write_node
+ assert_implicit_array("$a = *b")
+ assert_implicit_array("$a = 1, 2, 3")
+ end
+
+ def test_instance_variable_write_node
+ assert_implicit_array("@a = *b")
+ assert_implicit_array("@a = 1, 2, 3")
+ end
+
+ def test_local_variable_write_node
+ assert_implicit_array("a = *b")
+ assert_implicit_array("a = 1, 2, 3")
+ end
+
+ def test_multi_write_node
+ assert_implicit_array("a, b, c = *b")
+ assert_implicit_array("a, b, c = 1, 2, 3")
+ end
+
+ private
+
+ def assert_implicit_array(source)
+ assert Prism.parse_success?(source)
+ assert Prism.parse_failure?("if #{source} then end")
+
+ assert_valid_syntax(source)
+ refute_valid_syntax("if #{source} then end")
+ end
+ end
+end
diff --git a/test/prism/result/index_write_test.rb b/test/prism/result/index_write_test.rb
new file mode 100644
index 0000000000..0d5383b601
--- /dev/null
+++ b/test/prism/result/index_write_test.rb
@@ -0,0 +1,89 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class IndexWriteTest < TestCase
+ def test_keywords_3_3
+ assert_parse_success(<<~RUBY, "3.3.0")
+ foo[bar: 1] = 1
+ foo[bar: 1] &&= 1
+ foo[bar: 1] ||= 1
+ foo[bar: 1] += 1
+ RUBY
+
+ assert_parse_success(<<~RUBY, "3.3.0")
+ def foo(**)
+ bar[**] = 1
+ bar[**] &&= 1
+ bar[**] ||= 1
+ bar[**] += 1
+ end
+ RUBY
+ end
+
+ def test_block_3_3
+ assert_parse_success(<<~RUBY, "3.3.0")
+ foo[&bar] = 1
+ foo[&bar] &&= 1
+ foo[&bar] ||= 1
+ foo[&bar] += 1
+ RUBY
+
+ assert_parse_success(<<~RUBY, "3.3.0")
+ def foo(&)
+ bar[&] = 1
+ bar[&] &&= 1
+ bar[&] ||= 1
+ bar[&] += 1
+ end
+ RUBY
+ end
+
+ def test_keywords_latest
+ assert_parse_failure(<<~RUBY)
+ foo[bar: 1] = 1
+ foo[bar: 1] &&= 1
+ foo[bar: 1] ||= 1
+ foo[bar: 1] += 1
+ RUBY
+
+ assert_parse_failure(<<~RUBY)
+ def foo(**)
+ bar[**] = 1
+ bar[**] &&= 1
+ bar[**] ||= 1
+ bar[**] += 1
+ end
+ RUBY
+ end
+
+ def test_block_latest
+ assert_parse_failure(<<~RUBY)
+ foo[&bar] = 1
+ foo[&bar] &&= 1
+ foo[&bar] ||= 1
+ foo[&bar] += 1
+ RUBY
+
+ assert_parse_failure(<<~RUBY)
+ def foo(&)
+ bar[&] = 1
+ bar[&] &&= 1
+ bar[&] ||= 1
+ bar[&] += 1
+ end
+ RUBY
+ end
+
+ private
+
+ def assert_parse_success(source, version = "latest")
+ assert Prism.parse_success?(source, version: version)
+ end
+
+ def assert_parse_failure(source, version = "latest")
+ assert Prism.parse_failure?(source, version: version)
+ end
+ end
+end
diff --git a/test/prism/result/integer_base_flags_test.rb b/test/prism/result/integer_base_flags_test.rb
new file mode 100644
index 0000000000..e3ab8c6910
--- /dev/null
+++ b/test/prism/result/integer_base_flags_test.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class IntegerBaseFlagsTest < TestCase
+ # Through some bit hackery, we want to allow consumers to use the integer
+ # base flags as the base itself. It has a nice property that the current
+ # alignment provides them in the correct order. So here we test that our
+ # assumption holds so that it doesn't change out from under us.
+ #
+ # In C, this would look something like:
+ #
+ # ((flags & ~DECIMAL) >> 1) || 10
+ #
+ # We have to do some other work in Ruby because 0 is truthy and ~ on an
+ # integer doesn't have a fixed width.
+ def test_flags
+ assert_equal 2, base("0b1")
+ assert_equal 8, base("0o1")
+ assert_equal 10, base("0d1")
+ assert_equal 16, base("0x1")
+ end
+
+ private
+
+ def base(source)
+ node = Prism.parse_statement(source)
+ value = (node.send(:flags) & (0b111100 - IntegerBaseFlags::DECIMAL)) >> 1
+ value == 0 ? 10 : value
+ end
+ end
+end
diff --git a/test/prism/result/integer_parse_test.rb b/test/prism/result/integer_parse_test.rb
new file mode 100644
index 0000000000..7b5ce98bb6
--- /dev/null
+++ b/test/prism/result/integer_parse_test.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class IntegerParseTest < TestCase
+ def test_integer_parse
+ assert_integer_parse(1)
+ assert_integer_parse(50)
+ assert_integer_parse(100)
+ assert_integer_parse(100, "1_0_0")
+ assert_integer_parse(8, "0_1_0")
+
+ assert_integer_parse(10, "0b1010")
+ assert_integer_parse(10, "0B1010")
+ assert_integer_parse(10, "0o12")
+ assert_integer_parse(10, "0O12")
+ assert_integer_parse(10, "012")
+ assert_integer_parse(10, "0d10")
+ assert_integer_parse(10, "0D10")
+ assert_integer_parse(10, "0xA")
+ assert_integer_parse(10, "0XA")
+
+ assert_integer_parse(2**32)
+ assert_integer_parse(2**64 + 2**32)
+ assert_integer_parse(2**128 + 2**64 + 2**32)
+
+ num = 99 ** 99
+ assert_integer_parse(num, "0b#{num.to_s(2)}")
+ assert_integer_parse(num, "0o#{num.to_s(8)}")
+ assert_integer_parse(num, "0d#{num.to_s(10)}")
+ assert_integer_parse(num, "0x#{num.to_s(16)}")
+ end
+
+ private
+
+ def assert_integer_parse(expected, source = expected.to_s)
+ assert_equal expected, Prism.parse_statement(source).value
+ end
+ end
+end
diff --git a/test/prism/result/node_id_test.rb b/test/prism/result/node_id_test.rb
new file mode 100644
index 0000000000..59b79bc574
--- /dev/null
+++ b/test/prism/result/node_id_test.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class NodeIdTest < TestCase
+ Fixture.each do |fixture|
+ define_method(fixture.test_name) { assert_node_ids(fixture.read) }
+ end
+
+ private
+
+ def assert_node_ids(source)
+ queue = [Prism.parse(source).value]
+ node_ids = []
+
+ while (node = queue.shift)
+ node_ids << node.node_id
+ queue.concat(node.compact_child_nodes)
+ end
+
+ node_ids.sort!
+ refute_includes node_ids, 0
+ assert_equal node_ids, node_ids.uniq
+ end
+ end
+end
diff --git a/test/prism/result/numeric_value_test.rb b/test/prism/result/numeric_value_test.rb
new file mode 100644
index 0000000000..5c89230a1f
--- /dev/null
+++ b/test/prism/result/numeric_value_test.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class NumericValueTest < TestCase
+ def test_numeric_value
+ assert_equal 123, Prism.parse_statement("123").value
+ assert_equal 3.14, Prism.parse_statement("3.14").value
+ assert_equal 42i, Prism.parse_statement("42i").value
+ assert_equal 42.1ri, Prism.parse_statement("42.1ri").value
+ assert_equal 3.14i, Prism.parse_statement("3.14i").value
+ assert_equal 42r, Prism.parse_statement("42r").value
+ assert_equal 0.5r, Prism.parse_statement("0.5r").value
+ assert_equal 42ri, Prism.parse_statement("42ri").value
+ assert_equal 0.5ri, Prism.parse_statement("0.5ri").value
+ assert_equal 0xFFr, Prism.parse_statement("0xFFr").value
+ assert_equal 0xFFri, Prism.parse_statement("0xFFri").value
+ end
+ end
+end
diff --git a/test/prism/result/overlap_test.rb b/test/prism/result/overlap_test.rb
new file mode 100644
index 0000000000..155bc870d3
--- /dev/null
+++ b/test/prism/result/overlap_test.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class OverlapTest < TestCase
+ Fixture.each do |fixture|
+ define_method(fixture.test_name) { assert_overlap(fixture) }
+ end
+
+ private
+
+ # Check that the location ranges of each node in the tree are a superset of
+ # their respective child nodes.
+ def assert_overlap(fixture)
+ queue = [Prism.parse_file(fixture.full_path).value]
+
+ while (current = queue.shift)
+ # We only want to compare parent/child location overlap in the case that
+ # we are not looking at a heredoc. That's because heredoc locations are
+ # special in that they only use the declaration of the heredoc.
+ compare = !(current.is_a?(StringNode) ||
+ current.is_a?(XStringNode) ||
+ current.is_a?(InterpolatedStringNode) ||
+ current.is_a?(InterpolatedXStringNode)) ||
+ !current.opening&.start_with?("<<")
+
+ current.child_nodes.each do |child|
+ # child_nodes can return nil values, so we need to skip those.
+ next unless child
+
+ # Now that we know we have a child node, add that to the queue.
+ queue << child
+
+ if compare
+ assert_operator current.location.start_offset, :<=, child.location.start_offset
+ assert_operator current.location.end_offset, :>=, child.location.end_offset
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/test/prism/result/regular_expression_options_test.rb b/test/prism/result/regular_expression_options_test.rb
new file mode 100644
index 0000000000..ff6e20526f
--- /dev/null
+++ b/test/prism/result/regular_expression_options_test.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class RegularExpressionOptionsTest < TestCase
+ def test_options
+ assert_equal "", Prism.parse_statement("__FILE__").filepath
+ assert_equal "foo.rb", Prism.parse_statement("__FILE__", filepath: "foo.rb").filepath
+
+ assert_equal 1, Prism.parse_statement("foo").location.start_line
+ assert_equal 10, Prism.parse_statement("foo", line: 10).location.start_line
+
+ refute Prism.parse_statement("\"foo\"").frozen?
+ assert Prism.parse_statement("\"foo\"", frozen_string_literal: true).frozen?
+ refute Prism.parse_statement("\"foo\"", frozen_string_literal: false).frozen?
+
+ assert_kind_of CallNode, Prism.parse_statement("foo")
+ assert_kind_of LocalVariableReadNode, Prism.parse_statement("foo", scopes: [[:foo]])
+ assert_equal 1, Prism.parse_statement("foo", scopes: [[:foo], []]).depth
+
+ assert_equal [:foo], Prism.parse("foo", scopes: [[:foo]]).value.locals
+ end
+ end
+end
diff --git a/test/prism/result/source_location_test.rb b/test/prism/result/source_location_test.rb
new file mode 100644
index 0000000000..7bdc707658
--- /dev/null
+++ b/test/prism/result/source_location_test.rb
@@ -0,0 +1,950 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class SourceLocationTest < TestCase
+ def test_AliasGlobalVariableNode
+ assert_location(AliasGlobalVariableNode, "alias $foo $bar")
+ end
+
+ def test_AliasMethodNode
+ assert_location(AliasMethodNode, "alias foo bar")
+ end
+
+ def test_AlternationPatternNode
+ assert_location(AlternationPatternNode, "foo => bar | baz", 7...16, &:pattern)
+ end
+
+ def test_AndNode
+ assert_location(AndNode, "foo and bar")
+ assert_location(AndNode, "foo && bar")
+ end
+
+ def test_ArgumentsNode
+ assert_location(ArgumentsNode, "foo(bar, baz, qux)", 4...17, &:arguments)
+ end
+
+ def test_ArrayNode
+ assert_location(ArrayNode, "[foo, bar, baz]")
+ assert_location(ArrayNode, "%i[foo bar baz]")
+ assert_location(ArrayNode, "%I[foo bar baz]")
+ assert_location(ArrayNode, "%w[foo bar baz]")
+ assert_location(ArrayNode, "%W[foo bar baz]")
+ end
+
+ def test_ArrayPatternNode
+ assert_location(ArrayPatternNode, "foo => bar, baz", 7...15, &:pattern)
+ assert_location(ArrayPatternNode, "foo => [bar, baz]", 7...17, &:pattern)
+ assert_location(ArrayPatternNode, "foo => *bar", 7...11, &:pattern)
+ assert_location(ArrayPatternNode, "foo => []", 7...9, &:pattern)
+ assert_location(ArrayPatternNode, "foo => Foo[]", 7...12, &:pattern)
+ assert_location(ArrayPatternNode, "foo => Foo[bar]", 7...15, &:pattern)
+ end
+
+ def test_AssocNode
+ assert_location(AssocNode, "{ '': 1 }", 2...7) { |node| node.elements.first }
+ assert_location(AssocNode, "{ foo: :bar }", 2...11) { |node| node.elements.first }
+ assert_location(AssocNode, "{ :foo => :bar }", 2...14) { |node| node.elements.first }
+ assert_location(AssocNode, "foo(bar: :baz)", 4...13) { |node| node.arguments.arguments.first.elements.first }
+ end
+
+ def test_AssocSplatNode
+ assert_location(AssocSplatNode, "{ **foo }", 2...7) { |node| node.elements.first }
+ assert_location(AssocSplatNode, "foo(**bar)", 4...9) { |node| node.arguments.arguments.first.elements.first }
+ end
+
+ def test_BackReferenceReadNode
+ assert_location(BackReferenceReadNode, "$+")
+ end
+
+ def test_BeginNode
+ assert_location(BeginNode, "begin foo end")
+ assert_location(BeginNode, "begin foo rescue bar end")
+ assert_location(BeginNode, "begin foo; rescue bar\nelse baz end")
+ assert_location(BeginNode, "begin foo; rescue bar\nelse baz\nensure qux end")
+
+ assert_location(BeginNode, "class Foo\nrescue then end", 0..25, &:body)
+ assert_location(BeginNode, "module Foo\nrescue then end", 0..26, &:body)
+ end
+
+ def test_BlockArgumentNode
+ assert_location(BlockArgumentNode, "foo(&bar)", 4...8, &:block)
+ end
+
+ def test_BlockLocalVariableNode
+ assert_location(BlockLocalVariableNode, "foo { |;bar| }", 8...11) do |node|
+ node.block.parameters.locals.first
+ end
+ end
+
+ def test_BlockNode
+ assert_location(BlockNode, "foo {}", 4...6, &:block)
+ assert_location(BlockNode, "foo do end", 4...10, &:block)
+ end
+
+ def test_BlockParameterNode
+ assert_location(BlockParameterNode, "def foo(&bar) end", 8...12) { |node| node.parameters.block }
+ end
+
+ def test_BlockParametersNode
+ assert_location(BlockParametersNode, "foo { || }", 6...8) { |node| node.block.parameters }
+ assert_location(BlockParametersNode, "foo { |bar| baz }", 6...11) { |node| node.block.parameters }
+ assert_location(BlockParametersNode, "foo { |bar; baz| baz }", 6...16) { |node| node.block.parameters }
+
+ assert_location(BlockParametersNode, "-> () {}", 3...5, &:parameters)
+ assert_location(BlockParametersNode, "-> (bar) { baz }", 3...8, &:parameters)
+ assert_location(BlockParametersNode, "-> (bar; baz) { baz }", 3...13, &:parameters)
+ end
+
+ def test_BreakNode
+ assert_location(BreakNode, "tap { break }", 6...11) { |node| node.block.body.body.first }
+ assert_location(BreakNode, "tap { break foo }", 6...15) { |node| node.block.body.body.first }
+ assert_location(BreakNode, "tap { break foo, bar }", 6...20) { |node| node.block.body.body.first }
+ assert_location(BreakNode, "tap { break(foo) }", 6...16) { |node| node.block.body.body.first }
+ end
+
+ def test_CallNode
+ assert_location(CallNode, "foo")
+ assert_location(CallNode, "foo?")
+ assert_location(CallNode, "foo!")
+
+ assert_location(CallNode, "foo()")
+ assert_location(CallNode, "foo?()")
+ assert_location(CallNode, "foo!()")
+
+ assert_location(CallNode, "foo(bar)")
+ assert_location(CallNode, "foo?(bar)")
+ assert_location(CallNode, "foo!(bar)")
+
+ assert_location(CallNode, "!foo")
+ assert_location(CallNode, "~foo")
+ assert_location(CallNode, "+foo")
+ assert_location(CallNode, "-foo")
+
+ assert_location(CallNode, "not foo")
+ assert_location(CallNode, "not(foo)")
+ assert_location(CallNode, "not()")
+
+ assert_location(CallNode, "foo + bar")
+ assert_location(CallNode, "foo -\n bar")
+
+ assert_location(CallNode, "Foo()")
+ assert_location(CallNode, "Foo(bar)")
+
+ assert_location(CallNode, "Foo::Bar()")
+ assert_location(CallNode, "Foo::Bar(baz)")
+
+ assert_location(CallNode, "Foo::bar")
+ assert_location(CallNode, "Foo::bar()")
+ assert_location(CallNode, "Foo::bar(baz)")
+
+ assert_location(CallNode, "Foo.bar")
+ assert_location(CallNode, "Foo.bar()")
+ assert_location(CallNode, "Foo.bar(baz)")
+
+ assert_location(CallNode, "foo::bar")
+ assert_location(CallNode, "foo::bar()")
+ assert_location(CallNode, "foo::bar(baz)")
+
+ assert_location(CallNode, "foo.bar")
+ assert_location(CallNode, "foo.bar()")
+ assert_location(CallNode, "foo.bar(baz)")
+
+ assert_location(CallNode, "foo&.bar")
+ assert_location(CallNode, "foo&.bar()")
+ assert_location(CallNode, "foo&.bar(baz)")
+
+ assert_location(CallNode, "foo[]")
+ assert_location(CallNode, "foo[bar]")
+ assert_location(CallNode, "foo[bar, baz]")
+
+ assert_location(CallNode, "foo[] = 1")
+ assert_location(CallNode, "foo[bar] = 1")
+ assert_location(CallNode, "foo[bar, baz] = 1")
+
+ assert_location(CallNode, "foo.()")
+ assert_location(CallNode, "foo.(bar)")
+
+ assert_location(CallNode, "foo&.()")
+ assert_location(CallNode, "foo&.(bar)")
+
+ assert_location(CallNode, "foo::()")
+ assert_location(CallNode, "foo::(bar)")
+ assert_location(CallNode, "foo::(bar, baz)")
+
+ assert_location(CallNode, "foo bar baz")
+ assert_location(CallNode, "foo bar('baz')")
+ end
+
+ def test_CallAndWriteNode
+ assert_location(CallAndWriteNode, "foo.foo &&= bar")
+ end
+
+ def test_CallOperatorWriteNode
+ assert_location(CallOperatorWriteNode, "foo.foo += bar")
+ end
+
+ def test_CallOrWriteNode
+ assert_location(CallOrWriteNode, "foo.foo ||= bar")
+ end
+
+ def test_CallTargetNode
+ assert_location(CallTargetNode, "foo.bar, = baz", 0...7) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_CapturePatternNode
+ assert_location(CapturePatternNode, "case foo; in bar => baz; end", 13...23) do |node|
+ node.conditions.first.pattern
+ end
+ end
+
+ def test_CaseNode
+ assert_location(CaseNode, "case foo; when bar; end")
+ assert_location(CaseNode, "case foo; when bar; else; end")
+ assert_location(CaseNode, "case foo; when bar; when baz; end")
+ assert_location(CaseNode, "case foo; when bar; when baz; else; end")
+ end
+
+ def test_CaseMatchNode
+ assert_location(CaseMatchNode, "case foo; in bar; end")
+ assert_location(CaseMatchNode, "case foo; in bar; else; end")
+ assert_location(CaseMatchNode, "case foo; in bar; in baz; end")
+ assert_location(CaseMatchNode, "case foo; in bar; in baz; else; end")
+ end
+
+ def test_ClassNode
+ assert_location(ClassNode, "class Foo end")
+ assert_location(ClassNode, "class Foo < Bar; end")
+ end
+
+ def test_ClassVariableAndWriteNode
+ assert_location(ClassVariableAndWriteNode, "@@foo &&= bar")
+ end
+
+ def test_ClassVariableOperatorWriteNode
+ assert_location(ClassVariableOperatorWriteNode, "@@foo += bar")
+ end
+
+ def test_ClassVariableOrWriteNode
+ assert_location(ClassVariableOrWriteNode, "@@foo ||= bar")
+ end
+
+ def test_ClassVariableReadNode
+ assert_location(ClassVariableReadNode, "@@foo")
+ end
+
+ def test_ClassVariableTargetNode
+ assert_location(ClassVariableTargetNode, "@@foo, @@bar = baz", 0...5) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_ClassVariableWriteNode
+ assert_location(ClassVariableWriteNode, "@@foo = bar")
+ end
+
+ def test_ConstantPathAndWriteNode
+ assert_location(ConstantPathAndWriteNode, "Parent::Child &&= bar")
+ end
+
+ def test_ConstantPathNode
+ assert_location(ConstantPathNode, "Foo::Bar")
+ assert_location(ConstantPathNode, "::Foo")
+ assert_location(ConstantPathNode, "::Foo::Bar")
+ end
+
+ def test_ConstantPathOperatorWriteNode
+ assert_location(ConstantPathOperatorWriteNode, "Parent::Child += bar")
+ end
+
+ def test_ConstantPathOrWriteNode
+ assert_location(ConstantPathOrWriteNode, "Parent::Child ||= bar")
+ end
+
+ def test_ConstantPathTargetNode
+ assert_location(ConstantPathTargetNode, "::Foo, ::Bar = baz", 0...5) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_ConstantPathWriteNode
+ assert_location(ConstantPathWriteNode, "Foo::Bar = baz")
+ assert_location(ConstantPathWriteNode, "::Foo = bar")
+ assert_location(ConstantPathWriteNode, "::Foo::Bar = baz")
+ end
+
+ def test_ConstantAndWriteNode
+ assert_location(ConstantAndWriteNode, "Foo &&= bar")
+ end
+
+ def test_ConstantOperatorWriteNode
+ assert_location(ConstantOperatorWriteNode, "Foo += bar")
+ end
+
+ def test_ConstantOrWriteNode
+ assert_location(ConstantOrWriteNode, "Foo ||= bar")
+ end
+
+ def test_ConstantReadNode
+ assert_location(ConstantReadNode, "Foo")
+ end
+
+ def test_ConstantTargetNode
+ assert_location(ConstantTargetNode, "Foo, Bar = baz", 0...3) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_ConstantWriteNode
+ assert_location(ConstantWriteNode, "Foo = bar")
+ end
+
+ def test_DefNode
+ assert_location(DefNode, "def foo; bar; end")
+ assert_location(DefNode, "def foo = bar")
+ assert_location(DefNode, "def foo.bar; baz; end")
+ assert_location(DefNode, "def foo.bar = baz")
+ end
+
+ def test_DefinedNode
+ assert_location(DefinedNode, "defined? foo")
+ assert_location(DefinedNode, "defined?(foo)")
+ end
+
+ def test_ElseNode
+ assert_location(ElseNode, "if foo; bar; else; baz; end", 13...27, &:subsequent)
+ assert_location(ElseNode, "foo ? bar : baz", 10...15, &:subsequent)
+ end
+
+ def test_EmbeddedStatementsNode
+ assert_location(EmbeddedStatementsNode, '"foo #{bar} baz"', 5...11) { |node| node.parts[1] }
+ end
+
+ def test_EmbeddedVariableNode
+ assert_location(EmbeddedVariableNode, '"foo #@@bar baz"', 5...11) { |node| node.parts[1] }
+ end
+
+ def test_EnsureNode
+ assert_location(EnsureNode, "begin; foo; ensure; bar; end", 12...28, &:ensure_clause)
+ end
+
+ def test_FalseNode
+ assert_location(FalseNode, "false")
+ end
+
+ def test_FindPatternNode
+ assert_location(FindPatternNode, "case foo; in *, bar, *; end", 13...22) do |node|
+ node.conditions.first.pattern
+ end
+ end
+
+ def test_FlipFlopNode
+ assert_location(FlipFlopNode, "if foo..bar; end", 3..11, &:predicate)
+ end
+
+ def test_FloatNode
+ assert_location(FloatNode, "0.0")
+ assert_location(FloatNode, "1.0")
+ assert_location(FloatNode, "1.0e10")
+ assert_location(FloatNode, "1.0e-10")
+ end
+
+ def test_ForNode
+ assert_location(ForNode, "for foo in bar; end")
+ assert_location(ForNode, "for foo, bar in baz do end")
+ end
+
+ def test_ForwardingArgumentsNode
+ assert_location(ForwardingArgumentsNode, "def foo(...); bar(...); end", 18...21) do |node|
+ node.body.body.first.arguments.arguments.first
+ end
+ end
+
+ def test_ForwardingParameterNode
+ assert_location(ForwardingParameterNode, "def foo(...); end", 8...11) do |node|
+ node.parameters.keyword_rest
+ end
+ end
+
+ def test_ForwardingSuperNode
+ assert_location(ForwardingSuperNode, "super")
+ assert_location(ForwardingSuperNode, "super {}")
+ end
+
+ def test_GlobalVariableAndWriteNode
+ assert_location(GlobalVariableAndWriteNode, "$foo &&= bar")
+ end
+
+ def test_GlobalVariableOperatorWriteNode
+ assert_location(GlobalVariableOperatorWriteNode, "$foo += bar")
+ end
+
+ def test_GlobalVariableOrWriteNode
+ assert_location(GlobalVariableOrWriteNode, "$foo ||= bar")
+ end
+
+ def test_GlobalVariableReadNode
+ assert_location(GlobalVariableReadNode, "$foo")
+ end
+
+ def test_GlobalVariableTargetNode
+ assert_location(GlobalVariableTargetNode, "$foo, $bar = baz", 0...4) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_GlobalVariableWriteNode
+ assert_location(GlobalVariableWriteNode, "$foo = bar")
+ end
+
+ def test_HashNode
+ assert_location(HashNode, "{ foo: 2 }")
+ assert_location(HashNode, "{ \nfoo: 2, \nbar: 3 \n}")
+ end
+
+ def test_HashPatternNode
+ assert_location(HashPatternNode, "case foo; in bar: baz; end", 13...21) do |node|
+ node.conditions.first.pattern
+ end
+ end
+
+ def test_IfNode
+ assert_location(IfNode, "if type in 1;elsif type in B;end")
+ end
+
+ def test_ImaginaryNode
+ assert_location(ImaginaryNode, "1i")
+ assert_location(ImaginaryNode, "1ri")
+ end
+
+ def test_ImplicitNode
+ assert_location(ImplicitNode, "{ foo: }", 2...6) do |node|
+ node.elements.first.value
+ end
+
+ assert_location(ImplicitNode, "{ Foo: }", 2..6) do |node|
+ node.elements.first.value
+ end
+
+ assert_location(ImplicitNode, "foo = 1; { foo: }", 11..15) do |node|
+ node.elements.first.value
+ end
+ end
+
+ def test_ImplicitRestNode
+ assert_location(ImplicitRestNode, "foo, = bar", 3..4, &:rest)
+
+ assert_location(ImplicitRestNode, "for foo, in bar do end", 7..8) do |node|
+ node.index.rest
+ end
+
+ assert_location(ImplicitRestNode, "foo { |bar,| }", 10..11) do |node|
+ node.block.parameters.parameters.rest
+ end
+
+ assert_location(ImplicitRestNode, "foo in [bar,]", 11..12) do |node|
+ node.pattern.rest
+ end
+ end
+
+ def test_InNode
+ assert_location(InNode, "case foo; in bar; end", 10...16) do |node|
+ node.conditions.first
+ end
+ end
+
+ def test_IndexAndWriteNode
+ assert_location(IndexAndWriteNode, "foo[foo] &&= bar")
+ end
+
+ def test_IndexOperatorWriteNode
+ assert_location(IndexOperatorWriteNode, "foo[foo] += bar")
+ end
+
+ def test_IndexOrWriteNode
+ assert_location(IndexOrWriteNode, "foo[foo] ||= bar")
+ end
+
+ def test_IndexTargetNode
+ assert_location(IndexTargetNode, "foo[bar], = qux", 0...8) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_InstanceVariableAndWriteNode
+ assert_location(InstanceVariableAndWriteNode, "@foo &&= bar")
+ end
+
+ def test_InstanceVariableOperatorWriteNode
+ assert_location(InstanceVariableOperatorWriteNode, "@foo += bar")
+ end
+
+ def test_InstanceVariableOrWriteNode
+ assert_location(InstanceVariableOrWriteNode, "@foo ||= bar")
+ end
+
+ def test_InstanceVariableReadNode
+ assert_location(InstanceVariableReadNode, "@foo")
+ end
+
+ def test_InstanceVariableTargetNode
+ assert_location(InstanceVariableTargetNode, "@foo, @bar = baz", 0...4) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_InstanceVariableWriteNode
+ assert_location(InstanceVariableWriteNode, "@foo = bar")
+ end
+
+ def test_IntegerNode
+ assert_location(IntegerNode, "0")
+ assert_location(IntegerNode, "1")
+ assert_location(IntegerNode, "1_000")
+ assert_location(IntegerNode, "0x1")
+ assert_location(IntegerNode, "0x1_000")
+ assert_location(IntegerNode, "0b1")
+ assert_location(IntegerNode, "0b1_000")
+ assert_location(IntegerNode, "0o1")
+ assert_location(IntegerNode, "0o1_000")
+ end
+
+ def test_InterpolatedMatchLastLineNode
+ assert_location(InterpolatedMatchLastLineNode, "if /foo \#{bar}/ then end", 3...15, &:predicate)
+ end
+
+ def test_InterpolatedRegularExpressionNode
+ assert_location(InterpolatedRegularExpressionNode, "/\#{foo}/")
+ assert_location(InterpolatedRegularExpressionNode, "/\#{foo}/io")
+ end
+
+ def test_InterpolatedStringNode
+ assert_location(InterpolatedStringNode, "\"foo \#@bar baz\"")
+ assert_location(InterpolatedStringNode, "<<~A\nhello \#{1} world\nA", 0...4)
+ assert_location(InterpolatedStringNode, '"foo" "bar"')
+ end
+
+ def test_InterpolatedSymbolNode
+ assert_location(InterpolatedSymbolNode, ':"#{foo}bar"')
+ end
+
+ def test_InterpolatedXStringNode
+ assert_location(InterpolatedXStringNode, '`foo #{bar} baz`')
+ end
+
+ def test_ItLocalVariableReadNode
+ assert_location(ItLocalVariableReadNode, "-> { it }", 5...7) do |node|
+ node.body.body.first
+ end
+
+ assert_location(ItLocalVariableReadNode, "foo { it }", 6...8) do |node|
+ node.block.body.body.first
+ end
+
+ assert_location(CallNode, "-> { it }", 5...7, version: "3.3.0") do |node|
+ node.body.body.first
+ end
+
+ assert_location(ItLocalVariableReadNode, "-> { it }", 5...7, version: "3.4.0") do |node|
+ node.body.body.first
+ end
+ end
+
+ def test_ItParametersNode
+ assert_location(ItParametersNode, "-> { it }", &:parameters)
+ end
+
+ def test_KeywordHashNode
+ assert_location(KeywordHashNode, "foo(a, b: 1)", 7...11) { |node| node.arguments.arguments[1] }
+ end
+
+ def test_KeywordRestParameterNode
+ assert_location(KeywordRestParameterNode, "def foo(**); end", 8...10) do |node|
+ node.parameters.keyword_rest
+ end
+
+ assert_location(KeywordRestParameterNode, "def foo(**bar); end", 8...13) do |node|
+ node.parameters.keyword_rest
+ end
+ end
+
+ def test_LambdaNode
+ assert_location(LambdaNode, "-> { foo }")
+ assert_location(LambdaNode, "-> do foo end")
+ end
+
+ def test_LocalVariableAndWriteNode
+ assert_location(LocalVariableAndWriteNode, "foo &&= bar")
+ assert_location(LocalVariableAndWriteNode, "foo = 1; foo &&= bar", 9...20)
+ end
+
+ def test_LocalVariableOperatorWriteNode
+ assert_location(LocalVariableOperatorWriteNode, "foo += bar")
+ assert_location(LocalVariableOperatorWriteNode, "foo = 1; foo += bar", 9...19)
+ end
+
+ def test_LocalVariableOrWriteNode
+ assert_location(LocalVariableOrWriteNode, "foo ||= bar")
+ assert_location(LocalVariableOrWriteNode, "foo = 1; foo ||= bar", 9...20)
+ end
+
+ def test_LocalVariableReadNode
+ assert_location(LocalVariableReadNode, "foo = 1; foo", 9...12)
+ end
+
+ def test_LocalVariableTargetNode
+ assert_location(LocalVariableTargetNode, "foo, bar = baz", 0...3) do |node|
+ node.lefts.first
+ end
+ end
+
+ def test_LocalVariableWriteNode
+ assert_location(LocalVariableWriteNode, "foo = bar")
+ end
+
+ def test_MatchLastLineNode
+ assert_location(MatchLastLineNode, "if /foo/ then end", 3...8, &:predicate)
+ end
+
+ def test_MatchPredicateNode
+ assert_location(MatchPredicateNode, "foo in bar")
+ end
+
+ def test_MatchRequiredNode
+ assert_location(MatchRequiredNode, "foo => bar")
+ end
+
+ def test_MatchWriteNode
+ assert_location(MatchWriteNode, "/(?<foo>)/ =~ foo")
+ end
+
+ def test_ModuleNode
+ assert_location(ModuleNode, "module Foo end")
+ end
+
+ def test_MultiTargetNode
+ assert_location(MultiTargetNode, "for foo, bar in baz do end", 4...12, &:index)
+ assert_location(MultiTargetNode, "foo, (bar, baz) = qux", 5...15) { |node| node.lefts.last }
+ assert_location(MultiTargetNode, "def foo((bar)); end", 8...13) do |node|
+ node.parameters.requireds.first
+ end
+ end
+
+ def test_MultiWriteNode
+ assert_location(MultiWriteNode, "foo, bar = baz")
+ assert_location(MultiWriteNode, "(foo, bar) = baz")
+ assert_location(MultiWriteNode, "((foo, bar)) = baz")
+ end
+
+ def test_NextNode
+ assert_location(NextNode, "tap { next }", 6...10) { |node| node.block.body.body.first }
+ assert_location(NextNode, "tap { next foo }", 6...14) { |node| node.block.body.body.first }
+ assert_location(NextNode, "tap { next foo, bar }", 6...19) { |node| node.block.body.body.first }
+ assert_location(NextNode, "tap { next(foo) }", 6...15) { |node| node.block.body.body.first }
+ end
+
+ def test_NilNode
+ assert_location(NilNode, "nil")
+ end
+
+ def test_NoKeywordsParameterNode
+ assert_location(NoKeywordsParameterNode, "def foo(**nil); end", 8...13) { |node| node.parameters.keyword_rest }
+ end
+
+ def test_NumberedParametersNode
+ assert_location(NumberedParametersNode, "-> { _1 }", &:parameters)
+ assert_location(NumberedParametersNode, "foo { _1 }", 4...10) { |node| node.block.parameters }
+ end
+
+ def test_NumberedReferenceReadNode
+ assert_location(NumberedReferenceReadNode, "$1")
+ end
+
+ def test_OptionalKeywordParameterNode
+ assert_location(OptionalKeywordParameterNode, "def foo(bar: nil); end", 8...16) do |node|
+ node.parameters.keywords.first
+ end
+ end
+
+ def test_OptionalParameterNode
+ assert_location(OptionalParameterNode, "def foo(bar = nil); end", 8...17) do |node|
+ node.parameters.optionals.first
+ end
+ end
+
+ def test_OrNode
+ assert_location(OrNode, "foo || bar")
+ assert_location(OrNode, "foo or bar")
+ end
+
+ def test_ParametersNode
+ assert_location(ParametersNode, "def foo(bar, baz); end", 8...16, &:parameters)
+ end
+
+ def test_ParenthesesNode
+ assert_location(ParenthesesNode, "()")
+ assert_location(ParenthesesNode, "(foo)")
+ assert_location(ParenthesesNode, "foo (bar), baz", 4...9) { |node| node.arguments.arguments.first }
+ assert_location(ParenthesesNode, "def (foo).bar; end", 4...9, &:receiver)
+ end
+
+ def test_PinnedExpressionNode
+ assert_location(PinnedExpressionNode, "foo in ^(bar)", 7...13, &:pattern)
+ end
+
+ def test_PinnedVariableNode
+ assert_location(PinnedVariableNode, "bar = 1; foo in ^bar", 16...20, &:pattern)
+ assert_location(PinnedVariableNode, "proc { 1 in ^it }.call(1)", 12...15) do |node|
+ node.receiver.block.body.body.first.pattern
+ end
+ end
+
+ def test_PostExecutionNode
+ assert_location(PostExecutionNode, "END {}")
+ assert_location(PostExecutionNode, "END { foo }")
+ end
+
+ def test_PreExecutionNode
+ assert_location(PreExecutionNode, "BEGIN {}")
+ assert_location(PreExecutionNode, "BEGIN { foo }")
+ end
+
+ def test_RangeNode
+ assert_location(RangeNode, "1..2")
+ assert_location(RangeNode, "1...2")
+
+ assert_location(RangeNode, "..2")
+ assert_location(RangeNode, "...2")
+
+ assert_location(RangeNode, "1..")
+ assert_location(RangeNode, "1...")
+ end
+
+ def test_RationalNode
+ assert_location(RationalNode, "1r")
+ assert_location(RationalNode, "1.0r")
+ end
+
+ def test_RedoNode
+ assert_location(RedoNode, "tap { redo }", 6...10) { |node| node.block.body.body.first }
+ end
+
+ def test_RegularExpressionNode
+ assert_location(RegularExpressionNode, "/foo/")
+ assert_location(RegularExpressionNode, "/foo/io")
+ end
+
+ def test_RequiredKeywordParameterNode
+ assert_location(RequiredKeywordParameterNode, "def foo(bar:); end", 8...12) do |node|
+ node.parameters.keywords.first
+ end
+ end
+
+ def test_RequiredParameterNode
+ assert_location(RequiredParameterNode, "def foo(bar); end", 8...11) do |node|
+ node.parameters.requireds.first
+ end
+ end
+
+ def test_RescueNode
+ code = <<~RUBY
+ begin
+ body
+ rescue TypeError
+ rescue ArgumentError
+ end
+ RUBY
+ assert_location(RescueNode, code, 13...50) { |node| node.rescue_clause }
+ assert_location(RescueNode, code, 30...50) { |node| node.rescue_clause.subsequent }
+ end
+
+ def test_RescueModifierNode
+ assert_location(RescueModifierNode, "foo rescue bar")
+ end
+
+ def test_RestParameterNode
+ assert_location(RestParameterNode, "def foo(*bar); end", 8...12) do |node|
+ node.parameters.rest
+ end
+ end
+
+ def test_RetryNode
+ assert_location(RetryNode, "begin; rescue; retry; end", 15...20) { |node| node.rescue_clause.statements.body.first }
+ end
+
+ def test_ReturnNode
+ assert_location(ReturnNode, "return")
+ assert_location(ReturnNode, "return foo")
+ assert_location(ReturnNode, "return foo, bar")
+ assert_location(ReturnNode, "return(foo)")
+ end
+
+ def test_SelfNode
+ assert_location(SelfNode, "self")
+ end
+
+ def test_ShareableConstantNode
+ source = <<~RUBY
+ # shareable_constant_value: literal
+ C = { foo: 1 }
+ RUBY
+
+ assert_location(ShareableConstantNode, source, 36...50)
+ end
+
+ def test_SingletonClassNode
+ assert_location(SingletonClassNode, "class << self; end")
+ end
+
+ def test_SourceEncodingNode
+ assert_location(SourceEncodingNode, "__ENCODING__")
+ end
+
+ def test_SourceFileNode
+ assert_location(SourceFileNode, "__FILE__")
+ end
+
+ def test_SourceLineNode
+ assert_location(SourceLineNode, "__LINE__")
+ end
+
+ def test_SplatNode
+ assert_location(SplatNode, "*foo = bar", 0...4, &:rest)
+ end
+
+ def test_StatementsNode
+ assert_location(StatementsNode, "foo { 1 }", 6...7) { |node| node.block.body }
+
+ assert_location(StatementsNode, "(1)", 1...2, &:body)
+
+ assert_location(StatementsNode, "def foo; 1; end", 9...10, &:body)
+ assert_location(StatementsNode, "def foo = 1", 10...11, &:body)
+ assert_location(StatementsNode, "def foo; 1\n2; end", 9...12, &:body)
+
+ assert_location(StatementsNode, "if foo; bar; end", 8...11, &:statements)
+ assert_location(StatementsNode, "foo if bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "if foo; foo; elsif bar; bar; end", 24...27) { |node| node.subsequent.statements }
+ assert_location(StatementsNode, "if foo; foo; else; bar; end", 19...22) { |node| node.subsequent.statements }
+
+ assert_location(StatementsNode, "unless foo; bar; end", 12...15, &:statements)
+ assert_location(StatementsNode, "foo unless bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "case; when foo; bar; end", 16...19) { |node| node.conditions.first.statements }
+
+ assert_location(StatementsNode, "while foo; bar; end", 11...14, &:statements)
+ assert_location(StatementsNode, "foo while bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "until foo; bar; end", 11...14, &:statements)
+ assert_location(StatementsNode, "foo until bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "for foo in bar; baz; end", 16...19, &:statements)
+
+ assert_location(StatementsNode, "begin; foo; end", 7...10, &:statements)
+ assert_location(StatementsNode, "begin; rescue; foo; end", 15...18) { |node| node.rescue_clause.statements }
+ assert_location(StatementsNode, "begin; ensure; foo; end", 15...18) { |node| node.ensure_clause.statements }
+ assert_location(StatementsNode, "begin; rescue; else; foo; end", 21...24) { |node| node.else_clause.statements }
+
+ assert_location(StatementsNode, "class Foo; foo; end", 11...14, &:body)
+ assert_location(StatementsNode, "module Foo; foo; end", 12...15, &:body)
+ assert_location(StatementsNode, "class << self; foo; end", 15...18, &:body)
+
+ assert_location(StatementsNode, "-> { foo }", 5...8, &:body)
+ assert_location(StatementsNode, "BEGIN { foo }", 8...11, &:statements)
+ assert_location(StatementsNode, "END { foo }", 6...9, &:statements)
+
+ assert_location(StatementsNode, "\"\#{foo}\"", 3...6) { |node| node.parts.first.statements }
+ end
+
+ def test_StringNode
+ assert_location(StringNode, '"foo"')
+ assert_location(StringNode, '%q[foo]')
+ end
+
+ def test_SuperNode
+ assert_location(SuperNode, "super foo")
+ assert_location(SuperNode, "super foo, bar")
+
+ assert_location(SuperNode, "super()")
+ assert_location(SuperNode, "super(foo)")
+ assert_location(SuperNode, "super(foo, bar)")
+
+ assert_location(SuperNode, "super() {}")
+ end
+
+ def test_SymbolNode
+ assert_location(SymbolNode, ":foo")
+ end
+
+ def test_TrueNode
+ assert_location(TrueNode, "true")
+ end
+
+ def test_UndefNode
+ assert_location(UndefNode, "undef foo")
+ assert_location(UndefNode, "undef foo, bar")
+ end
+
+ def test_UnlessNode
+ assert_location(UnlessNode, "foo unless bar")
+ assert_location(UnlessNode, "unless bar; foo; end")
+ end
+
+ def test_UntilNode
+ assert_location(UntilNode, "foo = bar until baz")
+ assert_location(UntilNode, "until bar;baz;end")
+ end
+
+ def test_WhenNode
+ assert_location(WhenNode, "case foo; when bar; end", 10...18) { |node| node.conditions.first }
+ end
+
+ def test_WhileNode
+ assert_location(WhileNode, "foo = bar while foo != baz")
+ assert_location(WhileNode, "while a;bar;baz;end")
+ end
+
+ def test_XStringNode
+ assert_location(XStringNode, "`foo`")
+ assert_location(XStringNode, "%x[foo]")
+ end
+
+ def test_YieldNode
+ assert_location(YieldNode, "def test; yield; end", 10...15) { |node| node.body.body.first }
+ assert_location(YieldNode, "def test; yield foo; end", 10...19) { |node| node.body.body.first }
+ assert_location(YieldNode, "def test; yield foo, bar; end", 10...24) { |node| node.body.body.first }
+ assert_location(YieldNode, "def test; yield(foo); end", 10...20) { |node| node.body.body.first }
+ end
+
+ def test_all_tested
+ expected = Prism.constants.grep(/.Node$/).sort - %i[MissingNode ProgramNode]
+ actual = SourceLocationTest.instance_methods(false).grep(/.Node$/).map { |name| name[5..].to_sym }.sort
+ assert_equal expected, actual
+ end
+
+ private
+
+ def assert_location(kind, source, expected = 0...source.length, **options)
+ result = Prism.parse(source, **options)
+ assert result.success?
+
+ node = result.value.statements.body.last
+ node = yield node if block_given?
+
+ if expected.begin == 0
+ assert_equal 0, node.location.start_column
+ end
+
+ if expected.end == source.length
+ assert_equal source.split("\n").last.length, node.location.end_column
+ end
+
+ assert_kind_of kind, node
+ assert_equal expected.begin, node.location.start_offset
+ assert_equal expected.end, node.location.end_offset
+ end
+ end
+end
diff --git a/test/prism/result/static_inspect_test.rb b/test/prism/result/static_inspect_test.rb
new file mode 100644
index 0000000000..cf8cef3298
--- /dev/null
+++ b/test/prism/result/static_inspect_test.rb
@@ -0,0 +1,89 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class StaticInspectTest < TestCase
+ def test_false
+ assert_equal "false", static_inspect("false")
+ end
+
+ def test_float
+ assert_equal "0.25", static_inspect("0.25")
+ assert_equal "5.125", static_inspect("5.125")
+
+ assert_equal "0.0", static_inspect("0.0")
+ assert_equal "-0.0", static_inspect("-0.0")
+
+ assert_equal "1.0e+100", static_inspect("1e100")
+ assert_equal "-1.0e+100", static_inspect("-1e100")
+
+ assert_equal "Infinity", static_inspect("1e1000")
+ assert_equal "-Infinity", static_inspect("-1e1000")
+ end
+
+ def test_imaginary
+ assert_equal "(0+1i)", static_inspect("1i")
+ assert_equal "(0-1i)", static_inspect("-1i")
+ end
+
+ def test_integer
+ assert_equal "1000", static_inspect("1_0_0_0")
+ assert_equal "10000000000000000000000000000", static_inspect("1_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0")
+ end
+
+ def test_nil
+ assert_equal "nil", static_inspect("nil")
+ end
+
+ def test_rational
+ assert_equal "(0/1)", static_inspect("0r")
+ assert_equal "(1/1)", static_inspect("1r")
+ assert_equal "(1/1)", static_inspect("1.0r")
+ assert_equal "(77777/1000)", static_inspect("77.777r")
+ end
+
+ def test_regular_expression
+ assert_equal "/.*/", static_inspect("/.*/")
+ assert_equal "/.*/i", static_inspect("/.*/i")
+ assert_equal "/.*/", static_inspect("/.*/u")
+ assert_equal "/.*/n", static_inspect("/.*/un")
+ end
+
+ def test_source_encoding
+ assert_equal "#<Encoding:UTF-8>", static_inspect("__ENCODING__")
+ assert_equal "#<Encoding:Windows-31J>", static_inspect("__ENCODING__", encoding: "Windows-31J")
+ end
+
+ def test_source_file
+ assert_equal __FILE__.inspect, static_inspect("__FILE__", filepath: __FILE__, frozen_string_literal: true)
+ end
+
+ def test_source_line
+ assert_equal "1", static_inspect("__LINE__")
+ assert_equal "5", static_inspect("__LINE__", line: 5)
+ end
+
+ def test_string
+ assert_equal "\"\"", static_inspect('""', frozen_string_literal: true)
+ assert_equal "\"Hello, World!\"", static_inspect('"Hello, World!"', frozen_string_literal: true)
+ assert_equal "\"\\a\"", static_inspect("\"\\a\"", frozen_string_literal: true)
+ end
+
+ def test_symbol
+ assert_equal ":foo", static_inspect(":foo")
+ assert_equal ":foo", static_inspect("%s[foo]")
+ end
+
+ def test_true
+ assert_equal "true", static_inspect("true")
+ end
+
+ private
+
+ def static_inspect(source, **options)
+ warnings = Prism.parse("{ #{source} => 1, #{source} => 1 }", **options).warnings
+ warnings.last.message[/^key (.+) is duplicated and overwritten on line \d/, 1]
+ end
+ end
+end
diff --git a/test/prism/result/static_literals_test.rb b/test/prism/result/static_literals_test.rb
new file mode 100644
index 0000000000..dcfc692897
--- /dev/null
+++ b/test/prism/result/static_literals_test.rb
@@ -0,0 +1,92 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class StaticLiteralsTest < TestCase
+ def test_static_literals
+ assert_warning("1")
+ assert_warning("0xA", "10", "10")
+ assert_warning("0o10", "8", "8")
+ assert_warning("0b10", "2", "2")
+ assert_warning("1_000", "1000", "1000")
+ assert_warning((2**32).to_s(10), "0x#{(2**32).to_s(16)}", (2**32).to_s(10))
+ assert_warning((2**64).to_s(10), "0x#{(2**64).to_s(16)}", (2**64).to_s(10))
+
+ refute_warning("1", "-1")
+ refute_warning((2**32).to_s(10), "-0x#{(2**32).to_s(16)}")
+ refute_warning((2**64).to_s(10), "-0x#{(2**64).to_s(16)}")
+
+ assert_warning("__LINE__", "2", "2")
+ assert_warning("3", "__LINE__", "3")
+
+ assert_warning("1.0")
+ assert_warning("1e2", "100.0", "100.0")
+
+ assert_warning("1r", "1r", "(1/1)")
+ assert_warning("1.0r", "1.0r", "(1/1)")
+
+ assert_warning("1i", "1i", "(0+1i)")
+ assert_warning("1.0i", "1.0i", "(0+1.0i)")
+
+ assert_warning("1ri", "1ri", "(0+(1/1)*i)")
+ assert_warning("1.0ri", "1.0ri", "(0+(1/1)*i)")
+
+ assert_warning("__FILE__", "\"#{__FILE__}\"", __FILE__)
+ assert_warning("\"#{__FILE__}\"")
+ assert_warning("\"foo\"")
+
+ assert_warning("/foo/")
+
+ refute_warning("/foo/", "/foo/i")
+
+ assert_warning(":foo")
+ assert_warning("%s[foo]", ":foo", ":foo")
+
+ assert_warning("true")
+ assert_warning("false")
+ assert_warning("nil")
+ assert_warning("__ENCODING__", "__ENCODING__", "#<Encoding:UTF-8>")
+ end
+
+ private
+
+ class NullWarning
+ def message
+ ""
+ end
+ end
+
+ def parse_warnings(left, right)
+ warnings = []
+
+ warnings << (Prism.parse(<<~RUBY, filepath: __FILE__).warnings.first || NullWarning.new)
+ {
+ #{left} => 1,
+ #{right} => 2
+ }
+ RUBY
+
+ warnings << (Prism.parse(<<~RUBY, filepath: __FILE__).warnings.first || NullWarning.new)
+ case foo
+ when #{left}
+ when #{right}
+ end
+ RUBY
+
+ warnings
+ end
+
+ def assert_warning(left, right = left, message = left)
+ hash_keys, when_clauses = parse_warnings(left, right)
+
+ assert_include hash_keys.message, message
+ assert_include hash_keys.message, "line 3"
+ assert_include when_clauses.message, "line 3"
+ end
+
+ def refute_warning(left, right)
+ assert_empty parse_warnings(left, right).grep_v(NullWarning)
+ end
+ end
+end
diff --git a/test/prism/result/warnings_test.rb b/test/prism/result/warnings_test.rb
new file mode 100644
index 0000000000..5cff2d2d2b
--- /dev/null
+++ b/test/prism/result/warnings_test.rb
@@ -0,0 +1,430 @@
+# frozen_string_literal: true
+
+return if RUBY_VERSION < "3.1"
+
+require_relative "../test_helper"
+
+module Prism
+ class WarningsTest < TestCase
+ def test_ambiguous_uminus
+ assert_warning("a -b", "ambiguous first argument")
+ end
+
+ def test_ambiguous_uplus
+ assert_warning("a +b", "ambiguous first argument")
+ end
+
+ def test_ambiguous_ustar
+ assert_warning("a *b", "argument prefix")
+ end
+
+ def test_ambiguous_regexp
+ assert_warning("a /b/", "wrap regexp in parentheses")
+ end
+
+ def test_ambiguous_ampersand
+ assert_warning("a &b", "argument prefix")
+ assert_warning("a &:+", "argument prefix")
+
+ refute_warning("a &:b")
+ refute_warning("a &:'b'")
+ refute_warning("a &:\"b\"")
+ end
+
+ def test_binary_operator
+ [
+ [:**, "argument prefix"],
+ [:*, "argument prefix"],
+ [:<<, "here document"],
+ [:&, "argument prefix"],
+ [:+, "unary operator"],
+ [:-, "unary operator"],
+ [:/, "regexp literal"],
+ [:%, "string literal"]
+ ].each do |(operator, warning)|
+ assert_warning("puts 1 #{operator}0", warning)
+ assert_warning("puts :a #{operator}0", warning)
+ assert_warning("m = 1; puts m #{operator}0", warning)
+ end
+ end
+
+ def test_equal_in_conditional
+ assert_warning("if a = 1; end; a = a", "should be ==")
+ end
+
+ def test_dot_dot_dot_eol
+ assert_warning("_ = foo...", "... at EOL")
+ assert_warning("def foo(...) = bar ...", "... at EOL")
+
+ assert_warning("_ = foo... #", "... at EOL")
+ assert_warning("_ = foo... \t\v\f\n", "... at EOL")
+
+ refute_warning("p foo...bar")
+ refute_warning("p foo... bar")
+ end
+
+ def test_END_in_method
+ assert_warning("def foo; END {}; end", "END in method")
+ end
+
+ def test_duplicated_hash_key
+ assert_warning("{ a: 1, a: 2 }", "duplicated and overwritten")
+ assert_warning("{ a: 1, **{ a: 2 } }", "duplicated and overwritten")
+ end
+
+ def test_duplicated_when_clause
+ assert_warning("case 1; when 1, 1; end", "when' clause")
+ end
+
+ def test_float_out_of_range
+ assert_warning("_ = 1.0e100000", "out of range")
+ end
+
+ def test_indentation_mismatch
+ assert_warning("if true\n end", "mismatched indentations at 'end' with 'if'")
+ assert_warning("if true\n elsif true\nend", "mismatched indentations at 'elsif' with 'if'")
+ assert_warning("if true\n else\nend", "mismatched indentations at 'else' with 'if'", "mismatched indentations at 'end' with 'else'")
+
+ assert_warning("unless true\n end", "mismatched indentations at 'end' with 'unless'")
+ assert_warning("unless true\n else\nend", "mismatched indentations at 'else' with 'unless'", "mismatched indentations at 'end' with 'else'")
+
+ assert_warning("while true\n end", "mismatched indentations at 'end' with 'while'")
+ assert_warning("until true\n end", "mismatched indentations at 'end' with 'until'")
+
+ assert_warning("begin\n end", "mismatched indentations at 'end' with 'begin'")
+ assert_warning("begin\n rescue\nend", "mismatched indentations at 'rescue' with 'begin'")
+ assert_warning("begin\n ensure\nend", "mismatched indentations at 'ensure' with 'begin'")
+ assert_warning("begin\nrescue\n else\nend", "mismatched indentations at 'else' with 'begin'", "mismatched indentations at 'end' with 'else'")
+ assert_warning("begin\n rescue\n ensure\n end", "mismatched indentations at 'rescue' with 'begin'", "mismatched indentations at 'ensure' with 'begin'", "mismatched indentations at 'end' with 'begin'");
+
+ assert_warning("def foo\n end", "mismatched indentations at 'end' with 'def'")
+ assert_warning("def foo\n rescue\nend", "mismatched indentations at 'rescue' with 'def'")
+ assert_warning("def foo\n ensure\nend", "mismatched indentations at 'ensure' with 'def'")
+ assert_warning("def foo\nrescue\n else\nend", "mismatched indentations at 'else' with 'def'", "mismatched indentations at 'end' with 'else'")
+ assert_warning("def foo\n rescue\n ensure\n end", "mismatched indentations at 'rescue' with 'def'", "mismatched indentations at 'ensure' with 'def'", "mismatched indentations at 'end' with 'def'");
+
+ assert_warning("class Foo\n end", "mismatched indentations at 'end' with 'class'")
+ assert_warning("class Foo\n rescue\nend", "mismatched indentations at 'rescue' with 'class'")
+ assert_warning("class Foo\n ensure\nend", "mismatched indentations at 'ensure' with 'class'")
+ assert_warning("class Foo\nrescue\n else\nend", "mismatched indentations at 'else' with 'class'", "mismatched indentations at 'end' with 'else'")
+ assert_warning("class Foo\n rescue\n ensure\n end", "mismatched indentations at 'rescue' with 'class'", "mismatched indentations at 'ensure' with 'class'", "mismatched indentations at 'end' with 'class'");
+
+ assert_warning("module Foo\n end", "mismatched indentations at 'end' with 'module'")
+ assert_warning("module Foo\n rescue\nend", "mismatched indentations at 'rescue' with 'module'")
+ assert_warning("module Foo\n ensure\nend", "mismatched indentations at 'ensure' with 'module'")
+ assert_warning("module Foo\nrescue\n else\nend", "mismatched indentations at 'else' with 'module'", "mismatched indentations at 'end' with 'else'")
+ assert_warning("module Foo\n rescue\n ensure\n end", "mismatched indentations at 'rescue' with 'module'", "mismatched indentations at 'ensure' with 'module'", "mismatched indentations at 'end' with 'module'");
+
+ assert_warning("class << foo\n end", "mismatched indentations at 'end' with 'class'")
+ assert_warning("class << foo\n rescue\nend", "mismatched indentations at 'rescue' with 'class'")
+ assert_warning("class << foo\n ensure\nend", "mismatched indentations at 'ensure' with 'class'")
+ assert_warning("class << foo\nrescue\n else\nend", "mismatched indentations at 'else' with 'class'", "mismatched indentations at 'end' with 'else'")
+ assert_warning("class << foo\n rescue\n ensure\n end", "mismatched indentations at 'rescue' with 'class'", "mismatched indentations at 'ensure' with 'class'", "mismatched indentations at 'end' with 'class'");
+
+ assert_warning("case 1; when 2\n end", "mismatched indentations at 'end' with 'case'")
+ assert_warning("case 1; in 2\n end", "mismatched indentations at 'end' with 'case'")
+
+ assert_warning(" case 1\nwhen 2\n end", "mismatched indentations at 'when' with 'case'")
+ refute_warning("case 1\n when 2\n when 3\nend") # case/when allows more indentation
+
+ assert_warning("-> {\n }", "mismatched indentations at '}' with '->'")
+ assert_warning("-> do\n end", "mismatched indentations at 'end' with '->'")
+ assert_warning("-> do\n rescue\nend", "mismatched indentations at 'rescue' with '->'")
+ assert_warning("-> do\n ensure\nend", "mismatched indentations at 'ensure' with '->'")
+ assert_warning("-> do\nrescue\n else\nend", "mismatched indentations at 'else' with '->'", "mismatched indentations at 'end' with 'else'")
+ assert_warning("-> do\n rescue\n ensure\n end", "mismatched indentations at 'rescue' with '->'", "mismatched indentations at 'ensure' with '->'", "mismatched indentations at 'end' with '->'");
+ assert_warning("foo do\nrescue\n else\nend", "mismatched indentations at 'end' with 'else'")
+
+ refute_warning("class Foo; end") # same line
+ refute_warning("; class Foo\nend") # non whitespace on opening line
+ refute_warning("\tclass Foo\n end") # tab stop matches space
+ refute_warning(" \tclass Foo\n end") # tab stop matches space
+ end
+
+ def test_integer_in_flip_flop
+ assert_warning("1 if 2..foo", "integer")
+ end
+
+ def test_literal_in_conditionals
+ sources = [
+ "if (a = 2); a; end",
+ "if ($a = 2); end",
+ "if (@a = 2); end",
+ "if a; elsif b = 2; b end",
+ "unless (a = 2); a; end",
+ "unless ($a = 2); end",
+ "unless (@a = 2); end",
+ "while (a = 2); a; end",
+ "while ($a = 2); end",
+ "while (@a = 2); end",
+ "until (a = 2); a; end",
+ "until ($a = 2); end",
+ "until (@a = 2); end",
+ "foo if (a, b = 2); [a, b]",
+ "foo if a = 2 and a",
+ "(@foo = 1) ? a : b",
+ "!(a = 2) and a",
+ "not a = 2 and a"
+ ]
+
+ if RUBY_VERSION >= "3.3"
+ sources.push(
+ "if (@@a = 2); end",
+ "unless (@@a = 2); end",
+ "while (@@a = 2); end",
+ "until (@@a = 2); end"
+ )
+ end
+
+ sources.each do |source|
+ assert_warning(source, "= literal' in conditional, should be ==")
+ end
+ end
+
+ def test_keyword_eol
+ assert_warning("if\ntrue; end", "end of line")
+ assert_warning("if true\nelsif\nfalse; end", "end of line")
+ end
+
+ def test_numbered_reference
+ assert_warning("_ = _ = $999999999999999999999", "too big for a number variable, always nil")
+ end
+
+ def test_shareable_constant_value
+ assert_warning("foo # shareable_constant_value: none", "ignored")
+ assert_warning("\v # shareable_constant_value: none", "ignored")
+
+ refute_warning("# shareable_constant_value: none")
+ refute_warning(" # shareable_constant_value: none")
+ refute_warning("\t\t# shareable_constant_value: none")
+ end
+
+ def test_string_in_predicate
+ assert_warning("if 'foo'; end", "string")
+ assert_warning("if \"\#{foo}\"; end", "string")
+ assert_warning("if __FILE__; end", "string")
+ end
+
+ def test_symbol_in_predicate
+ assert_warning("if :foo; end", "symbol")
+ assert_warning("if :\"\#{foo}\"; end", "symbol")
+ end
+
+ def test_literal_in_predicate
+ assert_warning("if __LINE__; end", "literal")
+ assert_warning("if __ENCODING__; end", "literal")
+ assert_warning("if 1; end", "literal")
+ assert_warning("if 1.0; end", "literal")
+ assert_warning("if 1r; end", "literal")
+ assert_warning("if 1i; end", "literal")
+ end
+
+ def test_regexp_in_predicate
+ assert_warning("if /foo/; end", "regex")
+ assert_warning("if /foo\#{bar}/; end", "regex")
+ end
+
+ def test_unused_local_variables
+ assert_warning("foo = 1", "unused")
+
+ refute_warning("foo = 1", compare: false, command_line: "e")
+ refute_warning("foo = 1", compare: false, scopes: [[]])
+
+ assert_warning("def foo; bar = 1; end", "unused")
+ assert_warning("def foo; bar, = 1; end", "unused")
+
+ refute_warning("def foo; bar &&= 1; end")
+ refute_warning("def foo; bar ||= 1; end")
+ refute_warning("def foo; bar += 1; end")
+
+ refute_warning("def foo; bar = bar; end")
+ refute_warning("def foo; bar = bar = 1; end")
+ refute_warning("def foo; bar = (bar = 1); end")
+ refute_warning("def foo; bar = begin; bar = 1; end; end")
+ refute_warning("def foo; bar = (qux; bar = 1); end")
+ refute_warning("def foo; bar, = bar = 1; end")
+ refute_warning("def foo; bar, = 1, bar = 1; end")
+
+ refute_warning("def foo(bar); end")
+ refute_warning("def foo(bar = 1); end")
+ refute_warning("def foo((bar)); end")
+ refute_warning("def foo(*bar); end")
+ refute_warning("def foo(*, bar); end")
+ refute_warning("def foo(*, (bar)); end")
+ refute_warning("def foo(bar:); end")
+ refute_warning("def foo(**bar); end")
+ refute_warning("def foo(&bar); end")
+ refute_warning("->(bar) {}")
+ refute_warning("->(; bar) {}", compare: false)
+
+ refute_warning("def foo; bar = 1; tap { bar }; end")
+ refute_warning("def foo; bar = 1; tap { baz = bar; baz }; end")
+ end
+
+ def test_void_statements
+ assert_warning("foo = 1; foo", "a variable in void")
+ assert_warning("@foo", "a variable in void")
+ assert_warning("@@foo", "a variable in void")
+ assert_warning("$foo", "a variable in void")
+ assert_warning("$+", "a variable in void")
+ assert_warning("$1", "a variable in void")
+
+ assert_warning("self", "self in void")
+ assert_warning("nil", "nil in void")
+ assert_warning("true", "true in void")
+ assert_warning("false", "false in void")
+
+ assert_warning("1", "literal in void")
+ assert_warning("1.0", "literal in void")
+ assert_warning("1r", "literal in void")
+ assert_warning("1i", "literal in void")
+ assert_warning(":foo", "literal in void")
+ assert_warning("\"foo\"", "literal in void")
+ assert_warning("\"foo\#{1}\"", "literal in void")
+ assert_warning("/foo/", "literal in void")
+ assert_warning("/foo\#{1}/", "literal in void")
+
+ assert_warning("Foo", "constant in void")
+ assert_warning("::Foo", ":: in void")
+ assert_warning("Foo::Bar", ":: in void")
+
+ assert_warning("1..2", ".. in void")
+ assert_warning("1..", ".. in void")
+ assert_warning("..2", ".. in void")
+ assert_warning("1...2", "... in void")
+ assert_warning("1...;", "... in void")
+ assert_warning("...2", "... in void")
+
+ assert_warning("defined?(foo)", "defined? in void")
+
+ assert_warning("1 + 1", "+ in void")
+ assert_warning("1 - 1", "- in void")
+ assert_warning("1 * 1", "* in void")
+ assert_warning("1 / 1", "/ in void")
+ assert_warning("1 % 1", "% in void")
+ assert_warning("1 | 1", "| in void")
+ assert_warning("1 ^ 1", "^ in void")
+ assert_warning("1 & 1", "& in void")
+ assert_warning("1 > 1", "> in void")
+ assert_warning("1 < 1", "< in void")
+
+ assert_warning("1 ** 1", "** in void")
+ assert_warning("1 <= 1", "<= in void")
+ assert_warning("1 >= 1", ">= in void")
+ assert_warning("1 != 1", "!= in void")
+ assert_warning("1 == 1", "== in void")
+ assert_warning("1 <=> 1", "<=> in void")
+
+ assert_warning("+foo", "+@ in void")
+ assert_warning("-foo", "-@ in void")
+
+ assert_warning("def foo; @bar; @baz; end", "variable in void")
+ refute_warning("def foo; @bar; end")
+ refute_warning("@foo", compare: false, scopes: [[]])
+ end
+
+ def test_unreachable_statement
+ assert_warning("begin; rescue; retry; foo; end", "statement not reached")
+
+ assert_warning("return; foo", "statement not reached")
+
+ assert_warning("tap { break; foo }", "statement not reached")
+ assert_warning("tap { break 1; foo }", "statement not reached")
+
+ assert_warning("tap { next; foo }", "statement not reached")
+ assert_warning("tap { next 1; foo }", "statement not reached")
+
+ assert_warning("tap { redo; foo }", "statement not reached")
+ end
+
+ if RbConfig::CONFIG["host_os"].match?(/bccwin|cygwin|djgpp|mingw|mswin|wince/i)
+ def test_shebang_ending_with_carriage_return
+ refute_warning("#!ruby\r\np(123)\n", compare: false)
+ end
+ else
+ def test_shebang_ending_with_carriage_return
+ msg = "shebang line ending with \\r may cause problems"
+
+ assert_warning(<<~RUBY, msg, compare: false, main_script: true)
+ #!ruby\r
+ p(123)
+ RUBY
+
+ assert_warning(<<~RUBY, msg, compare: false, main_script: true)
+ #!ruby \r
+ p(123)
+ RUBY
+
+ assert_warning(<<~RUBY, msg, compare: false, main_script: true)
+ #!ruby -Eutf-8\r
+ p(123)
+ RUBY
+
+ # Used with the `-x` object, to ignore the script up until the first
+ # shebang that mentioned "ruby".
+ assert_warning(<<~SCRIPT, msg, compare: false, main_script: true)
+ #!/usr/bin/env bash
+ # Some initial shell script or other content
+ # that Ruby should ignore
+ echo "This is shell script part"
+ exit 0
+
+ #! /usr/bin/env ruby -Eutf-8\r
+ # Ruby script starts here
+ puts "Hello from Ruby!"
+ SCRIPT
+
+ refute_warning("#ruby not_a_shebang\r\n", compare: false, main_script: true)
+
+ # CRuby doesn't emit the warning if a malformed file only has `\r` and
+ # not `\n`. https://bugs.ruby-lang.org/issues/20700.
+ refute_warning("#!ruby\r", compare: false, main_script: true)
+ end
+ end
+
+ def test_warnings_verbosity
+ warning = Prism.parse("def foo; END { }; end").warnings.first
+ assert_equal "END in method; use at_exit", warning.message
+ assert_equal :default, warning.level
+
+ warning = Prism.parse("foo /regexp/").warnings.first
+ assert_equal "ambiguous `/`; wrap regexp in parentheses or add a space after `/` operator", warning.message
+ assert_equal :verbose, warning.level
+ end
+
+ private
+
+ def assert_warning(source, *messages, compare: true, **options)
+ warnings = Prism.parse(source, **options).warnings
+ assert_equal messages.length, warnings.length, "Expected #{messages.length} warning(s) in #{source.inspect}, got #{warnings.map(&:message).inspect}"
+
+ warnings.zip(messages).each do |warning, message|
+ assert_include warning.message, message
+ end
+
+ if compare && defined?(RubyVM::AbstractSyntaxTree)
+ stderr = capture_stderr { RubyVM::AbstractSyntaxTree.parse(source) }
+ messages.each { |message| assert_include stderr, message }
+ end
+ end
+
+ def refute_warning(source, compare: true, **options)
+ assert_empty Prism.parse(source, **options).warnings
+
+ if compare && defined?(RubyVM::AbstractSyntaxTree)
+ assert_empty capture_stderr { RubyVM::AbstractSyntaxTree.parse(source) }
+ end
+ end
+
+ def capture_stderr
+ stderr, $stderr, verbose, $VERBOSE = $stderr, StringIO.new, $VERBOSE, true
+
+ begin
+ yield
+ $stderr.string
+ ensure
+ $stderr, $VERBOSE = stderr, verbose
+ end
+ end
+ end
+end
diff --git a/test/prism/ripper_test.rb b/test/prism/ripper_test.rb
deleted file mode 100644
index 07238fc3d5..0000000000
--- a/test/prism/ripper_test.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# frozen_string_literal: true
-
-return if RUBY_VERSION < "3.3"
-
-require_relative "test_helper"
-
-module Prism
- class RipperTest < TestCase
- base = File.join(__dir__, "fixtures")
- relatives = ENV["FOCUS"] ? [ENV["FOCUS"]] : Dir["**/*.txt", base: base]
-
- incorrect = [
- # Ripper incorrectly attributes the block to the keyword.
- "seattlerb/block_break.txt",
- "seattlerb/block_next.txt",
- "seattlerb/block_return.txt",
- "whitequark/break_block.txt",
- "whitequark/next_block.txt",
- "whitequark/return_block.txt",
-
- # Ripper is not accounting for locals created by patterns using the **
- # operator within an `in` clause.
- "seattlerb/parse_pattern_058.txt",
-
- # Ripper cannot handle named capture groups in regular expressions.
- "regex.txt",
- "regex_char_width.txt",
- "whitequark/lvar_injecting_match.txt",
-
- # Ripper fails to understand some structures that span across heredocs.
- "spanning_heredoc.txt"
- ]
-
- omitted = [
- "dos_endings.txt",
- "heredocs_with_ignored_newlines.txt",
- "seattlerb/block_call_dot_op2_brace_block.txt",
- "seattlerb/block_command_operation_colon.txt",
- "seattlerb/block_command_operation_dot.txt",
- "seattlerb/heredoc__backslash_dos_format.txt",
- "seattlerb/heredoc_backslash_nl.txt",
- "seattlerb/heredoc_nested.txt",
- "seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt",
- "tilde_heredocs.txt",
- "unparser/corpus/semantic/dstr.txt",
- "whitequark/dedenting_heredoc.txt",
- "whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt",
- "whitequark/parser_slash_slash_n_escaping_in_literals.txt",
- "whitequark/send_block_chain_cmd.txt",
- "whitequark/slash_newline_in_heredocs.txt"
- ]
-
- relatives.each do |relative|
- # Skip the tests that Ripper is reporting the wrong results for.
- next if incorrect.include?(relative)
-
- # Skip the tests we haven't implemented yet.
- next if omitted.include?(relative)
-
- filepath = File.join(__dir__, "fixtures", relative)
-
- define_method "test_ripper_#{relative}" do
- source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
-
- case relative
- when /break|next|redo|if|unless|rescue|control|keywords|retry/
- source = "-> do\nrescue\n#{source}\nend"
- end
-
- case source
- when /^ *yield/
- source = "def __invalid_yield__\n#{source}\nend"
- end
-
- assert_ripper(source)
- end
- end
-
- private
-
- def assert_ripper(source)
- assert_equal Ripper.sexp_raw(source), Prism::Translation::Ripper.sexp_raw(source)
- end
- end
-end
diff --git a/test/prism/ruby/compiler_test.rb b/test/prism/ruby/compiler_test.rb
new file mode 100644
index 0000000000..35ccfd5950
--- /dev/null
+++ b/test/prism/ruby/compiler_test.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+# typed: ignore
+
+require_relative "../test_helper"
+
+module Prism
+ class CompilerTest < TestCase
+ class SExpressions < Prism::Compiler
+ def visit_arguments_node(node)
+ [:arguments, super]
+ end
+
+ def visit_call_node(node)
+ [:call, super]
+ end
+
+ def visit_integer_node(node)
+ [:integer]
+ end
+
+ def visit_program_node(node)
+ [:program, super]
+ end
+ end
+
+ def test_compiler
+ expected = [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]]
+ assert_equal expected, Prism.parse("1 + 2").value.accept(SExpressions.new)
+ end
+ end
+end
diff --git a/test/prism/ruby/desugar_compiler_test.rb b/test/prism/ruby/desugar_compiler_test.rb
new file mode 100644
index 0000000000..fe9a25e030
--- /dev/null
+++ b/test/prism/ruby/desugar_compiler_test.rb
@@ -0,0 +1,80 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class DesugarCompilerTest < TestCase
+ def test_and_write
+ assert_desugars("(AndNode (ClassVariableReadNode) (ClassVariableWriteNode (CallNode)))", "@@foo &&= bar")
+ assert_not_desugared("Foo::Bar &&= baz", "Desugaring would execute Foo twice or need temporary variables")
+ assert_desugars("(AndNode (ConstantReadNode) (ConstantWriteNode (CallNode)))", "Foo &&= bar")
+ assert_desugars("(AndNode (GlobalVariableReadNode) (GlobalVariableWriteNode (CallNode)))", "$foo &&= bar")
+ assert_desugars("(AndNode (InstanceVariableReadNode) (InstanceVariableWriteNode (CallNode)))", "@foo &&= bar")
+ assert_desugars("(AndNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo &&= bar")
+ assert_desugars("(AndNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo = 1; foo &&= bar")
+ end
+
+ def test_or_write
+ assert_desugars("(IfNode (DefinedNode (ClassVariableReadNode)) (StatementsNode (ClassVariableReadNode)) (ElseNode (StatementsNode (ClassVariableWriteNode (CallNode)))))", "@@foo ||= bar")
+ assert_not_desugared("Foo::Bar ||= baz", "Desugaring would execute Foo twice or need temporary variables")
+ assert_desugars("(IfNode (DefinedNode (ConstantReadNode)) (StatementsNode (ConstantReadNode)) (ElseNode (StatementsNode (ConstantWriteNode (CallNode)))))", "Foo ||= bar")
+ assert_desugars("(IfNode (DefinedNode (GlobalVariableReadNode)) (StatementsNode (GlobalVariableReadNode)) (ElseNode (StatementsNode (GlobalVariableWriteNode (CallNode)))))", "$foo ||= bar")
+ assert_desugars("(OrNode (InstanceVariableReadNode) (InstanceVariableWriteNode (CallNode)))", "@foo ||= bar")
+ assert_desugars("(OrNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo ||= bar")
+ assert_desugars("(OrNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo = 1; foo ||= bar")
+ end
+
+ def test_operator_write
+ assert_desugars("(ClassVariableWriteNode (CallNode (ClassVariableReadNode) (ArgumentsNode (CallNode))))", "@@foo += bar")
+ assert_not_desugared("Foo::Bar += baz", "Desugaring would execute Foo twice or need temporary variables")
+ assert_desugars("(ConstantWriteNode (CallNode (ConstantReadNode) (ArgumentsNode (CallNode))))", "Foo += bar")
+ assert_desugars("(GlobalVariableWriteNode (CallNode (GlobalVariableReadNode) (ArgumentsNode (CallNode))))", "$foo += bar")
+ assert_desugars("(InstanceVariableWriteNode (CallNode (InstanceVariableReadNode) (ArgumentsNode (CallNode))))", "@foo += bar")
+ assert_desugars("(LocalVariableWriteNode (CallNode (LocalVariableReadNode) (ArgumentsNode (CallNode))))", "foo += bar")
+ assert_desugars("(LocalVariableWriteNode (CallNode (LocalVariableReadNode) (ArgumentsNode (CallNode))))", "foo = 1; foo += bar")
+ end
+
+ private
+
+ def ast_inspect(node)
+ parts = [node.class.name.split("::").last]
+
+ node.deconstruct_keys(nil).each do |_, value|
+ case value
+ when Node
+ parts << ast_inspect(value)
+ when Array
+ parts.concat(value.map { |element| ast_inspect(element) })
+ end
+ end
+
+ "(#{parts.join(" ")})"
+ end
+
+ # Ensure every node is only present once in the AST.
+ # If the same node is present twice it would most likely indicate it is executed twice, which is invalid semantically.
+ # This also acts as a sanity check that Node#child_nodes returns only nodes or nil (which caught a couple bugs).
+ def ensure_every_node_once_in_ast(node, all_nodes = {}.compare_by_identity)
+ if all_nodes.include?(node)
+ raise "#{node.inspect} is present multiple times in the desugared AST and likely executed multiple times"
+ else
+ all_nodes[node] = true
+ end
+ node.child_nodes.each do |child|
+ ensure_every_node_once_in_ast(child, all_nodes) unless child.nil?
+ end
+ end
+
+ def assert_desugars(expected, source)
+ ast = Prism.parse(source).value.accept(DesugarCompiler.new)
+ assert_equal expected, ast_inspect(ast.statements.body.last)
+
+ ensure_every_node_once_in_ast(ast)
+ end
+
+ def assert_not_desugared(source, reason)
+ ast = Prism.parse(source).value
+ assert_equal_nodes(ast, ast.accept(DesugarCompiler.new))
+ end
+ end
+end
diff --git a/test/prism/ruby/dispatcher_test.rb b/test/prism/ruby/dispatcher_test.rb
new file mode 100644
index 0000000000..1b6d7f4117
--- /dev/null
+++ b/test/prism/ruby/dispatcher_test.rb
@@ -0,0 +1,46 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class DispatcherTest < TestCase
+ class TestListener
+ attr_reader :events_received
+
+ def initialize
+ @events_received = []
+ end
+
+ def on_call_node_enter(node)
+ events_received << :on_call_node_enter
+ end
+
+ def on_call_node_leave(node)
+ events_received << :on_call_node_leave
+ end
+
+ def on_integer_node_enter(node)
+ events_received << :on_integer_node_enter
+ end
+ end
+
+ def test_dispatching_events
+ listener = TestListener.new
+ dispatcher = Dispatcher.new
+ dispatcher.register(listener, :on_call_node_enter, :on_call_node_leave, :on_integer_node_enter)
+
+ root = Prism.parse(<<~RUBY).value
+ def foo
+ something(1, 2, 3)
+ end
+ RUBY
+
+ dispatcher.dispatch(root)
+ assert_equal([:on_call_node_enter, :on_integer_node_enter, :on_integer_node_enter, :on_integer_node_enter, :on_call_node_leave], listener.events_received)
+
+ listener.events_received.clear
+ dispatcher.dispatch_once(root.statements.body.first.body.body.first)
+ assert_equal([:on_call_node_enter, :on_call_node_leave], listener.events_received)
+ end
+ end
+end
diff --git a/test/prism/ruby/location_test.rb b/test/prism/ruby/location_test.rb
new file mode 100644
index 0000000000..fc80a5b875
--- /dev/null
+++ b/test/prism/ruby/location_test.rb
@@ -0,0 +1,173 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class LocationTest < TestCase
+ def test_join
+ call = Prism.parse_statement("1234 + 567")
+ receiver = call.receiver
+ argument = call.arguments.arguments.first
+
+ joined = receiver.location.join(argument.location)
+ assert_equal 0, joined.start_offset
+ assert_equal 10, joined.length
+
+ assert_raise(RuntimeError, "Incompatible locations") do
+ argument.location.join(receiver.location)
+ end
+
+ other_argument = Prism.parse_statement("1234 + 567").arguments.arguments.first
+
+ assert_raise(RuntimeError, "Incompatible sources") do
+ other_argument.location.join(receiver.location)
+ end
+
+ assert_raise(RuntimeError, "Incompatible sources") do
+ receiver.location.join(other_argument.location)
+ end
+ end
+
+ def test_character_offsets
+ program = Prism.parse("😀 + 😀\n😠||= ðŸ˜").value
+
+ # first 😀
+ location = program.statements.body.first.receiver.location
+ assert_equal 0, location.start_character_offset
+ assert_equal 1, location.end_character_offset
+ assert_equal 0, location.start_character_column
+ assert_equal 1, location.end_character_column
+
+ # second 😀
+ location = program.statements.body.first.arguments.arguments.first.location
+ assert_equal 4, location.start_character_offset
+ assert_equal 5, location.end_character_offset
+ assert_equal 4, location.start_character_column
+ assert_equal 5, location.end_character_column
+
+ # first ðŸ˜
+ location = program.statements.body.last.name_loc
+ assert_equal 6, location.start_character_offset
+ assert_equal 7, location.end_character_offset
+ assert_equal 0, location.start_character_column
+ assert_equal 1, location.end_character_column
+
+ # second ðŸ˜
+ location = program.statements.body.last.value.location
+ assert_equal 12, location.start_character_offset
+ assert_equal 13, location.end_character_offset
+ assert_equal 6, location.start_character_column
+ assert_equal 7, location.end_character_column
+ end
+
+ def test_code_units
+ program = Prism.parse("😀 + 😀\n😠||= ðŸ˜").value
+
+ # first 😀
+ location = program.statements.body.first.receiver.location
+
+ assert_equal 0, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 0, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 0, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 1, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 2, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 1, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 2, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_32LE)
+
+ # second 😀
+ location = program.statements.body.first.arguments.arguments.first.location
+
+ assert_equal 4, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 5, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 4, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 5, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 7, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 5, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 4, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 5, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 4, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 5, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 7, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 5, location.end_code_units_column(Encoding::UTF_32LE)
+
+ # first ðŸ˜
+ location = program.statements.body.last.name_loc
+
+ assert_equal 6, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 8, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 6, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 7, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 10, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 7, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 0, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 2, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 1, location.end_code_units_column(Encoding::UTF_32LE)
+
+ # second ðŸ˜
+ location = program.statements.body.last.value.location
+
+ assert_equal 12, location.start_code_units_offset(Encoding::UTF_8)
+ assert_equal 15, location.start_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 12, location.start_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 13, location.end_code_units_offset(Encoding::UTF_8)
+ assert_equal 17, location.end_code_units_offset(Encoding::UTF_16LE)
+ assert_equal 13, location.end_code_units_offset(Encoding::UTF_32LE)
+
+ assert_equal 6, location.start_code_units_column(Encoding::UTF_8)
+ assert_equal 7, location.start_code_units_column(Encoding::UTF_16LE)
+ assert_equal 6, location.start_code_units_column(Encoding::UTF_32LE)
+
+ assert_equal 7, location.end_code_units_column(Encoding::UTF_8)
+ assert_equal 9, location.end_code_units_column(Encoding::UTF_16LE)
+ assert_equal 7, location.end_code_units_column(Encoding::UTF_32LE)
+ end
+
+ def test_chop
+ location = Prism.parse("foo").value.location
+
+ assert_equal "fo", location.chop.slice
+ assert_equal "", location.chop.chop.chop.slice
+
+ # Check that we don't go negative.
+ 10.times { location = location.chop }
+ assert_equal "", location.slice
+ end
+
+ def test_slice_lines
+ method = Prism.parse_statement("\nprivate def foo\nend\n").arguments.arguments.first
+
+ assert_equal "private def foo\nend\n", method.slice_lines
+ end
+
+ def test_adjoin
+ program = Prism.parse("foo.bar = 1").value
+
+ location = program.statements.body.first.message_loc
+ adjoined = location.adjoin("=")
+
+ assert_kind_of Location, adjoined
+ refute_equal location, adjoined
+
+ assert_equal 4, adjoined.start_offset
+ assert_equal 9, adjoined.end_offset
+ end
+ end
+end
diff --git a/test/prism/ruby/parameters_signature_test.rb b/test/prism/ruby/parameters_signature_test.rb
new file mode 100644
index 0000000000..9256bcc070
--- /dev/null
+++ b/test/prism/ruby/parameters_signature_test.rb
@@ -0,0 +1,91 @@
+# frozen_string_literal: true
+
+return if RUBY_VERSION < "3.2"
+
+require_relative "../test_helper"
+
+module Prism
+ class ParametersSignatureTest < TestCase
+ def test_req
+ assert_parameters([[:req, :a]], "a")
+ end
+
+ def test_req_destructure
+ assert_parameters([[:req]], "(a, b)")
+ end
+
+ def test_opt
+ assert_parameters([[:opt, :a]], "a = 1")
+ end
+
+ def test_rest
+ assert_parameters([[:rest, :a]], "*a")
+ end
+
+ def test_rest_anonymous
+ assert_parameters([[:rest, :*]], "*")
+ end
+
+ def test_post
+ assert_parameters([[:rest, :a], [:req, :b]], "*a, b")
+ end
+
+ def test_post_destructure
+ assert_parameters([[:rest, :a], [:req]], "*a, (b, c)")
+ end
+
+ def test_keyreq
+ assert_parameters([[:keyreq, :a]], "a:")
+ end
+
+ def test_key
+ assert_parameters([[:key, :a]], "a: 1")
+ end
+
+ def test_keyrest
+ assert_parameters([[:keyrest, :a]], "**a")
+ end
+
+ def test_nokey
+ assert_parameters([[:nokey]], "**nil")
+ end
+
+ def test_keyrest_anonymous
+ assert_parameters([[:keyrest, :**]], "**")
+ end
+
+ def test_key_ordering
+ omit("TruffleRuby returns keys in order they were declared") if RUBY_ENGINE == "truffleruby"
+ assert_parameters([[:keyreq, :a], [:keyreq, :b], [:key, :c], [:key, :d]], "a:, c: 1, b:, d: 2")
+ end
+
+ def test_block
+ assert_parameters([[:block, :a]], "&a")
+ end
+
+ def test_block_anonymous
+ assert_parameters([[:block, :&]], "&")
+ end
+
+ def test_forwarding
+ assert_parameters([[:rest, :*], [:keyrest, :**], [:block, :&]], "...")
+ end
+
+ private
+
+ def assert_parameters(expected, source)
+ # Compare against our expectation.
+ assert_equal(expected, signature(source))
+
+ # Compare against Ruby's expectation.
+ object = Object.new
+ eval("def object.m(#{source}); end")
+ assert_equal(expected, object.method(:m).parameters)
+ end
+
+ def signature(source)
+ program = Prism.parse("def m(#{source}); end").value
+ program.statements.body.first.parameters.signature
+ end
+ end
+end
diff --git a/test/prism/ruby/parser_test.rb b/test/prism/ruby/parser_test.rb
new file mode 100644
index 0000000000..606a0e54f6
--- /dev/null
+++ b/test/prism/ruby/parser_test.rb
@@ -0,0 +1,291 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+begin
+ verbose, $VERBOSE = $VERBOSE, nil
+ require "parser/ruby33"
+ require "prism/translation/parser33"
+rescue LoadError
+ # In CRuby's CI, we're not going to test against the parser gem because we
+ # don't want to have to install it. So in this case we'll just skip this test.
+ return
+ensure
+ $VERBOSE = verbose
+end
+
+# First, opt in to every AST feature.
+Parser::Builders::Default.modernize
+
+# Modify the source map == check so that it doesn't check against the node
+# itself so we don't get into a recursive loop.
+Parser::Source::Map.prepend(
+ Module.new {
+ def ==(other)
+ self.class == other.class &&
+ (instance_variables - %i[@node]).map do |ivar|
+ instance_variable_get(ivar) == other.instance_variable_get(ivar)
+ end.reduce(:&)
+ end
+ }
+)
+
+# Next, ensure that we're comparing the nodes and also comparing the source
+# ranges so that we're getting all of the necessary information.
+Parser::AST::Node.prepend(
+ Module.new {
+ def ==(other)
+ super && (location == other.location)
+ end
+ }
+)
+
+module Prism
+ class ParserTest < TestCase
+ # These files contain code that is being parsed incorrectly by the parser
+ # gem, and therefore we don't want to compare against our translation.
+ skip_incorrect = [
+ # https://github.com/whitequark/parser/issues/1017
+ "spanning_heredoc.txt",
+ "spanning_heredoc_newlines.txt",
+
+ # https://github.com/whitequark/parser/issues/1021
+ "seattlerb/heredoc_nested.txt",
+
+ # https://github.com/whitequark/parser/issues/1016
+ "whitequark/unary_num_pow_precedence.txt"
+ ]
+
+ # These files are either failing to parse or failing to translate, so we'll
+ # skip them for now.
+ skip_all = skip_incorrect | [
+ "regex.txt",
+ "unescaping.txt",
+ "seattlerb/bug190.txt",
+ "seattlerb/heredoc_with_extra_carriage_returns_windows.txt",
+ "seattlerb/heredoc_with_only_carriage_returns_windows.txt",
+ "seattlerb/heredoc_with_only_carriage_returns.txt",
+ "seattlerb/parse_line_heredoc_hardnewline.txt",
+ "seattlerb/pctW_lineno.txt",
+ "seattlerb/regexp_esc_C_slash.txt",
+ "unparser/corpus/literal/literal.txt",
+ "unparser/corpus/semantic/dstr.txt",
+ "whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt",
+ "whitequark/parser_slash_slash_n_escaping_in_literals.txt",
+ "whitequark/ruby_bug_11989.txt"
+ ]
+
+ # Not sure why these files are failing on JRuby, but skipping them for now.
+ if RUBY_ENGINE == "jruby"
+ skip_all.push("emoji_method_calls.txt", "symbols.txt")
+ end
+
+ # These files are failing to translate their lexer output into the lexer
+ # output expected by the parser gem, so we'll skip them for now.
+ skip_tokens = [
+ "comments.txt",
+ "dash_heredocs.txt",
+ "dos_endings.txt",
+ "embdoc_no_newline_at_end.txt",
+ "heredoc_with_comment.txt",
+ "heredocs_with_ignored_newlines.txt",
+ "indented_file_end.txt",
+ "methods.txt",
+ "strings.txt",
+ "tilde_heredocs.txt",
+ "xstring_with_backslash.txt",
+ "seattlerb/backticks_interpolation_line.txt",
+ "seattlerb/bug169.txt",
+ "seattlerb/case_in.txt",
+ "seattlerb/class_comments.txt",
+ "seattlerb/difficult4__leading_dots2.txt",
+ "seattlerb/difficult6__7.txt",
+ "seattlerb/difficult6__8.txt",
+ "seattlerb/dsym_esc_to_sym.txt",
+ "seattlerb/heredoc__backslash_dos_format.txt",
+ "seattlerb/heredoc_backslash_nl.txt",
+ "seattlerb/heredoc_comma_arg.txt",
+ "seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt",
+ "seattlerb/heredoc_squiggly_blank_lines.txt",
+ "seattlerb/heredoc_squiggly_interp.txt",
+ "seattlerb/heredoc_squiggly_tabs_extra.txt",
+ "seattlerb/heredoc_squiggly_tabs.txt",
+ "seattlerb/heredoc_squiggly_visually_blank_lines.txt",
+ "seattlerb/heredoc_squiggly.txt",
+ "seattlerb/heredoc_unicode.txt",
+ "seattlerb/heredoc_with_carriage_return_escapes_windows.txt",
+ "seattlerb/heredoc_with_carriage_return_escapes.txt",
+ "seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt",
+ "seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt",
+ "seattlerb/interpolated_symbol_array_line_breaks.txt",
+ "seattlerb/interpolated_word_array_line_breaks.txt",
+ "seattlerb/label_vs_string.txt",
+ "seattlerb/module_comments.txt",
+ "seattlerb/non_interpolated_symbol_array_line_breaks.txt",
+ "seattlerb/non_interpolated_word_array_line_breaks.txt",
+ "seattlerb/parse_line_block_inline_comment_leading_newlines.txt",
+ "seattlerb/parse_line_block_inline_comment.txt",
+ "seattlerb/parse_line_block_inline_multiline_comment.txt",
+ "seattlerb/parse_line_dstr_escaped_newline.txt",
+ "seattlerb/parse_line_heredoc.txt",
+ "seattlerb/parse_line_multiline_str_literal_n.txt",
+ "seattlerb/parse_line_str_with_newline_escape.txt",
+ "seattlerb/pct_w_heredoc_interp_nested.txt",
+ "seattlerb/qsymbols_empty_space.txt",
+ "seattlerb/qw_escape_term.txt",
+ "seattlerb/qWords_space.txt",
+ "seattlerb/read_escape_unicode_curlies.txt",
+ "seattlerb/read_escape_unicode_h4.txt",
+ "seattlerb/required_kwarg_no_value.txt",
+ "seattlerb/slashy_newlines_within_string.txt",
+ "seattlerb/str_double_escaped_newline.txt",
+ "seattlerb/str_double_newline.txt",
+ "seattlerb/str_evstr_escape.txt",
+ "seattlerb/str_newline_hash_line_number.txt",
+ "seattlerb/str_single_newline.txt",
+ "seattlerb/symbols_empty_space.txt",
+ "seattlerb/TestRubyParserShared.txt",
+ "unparser/corpus/literal/assignment.txt",
+ "unparser/corpus/literal/dstr.txt",
+ "unparser/corpus/semantic/opasgn.txt",
+ "whitequark/args.txt",
+ "whitequark/beginless_erange_after_newline.txt",
+ "whitequark/beginless_irange_after_newline.txt",
+ "whitequark/bug_ascii_8bit_in_literal.txt",
+ "whitequark/bug_def_no_paren_eql_begin.txt",
+ "whitequark/dedenting_heredoc.txt",
+ "whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt",
+ "whitequark/forward_arg_with_open_args.txt",
+ "whitequark/interp_digit_var.txt",
+ "whitequark/lbrace_arg_after_command_args.txt",
+ "whitequark/multiple_pattern_matches.txt",
+ "whitequark/newline_in_hash_argument.txt",
+ "whitequark/parser_bug_640.txt",
+ "whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt",
+ "whitequark/ruby_bug_11990.txt",
+ "whitequark/ruby_bug_14690.txt",
+ "whitequark/ruby_bug_9669.txt",
+ "whitequark/slash_newline_in_heredocs.txt",
+ "whitequark/space_args_arg_block.txt",
+ "whitequark/space_args_block.txt"
+ ]
+
+ Fixture.each do |fixture|
+ define_method(fixture.test_name) do
+ assert_equal_parses(
+ fixture,
+ compare_asts: !skip_all.include?(fixture.path),
+ compare_tokens: !skip_tokens.include?(fixture.path),
+ compare_comments: fixture.path != "embdoc_no_newline_at_end.txt"
+ )
+ end
+ end
+
+ private
+
+ def assert_equal_parses(fixture, compare_asts: true, compare_tokens: true, compare_comments: true)
+ buffer = Parser::Source::Buffer.new(fixture.path, 1)
+ buffer.source = fixture.read
+
+ parser = Parser::Ruby33.new
+ parser.diagnostics.consumer = ->(*) {}
+ parser.diagnostics.all_errors_are_fatal = true
+
+ expected_ast, expected_comments, expected_tokens =
+ begin
+ ignore_warnings { parser.tokenize(buffer) }
+ rescue ArgumentError, Parser::SyntaxError
+ return
+ end
+
+ actual_ast, actual_comments, actual_tokens =
+ ignore_warnings { Prism::Translation::Parser33.new.tokenize(buffer) }
+
+ if expected_ast == actual_ast
+ if !compare_asts
+ puts "#{fixture.path} is now passing"
+ end
+
+ assert_equal expected_ast, actual_ast, -> { assert_equal_asts_message(expected_ast, actual_ast) }
+
+ begin
+ assert_equal_tokens(expected_tokens, actual_tokens)
+ rescue Test::Unit::AssertionFailedError
+ raise if compare_tokens
+ else
+ puts "#{fixture.path} is now passing" if !compare_tokens
+ end
+
+ assert_equal_comments(expected_comments, actual_comments) if compare_comments
+ elsif compare_asts
+ assert_equal expected_ast, actual_ast, -> { assert_equal_asts_message(expected_ast, actual_ast) }
+ end
+ end
+
+ def assert_equal_asts_message(expected_ast, actual_ast)
+ queue = [[expected_ast, actual_ast]]
+
+ while (left, right = queue.shift)
+ if left.type != right.type
+ return "expected: #{left.type}\nactual: #{right.type}"
+ end
+
+ if left.location != right.location
+ return "expected:\n#{left.inspect}\n#{left.location.inspect}\nactual:\n#{right.inspect}\n#{right.location.inspect}"
+ end
+
+ if left.type == :str && left.children[0] != right.children[0]
+ return "expected: #{left.inspect}\nactual: #{right.inspect}"
+ end
+
+ left.children.zip(right.children).each do |left_child, right_child|
+ queue << [left_child, right_child] if left_child.is_a?(Parser::AST::Node)
+ end
+ end
+
+ "expected: #{expected_ast.inspect}\nactual: #{actual_ast.inspect}"
+ end
+
+ def assert_equal_tokens(expected_tokens, actual_tokens)
+ if expected_tokens != actual_tokens
+ expected_index = 0
+ actual_index = 0
+
+ while expected_index < expected_tokens.length
+ expected_token = expected_tokens[expected_index]
+ actual_token = actual_tokens.fetch(actual_index, [])
+
+ expected_index += 1
+ actual_index += 1
+
+ # The parser gem always has a space before a string end in list
+ # literals, but we don't. So we'll skip over the space.
+ if expected_token[0] == :tSPACE && actual_token[0] == :tSTRING_END
+ expected_index += 1
+ next
+ end
+
+ # There are a lot of tokens that have very specific meaning according
+ # to the context of the parser. We don't expose that information in
+ # prism, so we need to normalize these tokens a bit.
+ if expected_token[0] == :kDO_BLOCK && actual_token[0] == :kDO
+ actual_token[0] = expected_token[0]
+ end
+
+ # Now we can assert that the tokens are actually equal.
+ assert_equal expected_token, actual_token, -> {
+ "expected: #{expected_token.inspect}\n" \
+ "actual: #{actual_token.inspect}"
+ }
+ end
+ end
+ end
+
+ def assert_equal_comments(expected_comments, actual_comments)
+ assert_equal expected_comments, actual_comments, -> {
+ "expected: #{expected_comments.inspect}\n" \
+ "actual: #{actual_comments.inspect}"
+ }
+ end
+ end
+end
diff --git a/test/prism/ruby/pattern_test.rb b/test/prism/ruby/pattern_test.rb
new file mode 100644
index 0000000000..23f512fc1c
--- /dev/null
+++ b/test/prism/ruby/pattern_test.rb
@@ -0,0 +1,132 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class PatternTest < TestCase
+ def test_invalid_syntax
+ assert_raise(Pattern::CompilationError) { scan("", "<>") }
+ end
+
+ def test_invalid_constant
+ assert_raise(Pattern::CompilationError) { scan("", "Foo") }
+ end
+
+ def test_invalid_nested_constant
+ assert_raise(Pattern::CompilationError) { scan("", "Foo::Bar") }
+ end
+
+ def test_regexp_with_interpolation
+ assert_raise(Pattern::CompilationError) { scan("", "/\#{foo}/") }
+ end
+
+ def test_string_with_interpolation
+ assert_raise(Pattern::CompilationError) { scan("", '"#{foo}"') }
+ end
+
+ def test_symbol_with_interpolation
+ assert_raise(Pattern::CompilationError) { scan("", ":\"\#{foo}\"") }
+ end
+
+ def test_invalid_node
+ assert_raise(Pattern::CompilationError) { scan("", "IntegerNode[^foo]") }
+ end
+
+ def test_self
+ assert_raise(Pattern::CompilationError) { scan("", "self") }
+ end
+
+ def test_array_pattern_no_constant
+ results = scan("1 + 2", "[IntegerNode]")
+
+ assert_equal 1, results.length
+ end
+
+ def test_array_pattern
+ results = scan("1 + 2", "CallNode[name: :+, receiver: IntegerNode, arguments: [IntegerNode]]")
+
+ assert_equal 1, results.length
+ end
+
+ def test_alternation_pattern
+ results = scan("Foo + Bar + 1", "ConstantReadNode | IntegerNode")
+
+ assert_equal 3, results.length
+ assert_equal 1, results.grep(IntegerNode).first.value
+ end
+
+ def test_constant_read_node
+ results = scan("Foo + Bar + Baz", "ConstantReadNode")
+
+ assert_equal 3, results.length
+ assert_equal %w[Bar Baz Foo], results.map(&:slice).sort
+ end
+
+ def test_object_const
+ results = scan("1 + 2 + 3", "IntegerNode[]")
+
+ assert_equal 3, results.length
+ end
+
+ def test_constant_path
+ results = scan("Foo + Bar + Baz", "Prism::ConstantReadNode")
+
+ assert_equal 3, results.length
+ end
+
+ def test_hash_pattern_no_constant
+ results = scan("Foo + Bar + Baz", "{ name: :+ }")
+
+ assert_equal 2, results.length
+ end
+
+ def test_hash_pattern_regexp
+ results = scan("Foo + Bar + Baz", "{ name: /^[[:punct:]]$/ }")
+
+ assert_equal 2, results.length
+ assert_equal ["Prism::CallNode"], results.map { |node| node.class.name }.uniq
+ end
+
+ def test_nil
+ results = scan("foo", "{ receiver: nil }")
+
+ assert_equal 1, results.length
+ end
+
+ def test_regexp_options
+ results = scan("@foo + @bar + @baz", "InstanceVariableReadNode[name: /^@B/i]")
+
+ assert_equal 2, results.length
+ end
+
+ def test_string_empty
+ results = scan("", "''")
+
+ assert_empty results
+ end
+
+ def test_symbol_empty
+ results = scan("", ":''")
+
+ assert_empty results
+ end
+
+ def test_symbol_plain
+ results = scan("@foo", "{ name: :\"@foo\" }")
+
+ assert_equal 1, results.length
+ end
+
+ def test_symbol
+ results = scan("@foo", "{ name: :@foo }")
+
+ assert_equal 1, results.length
+ end
+
+ private
+
+ def scan(source, query)
+ Prism::Pattern.new(query).scan(Prism.parse(source).value).to_a
+ end
+ end
+end
diff --git a/test/prism/ruby/reflection_test.rb b/test/prism/ruby/reflection_test.rb
new file mode 100644
index 0000000000..3ac462e1ac
--- /dev/null
+++ b/test/prism/ruby/reflection_test.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class ReflectionTest < TestCase
+ def test_fields_for
+ fields = Reflection.fields_for(CallNode)
+ methods = CallNode.instance_methods(false)
+
+ fields.each do |field|
+ if field.is_a?(Reflection::FlagsField)
+ field.flags.each do |flag|
+ assert_includes methods, flag
+ end
+ else
+ assert_includes methods, field.name
+ end
+ end
+ end
+ end
+end
diff --git a/test/prism/ruby/ripper_test.rb b/test/prism/ruby/ripper_test.rb
new file mode 100644
index 0000000000..8db47da3d3
--- /dev/null
+++ b/test/prism/ruby/ripper_test.rb
@@ -0,0 +1,62 @@
+# frozen_string_literal: true
+
+return if RUBY_VERSION < "3.3"
+
+require_relative "../test_helper"
+
+module Prism
+ class RipperTest < TestCase
+ # Skip these tests that Ripper is reporting the wrong results for.
+ incorrect = [
+ # Ripper incorrectly attributes the block to the keyword.
+ "seattlerb/block_break.txt",
+ "seattlerb/block_next.txt",
+ "seattlerb/block_return.txt",
+ "whitequark/break_block.txt",
+ "whitequark/next_block.txt",
+ "whitequark/return_block.txt",
+
+ # Ripper is not accounting for locals created by patterns using the **
+ # operator within an `in` clause.
+ "seattlerb/parse_pattern_058.txt",
+
+ # Ripper cannot handle named capture groups in regular expressions.
+ "regex.txt",
+ "regex_char_width.txt",
+ "whitequark/lvar_injecting_match.txt",
+
+ # Ripper fails to understand some structures that span across heredocs.
+ "spanning_heredoc.txt"
+ ]
+
+ # Skip these tests that we haven't implemented yet.
+ omitted = [
+ "dos_endings.txt",
+ "heredocs_with_ignored_newlines.txt",
+ "seattlerb/block_call_dot_op2_brace_block.txt",
+ "seattlerb/block_command_operation_colon.txt",
+ "seattlerb/block_command_operation_dot.txt",
+ "seattlerb/heredoc__backslash_dos_format.txt",
+ "seattlerb/heredoc_backslash_nl.txt",
+ "seattlerb/heredoc_nested.txt",
+ "seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt",
+ "tilde_heredocs.txt",
+ "unparser/corpus/semantic/dstr.txt",
+ "whitequark/dedenting_heredoc.txt",
+ "whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt",
+ "whitequark/parser_slash_slash_n_escaping_in_literals.txt",
+ "whitequark/send_block_chain_cmd.txt",
+ "whitequark/slash_newline_in_heredocs.txt"
+ ]
+
+ Fixture.each(except: incorrect | omitted) do |fixture|
+ define_method(fixture.test_name) { assert_ripper(fixture.read) }
+ end
+
+ private
+
+ def assert_ripper(source)
+ assert_equal Ripper.sexp_raw(source), Prism::Translation::Ripper.sexp_raw(source)
+ end
+ end
+end
diff --git a/test/prism/ruby/ruby_parser_test.rb b/test/prism/ruby/ruby_parser_test.rb
new file mode 100644
index 0000000000..a13daeeb84
--- /dev/null
+++ b/test/prism/ruby/ruby_parser_test.rb
@@ -0,0 +1,127 @@
+# frozen_string_literal: true
+
+return if RUBY_ENGINE == "jruby"
+
+require_relative "../test_helper"
+
+begin
+ require "ruby_parser"
+rescue LoadError
+ # In CRuby's CI, we're not going to test against the ruby_parser gem because
+ # we don't want to have to install it. So in this case we'll just skip this
+ # test.
+ return
+end
+
+# We want to also compare lines and files to make sure we're setting them
+# correctly.
+Sexp.prepend(
+ Module.new do
+ def ==(other)
+ super && line == other.line && file == other.file # && line_max == other.line_max
+ end
+ end
+)
+
+module Prism
+ class RubyParserTest < TestCase
+ todos = [
+ "newline_terminated.txt",
+ "regex_char_width.txt",
+ "seattlerb/bug169.txt",
+ "seattlerb/masgn_colon3.txt",
+ "seattlerb/messy_op_asgn_lineno.txt",
+ "seattlerb/op_asgn_primary_colon_const_command_call.txt",
+ "seattlerb/regexp_esc_C_slash.txt",
+ "seattlerb/str_lit_concat_bad_encodings.txt",
+ "unescaping.txt",
+ "unparser/corpus/literal/kwbegin.txt",
+ "unparser/corpus/literal/send.txt",
+ "whitequark/masgn_const.txt",
+ "whitequark/ruby_bug_12402.txt",
+ "whitequark/ruby_bug_14690.txt",
+ "whitequark/space_args_block.txt"
+ ]
+
+ # https://github.com/seattlerb/ruby_parser/issues/344
+ failures = [
+ "alias.txt",
+ "dos_endings.txt",
+ "heredocs_with_ignored_newlines.txt",
+ "method_calls.txt",
+ "methods.txt",
+ "multi_write.txt",
+ "not.txt",
+ "patterns.txt",
+ "regex.txt",
+ "seattlerb/and_multi.txt",
+ "seattlerb/heredoc__backslash_dos_format.txt",
+ "seattlerb/heredoc_bad_hex_escape.txt",
+ "seattlerb/heredoc_bad_oct_escape.txt",
+ "seattlerb/heredoc_with_extra_carriage_horrible_mix.txt",
+ "seattlerb/heredoc_with_extra_carriage_returns_windows.txt",
+ "seattlerb/heredoc_with_only_carriage_returns_windows.txt",
+ "seattlerb/heredoc_with_only_carriage_returns.txt",
+ "spanning_heredoc_newlines.txt",
+ "spanning_heredoc.txt",
+ "tilde_heredocs.txt",
+ "unparser/corpus/literal/literal.txt",
+ "while.txt",
+ "whitequark/cond_eflipflop.txt",
+ "whitequark/cond_iflipflop.txt",
+ "whitequark/cond_match_current_line.txt",
+ "whitequark/dedenting_heredoc.txt",
+ "whitequark/lvar_injecting_match.txt",
+ "whitequark/not.txt",
+ "whitequark/numparam_ruby_bug_19025.txt",
+ "whitequark/op_asgn_cmd.txt",
+ "whitequark/parser_bug_640.txt",
+ "whitequark/parser_slash_slash_n_escaping_in_literals.txt",
+ "whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt",
+ "whitequark/pattern_matching_single_line.txt",
+ "whitequark/ruby_bug_11989.txt",
+ "whitequark/slash_newline_in_heredocs.txt"
+ ]
+
+ Fixture.each(except: failures) do |fixture|
+ define_method(fixture.test_name) do
+ assert_ruby_parser(fixture, todos.include?(fixture.path))
+ end
+ end
+
+ private
+
+ def assert_ruby_parser(fixture, allowed_failure)
+ source = fixture.read
+ expected = ignore_warnings { ::RubyParser.new.parse(source, fixture.path) }
+ actual = Prism::Translation::RubyParser.new.parse(source, fixture.path)
+
+ if !allowed_failure
+ assert_equal(expected, actual, -> { message(expected, actual) })
+ elsif expected == actual
+ puts "#{name} now passes"
+ end
+ end
+
+ def message(expected, actual)
+ if expected == actual
+ nil
+ elsif expected.is_a?(Sexp) && actual.is_a?(Sexp)
+ if expected.line != actual.line
+ "expected: (#{expected.inspect} line=#{expected.line}), actual: (#{actual.inspect} line=#{actual.line})"
+ elsif expected.file != actual.file
+ "expected: (#{expected.inspect} file=#{expected.file}), actual: (#{actual.inspect} file=#{actual.file})"
+ elsif expected.length != actual.length
+ "expected: (#{expected.inspect} length=#{expected.length}), actual: (#{actual.inspect} length=#{actual.length})"
+ else
+ expected.zip(actual).find do |expected_field, actual_field|
+ result = message(expected_field, actual_field)
+ break result if result
+ end
+ end
+ else
+ "expected: #{expected.inspect}, actual: #{actual.inspect}"
+ end
+ end
+ end
+end
diff --git a/test/prism/ruby/tunnel_test.rb b/test/prism/ruby/tunnel_test.rb
new file mode 100644
index 0000000000..0214681604
--- /dev/null
+++ b/test/prism/ruby/tunnel_test.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+require_relative "../test_helper"
+
+module Prism
+ class TunnelTest < TestCase
+ def test_tunnel
+ program = Prism.parse("foo(1) +\n bar(2, 3) +\n baz(3, 4, 5)").value
+
+ tunnel = program.tunnel(1, 4).last
+ assert_kind_of IntegerNode, tunnel
+ assert_equal 1, tunnel.value
+
+ tunnel = program.tunnel(2, 6).last
+ assert_kind_of IntegerNode, tunnel
+ assert_equal 2, tunnel.value
+
+ tunnel = program.tunnel(3, 9).last
+ assert_kind_of IntegerNode, tunnel
+ assert_equal 4, tunnel.value
+
+ tunnel = program.tunnel(3, 8)
+ assert_equal [ProgramNode, StatementsNode, CallNode, ArgumentsNode, CallNode, ArgumentsNode], tunnel.map(&:class)
+ end
+ end
+end
diff --git a/test/prism/ruby_api_test.rb b/test/prism/ruby_api_test.rb
deleted file mode 100644
index a1e2592d3d..0000000000
--- a/test/prism/ruby_api_test.rb
+++ /dev/null
@@ -1,307 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class RubyAPITest < TestCase
- if !ENV["PRISM_BUILD_MINIMAL"]
- def test_ruby_api
- filepath = __FILE__
- source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
-
- assert_equal Prism.lex(source, filepath: filepath).value, Prism.lex_file(filepath).value
- assert_equal Prism.dump(source, filepath: filepath), Prism.dump_file(filepath)
-
- serialized = Prism.dump(source, filepath: filepath)
- ast1 = Prism.load(source, serialized).value
- ast2 = Prism.parse(source, filepath: filepath).value
- ast3 = Prism.parse_file(filepath).value
-
- assert_equal_nodes ast1, ast2
- assert_equal_nodes ast2, ast3
- end
- end
-
- def test_parse_success?
- assert Prism.parse_success?("1")
- refute Prism.parse_success?("<>")
- end
-
- def test_parse_file_success?
- assert Prism.parse_file_success?(__FILE__)
- end
-
- def test_options
- assert_equal "", Prism.parse("__FILE__").value.statements.body[0].filepath
- assert_equal "foo.rb", Prism.parse("__FILE__", filepath: "foo.rb").value.statements.body[0].filepath
-
- assert_equal 1, Prism.parse("foo").value.statements.body[0].location.start_line
- assert_equal 10, Prism.parse("foo", line: 10).value.statements.body[0].location.start_line
-
- refute Prism.parse("\"foo\"").value.statements.body[0].frozen?
- assert Prism.parse("\"foo\"", frozen_string_literal: true).value.statements.body[0].frozen?
- refute Prism.parse("\"foo\"", frozen_string_literal: false).value.statements.body[0].frozen?
-
- assert_kind_of Prism::CallNode, Prism.parse("foo").value.statements.body[0]
- assert_kind_of Prism::LocalVariableReadNode, Prism.parse("foo", scopes: [[:foo]]).value.statements.body[0]
- assert_equal 1, Prism.parse("foo", scopes: [[:foo], []]).value.statements.body[0].depth
-
- assert_equal [:foo], Prism.parse("foo", scopes: [[:foo]]).value.locals
- end
-
- def test_literal_value_method
- assert_equal 123, parse_expression("123").value
- assert_equal 3.14, parse_expression("3.14").value
- assert_equal 42i, parse_expression("42i").value
- assert_equal 42.1ri, parse_expression("42.1ri").value
- assert_equal 3.14i, parse_expression("3.14i").value
- assert_equal 42r, parse_expression("42r").value
- assert_equal 0.5r, parse_expression("0.5r").value
- assert_equal 42ri, parse_expression("42ri").value
- assert_equal 0.5ri, parse_expression("0.5ri").value
- assert_equal 0xFFr, parse_expression("0xFFr").value
- assert_equal 0xFFri, parse_expression("0xFFri").value
- end
-
- def test_location_join
- recv, args_node, _ = parse_expression("1234 + 567").child_nodes
- arg = args_node.arguments[0]
-
- joined = recv.location.join(arg.location)
- assert_equal 0, joined.start_offset
- assert_equal 10, joined.length
-
- assert_raise RuntimeError, "Incompatible locations" do
- arg.location.join(recv.location)
- end
-
- other_arg = parse_expression("1234 + 567").arguments.arguments[0]
-
- assert_raise RuntimeError, "Incompatible sources" do
- other_arg.location.join(recv.location)
- end
-
- assert_raise RuntimeError, "Incompatible sources" do
- recv.location.join(other_arg.location)
- end
- end
-
- def test_location_character_offsets
- program = Prism.parse("😀 + 😀\n😠||= ðŸ˜").value
-
- # first 😀
- location = program.statements.body.first.receiver.location
- assert_equal 0, location.start_character_offset
- assert_equal 1, location.end_character_offset
- assert_equal 0, location.start_character_column
- assert_equal 1, location.end_character_column
-
- # second 😀
- location = program.statements.body.first.arguments.arguments.first.location
- assert_equal 4, location.start_character_offset
- assert_equal 5, location.end_character_offset
- assert_equal 4, location.start_character_column
- assert_equal 5, location.end_character_column
-
- # first ðŸ˜
- location = program.statements.body.last.name_loc
- assert_equal 6, location.start_character_offset
- assert_equal 7, location.end_character_offset
- assert_equal 0, location.start_character_column
- assert_equal 1, location.end_character_column
-
- # second ðŸ˜
- location = program.statements.body.last.value.location
- assert_equal 12, location.start_character_offset
- assert_equal 13, location.end_character_offset
- assert_equal 6, location.start_character_column
- assert_equal 7, location.end_character_column
- end
-
- def test_location_code_units
- program = Prism.parse("😀 + 😀\n😠||= ðŸ˜").value
-
- # first 😀
- location = program.statements.body.first.receiver.location
-
- assert_equal 0, location.start_code_units_offset(Encoding::UTF_8)
- assert_equal 0, location.start_code_units_offset(Encoding::UTF_16LE)
- assert_equal 0, location.start_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 1, location.end_code_units_offset(Encoding::UTF_8)
- assert_equal 2, location.end_code_units_offset(Encoding::UTF_16LE)
- assert_equal 1, location.end_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 0, location.start_code_units_column(Encoding::UTF_8)
- assert_equal 0, location.start_code_units_column(Encoding::UTF_16LE)
- assert_equal 0, location.start_code_units_column(Encoding::UTF_32LE)
-
- assert_equal 1, location.end_code_units_column(Encoding::UTF_8)
- assert_equal 2, location.end_code_units_column(Encoding::UTF_16LE)
- assert_equal 1, location.end_code_units_column(Encoding::UTF_32LE)
-
- # second 😀
- location = program.statements.body.first.arguments.arguments.first.location
-
- assert_equal 4, location.start_code_units_offset(Encoding::UTF_8)
- assert_equal 5, location.start_code_units_offset(Encoding::UTF_16LE)
- assert_equal 4, location.start_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 5, location.end_code_units_offset(Encoding::UTF_8)
- assert_equal 7, location.end_code_units_offset(Encoding::UTF_16LE)
- assert_equal 5, location.end_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 4, location.start_code_units_column(Encoding::UTF_8)
- assert_equal 5, location.start_code_units_column(Encoding::UTF_16LE)
- assert_equal 4, location.start_code_units_column(Encoding::UTF_32LE)
-
- assert_equal 5, location.end_code_units_column(Encoding::UTF_8)
- assert_equal 7, location.end_code_units_column(Encoding::UTF_16LE)
- assert_equal 5, location.end_code_units_column(Encoding::UTF_32LE)
-
- # first ðŸ˜
- location = program.statements.body.last.name_loc
-
- assert_equal 6, location.start_code_units_offset(Encoding::UTF_8)
- assert_equal 8, location.start_code_units_offset(Encoding::UTF_16LE)
- assert_equal 6, location.start_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 7, location.end_code_units_offset(Encoding::UTF_8)
- assert_equal 10, location.end_code_units_offset(Encoding::UTF_16LE)
- assert_equal 7, location.end_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 0, location.start_code_units_column(Encoding::UTF_8)
- assert_equal 0, location.start_code_units_column(Encoding::UTF_16LE)
- assert_equal 0, location.start_code_units_column(Encoding::UTF_32LE)
-
- assert_equal 1, location.end_code_units_column(Encoding::UTF_8)
- assert_equal 2, location.end_code_units_column(Encoding::UTF_16LE)
- assert_equal 1, location.end_code_units_column(Encoding::UTF_32LE)
-
- # second ðŸ˜
- location = program.statements.body.last.value.location
-
- assert_equal 12, location.start_code_units_offset(Encoding::UTF_8)
- assert_equal 15, location.start_code_units_offset(Encoding::UTF_16LE)
- assert_equal 12, location.start_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 13, location.end_code_units_offset(Encoding::UTF_8)
- assert_equal 17, location.end_code_units_offset(Encoding::UTF_16LE)
- assert_equal 13, location.end_code_units_offset(Encoding::UTF_32LE)
-
- assert_equal 6, location.start_code_units_column(Encoding::UTF_8)
- assert_equal 7, location.start_code_units_column(Encoding::UTF_16LE)
- assert_equal 6, location.start_code_units_column(Encoding::UTF_32LE)
-
- assert_equal 7, location.end_code_units_column(Encoding::UTF_8)
- assert_equal 9, location.end_code_units_column(Encoding::UTF_16LE)
- assert_equal 7, location.end_code_units_column(Encoding::UTF_32LE)
- end
-
- def test_location_chop
- location = Prism.parse("foo").value.location
-
- assert_equal "fo", location.chop.slice
- assert_equal "", location.chop.chop.chop.slice
-
- # Check that we don't go negative.
- 10.times { location = location.chop }
- assert_equal "", location.slice
- end
-
- def test_location_slice_lines
- result = Prism.parse("\nprivate def foo\nend\n")
- method = result.value.statements.body.first.arguments.arguments.first
-
- assert_equal "private def foo\nend\n", method.slice_lines
- end
-
- def test_heredoc?
- refute parse_expression("\"foo\"").heredoc?
- refute parse_expression("\"foo \#{1}\"").heredoc?
- refute parse_expression("`foo`").heredoc?
- refute parse_expression("`foo \#{1}`").heredoc?
-
- assert parse_expression("<<~HERE\nfoo\nHERE\n").heredoc?
- assert parse_expression("<<~HERE\nfoo \#{1}\nHERE\n").heredoc?
- assert parse_expression("<<~`HERE`\nfoo\nHERE\n").heredoc?
- assert parse_expression("<<~`HERE`\nfoo \#{1}\nHERE\n").heredoc?
- end
-
- # Through some bit hackery, we want to allow consumers to use the integer
- # base flags as the base itself. It has a nice property that the current
- # alignment provides them in the correct order. So here we test that our
- # assumption holds so that it doesn't change out from under us.
- #
- # In C, this would look something like:
- #
- # ((flags & ~DECIMAL) << 1) || 10
- #
- # We have to do some other work in Ruby because 0 is truthy and ~ on an
- # integer doesn't have a fixed width.
- def test_integer_base_flags
- base = -> (node) do
- value = (node.send(:flags) & (0b1111 - IntegerBaseFlags::DECIMAL)) << 1
- value == 0 ? 10 : value
- end
-
- assert_equal 2, base[parse_expression("0b1")]
- assert_equal 8, base[parse_expression("0o1")]
- assert_equal 10, base[parse_expression("0d1")]
- assert_equal 16, base[parse_expression("0x1")]
- end
-
- def test_node_equality
- assert_operator parse_expression("1"), :===, parse_expression("1")
- assert_operator Prism.parse("1").value, :===, Prism.parse("1").value
-
- complex_source = "class Something; @var = something.else { _1 }; end"
- assert_operator parse_expression(complex_source), :===, parse_expression(complex_source)
-
- refute_operator parse_expression("1"), :===, parse_expression("2")
- refute_operator parse_expression("1"), :===, parse_expression("0x1")
-
- complex_source_1 = "class Something; @var = something.else { _1 }; end"
- complex_source_2 = "class Something; @var = something.else { _2 }; end"
- refute_operator parse_expression(complex_source_1), :===, parse_expression(complex_source_2)
- end
-
- def test_node_tunnel
- program = Prism.parse("foo(1) +\n bar(2, 3) +\n baz(3, 4, 5)").value
-
- tunnel = program.tunnel(1, 4).last
- assert_kind_of IntegerNode, tunnel
- assert_equal 1, tunnel.value
-
- tunnel = program.tunnel(2, 6).last
- assert_kind_of IntegerNode, tunnel
- assert_equal 2, tunnel.value
-
- tunnel = program.tunnel(3, 9).last
- assert_kind_of IntegerNode, tunnel
- assert_equal 4, tunnel.value
-
- tunnel = program.tunnel(3, 8)
- assert_equal [ProgramNode, StatementsNode, CallNode, ArgumentsNode, CallNode, ArgumentsNode], tunnel.map(&:class)
- end
-
- def test_location_adjoin
- program = Prism.parse("foo.bar = 1").value
-
- location = program.statements.body.first.message_loc
- adjoined = location.adjoin("=")
-
- assert_kind_of Location, adjoined
- refute_equal location, adjoined
-
- assert_equal 4, adjoined.start_offset
- assert_equal 9, adjoined.end_offset
- end
-
- private
-
- def parse_expression(source)
- Prism.parse(source).value.statements.body.first
- end
- end
-end
diff --git a/test/prism/ruby_parser_test.rb b/test/prism/ruby_parser_test.rb
deleted file mode 100644
index 8edeac4b4f..0000000000
--- a/test/prism/ruby_parser_test.rb
+++ /dev/null
@@ -1,144 +0,0 @@
-# frozen_string_literal: true
-
-return if RUBY_ENGINE == "jruby"
-
-require_relative "test_helper"
-
-begin
- require "ruby_parser"
-rescue LoadError
- # In CRuby's CI, we're not going to test against the ruby_parser gem because
- # we don't want to have to install it. So in this case we'll just skip this
- # test.
- return
-end
-
-# We want to also compare lines and files to make sure we're setting them
-# correctly.
-Sexp.prepend(
- Module.new do
- def ==(other)
- super && line == other.line && line_max == other.line_max && file == other.file
- end
- end
-)
-
-module Prism
- class RubyParserTest < TestCase
- base = File.join(__dir__, "fixtures")
-
- todos = %w[
- heredocs_nested.txt
- newline_terminated.txt
- regex_char_width.txt
- seattlerb/bug169.txt
- seattlerb/dstr_evstr.txt
- seattlerb/heredoc_squiggly_interp.txt
- seattlerb/masgn_colon3.txt
- seattlerb/messy_op_asgn_lineno.txt
- seattlerb/op_asgn_primary_colon_const_command_call.txt
- seattlerb/parse_line_evstr_after_break.txt
- seattlerb/regexp_esc_C_slash.txt
- seattlerb/str_lit_concat_bad_encodings.txt
- seattlerb/str_pct_nested_nested.txt
- unescaping.txt
- unparser/corpus/literal/kwbegin.txt
- unparser/corpus/literal/send.txt
- unparser/corpus/semantic/dstr.txt
- whitequark/masgn_const.txt
- whitequark/ruby_bug_12402.txt
- whitequark/ruby_bug_14690.txt
- whitequark/space_args_block.txt
- whitequark/string_concat.txt
- ]
-
- # https://github.com/seattlerb/ruby_parser/issues/344
- failures = %w[
- alias.txt
- dos_endings.txt
- heredocs_with_ignored_newlines.txt
- method_calls.txt
- methods.txt
- multi_write.txt
- not.txt
- patterns.txt
- regex.txt
- seattlerb/and_multi.txt
- seattlerb/heredoc__backslash_dos_format.txt
- seattlerb/heredoc_bad_hex_escape.txt
- seattlerb/heredoc_bad_oct_escape.txt
- seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
- seattlerb/heredoc_with_extra_carriage_returns_windows.txt
- seattlerb/heredoc_with_only_carriage_returns_windows.txt
- seattlerb/heredoc_with_only_carriage_returns.txt
- spanning_heredoc_newlines.txt
- spanning_heredoc.txt
- tilde_heredocs.txt
- unparser/corpus/literal/literal.txt
- while.txt
- whitequark/class_definition_in_while_cond.txt
- whitequark/cond_eflipflop.txt
- whitequark/cond_iflipflop.txt
- whitequark/cond_match_current_line.txt
- whitequark/dedenting_heredoc.txt
- whitequark/if_while_after_class__since_32.txt
- whitequark/lvar_injecting_match.txt
- whitequark/not.txt
- whitequark/numparam_ruby_bug_19025.txt
- whitequark/op_asgn_cmd.txt
- whitequark/parser_bug_640.txt
- whitequark/parser_slash_slash_n_escaping_in_literals.txt
- whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
- whitequark/pattern_matching_single_line.txt
- whitequark/ruby_bug_11989.txt
- whitequark/slash_newline_in_heredocs.txt
- ]
-
- Dir["**/*.txt", base: base].each do |name|
- next if failures.include?(name)
-
- define_method("test_#{name}") do
- begin
- # Parsing with ruby parser tends to be noisy with warnings, so we're
- # turning those off.
- previous_verbose, $VERBOSE = $VERBOSE, nil
- assert_parse_file(base, name, todos.include?(name))
- ensure
- $VERBOSE = previous_verbose
- end
- end
- end
-
- private
-
- def assert_parse_file(base, name, allowed_failure)
- filepath = File.join(base, name)
- expected = ::RubyParser.new.parse(File.read(filepath), filepath)
- actual = Prism::Translation::RubyParser.parse_file(filepath)
-
- if !allowed_failure
- assert_equal_nodes expected, actual
- elsif expected == actual
- puts "#{name} now passes"
- end
- end
-
- def assert_equal_nodes(left, right)
- return if left == right
-
- if left.is_a?(Sexp) && right.is_a?(Sexp)
- if left.line != right.line
- assert_equal "(#{left.inspect} line=#{left.line})", "(#{right.inspect} line=#{right.line})"
- elsif left.file != right.file
- assert_equal "(#{left.inspect} file=#{left.file})", "(#{right.inspect} file=#{right.file})"
- elsif left.length != right.length
- assert_equal "(#{left.inspect} length=#{left.length})", "(#{right.inspect} length=#{right.length})"
- else
- left.zip(right).each { |l, r| assert_equal_nodes(l, r) }
- end
- else
- assert_equal left, right
- end
- end
- end
-end
diff --git a/test/prism/snapshots/alias.txt b/test/prism/snapshots/alias.txt
deleted file mode 100644
index a952e96f67..0000000000
--- a/test/prism/snapshots/alias.txt
+++ /dev/null
@@ -1,194 +0,0 @@
-@ ProgramNode (location: (1,0)-(23,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(23,11))
- └── body: (length: 12)
- ├── @ AliasMethodNode (location: (1,0)-(1,15))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (1,6)-(1,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,6)-(1,7) = ":"
- │ │ ├── value_loc: (1,7)-(1,10) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (1,11)-(1,15))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,11)-(1,12) = ":"
- │ │ ├── value_loc: (1,12)-(1,15) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ └── keyword_loc: (1,0)-(1,5) = "alias"
- ├── @ AliasMethodNode (location: (3,0)-(3,21))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (3,6)-(3,13))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,6)-(3,9) = "%s["
- │ │ ├── value_loc: (3,9)-(3,12) = "abc"
- │ │ ├── closing_loc: (3,12)-(3,13) = "]"
- │ │ └── unescaped: "abc"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (3,14)-(3,21))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,14)-(3,17) = "%s["
- │ │ ├── value_loc: (3,17)-(3,20) = "def"
- │ │ ├── closing_loc: (3,20)-(3,21) = "]"
- │ │ └── unescaped: "def"
- │ └── keyword_loc: (3,0)-(3,5) = "alias"
- ├── @ AliasMethodNode (location: (5,0)-(5,19))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (5,6)-(5,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,6)-(5,8) = ":'"
- │ │ ├── value_loc: (5,8)-(5,11) = "abc"
- │ │ ├── closing_loc: (5,11)-(5,12) = "'"
- │ │ └── unescaped: "abc"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (5,13)-(5,19))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,13)-(5,15) = ":'"
- │ │ ├── value_loc: (5,15)-(5,18) = "def"
- │ │ ├── closing_loc: (5,18)-(5,19) = "'"
- │ │ └── unescaped: "def"
- │ └── keyword_loc: (5,0)-(5,5) = "alias"
- ├── @ AliasMethodNode (location: (7,0)-(7,23))
- │ ├── new_name:
- │ │ @ InterpolatedSymbolNode (location: (7,6)-(7,16))
- │ │ ├── opening_loc: (7,6)-(7,8) = ":\""
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (7,8)-(7,11))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (7,8)-(7,11) = "abc"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "abc"
- │ │ │ └── @ EmbeddedStatementsNode (location: (7,11)-(7,15))
- │ │ │ ├── opening_loc: (7,11)-(7,13) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (7,13)-(7,14))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (7,13)-(7,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (7,14)-(7,15) = "}"
- │ │ └── closing_loc: (7,15)-(7,16) = "\""
- │ ├── old_name:
- │ │ @ SymbolNode (location: (7,17)-(7,23))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (7,17)-(7,19) = ":'"
- │ │ ├── value_loc: (7,19)-(7,22) = "def"
- │ │ ├── closing_loc: (7,22)-(7,23) = "'"
- │ │ └── unescaped: "def"
- │ └── keyword_loc: (7,0)-(7,5) = "alias"
- ├── @ AliasGlobalVariableNode (location: (9,0)-(9,11))
- │ ├── new_name:
- │ │ @ GlobalVariableReadNode (location: (9,6)-(9,8))
- │ │ └── name: :$a
- │ ├── old_name:
- │ │ @ BackReferenceReadNode (location: (9,9)-(9,11))
- │ │ └── name: :$'
- │ └── keyword_loc: (9,0)-(9,5) = "alias"
- ├── @ AliasMethodNode (location: (11,0)-(11,13))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (11,6)-(11,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (11,6)-(11,9) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (11,10)-(11,13))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (11,10)-(11,13) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ └── keyword_loc: (11,0)-(11,5) = "alias"
- ├── @ AliasGlobalVariableNode (location: (13,0)-(13,15))
- │ ├── new_name:
- │ │ @ GlobalVariableReadNode (location: (13,6)-(13,10))
- │ │ └── name: :$foo
- │ ├── old_name:
- │ │ @ GlobalVariableReadNode (location: (13,11)-(13,15))
- │ │ └── name: :$bar
- │ └── keyword_loc: (13,0)-(13,5) = "alias"
- ├── @ AliasMethodNode (location: (15,0)-(15,12))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (15,6)-(15,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (15,6)-(15,9) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (15,10)-(15,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (15,10)-(15,12) = "if"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "if"
- │ └── keyword_loc: (15,0)-(15,5) = "alias"
- ├── @ AliasMethodNode (location: (17,0)-(17,13))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (17,6)-(17,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (17,6)-(17,9) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (17,10)-(17,13))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (17,10)-(17,13) = "<=>"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "<=>"
- │ └── keyword_loc: (17,0)-(17,5) = "alias"
- ├── @ AliasMethodNode (location: (19,0)-(19,15))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (19,6)-(19,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (19,6)-(19,7) = ":"
- │ │ ├── value_loc: (19,7)-(19,9) = "=="
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "=="
- │ ├── old_name:
- │ │ @ SymbolNode (location: (19,10)-(19,15))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (19,10)-(19,11) = ":"
- │ │ ├── value_loc: (19,11)-(19,15) = "eql?"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "eql?"
- │ └── keyword_loc: (19,0)-(19,5) = "alias"
- ├── @ AliasMethodNode (location: (21,0)-(21,9))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (21,6)-(21,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (21,6)-(21,7) = "A"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "A"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (21,8)-(21,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (21,8)-(21,9) = "B"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "B"
- │ └── keyword_loc: (21,0)-(21,5) = "alias"
- └── @ AliasMethodNode (location: (23,0)-(23,11))
- ├── new_name:
- │ @ SymbolNode (location: (23,6)-(23,8))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (23,6)-(23,7) = ":"
- │ ├── value_loc: (23,7)-(23,8) = "A"
- │ ├── closing_loc: ∅
- │ └── unescaped: "A"
- ├── old_name:
- │ @ SymbolNode (location: (23,9)-(23,11))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (23,9)-(23,10) = ":"
- │ ├── value_loc: (23,10)-(23,11) = "B"
- │ ├── closing_loc: ∅
- │ └── unescaped: "B"
- └── keyword_loc: (23,0)-(23,5) = "alias"
diff --git a/test/prism/snapshots/arithmetic.txt b/test/prism/snapshots/arithmetic.txt
deleted file mode 100644
index c8a31c3d70..0000000000
--- a/test/prism/snapshots/arithmetic.txt
+++ /dev/null
@@ -1,255 +0,0 @@
-@ ProgramNode (location: (1,0)-(13,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(13,8))
- └── body: (length: 7)
- ├── @ CallNode (location: (1,0)-(1,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,5)-(1,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (1,5)-(1,8) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (1,4)-(1,5) = "!"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (3,0)-(3,4))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (3,1)-(3,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (3,1)-(3,4) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :-@
- │ │ ├── message_loc: (3,0)-(3,1) = "-"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :*
- │ ├── message_loc: (3,4)-(3,5) = "*"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,5)-(3,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (3,5)-(3,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (3,5)-(3,8) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (5,0)-(5,4))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (5,1)-(5,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (5,1)-(5,4) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :+@
- │ │ ├── message_loc: (5,0)-(5,1) = "+"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :**
- │ ├── message_loc: (5,4)-(5,6) = "**"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,6)-(5,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (5,6)-(5,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (5,6)-(5,9) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (7,0)-(7,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (7,0)-(7,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,4)-(7,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (7,4)-(7,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (7,5)-(7,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (7,5)-(7,8) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :~
- │ │ ├── message_loc: (7,4)-(7,5) = "~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (9,0)-(9,17))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (9,0)-(9,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (9,0)-(9,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (9,0)-(9,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :<<
- │ │ ├── message_loc: (9,4)-(9,6) = "<<"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (9,7)-(9,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (9,7)-(9,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (9,7)-(9,10) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :<<
- │ ├── message_loc: (9,11)-(9,13) = "<<"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (9,14)-(9,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (9,14)-(9,17))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (9,14)-(9,17) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (11,0)-(11,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (11,1)-(11,5))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (11,1)-(11,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :**
- │ │ ├── message_loc: (11,2)-(11,4) = "**"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :-@
- │ ├── message_loc: (11,0)-(11,1) = "-"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (13,0)-(13,8))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (13,0)-(13,2))
- │ ├── flags: decimal
- │ └── value: -1
- ├── call_operator_loc: (13,2)-(13,3) = "."
- ├── name: :zero?
- ├── message_loc: (13,3)-(13,8) = "zero?"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/arrays.txt b/test/prism/snapshots/arrays.txt
deleted file mode 100644
index 90a4d8f3bb..0000000000
--- a/test/prism/snapshots/arrays.txt
+++ /dev/null
@@ -1,1837 +0,0 @@
-@ ProgramNode (location: (1,0)-(122,32))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(122,32))
- └── body: (length: 50)
- ├── @ ArrayNode (location: (1,0)-(1,4))
- │ ├── flags: contains_splat
- │ ├── elements: (length: 1)
- │ │ └── @ SplatNode (location: (1,1)-(1,3))
- │ │ ├── operator_loc: (1,1)-(1,2) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (1,2)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,2)-(1,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "["
- │ └── closing_loc: (1,3)-(1,4) = "]"
- ├── @ CallNode (location: (3,0)-(3,23))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ CallNode (location: (3,0)-(3,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (3,0)-(3,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (3,3)-(3,13) = "[bar, baz]"
- │ ├── opening_loc: (3,3)-(3,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,4)-(3,23))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ CallNode (location: (3,4)-(3,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (3,4)-(3,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── @ CallNode (location: (3,9)-(3,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (3,9)-(3,12) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ ArrayNode (location: (3,16)-(3,23))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (3,16)-(3,17))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (3,19)-(3,20))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (3,22)-(3,23))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── closing_loc: (3,12)-(3,13) = "]"
- │ └── block: ∅
- ├── @ ArrayNode (location: (5,0)-(5,13))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ KeywordHashNode (location: (5,1)-(5,12))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (5,1)-(5,12))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (5,1)-(5,3))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (5,1)-(5,2) = "a"
- │ │ │ ├── closing_loc: (5,2)-(5,3) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ ArrayNode (location: (5,4)-(5,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ SymbolNode (location: (5,5)-(5,7))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (5,5)-(5,6) = ":"
- │ │ │ │ │ ├── value_loc: (5,6)-(5,7) = "b"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ └── @ SymbolNode (location: (5,9)-(5,11))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (5,9)-(5,10) = ":"
- │ │ │ │ ├── value_loc: (5,10)-(5,11) = "c"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "c"
- │ │ │ ├── opening_loc: (5,4)-(5,5) = "["
- │ │ │ └── closing_loc: (5,11)-(5,12) = "]"
- │ │ └── operator_loc: ∅
- │ ├── opening_loc: (5,0)-(5,1) = "["
- │ └── closing_loc: (5,12)-(5,13) = "]"
- ├── @ ArrayNode (location: (9,0)-(15,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 5)
- │ │ ├── @ SymbolNode (location: (9,1)-(9,3))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (9,1)-(9,2) = ":"
- │ │ │ ├── value_loc: (9,2)-(9,3) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ SymbolNode (location: (9,5)-(9,7))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (9,5)-(9,6) = ":"
- │ │ │ ├── value_loc: (9,6)-(9,7) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ ├── @ SymbolNode (location: (10,0)-(10,2))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (10,0)-(10,1) = ":"
- │ │ │ ├── value_loc: (10,1)-(10,2) = "c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "c"
- │ │ ├── @ IntegerNode (location: (10,3)-(10,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ SymbolNode (location: (14,0)-(14,2))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (14,0)-(14,1) = ":"
- │ │ ├── value_loc: (14,1)-(14,2) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── opening_loc: (9,0)-(9,1) = "["
- │ └── closing_loc: (15,0)-(15,1) = "]"
- ├── @ ArrayNode (location: (18,0)-(26,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 5)
- │ │ ├── @ SymbolNode (location: (18,1)-(18,3))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (18,1)-(18,2) = ":"
- │ │ │ ├── value_loc: (18,2)-(18,3) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ SymbolNode (location: (18,5)-(18,7))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (18,5)-(18,6) = ":"
- │ │ │ ├── value_loc: (18,6)-(18,7) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ ├── @ SymbolNode (location: (19,0)-(19,2))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (19,0)-(19,1) = ":"
- │ │ │ ├── value_loc: (19,1)-(19,2) = "c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "c"
- │ │ ├── @ IntegerNode (location: (19,3)-(19,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ SymbolNode (location: (23,0)-(23,2))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (23,0)-(23,1) = ":"
- │ │ ├── value_loc: (23,1)-(23,2) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── opening_loc: (18,0)-(18,1) = "["
- │ └── closing_loc: (26,0)-(26,1) = "]"
- ├── @ ArrayNode (location: (28,0)-(28,12))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ KeywordHashNode (location: (28,1)-(28,11))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (28,1)-(28,11))
- │ │ ├── key:
- │ │ │ @ CallNode (location: (28,1)-(28,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (28,1)-(28,4) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── value:
- │ │ │ @ CallNode (location: (28,8)-(28,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (28,8)-(28,11) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (28,5)-(28,7) = "=>"
- │ ├── opening_loc: (28,0)-(28,1) = "["
- │ └── closing_loc: (28,11)-(28,12) = "]"
- ├── @ CallNode (location: (30,0)-(30,19))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ CallNode (location: (30,0)-(30,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (30,0)-(30,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]
- │ │ ├── message_loc: (30,3)-(30,8) = "[bar]"
- │ │ ├── opening_loc: (30,3)-(30,4) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (30,4)-(30,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (30,4)-(30,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (30,4)-(30,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: (30,7)-(30,8) = "]"
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (30,8)-(30,13) = "[baz]"
- │ ├── opening_loc: (30,8)-(30,9) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (30,9)-(30,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (30,9)-(30,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (30,9)-(30,12) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (30,16)-(30,19))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :qux
- │ │ ├── message_loc: (30,16)-(30,19) = "qux"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (30,12)-(30,13) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (32,0)-(32,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (32,0)-(32,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (32,0)-(32,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (32,0)-(32,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]
- │ │ ├── message_loc: (32,3)-(32,8) = "[bar]"
- │ │ ├── opening_loc: (32,3)-(32,4) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (32,4)-(32,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (32,4)-(32,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (32,4)-(32,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: (32,7)-(32,8) = "]"
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (32,8)-(32,13) = "[baz]"
- │ ├── opening_loc: (32,8)-(32,9) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (32,9)-(32,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (32,9)-(32,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (32,9)-(32,12) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (32,12)-(32,13) = "]"
- │ └── block: ∅
- ├── @ ArrayNode (location: (34,0)-(35,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (34,0)-(34,1) = "["
- │ └── closing_loc: (35,0)-(35,1) = "]"
- ├── @ CallNode (location: (37,0)-(37,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (37,0)-(37,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (37,0)-(37,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (37,3)-(37,13) = "[bar, baz]"
- │ ├── opening_loc: (37,3)-(37,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (37,4)-(37,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (37,4)-(37,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (37,4)-(37,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (37,9)-(37,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (37,9)-(37,12) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (37,12)-(37,13) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (39,0)-(39,19))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ CallNode (location: (39,0)-(39,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (39,0)-(39,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (39,3)-(39,13) = "[bar, baz]"
- │ ├── opening_loc: (39,3)-(39,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (39,4)-(39,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ CallNode (location: (39,4)-(39,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (39,4)-(39,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── @ CallNode (location: (39,9)-(39,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (39,9)-(39,12) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (39,16)-(39,19))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :qux
- │ │ ├── message_loc: (39,16)-(39,19) = "qux"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (39,12)-(39,13) = "]"
- │ └── block: ∅
- ├── @ MultiWriteNode (location: (41,0)-(41,21))
- │ ├── lefts: (length: 2)
- │ │ ├── @ IndexTargetNode (location: (41,0)-(41,6))
- │ │ │ ├── flags: attribute_write
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (41,0)-(41,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── opening_loc: (41,3)-(41,4) = "["
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (41,4)-(41,5))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (41,4)-(41,5))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 0
- │ │ │ ├── closing_loc: (41,5)-(41,6) = "]"
- │ │ │ └── block: ∅
- │ │ └── @ IndexTargetNode (location: (41,8)-(41,14))
- │ │ ├── flags: attribute_write
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (41,8)-(41,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (41,8)-(41,11) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (41,11)-(41,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (41,12)-(41,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (41,12)-(41,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 0
- │ │ ├── closing_loc: (41,13)-(41,14) = "]"
- │ │ └── block: ∅
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (41,15)-(41,16) = "="
- │ └── value:
- │ @ ArrayNode (location: (41,17)-(41,21))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (41,17)-(41,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (41,20)-(41,21))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── @ CallNode (location: (43,0)-(43,19))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (43,0)-(43,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (43,0)-(43,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (43,3)-(43,19) = "[bar[baz] = qux]"
- │ ├── opening_loc: (43,3)-(43,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (43,4)-(43,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (43,4)-(43,18))
- │ │ ├── flags: attribute_write
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (43,4)-(43,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (43,4)-(43,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]=
- │ │ ├── message_loc: (43,7)-(43,12) = "[baz]"
- │ │ ├── opening_loc: (43,7)-(43,8) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (43,8)-(43,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ CallNode (location: (43,8)-(43,11))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (43,8)-(43,11) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── @ CallNode (location: (43,15)-(43,18))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :qux
- │ │ │ ├── message_loc: (43,15)-(43,18) = "qux"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: (43,11)-(43,12) = "]"
- │ │ └── block: ∅
- │ ├── closing_loc: (43,18)-(43,19) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (45,0)-(45,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (45,0)-(45,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (45,3)-(45,8) = "[bar]"
- │ ├── opening_loc: (45,3)-(45,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (45,4)-(45,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (45,4)-(45,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (45,4)-(45,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (45,7)-(45,8) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (47,0)-(47,14))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ CallNode (location: (47,0)-(47,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (47,0)-(47,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (47,3)-(47,8) = "[bar]"
- │ ├── opening_loc: (47,3)-(47,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (47,4)-(47,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (47,4)-(47,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (47,4)-(47,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (47,11)-(47,14))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (47,11)-(47,14) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (47,7)-(47,8) = "]"
- │ └── block: ∅
- ├── @ ArrayNode (location: (49,0)-(49,6))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ KeywordHashNode (location: (49,1)-(49,5))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (49,1)-(49,5))
- │ │ ├── value:
- │ │ │ @ HashNode (location: (49,3)-(49,5))
- │ │ │ ├── opening_loc: (49,3)-(49,4) = "{"
- │ │ │ ├── elements: (length: 0)
- │ │ │ └── closing_loc: (49,4)-(49,5) = "}"
- │ │ └── operator_loc: (49,1)-(49,3) = "**"
- │ ├── opening_loc: (49,0)-(49,1) = "["
- │ └── closing_loc: (49,5)-(49,6) = "]"
- ├── @ ArrayNode (location: (51,0)-(51,6))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ KeywordHashNode (location: (51,1)-(51,5))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (51,1)-(51,5))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (51,3)-(51,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :kw
- │ │ │ ├── message_loc: (51,3)-(51,5) = "kw"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (51,1)-(51,3) = "**"
- │ ├── opening_loc: (51,0)-(51,1) = "["
- │ └── closing_loc: (51,5)-(51,6) = "]"
- ├── @ ArrayNode (location: (53,0)-(53,9))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (53,1)-(53,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ KeywordHashNode (location: (53,4)-(53,8))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (53,4)-(53,8))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (53,6)-(53,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :kw
- │ │ │ ├── message_loc: (53,6)-(53,8) = "kw"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (53,4)-(53,6) = "**"
- │ ├── opening_loc: (53,0)-(53,1) = "["
- │ └── closing_loc: (53,8)-(53,9) = "]"
- ├── @ ArrayNode (location: (55,0)-(55,21))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (55,1)-(55,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ KeywordHashNode (location: (55,4)-(55,20))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 3)
- │ │ ├── @ AssocSplatNode (location: (55,4)-(55,8))
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (55,6)-(55,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :kw
- │ │ │ │ ├── message_loc: (55,6)-(55,8) = "kw"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (55,4)-(55,6) = "**"
- │ │ ├── @ AssocSplatNode (location: (55,10)-(55,14))
- │ │ │ ├── value:
- │ │ │ │ @ HashNode (location: (55,12)-(55,14))
- │ │ │ │ ├── opening_loc: (55,12)-(55,13) = "{"
- │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ └── closing_loc: (55,13)-(55,14) = "}"
- │ │ │ └── operator_loc: (55,10)-(55,12) = "**"
- │ │ └── @ AssocSplatNode (location: (55,16)-(55,20))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (55,18)-(55,20))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :kw
- │ │ │ ├── message_loc: (55,18)-(55,20) = "kw"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (55,16)-(55,18) = "**"
- │ ├── opening_loc: (55,0)-(55,1) = "["
- │ └── closing_loc: (55,20)-(55,21) = "]"
- ├── @ ArrayNode (location: (57,0)-(59,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ KeywordHashNode (location: (58,2)-(58,12))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (58,2)-(58,12))
- │ │ ├── key:
- │ │ │ @ CallNode (location: (58,2)-(58,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (58,2)-(58,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── value:
- │ │ │ @ CallNode (location: (58,9)-(58,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (58,9)-(58,12) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (58,6)-(58,8) = "=>"
- │ ├── opening_loc: (57,0)-(57,1) = "["
- │ └── closing_loc: (59,0)-(59,1) = "]"
- ├── @ ArrayNode (location: (62,0)-(62,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ SymbolNode (location: (62,3)-(62,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (62,3)-(62,6) = "one"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "one"
- │ │ ├── @ SymbolNode (location: (62,7)-(62,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (62,7)-(62,10) = "two"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "two"
- │ │ └── @ SymbolNode (location: (62,11)-(62,16))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (62,11)-(62,16) = "three"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "three"
- │ ├── opening_loc: (62,0)-(62,3) = "%i#"
- │ └── closing_loc: (62,16)-(62,17) = "#"
- ├── @ ArrayNode (location: (64,0)-(64,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (64,3)-(64,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (64,3)-(64,6) = "one"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "one"
- │ │ ├── @ StringNode (location: (64,7)-(64,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (64,7)-(64,10) = "two"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "two"
- │ │ └── @ StringNode (location: (64,11)-(64,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (64,11)-(64,16) = "three"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "three"
- │ ├── opening_loc: (64,0)-(64,3) = "%w#"
- │ └── closing_loc: (64,16)-(64,17) = "#"
- ├── @ XStringNode (location: (66,0)-(66,17))
- │ ├── flags: ∅
- │ ├── opening_loc: (66,0)-(66,3) = "%x#"
- │ ├── content_loc: (66,3)-(66,16) = "one two three"
- │ ├── closing_loc: (66,16)-(66,17) = "#"
- │ └── unescaped: "one two three"
- ├── @ ArrayNode (location: (69,0)-(69,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ SymbolNode (location: (69,3)-(69,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (69,3)-(69,6) = "one"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "one"
- │ │ ├── @ SymbolNode (location: (69,7)-(69,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (69,7)-(69,10) = "two"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "two"
- │ │ └── @ SymbolNode (location: (69,11)-(69,16))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (69,11)-(69,16) = "three"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "three"
- │ ├── opening_loc: (69,0)-(69,3) = "%i@"
- │ └── closing_loc: (69,16)-(69,17) = "@"
- ├── @ ArrayNode (location: (71,0)-(71,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (71,3)-(71,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (71,3)-(71,6) = "one"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "one"
- │ │ ├── @ StringNode (location: (71,7)-(71,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (71,7)-(71,10) = "two"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "two"
- │ │ └── @ StringNode (location: (71,11)-(71,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (71,11)-(71,16) = "three"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "three"
- │ ├── opening_loc: (71,0)-(71,3) = "%w@"
- │ └── closing_loc: (71,16)-(71,17) = "@"
- ├── @ XStringNode (location: (73,0)-(73,17))
- │ ├── flags: ∅
- │ ├── opening_loc: (73,0)-(73,3) = "%x@"
- │ ├── content_loc: (73,3)-(73,16) = "one two three"
- │ ├── closing_loc: (73,16)-(73,17) = "@"
- │ └── unescaped: "one two three"
- ├── @ ArrayNode (location: (76,0)-(76,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ SymbolNode (location: (76,3)-(76,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (76,3)-(76,6) = "one"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "one"
- │ │ ├── @ SymbolNode (location: (76,7)-(76,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (76,7)-(76,10) = "two"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "two"
- │ │ └── @ SymbolNode (location: (76,11)-(76,16))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (76,11)-(76,16) = "three"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "three"
- │ ├── opening_loc: (76,0)-(76,3) = "%i{"
- │ └── closing_loc: (76,16)-(76,17) = "}"
- ├── @ ArrayNode (location: (78,0)-(78,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (78,3)-(78,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (78,3)-(78,6) = "one"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "one"
- │ │ ├── @ StringNode (location: (78,7)-(78,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (78,7)-(78,10) = "two"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "two"
- │ │ └── @ StringNode (location: (78,11)-(78,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (78,11)-(78,16) = "three"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "three"
- │ ├── opening_loc: (78,0)-(78,3) = "%w{"
- │ └── closing_loc: (78,16)-(78,17) = "}"
- ├── @ XStringNode (location: (80,0)-(80,17))
- │ ├── flags: ∅
- │ ├── opening_loc: (80,0)-(80,3) = "%x{"
- │ ├── content_loc: (80,3)-(80,16) = "one two three"
- │ ├── closing_loc: (80,16)-(80,17) = "}"
- │ └── unescaped: "one two three"
- ├── @ ArrayNode (location: (82,0)-(82,7))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ StringNode (location: (82,3)-(82,6))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (82,3)-(82,6) = "\\C:"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\\C:"
- │ ├── opening_loc: (82,0)-(82,3) = "%w["
- │ └── closing_loc: (82,6)-(82,7) = "]"
- ├── @ IndexOperatorWriteNode (location: (84,0)-(84,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (84,0)-(84,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (84,0)-(84,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (84,3)-(84,4) = "["
- │ ├── arguments: ∅
- │ ├── closing_loc: (84,4)-(84,5) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :+
- │ ├── binary_operator_loc: (84,6)-(84,8) = "+="
- │ └── value:
- │ @ IntegerNode (location: (84,9)-(84,10))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexOrWriteNode (location: (86,0)-(86,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (86,0)-(86,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (86,0)-(86,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (86,3)-(86,4) = "["
- │ ├── arguments: ∅
- │ ├── closing_loc: (86,4)-(86,5) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (86,6)-(86,9) = "||="
- │ └── value:
- │ @ IntegerNode (location: (86,10)-(86,11))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexAndWriteNode (location: (88,0)-(88,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (88,0)-(88,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (88,0)-(88,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (88,3)-(88,4) = "["
- │ ├── arguments: ∅
- │ ├── closing_loc: (88,4)-(88,5) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (88,6)-(88,9) = "&&="
- │ └── value:
- │ @ IntegerNode (location: (88,10)-(88,11))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexOperatorWriteNode (location: (90,0)-(90,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (90,0)-(90,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (90,0)-(90,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (90,0)-(90,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (90,3)-(90,4) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (90,4)-(90,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (90,7)-(90,8) = "["
- │ ├── arguments: ∅
- │ ├── closing_loc: (90,8)-(90,9) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :+
- │ ├── binary_operator_loc: (90,10)-(90,12) = "+="
- │ └── value:
- │ @ IntegerNode (location: (90,13)-(90,14))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexOrWriteNode (location: (92,0)-(92,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (92,0)-(92,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (92,0)-(92,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (92,0)-(92,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (92,3)-(92,4) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (92,4)-(92,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (92,7)-(92,8) = "["
- │ ├── arguments: ∅
- │ ├── closing_loc: (92,8)-(92,9) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (92,10)-(92,13) = "||="
- │ └── value:
- │ @ IntegerNode (location: (92,14)-(92,15))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexAndWriteNode (location: (94,0)-(94,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (94,0)-(94,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (94,0)-(94,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (94,0)-(94,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (94,3)-(94,4) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (94,4)-(94,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (94,7)-(94,8) = "["
- │ ├── arguments: ∅
- │ ├── closing_loc: (94,8)-(94,9) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (94,10)-(94,13) = "&&="
- │ └── value:
- │ @ IntegerNode (location: (94,14)-(94,15))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexOperatorWriteNode (location: (96,0)-(96,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (96,0)-(96,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (96,0)-(96,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (96,3)-(96,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (96,4)-(96,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (96,4)-(96,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (96,4)-(96,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (96,7)-(96,8) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :+
- │ ├── binary_operator_loc: (96,9)-(96,11) = "+="
- │ └── value:
- │ @ IntegerNode (location: (96,12)-(96,13))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexOrWriteNode (location: (98,0)-(98,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (98,0)-(98,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (98,0)-(98,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (98,3)-(98,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (98,4)-(98,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (98,4)-(98,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (98,4)-(98,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (98,7)-(98,8) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (98,9)-(98,12) = "||="
- │ └── value:
- │ @ IntegerNode (location: (98,13)-(98,14))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexAndWriteNode (location: (100,0)-(100,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (100,0)-(100,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (100,0)-(100,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (100,3)-(100,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (100,4)-(100,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (100,4)-(100,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (100,4)-(100,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (100,7)-(100,8) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (100,9)-(100,12) = "&&="
- │ └── value:
- │ @ IntegerNode (location: (100,13)-(100,14))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexOperatorWriteNode (location: (102,0)-(102,17))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (102,0)-(102,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (102,0)-(102,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (102,0)-(102,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (102,3)-(102,4) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (102,4)-(102,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (102,7)-(102,8) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (102,8)-(102,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (102,8)-(102,11))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (102,8)-(102,11) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (102,11)-(102,12) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :+
- │ ├── binary_operator_loc: (102,13)-(102,15) = "+="
- │ └── value:
- │ @ IntegerNode (location: (102,16)-(102,17))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexOrWriteNode (location: (104,0)-(104,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (104,0)-(104,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (104,0)-(104,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (104,0)-(104,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (104,3)-(104,4) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (104,4)-(104,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (104,7)-(104,8) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (104,8)-(104,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (104,8)-(104,11))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (104,8)-(104,11) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (104,11)-(104,12) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (104,13)-(104,16) = "||="
- │ └── value:
- │ @ IntegerNode (location: (104,17)-(104,18))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IndexAndWriteNode (location: (106,0)-(106,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (106,0)-(106,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (106,0)-(106,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (106,0)-(106,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (106,3)-(106,4) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (106,4)-(106,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (106,7)-(106,8) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (106,8)-(106,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (106,8)-(106,11))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (106,8)-(106,11) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (106,11)-(106,12) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (106,13)-(106,16) = "&&="
- │ └── value:
- │ @ IntegerNode (location: (106,17)-(106,18))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ DefNode (location: (108,0)-(108,19))
- │ ├── name: :f
- │ ├── name_loc: (108,4)-(108,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (108,6)-(108,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (108,6)-(108,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (108,6)-(108,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (108,10)-(108,14))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (108,10)-(108,14))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (108,10)-(108,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (108,10)-(108,11) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]
- │ │ ├── message_loc: (108,11)-(108,14) = "[*]"
- │ │ ├── opening_loc: (108,11)-(108,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (108,12)-(108,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ SplatNode (location: (108,12)-(108,13))
- │ │ │ ├── operator_loc: (108,12)-(108,13) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── closing_loc: (108,13)-(108,14) = "]"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (108,0)-(108,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (108,5)-(108,6) = "("
- │ ├── rparen_loc: (108,7)-(108,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (108,16)-(108,19) = "end"
- ├── @ DefNode (location: (110,0)-(110,22))
- │ ├── name: :f
- │ ├── name_loc: (110,4)-(110,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (110,6)-(110,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (110,6)-(110,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (110,6)-(110,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (110,10)-(110,17))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (110,10)-(110,17))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (110,10)-(110,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (110,10)-(110,11) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]
- │ │ ├── message_loc: (110,11)-(110,17) = "[1, *]"
- │ │ ├── opening_loc: (110,11)-(110,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (110,12)-(110,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (110,12)-(110,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ SplatNode (location: (110,15)-(110,16))
- │ │ │ ├── operator_loc: (110,15)-(110,16) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── closing_loc: (110,16)-(110,17) = "]"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (110,0)-(110,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (110,5)-(110,6) = "("
- │ ├── rparen_loc: (110,7)-(110,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (110,19)-(110,22) = "end"
- ├── @ DefNode (location: (112,0)-(112,23))
- │ ├── name: :f
- │ ├── name_loc: (112,4)-(112,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (112,6)-(112,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (112,6)-(112,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (112,6)-(112,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (112,10)-(112,18))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (112,10)-(112,18))
- │ │ ├── flags: attribute_write
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (112,10)-(112,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (112,10)-(112,11) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]=
- │ │ ├── message_loc: (112,11)-(112,14) = "[*]"
- │ │ ├── opening_loc: (112,11)-(112,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (112,12)-(112,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ SplatNode (location: (112,12)-(112,13))
- │ │ │ │ ├── operator_loc: (112,12)-(112,13) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ └── @ IntegerNode (location: (112,17)-(112,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: (112,13)-(112,14) = "]"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (112,0)-(112,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (112,5)-(112,6) = "("
- │ ├── rparen_loc: (112,7)-(112,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (112,20)-(112,23) = "end"
- ├── @ DefNode (location: (114,0)-(114,26))
- │ ├── name: :f
- │ ├── name_loc: (114,4)-(114,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (114,6)-(114,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (114,6)-(114,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (114,6)-(114,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (114,10)-(114,21))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (114,10)-(114,21))
- │ │ ├── flags: attribute_write
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (114,10)-(114,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (114,10)-(114,11) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]=
- │ │ ├── message_loc: (114,11)-(114,17) = "[1, *]"
- │ │ ├── opening_loc: (114,11)-(114,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (114,12)-(114,21))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (114,12)-(114,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ SplatNode (location: (114,15)-(114,16))
- │ │ │ │ ├── operator_loc: (114,15)-(114,16) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ └── @ IntegerNode (location: (114,20)-(114,21))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: (114,16)-(114,17) = "]"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (114,0)-(114,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (114,5)-(114,6) = "("
- │ ├── rparen_loc: (114,7)-(114,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (114,23)-(114,26) = "end"
- ├── @ DefNode (location: (116,0)-(116,24))
- │ ├── name: :f
- │ ├── name_loc: (116,4)-(116,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (116,6)-(116,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (116,6)-(116,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (116,6)-(116,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (116,10)-(116,19))
- │ │ └── body: (length: 1)
- │ │ └── @ IndexOperatorWriteNode (location: (116,10)-(116,19))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (116,10)-(116,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (116,10)-(116,11) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── opening_loc: (116,11)-(116,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (116,12)-(116,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ SplatNode (location: (116,12)-(116,13))
- │ │ │ ├── operator_loc: (116,12)-(116,13) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── closing_loc: (116,13)-(116,14) = "]"
- │ │ ├── block: ∅
- │ │ ├── binary_operator: :+
- │ │ ├── binary_operator_loc: (116,15)-(116,17) = "+="
- │ │ └── value:
- │ │ @ IntegerNode (location: (116,18)-(116,19))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── locals: []
- │ ├── def_keyword_loc: (116,0)-(116,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (116,5)-(116,6) = "("
- │ ├── rparen_loc: (116,7)-(116,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (116,21)-(116,24) = "end"
- ├── @ DefNode (location: (118,0)-(118,28))
- │ ├── name: :f
- │ ├── name_loc: (118,4)-(118,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (118,6)-(118,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (118,6)-(118,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (118,6)-(118,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (118,10)-(118,23))
- │ │ └── body: (length: 1)
- │ │ └── @ IndexAndWriteNode (location: (118,10)-(118,23))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (118,10)-(118,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (118,10)-(118,11) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── opening_loc: (118,11)-(118,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (118,12)-(118,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (118,12)-(118,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ SplatNode (location: (118,15)-(118,16))
- │ │ │ ├── operator_loc: (118,15)-(118,16) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── closing_loc: (118,16)-(118,17) = "]"
- │ │ ├── block: ∅
- │ │ ├── operator_loc: (118,18)-(118,21) = "&&="
- │ │ └── value:
- │ │ @ IntegerNode (location: (118,22)-(118,23))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── locals: []
- │ ├── def_keyword_loc: (118,0)-(118,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (118,5)-(118,6) = "("
- │ ├── rparen_loc: (118,7)-(118,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (118,25)-(118,28) = "end"
- ├── @ DefNode (location: (120,0)-(120,29))
- │ ├── name: :f
- │ ├── name_loc: (120,4)-(120,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (120,6)-(120,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (120,6)-(120,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (120,6)-(120,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (120,0)-(120,29))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (120,10)-(120,24))
- │ │ │ ├── keyword_loc: (120,10)-(120,16) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: (120,17)-(120,19) = "=>"
- │ │ │ ├── reference:
- │ │ │ │ @ IndexTargetNode (location: (120,20)-(120,24))
- │ │ │ │ ├── flags: attribute_write
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ CallNode (location: (120,20)-(120,21))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :a
- │ │ │ │ │ ├── message_loc: (120,20)-(120,21) = "a"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── opening_loc: (120,21)-(120,22) = "["
- │ │ │ │ ├── arguments:
- │ │ │ │ │ @ ArgumentsNode (location: (120,22)-(120,23))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ └── @ SplatNode (location: (120,22)-(120,23))
- │ │ │ │ │ ├── operator_loc: (120,22)-(120,23) = "*"
- │ │ │ │ │ └── expression: ∅
- │ │ │ │ ├── closing_loc: (120,23)-(120,24) = "]"
- │ │ │ │ └── block: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (120,26)-(120,29) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (120,0)-(120,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (120,5)-(120,6) = "("
- │ ├── rparen_loc: (120,7)-(120,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (120,26)-(120,29) = "end"
- └── @ DefNode (location: (122,0)-(122,32))
- ├── name: :f
- ├── name_loc: (122,4)-(122,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (122,6)-(122,7))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest:
- │ │ @ RestParameterNode (location: (122,6)-(122,7))
- │ │ ├── flags: ∅
- │ │ ├── name: ∅
- │ │ ├── name_loc: ∅
- │ │ └── operator_loc: (122,6)-(122,7) = "*"
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ BeginNode (location: (122,0)-(122,32))
- │ ├── begin_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (122,10)-(122,27))
- │ │ ├── keyword_loc: (122,10)-(122,16) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: (122,17)-(122,19) = "=>"
- │ │ ├── reference:
- │ │ │ @ IndexTargetNode (location: (122,20)-(122,27))
- │ │ │ ├── flags: attribute_write
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (122,20)-(122,21))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (122,20)-(122,21) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── opening_loc: (122,21)-(122,22) = "["
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (122,22)-(122,26))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 2)
- │ │ │ │ ├── @ IntegerNode (location: (122,22)-(122,23))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── @ SplatNode (location: (122,25)-(122,26))
- │ │ │ │ ├── operator_loc: (122,25)-(122,26) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── closing_loc: (122,26)-(122,27) = "]"
- │ │ │ └── block: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (122,29)-(122,32) = "end"
- ├── locals: []
- ├── def_keyword_loc: (122,0)-(122,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (122,5)-(122,6) = "("
- ├── rparen_loc: (122,7)-(122,8) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (122,29)-(122,32) = "end"
diff --git a/test/prism/snapshots/begin_ensure.txt b/test/prism/snapshots/begin_ensure.txt
deleted file mode 100644
index 9af9b9e573..0000000000
--- a/test/prism/snapshots/begin_ensure.txt
+++ /dev/null
@@ -1,251 +0,0 @@
-@ ProgramNode (location: (1,0)-(21,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(21,15))
- └── body: (length: 5)
- ├── @ BeginNode (location: (1,0)-(5,3))
- │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,0)-(2,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,0)-(2,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (2,0)-(2,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (3,0)-(5,3))
- │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (4,0)-(4,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (4,0)-(4,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (4,0)-(4,1) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ BeginNode (location: (7,0)-(7,24))
- │ ├── begin_keyword_loc: (7,0)-(7,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (7,7)-(7,8))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (7,7)-(7,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (7,7)-(7,8) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (7,10)-(7,24))
- │ │ ├── ensure_keyword_loc: (7,10)-(7,16) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (7,18)-(7,19))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (7,18)-(7,19))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (7,18)-(7,19) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (7,21)-(7,24) = "end"
- │ └── end_keyword_loc: (7,21)-(7,24) = "end"
- ├── @ BeginNode (location: (9,0)-(11,4))
- │ ├── begin_keyword_loc: (9,0)-(9,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (9,6)-(9,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (9,6)-(9,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (9,6)-(9,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (10,1)-(11,4))
- │ │ ├── ensure_keyword_loc: (10,1)-(10,7) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (10,8)-(10,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (10,8)-(10,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (10,8)-(10,9) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (11,1)-(11,4) = "end"
- │ └── end_keyword_loc: (11,1)-(11,4) = "end"
- ├── @ BeginNode (location: (13,0)-(13,22))
- │ ├── begin_keyword_loc: (13,0)-(13,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (13,6)-(13,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (13,6)-(13,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (13,6)-(13,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (13,9)-(13,22))
- │ │ ├── ensure_keyword_loc: (13,9)-(13,15) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (13,16)-(13,17))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (13,16)-(13,17))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (13,16)-(13,17) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (13,19)-(13,22) = "end"
- │ └── end_keyword_loc: (13,19)-(13,22) = "end"
- └── @ BeginNode (location: (15,0)-(21,15))
- ├── begin_keyword_loc: (15,0)-(15,5) = "begin"
- ├── statements:
- │ @ StatementsNode (location: (15,6)-(21,11))
- │ └── body: (length: 1)
- │ └── @ BeginNode (location: (15,6)-(21,11))
- │ ├── begin_keyword_loc: (15,6)-(15,11) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (15,11)-(21,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (15,11)-(21,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ SymbolNode (location: (15,11)-(15,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (15,11)-(15,12) = ":"
- │ │ │ ├── value_loc: (15,12)-(15,13) = "s"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "s"
- │ │ ├── call_operator_loc: (15,13)-(15,14) = "."
- │ │ ├── name: :l
- │ │ ├── message_loc: (15,14)-(15,15) = "l"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (15,16)-(21,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ BeginNode (location: (15,16)-(21,7))
- │ │ │ ├── begin_keyword_loc: (15,16)-(15,21) = "begin"
- │ │ │ ├── statements: ∅
- │ │ │ ├── rescue_clause: ∅
- │ │ │ ├── else_clause: ∅
- │ │ │ ├── ensure_clause:
- │ │ │ │ @ EnsureNode (location: (15,22)-(21,7))
- │ │ │ │ ├── ensure_keyword_loc: (15,22)-(15,28) = "ensure"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (15,29)-(21,3))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (15,29)-(21,3))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── receiver:
- │ │ │ │ │ │ @ ConstantReadNode (location: (15,29)-(15,35))
- │ │ │ │ │ │ └── name: :Module
- │ │ │ │ │ ├── call_operator_loc: (15,35)-(15,36) = "."
- │ │ │ │ │ ├── name: :new
- │ │ │ │ │ ├── message_loc: (15,36)-(15,39) = "new"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block:
- │ │ │ │ │ @ BlockNode (location: (15,40)-(21,3))
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body:
- │ │ │ │ │ │ @ StatementsNode (location: (16,2)-(20,5))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ BeginNode (location: (16,2)-(20,5))
- │ │ │ │ │ │ ├── begin_keyword_loc: (16,2)-(16,7) = "begin"
- │ │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ │ @ StatementsNode (location: (17,4)-(17,9))
- │ │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ │ └── @ BreakNode (location: (17,4)-(17,9))
- │ │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ │ └── keyword_loc: (17,4)-(17,9) = "break"
- │ │ │ │ │ │ ├── rescue_clause: ∅
- │ │ │ │ │ │ ├── else_clause: ∅
- │ │ │ │ │ │ ├── ensure_clause:
- │ │ │ │ │ │ │ @ EnsureNode (location: (18,4)-(20,5))
- │ │ │ │ │ │ │ ├── ensure_keyword_loc: (18,4)-(18,10) = "ensure"
- │ │ │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ │ │ @ StatementsNode (location: (18,11)-(19,7))
- │ │ │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ │ │ └── @ CallNode (location: (18,11)-(19,7))
- │ │ │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ │ │ ├── receiver:
- │ │ │ │ │ │ │ │ │ @ ConstantReadNode (location: (18,11)-(18,17))
- │ │ │ │ │ │ │ │ │ └── name: :Module
- │ │ │ │ │ │ │ │ ├── call_operator_loc: (18,17)-(18,18) = "."
- │ │ │ │ │ │ │ │ ├── name: :new
- │ │ │ │ │ │ │ │ ├── message_loc: (18,18)-(18,21) = "new"
- │ │ │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ │ │ └── block:
- │ │ │ │ │ │ │ │ @ BlockNode (location: (18,22)-(19,7))
- │ │ │ │ │ │ │ │ ├── locals: []
- │ │ │ │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ │ │ │ ├── opening_loc: (18,22)-(18,24) = "do"
- │ │ │ │ │ │ │ │ └── closing_loc: (19,4)-(19,7) = "end"
- │ │ │ │ │ │ │ └── end_keyword_loc: (20,2)-(20,5) = "end"
- │ │ │ │ │ │ └── end_keyword_loc: (20,2)-(20,5) = "end"
- │ │ │ │ │ ├── opening_loc: (15,40)-(15,42) = "do"
- │ │ │ │ │ └── closing_loc: (21,0)-(21,3) = "end"
- │ │ │ │ └── end_keyword_loc: (21,4)-(21,7) = "end"
- │ │ │ └── end_keyword_loc: (21,4)-(21,7) = "end"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (21,8)-(21,11) = "end"
- ├── rescue_clause: ∅
- ├── else_clause: ∅
- ├── ensure_clause: ∅
- └── end_keyword_loc: (21,12)-(21,15) = "end"
diff --git a/test/prism/snapshots/begin_rescue.txt b/test/prism/snapshots/begin_rescue.txt
deleted file mode 100644
index f624f85c07..0000000000
--- a/test/prism/snapshots/begin_rescue.txt
+++ /dev/null
@@ -1,699 +0,0 @@
-@ ProgramNode (location: (1,0)-(78,3))
-├── locals: [:ex]
-└── statements:
- @ StatementsNode (location: (1,0)-(78,3))
- └── body: (length: 17)
- ├── @ BeginNode (location: (1,0)-(1,33))
- │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,7)-(1,8))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,7)-(1,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,7)-(1,8) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (1,10)-(1,19))
- │ │ ├── keyword_loc: (1,10)-(1,16) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,18)-(1,19))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,18)-(1,19))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,18)-(1,19) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (1,21)-(1,33))
- │ │ ├── else_keyword_loc: (1,21)-(1,25) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,27)-(1,28))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,27)-(1,28))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (1,27)-(1,28) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (1,30)-(1,33) = "end"
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (1,30)-(1,33) = "end"
- ├── @ BeginNode (location: (3,0)-(3,44))
- │ ├── begin_keyword_loc: (3,0)-(3,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,7)-(3,8))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (3,7)-(3,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (3,7)-(3,8) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (3,10)-(3,19))
- │ │ ├── keyword_loc: (3,10)-(3,16) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,18)-(3,19))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,18)-(3,19))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (3,18)-(3,19) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (3,21)-(3,36))
- │ │ ├── else_keyword_loc: (3,21)-(3,25) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,27)-(3,28))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,27)-(3,28))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (3,27)-(3,28) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (3,30)-(3,36) = "ensure"
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (3,30)-(3,44))
- │ │ ├── ensure_keyword_loc: (3,30)-(3,36) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,38)-(3,39))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,38)-(3,39))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (3,38)-(3,39) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (3,41)-(3,44) = "end"
- │ └── end_keyword_loc: (3,41)-(3,44) = "end"
- ├── @ BeginNode (location: (5,0)-(7,3))
- │ ├── begin_keyword_loc: (5,0)-(5,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (6,0)-(6,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (6,0)-(6,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (6,0)-(6,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (7,0)-(7,3) = "end"
- ├── @ BeginNode (location: (9,0)-(9,13))
- │ ├── begin_keyword_loc: (9,0)-(9,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (9,7)-(9,8))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (9,7)-(9,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (9,7)-(9,8) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (9,10)-(9,13) = "end"
- ├── @ BeginNode (location: (11,0)-(12,4))
- │ ├── begin_keyword_loc: (11,0)-(11,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (11,6)-(11,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (11,6)-(11,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (11,6)-(11,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (12,1)-(12,4) = "end"
- ├── @ BeginNode (location: (14,0)-(14,12))
- │ ├── begin_keyword_loc: (14,0)-(14,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (14,6)-(14,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (14,6)-(14,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (14,6)-(14,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (14,9)-(14,12) = "end"
- ├── @ BeginNode (location: (16,0)-(24,3))
- │ ├── begin_keyword_loc: (16,0)-(16,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (17,0)-(17,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (17,0)-(17,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (17,0)-(17,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (18,0)-(23,1))
- │ │ ├── keyword_loc: (18,0)-(18,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (19,0)-(19,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (19,0)-(19,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (19,0)-(19,1) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent:
- │ │ @ RescueNode (location: (20,0)-(23,1))
- │ │ ├── keyword_loc: (20,0)-(20,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (21,0)-(21,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (21,0)-(21,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (21,0)-(21,1) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent:
- │ │ @ RescueNode (location: (22,0)-(23,1))
- │ │ ├── keyword_loc: (22,0)-(22,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (23,0)-(23,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (23,0)-(23,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (23,0)-(23,1) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (24,0)-(24,3) = "end"
- ├── @ BeginNode (location: (26,0)-(32,3))
- │ ├── begin_keyword_loc: (26,0)-(26,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (27,2)-(27,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (27,2)-(27,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (27,2)-(27,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (28,0)-(31,3))
- │ │ ├── keyword_loc: (28,0)-(28,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (28,7)-(28,16))
- │ │ │ └── name: :Exception
- │ │ ├── operator_loc: (28,17)-(28,19) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (28,20)-(28,22))
- │ │ │ ├── name: :ex
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (29,2)-(29,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (29,2)-(29,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (29,2)-(29,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent:
- │ │ @ RescueNode (location: (30,0)-(31,3))
- │ │ ├── keyword_loc: (30,0)-(30,6) = "rescue"
- │ │ ├── exceptions: (length: 2)
- │ │ │ ├── @ ConstantReadNode (location: (30,7)-(30,23))
- │ │ │ │ └── name: :AnotherException
- │ │ │ └── @ ConstantReadNode (location: (30,25)-(30,41))
- │ │ │ └── name: :OneMoreException
- │ │ ├── operator_loc: (30,42)-(30,44) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (30,45)-(30,47))
- │ │ │ ├── name: :ex
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (31,2)-(31,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (31,2)-(31,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (31,2)-(31,3) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (32,0)-(32,3) = "end"
- ├── @ BeginNode (location: (34,0)-(40,3))
- │ ├── begin_keyword_loc: (34,0)-(34,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (35,2)-(35,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (35,2)-(35,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (35,2)-(35,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (36,0)-(37,3))
- │ │ ├── keyword_loc: (36,0)-(36,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (36,7)-(36,16))
- │ │ │ └── name: :Exception
- │ │ ├── operator_loc: (36,17)-(36,19) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (36,20)-(36,22))
- │ │ │ ├── name: :ex
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (37,2)-(37,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (37,2)-(37,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (38,0)-(40,3))
- │ │ ├── ensure_keyword_loc: (38,0)-(38,6) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (39,2)-(39,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (39,2)-(39,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (39,2)-(39,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (40,0)-(40,3) = "end"
- │ └── end_keyword_loc: (40,0)-(40,3) = "end"
- ├── @ StringNode (location: (42,0)-(42,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (42,0)-(42,2) = "%!"
- │ ├── content_loc: (42,2)-(42,5) = "abc"
- │ ├── closing_loc: (42,5)-(42,6) = "!"
- │ └── unescaped: "abc"
- ├── @ BeginNode (location: (44,0)-(48,3))
- │ ├── begin_keyword_loc: (44,0)-(44,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (45,0)-(45,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (45,0)-(45,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (45,0)-(45,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (46,0)-(47,1))
- │ │ ├── keyword_loc: (46,0)-(46,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (47,0)-(47,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (47,0)-(47,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (47,0)-(47,1) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (48,0)-(48,3) = "end"
- ├── @ BeginNode (location: (50,0)-(50,20))
- │ ├── begin_keyword_loc: (50,0)-(50,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (50,6)-(50,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (50,6)-(50,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (50,6)-(50,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (50,8)-(50,16))
- │ │ ├── keyword_loc: (50,8)-(50,14) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (50,15)-(50,16))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (50,15)-(50,16))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (50,15)-(50,16) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (50,17)-(50,20) = "end"
- ├── @ BeginNode (location: (52,0)-(54,5))
- │ ├── begin_keyword_loc: (52,0)-(52,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (53,0)-(53,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (53,0)-(53,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (53,0)-(53,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (53,2)-(54,1))
- │ │ ├── keyword_loc: (53,2)-(53,8) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (54,0)-(54,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (54,0)-(54,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (54,0)-(54,1) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (54,2)-(54,5) = "end"
- ├── @ BeginNode (location: (56,0)-(60,3))
- │ ├── begin_keyword_loc: (56,0)-(56,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (57,0)-(57,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (57,0)-(57,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (57,0)-(57,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (58,0)-(59,1))
- │ │ ├── keyword_loc: (58,0)-(58,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (58,7)-(58,16))
- │ │ │ └── name: :Exception
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (59,0)-(59,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (59,0)-(59,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (59,0)-(59,1) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (60,0)-(60,3) = "end"
- ├── @ BeginNode (location: (62,0)-(66,3))
- │ ├── begin_keyword_loc: (62,0)-(62,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (63,0)-(63,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (63,0)-(63,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (63,0)-(63,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (64,0)-(65,1))
- │ │ ├── keyword_loc: (64,0)-(64,6) = "rescue"
- │ │ ├── exceptions: (length: 2)
- │ │ │ ├── @ ConstantReadNode (location: (64,7)-(64,16))
- │ │ │ │ └── name: :Exception
- │ │ │ └── @ ConstantReadNode (location: (64,18)-(64,33))
- │ │ │ └── name: :CustomException
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (65,0)-(65,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (65,0)-(65,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (65,0)-(65,1) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (66,0)-(66,3) = "end"
- ├── @ BeginNode (location: (68,0)-(72,3))
- │ ├── begin_keyword_loc: (68,0)-(68,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (69,2)-(69,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (69,2)-(69,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (69,2)-(69,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (70,0)-(71,3))
- │ │ ├── keyword_loc: (70,0)-(70,6) = "rescue"
- │ │ ├── exceptions: (length: 2)
- │ │ │ ├── @ ConstantReadNode (location: (70,7)-(70,16))
- │ │ │ │ └── name: :Exception
- │ │ │ └── @ ConstantReadNode (location: (70,18)-(70,33))
- │ │ │ └── name: :CustomException
- │ │ ├── operator_loc: (70,34)-(70,36) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (70,37)-(70,39))
- │ │ │ ├── name: :ex
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (71,2)-(71,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (71,2)-(71,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (71,2)-(71,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (72,0)-(72,3) = "end"
- └── @ BeginNode (location: (74,0)-(78,3))
- ├── begin_keyword_loc: (74,0)-(74,5) = "begin"
- ├── statements:
- │ @ StatementsNode (location: (75,2)-(75,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (75,2)-(75,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (75,2)-(75,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── rescue_clause:
- │ @ RescueNode (location: (76,0)-(77,3))
- │ ├── keyword_loc: (76,0)-(76,6) = "rescue"
- │ ├── exceptions: (length: 1)
- │ │ └── @ ConstantReadNode (location: (76,7)-(76,16))
- │ │ └── name: :Exception
- │ ├── operator_loc: (76,17)-(76,19) = "=>"
- │ ├── reference:
- │ │ @ LocalVariableTargetNode (location: (76,20)-(76,22))
- │ │ ├── name: :ex
- │ │ └── depth: 0
- │ ├── statements:
- │ │ @ StatementsNode (location: (77,2)-(77,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (77,2)-(77,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (77,2)-(77,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── consequent: ∅
- ├── else_clause: ∅
- ├── ensure_clause: ∅
- └── end_keyword_loc: (78,0)-(78,3) = "end"
diff --git a/test/prism/snapshots/blocks.txt b/test/prism/snapshots/blocks.txt
deleted file mode 100644
index 1c996ebd09..0000000000
--- a/test/prism/snapshots/blocks.txt
+++ /dev/null
@@ -1,774 +0,0 @@
-@ ProgramNode (location: (1,0)-(54,17))
-├── locals: [:fork]
-└── statements:
- @ StatementsNode (location: (1,0)-(54,17))
- └── body: (length: 20)
- ├── @ CallNode (location: (1,0)-(1,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (1,3)-(1,8) = "[bar]"
- │ ├── opening_loc: (1,3)-(1,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (1,4)-(1,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (1,7)-(1,8) = "]"
- │ └── block:
- │ @ BlockNode (location: (1,9)-(1,16))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,11)-(1,14))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,11)-(1,14))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (1,11)-(1,14) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (1,9)-(1,10) = "{"
- │ └── closing_loc: (1,15)-(1,16) = "}"
- ├── @ CallNode (location: (3,0)-(5,3))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (3,0)-(3,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (3,0)-(3,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (3,3)-(3,8) = "[bar]"
- │ ├── opening_loc: (3,3)-(3,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,4)-(3,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (3,4)-(3,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (3,4)-(3,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (3,7)-(3,8) = "]"
- │ └── block:
- │ @ BlockNode (location: (3,9)-(5,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (4,0)-(4,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (4,0)-(4,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (4,0)-(4,3) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (3,9)-(3,11) = "do"
- │ └── closing_loc: (5,0)-(5,3) = "end"
- ├── @ CallNode (location: (7,0)-(7,35))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (7,0)-(7,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :x
- │ │ ├── message_loc: (7,0)-(7,1) = "x"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (7,1)-(7,2) = "."
- │ ├── name: :reduce
- │ ├── message_loc: (7,2)-(7,8) = "reduce"
- │ ├── opening_loc: (7,8)-(7,9) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,9)-(7,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (7,9)-(7,10))
- │ │ ├── flags: decimal
- │ │ └── value: 0
- │ ├── closing_loc: (7,10)-(7,11) = ")"
- │ └── block:
- │ @ BlockNode (location: (7,12)-(7,35))
- │ ├── locals: [:x, :memo]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (7,14)-(7,23))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (7,15)-(7,22))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (7,15)-(7,16))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :x
- │ │ │ │ └── @ RequiredParameterNode (location: (7,18)-(7,22))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :memo
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (7,14)-(7,15) = "|"
- │ │ └── closing_loc: (7,22)-(7,23) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (7,24)-(7,33))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableOperatorWriteNode (location: (7,24)-(7,33))
- │ │ ├── name_loc: (7,24)-(7,28) = "memo"
- │ │ ├── binary_operator_loc: (7,29)-(7,31) = "+="
- │ │ ├── value:
- │ │ │ @ LocalVariableReadNode (location: (7,32)-(7,33))
- │ │ │ ├── name: :x
- │ │ │ └── depth: 0
- │ │ ├── name: :memo
- │ │ ├── binary_operator: :+
- │ │ └── depth: 0
- │ ├── opening_loc: (7,12)-(7,13) = "{"
- │ └── closing_loc: (7,34)-(7,35) = "}"
- ├── @ CallNode (location: (9,0)-(9,10))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (9,0)-(9,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (9,4)-(9,10))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (9,4)-(9,6) = "do"
- │ └── closing_loc: (9,7)-(9,10) = "end"
- ├── @ CallNode (location: (11,0)-(11,21))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (11,0)-(11,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,4)-(11,21))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (11,4)-(11,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (11,4)-(11,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ ParenthesesNode (location: (11,9)-(11,21))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (11,10)-(11,20))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (11,10)-(11,20))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (11,10)-(11,13) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (11,14)-(11,20))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (11,14)-(11,16) = "do"
- │ │ │ └── closing_loc: (11,17)-(11,20) = "end"
- │ │ ├── opening_loc: (11,9)-(11,10) = "("
- │ │ └── closing_loc: (11,20)-(11,21) = ")"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (13,0)-(13,14))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (13,0)-(13,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (13,4)-(13,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (13,4)-(13,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (13,4)-(13,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (13,8)-(13,14))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (13,8)-(13,10) = "do"
- │ └── closing_loc: (13,11)-(13,14) = "end"
- ├── @ CallNode (location: (15,0)-(15,18))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (15,0)-(15,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (15,4)-(15,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (15,4)-(15,11))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (15,4)-(15,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (15,8)-(15,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (15,8)-(15,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (15,8)-(15,11) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (15,12)-(15,18))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (15,12)-(15,14) = "do"
- │ └── closing_loc: (15,15)-(15,18) = "end"
- ├── @ CallNode (location: (17,0)-(18,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (17,0)-(17,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (17,4)-(18,3))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (17,7)-(17,17))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (17,8)-(17,16))
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── optionals: (length: 1)
- │ │ │ │ └── @ OptionalParameterNode (location: (17,8)-(17,16))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── name_loc: (17,8)-(17,9) = "a"
- │ │ │ │ ├── operator_loc: (17,10)-(17,11) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ CallNode (location: (17,12)-(17,16))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ CallNode (location: (17,12)-(17,13))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ ├── message_loc: (17,12)-(17,13) = "b"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :[]
- │ │ │ │ ├── message_loc: (17,13)-(17,16) = "[1]"
- │ │ │ │ ├── opening_loc: (17,13)-(17,14) = "["
- │ │ │ │ ├── arguments:
- │ │ │ │ │ @ ArgumentsNode (location: (17,14)-(17,15))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (17,14)-(17,15))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── closing_loc: (17,15)-(17,16) = "]"
- │ │ │ │ └── block: ∅
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (17,7)-(17,8) = "|"
- │ │ └── closing_loc: (17,16)-(17,17) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (17,4)-(17,6) = "do"
- │ └── closing_loc: (18,0)-(18,3) = "end"
- ├── @ CallNode (location: (20,0)-(22,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (20,0)-(20,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (20,4)-(22,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (20,4)-(22,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (21,0)-(21,6))
- │ │ │ ├── keyword_loc: (21,0)-(21,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (22,0)-(22,3) = "end"
- │ ├── opening_loc: (20,4)-(20,6) = "do"
- │ └── closing_loc: (22,0)-(22,3) = "end"
- ├── @ CallNode (location: (24,0)-(29,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (24,0)-(24,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (24,4)-(29,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (25,2)-(28,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (25,2)-(28,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (25,2)-(25,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (25,6)-(28,5))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (26,4)-(27,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (26,4)-(27,7))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (26,4)-(26,7) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (26,8)-(27,7))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (26,8)-(26,10) = "do"
- │ │ │ └── closing_loc: (27,4)-(27,7) = "end"
- │ │ ├── opening_loc: (25,6)-(25,8) = "do"
- │ │ └── closing_loc: (28,2)-(28,5) = "end"
- │ ├── opening_loc: (24,4)-(24,6) = "do"
- │ └── closing_loc: (29,0)-(29,3) = "end"
- ├── @ CallNode (location: (31,0)-(31,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (31,0)-(31,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (31,0)-(31,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (31,3)-(31,8) = "[bar]"
- │ ├── opening_loc: (31,3)-(31,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (31,4)-(31,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (31,4)-(31,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (31,4)-(31,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (31,7)-(31,8) = "]"
- │ └── block:
- │ @ BlockNode (location: (31,9)-(31,16))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (31,11)-(31,14))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (31,11)-(31,14))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (31,11)-(31,14) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (31,9)-(31,10) = "{"
- │ └── closing_loc: (31,15)-(31,16) = "}"
- ├── @ CallNode (location: (33,0)-(33,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (33,0)-(33,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (33,4)-(33,24))
- │ ├── locals: [:x, :y, :z]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (33,6)-(33,20))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (33,7)-(33,19))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (33,7)-(33,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :x
- │ │ │ ├── optionals: (length: 1)
- │ │ │ │ └── @ OptionalParameterNode (location: (33,10)-(33,15))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :y
- │ │ │ │ ├── name_loc: (33,10)-(33,11) = "y"
- │ │ │ │ ├── operator_loc: (33,12)-(33,13) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (33,14)-(33,15))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 1)
- │ │ │ │ └── @ RequiredKeywordParameterNode (location: (33,17)-(33,19))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :z
- │ │ │ │ └── name_loc: (33,17)-(33,19) = "z:"
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (33,6)-(33,7) = "|"
- │ │ └── closing_loc: (33,19)-(33,20) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (33,21)-(33,22))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (33,21)-(33,22))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── opening_loc: (33,4)-(33,5) = "{"
- │ └── closing_loc: (33,23)-(33,24) = "}"
- ├── @ CallNode (location: (35,0)-(35,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (35,0)-(35,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (35,4)-(35,11))
- │ ├── locals: [:x]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (35,6)-(35,9))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (35,7)-(35,8))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (35,7)-(35,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :x
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (35,6)-(35,7) = "|"
- │ │ └── closing_loc: (35,8)-(35,9) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (35,4)-(35,5) = "{"
- │ └── closing_loc: (35,10)-(35,11) = "}"
- ├── @ LocalVariableWriteNode (location: (37,0)-(37,8))
- │ ├── name: :fork
- │ ├── depth: 0
- │ ├── name_loc: (37,0)-(37,4) = "fork"
- │ ├── value:
- │ │ @ IntegerNode (location: (37,7)-(37,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (37,5)-(37,6) = "="
- ├── @ CallNode (location: (38,0)-(39,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :fork
- │ ├── message_loc: (38,0)-(38,4) = "fork"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (38,5)-(39,3))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (38,8)-(38,11))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (38,9)-(38,10))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (38,9)-(38,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (38,8)-(38,9) = "|"
- │ │ └── closing_loc: (38,10)-(38,11) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (38,5)-(38,7) = "do"
- │ └── closing_loc: (39,0)-(39,3) = "end"
- ├── @ CallNode (location: (41,0)-(41,12))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :fork
- │ ├── message_loc: (41,0)-(41,4) = "fork"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (41,5)-(41,12))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (41,7)-(41,10))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (41,8)-(41,9))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (41,8)-(41,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (41,7)-(41,8) = "|"
- │ │ └── closing_loc: (41,9)-(41,10) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (41,5)-(41,6) = "{"
- │ └── closing_loc: (41,11)-(41,12) = "}"
- ├── @ CallNode (location: (43,0)-(44,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :C
- │ ├── message_loc: (43,0)-(43,1) = "C"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (43,2)-(44,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (43,2)-(43,4) = "do"
- │ └── closing_loc: (44,0)-(44,3) = "end"
- ├── @ CallNode (location: (46,0)-(46,4))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :C
- │ ├── message_loc: (46,0)-(46,1) = "C"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (46,2)-(46,4))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (46,2)-(46,3) = "{"
- │ └── closing_loc: (46,3)-(46,4) = "}"
- ├── @ CallNode (location: (48,0)-(52,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (48,0)-(48,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (48,4)-(52,1))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (48,4)-(52,1))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :lambda
- │ │ ├── message_loc: (48,4)-(48,10) = "lambda"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (48,11)-(52,1))
- │ │ ├── locals: [:a, :b]
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (48,13)-(51,3))
- │ │ │ ├── parameters:
- │ │ │ │ @ ParametersNode (location: (49,2)-(50,6))
- │ │ │ │ ├── requireds: (length: 0)
- │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── keywords: (length: 2)
- │ │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (49,2)-(49,6))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ ├── name: :a
- │ │ │ │ │ │ ├── name_loc: (49,2)-(49,4) = "a:"
- │ │ │ │ │ │ └── value:
- │ │ │ │ │ │ @ IntegerNode (location: (49,5)-(49,6))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 1
- │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (50,2)-(50,6))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ ├── name_loc: (50,2)-(50,4) = "b:"
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ IntegerNode (location: (50,5)-(50,6))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (48,13)-(48,14) = "|"
- │ │ │ └── closing_loc: (51,2)-(51,3) = "|"
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (48,11)-(48,12) = "{"
- │ │ └── closing_loc: (52,0)-(52,1) = "}"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (54,0)-(54,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (54,0)-(54,3) = "foo"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (54,4)-(54,17))
- ├── locals: [:bar]
- ├── parameters:
- │ @ BlockParametersNode (location: (54,7)-(54,13))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (54,8)-(54,12))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (54,8)-(54,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ ImplicitRestNode (location: (54,11)-(54,12))
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (54,7)-(54,8) = "|"
- │ └── closing_loc: (54,12)-(54,13) = "|"
- ├── body: ∅
- ├── opening_loc: (54,4)-(54,6) = "do"
- └── closing_loc: (54,14)-(54,17) = "end"
diff --git a/test/prism/snapshots/boolean_operators.txt b/test/prism/snapshots/boolean_operators.txt
deleted file mode 100644
index 3bf33430c9..0000000000
--- a/test/prism/snapshots/boolean_operators.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,7))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(5,7))
- └── body: (length: 3)
- ├── @ LocalVariableAndWriteNode (location: (1,0)-(1,7))
- │ ├── name_loc: (1,0)-(1,1) = "a"
- │ ├── operator_loc: (1,2)-(1,5) = "&&="
- │ ├── value:
- │ │ @ CallNode (location: (1,6)-(1,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,6)-(1,7) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── name: :a
- │ └── depth: 0
- ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,6))
- │ ├── name_loc: (3,0)-(3,1) = "a"
- │ ├── binary_operator_loc: (3,2)-(3,4) = "+="
- │ ├── value:
- │ │ @ CallNode (location: (3,5)-(3,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (3,5)-(3,6) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── name: :a
- │ ├── binary_operator: :+
- │ └── depth: 0
- └── @ LocalVariableOrWriteNode (location: (5,0)-(5,7))
- ├── name_loc: (5,0)-(5,1) = "a"
- ├── operator_loc: (5,2)-(5,5) = "||="
- ├── value:
- │ @ CallNode (location: (5,6)-(5,7))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (5,6)-(5,7) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── name: :a
- └── depth: 0
diff --git a/test/prism/snapshots/booleans.txt b/test/prism/snapshots/booleans.txt
deleted file mode 100644
index 4731966243..0000000000
--- a/test/prism/snapshots/booleans.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,4))
- └── body: (length: 2)
- ├── @ FalseNode (location: (1,0)-(1,5))
- └── @ TrueNode (location: (3,0)-(3,4))
diff --git a/test/prism/snapshots/break.txt b/test/prism/snapshots/break.txt
deleted file mode 100644
index c15a9e4675..0000000000
--- a/test/prism/snapshots/break.txt
+++ /dev/null
@@ -1,401 +0,0 @@
-@ ProgramNode (location: (1,0)-(25,23))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(25,23))
- └── body: (length: 11)
- ├── @ CallNode (location: (1,0)-(1,13))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (1,0)-(1,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,4)-(1,13))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,6)-(1,11))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (1,6)-(1,11))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (1,6)-(1,11) = "break"
- │ ├── opening_loc: (1,4)-(1,5) = "{"
- │ └── closing_loc: (1,12)-(1,13) = "}"
- ├── @ CallNode (location: (3,0)-(3,27))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (3,0)-(3,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (3,4)-(3,27))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (3,6)-(3,25))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (3,6)-(3,25))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (3,12)-(3,25))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ ParenthesesNode (location: (3,12)-(3,15))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (3,13)-(3,14))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (3,13)-(3,14))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── opening_loc: (3,12)-(3,13) = "("
- │ │ │ │ └── closing_loc: (3,14)-(3,15) = ")"
- │ │ │ ├── @ ParenthesesNode (location: (3,17)-(3,20))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (3,18)-(3,19))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (3,18)-(3,19))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ ├── opening_loc: (3,17)-(3,18) = "("
- │ │ │ │ └── closing_loc: (3,19)-(3,20) = ")"
- │ │ │ └── @ ParenthesesNode (location: (3,22)-(3,25))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (3,23)-(3,24))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (3,23)-(3,24))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 3
- │ │ │ ├── opening_loc: (3,22)-(3,23) = "("
- │ │ │ └── closing_loc: (3,24)-(3,25) = ")"
- │ │ └── keyword_loc: (3,6)-(3,11) = "break"
- │ ├── opening_loc: (3,4)-(3,5) = "{"
- │ └── closing_loc: (3,26)-(3,27) = "}"
- ├── @ CallNode (location: (5,0)-(5,15))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (5,0)-(5,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (5,4)-(5,15))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (5,6)-(5,13))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (5,6)-(5,13))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,12)-(5,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,12)-(5,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── keyword_loc: (5,6)-(5,11) = "break"
- │ ├── opening_loc: (5,4)-(5,5) = "{"
- │ └── closing_loc: (5,14)-(5,15) = "}"
- ├── @ CallNode (location: (7,0)-(8,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (7,0)-(7,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (7,4)-(8,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (7,6)-(8,1))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (7,6)-(8,1))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (7,12)-(8,1))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (7,12)-(7,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (7,15)-(7,16))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ └── keyword_loc: (7,6)-(7,11) = "break"
- │ ├── opening_loc: (7,4)-(7,5) = "{"
- │ └── closing_loc: (8,2)-(8,3) = "}"
- ├── @ CallNode (location: (10,0)-(10,21))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (10,0)-(10,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (10,4)-(10,21))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (10,6)-(10,19))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (10,6)-(10,19))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (10,12)-(10,19))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (10,12)-(10,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (10,15)-(10,16))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (10,18)-(10,19))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ └── keyword_loc: (10,6)-(10,11) = "break"
- │ ├── opening_loc: (10,4)-(10,5) = "{"
- │ └── closing_loc: (10,20)-(10,21) = "}"
- ├── @ CallNode (location: (12,0)-(12,23))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (12,0)-(12,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (12,4)-(12,23))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (12,6)-(12,21))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (12,6)-(12,21))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (12,12)-(12,21))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ArrayNode (location: (12,12)-(12,21))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 3)
- │ │ │ │ ├── @ IntegerNode (location: (12,13)-(12,14))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── @ IntegerNode (location: (12,16)-(12,17))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ └── @ IntegerNode (location: (12,19)-(12,20))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 3
- │ │ │ ├── opening_loc: (12,12)-(12,13) = "["
- │ │ │ └── closing_loc: (12,20)-(12,21) = "]"
- │ │ └── keyword_loc: (12,6)-(12,11) = "break"
- │ ├── opening_loc: (12,4)-(12,5) = "{"
- │ └── closing_loc: (12,22)-(12,23) = "}"
- ├── @ CallNode (location: (14,0)-(17,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (14,0)-(14,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (14,4)-(17,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (14,6)-(17,1))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (14,6)-(17,1))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (14,11)-(17,1))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ParenthesesNode (location: (14,11)-(17,1))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (15,2)-(16,3))
- │ │ │ │ └── body: (length: 2)
- │ │ │ │ ├── @ IntegerNode (location: (15,2)-(15,3))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── opening_loc: (14,11)-(14,12) = "("
- │ │ │ └── closing_loc: (17,0)-(17,1) = ")"
- │ │ └── keyword_loc: (14,6)-(14,11) = "break"
- │ ├── opening_loc: (14,4)-(14,5) = "{"
- │ └── closing_loc: (17,2)-(17,3) = "}"
- ├── @ CallNode (location: (19,0)-(19,15))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (19,0)-(19,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (19,4)-(19,15))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (19,6)-(19,13))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (19,6)-(19,13))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (19,11)-(19,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ParenthesesNode (location: (19,11)-(19,13))
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (19,11)-(19,12) = "("
- │ │ │ └── closing_loc: (19,12)-(19,13) = ")"
- │ │ └── keyword_loc: (19,6)-(19,11) = "break"
- │ ├── opening_loc: (19,4)-(19,5) = "{"
- │ └── closing_loc: (19,14)-(19,15) = "}"
- ├── @ CallNode (location: (21,0)-(21,16))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (21,0)-(21,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (21,4)-(21,16))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (21,6)-(21,14))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (21,6)-(21,14))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (21,11)-(21,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ParenthesesNode (location: (21,11)-(21,14))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (21,12)-(21,13))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (21,12)-(21,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── opening_loc: (21,11)-(21,12) = "("
- │ │ │ └── closing_loc: (21,13)-(21,14) = ")"
- │ │ └── keyword_loc: (21,6)-(21,11) = "break"
- │ ├── opening_loc: (21,4)-(21,5) = "{"
- │ └── closing_loc: (21,15)-(21,16) = "}"
- ├── @ CallNode (location: (23,0)-(23,22))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (23,0)-(23,16))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (23,0)-(23,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (23,4)-(23,16))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (23,6)-(23,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ BreakNode (location: (23,6)-(23,14))
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (23,12)-(23,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (23,12)-(23,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── keyword_loc: (23,6)-(23,11) = "break"
- │ │ ├── opening_loc: (23,4)-(23,5) = "{"
- │ │ └── closing_loc: (23,15)-(23,16) = "}"
- │ ├── call_operator_loc: ∅
- │ ├── name: :==
- │ ├── message_loc: (23,17)-(23,19) = "=="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (23,20)-(23,22))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (23,20)-(23,22))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (25,0)-(25,23))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (25,0)-(25,17))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (25,0)-(25,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (25,4)-(25,17))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (25,6)-(25,9))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (25,7)-(25,8))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (25,7)-(25,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (25,6)-(25,7) = "|"
- │ │ └── closing_loc: (25,8)-(25,9) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (25,10)-(25,15))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (25,10)-(25,15))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (25,10)-(25,15) = "break"
- │ ├── opening_loc: (25,4)-(25,5) = "{"
- │ └── closing_loc: (25,16)-(25,17) = "}"
- ├── call_operator_loc: ∅
- ├── name: :==
- ├── message_loc: (25,18)-(25,20) = "=="
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (25,21)-(25,23))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (25,21)-(25,23))
- │ ├── flags: decimal
- │ └── value: 42
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/case.txt b/test/prism/snapshots/case.txt
deleted file mode 100644
index 417bf9492a..0000000000
--- a/test/prism/snapshots/case.txt
+++ /dev/null
@@ -1,495 +0,0 @@
-@ ProgramNode (location: (1,0)-(55,3))
-├── locals: [:b]
-└── statements:
- @ StatementsNode (location: (1,0)-(55,3))
- └── body: (length: 15)
- ├── @ CaseNode (location: (1,0)-(3,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (1,5)-(1,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ │ ├── value_loc: (1,6)-(1,8) = "hi"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "hi"
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (2,0)-(2,8))
- │ │ ├── keyword_loc: (2,0)-(2,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ SymbolNode (location: (2,5)-(2,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (2,5)-(2,6) = ":"
- │ │ │ ├── value_loc: (2,6)-(2,8) = "hi"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "hi"
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ CaseNode (location: (5,0)-(5,58))
- │ ├── predicate:
- │ │ @ TrueNode (location: (5,5)-(5,9))
- │ ├── conditions: (length: 2)
- │ │ ├── @ WhenNode (location: (5,11)-(5,30))
- │ │ │ ├── keyword_loc: (5,11)-(5,15) = "when"
- │ │ │ ├── conditions: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (5,16)-(5,20))
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (5,22)-(5,30))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (5,22)-(5,30))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :puts
- │ │ │ ├── message_loc: (5,22)-(5,26) = "puts"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (5,27)-(5,30))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (5,27)-(5,30))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (5,27)-(5,28) = ":"
- │ │ │ │ ├── value_loc: (5,28)-(5,30) = "hi"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "hi"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ WhenNode (location: (5,32)-(5,53))
- │ │ ├── keyword_loc: (5,32)-(5,36) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ FalseNode (location: (5,37)-(5,42))
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (5,44)-(5,53))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (5,44)-(5,53))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :puts
- │ │ ├── message_loc: (5,44)-(5,48) = "puts"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,49)-(5,53))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ SymbolNode (location: (5,49)-(5,53))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (5,49)-(5,50) = ":"
- │ │ │ ├── value_loc: (5,50)-(5,53) = "bye"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "bye"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (5,0)-(5,4) = "case"
- │ └── end_keyword_loc: (5,55)-(5,58) = "end"
- ├── @ CaseNode (location: (7,0)-(7,20))
- │ ├── predicate: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (7,6)-(7,15))
- │ │ ├── keyword_loc: (7,6)-(7,10) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ SplatNode (location: (7,11)-(7,15))
- │ │ │ ├── operator_loc: (7,11)-(7,12) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (7,12)-(7,15))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (7,12)-(7,15) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (7,0)-(7,4) = "case"
- │ └── end_keyword_loc: (7,17)-(7,20) = "end"
- ├── @ CaseNode (location: (9,0)-(13,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (9,5)-(9,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (9,5)-(9,6) = ":"
- │ │ ├── value_loc: (9,6)-(9,8) = "hi"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "hi"
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (10,0)-(10,8))
- │ │ ├── keyword_loc: (10,0)-(10,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ SymbolNode (location: (10,5)-(10,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (10,5)-(10,6) = ":"
- │ │ │ ├── value_loc: (10,6)-(10,8) = "hi"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "hi"
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (11,0)-(13,3))
- │ │ ├── else_keyword_loc: (11,0)-(11,4) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (12,0)-(12,2))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (12,0)-(12,2))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (12,0)-(12,1) = ":"
- │ │ │ ├── value_loc: (12,1)-(12,2) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── end_keyword_loc: (13,0)-(13,3) = "end"
- │ ├── case_keyword_loc: (9,0)-(9,4) = "case"
- │ └── end_keyword_loc: (13,0)-(13,3) = "end"
- ├── @ CaseNode (location: (15,0)-(15,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (15,5)-(15,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :this
- │ │ ├── message_loc: (15,5)-(15,9) = "this"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (15,11)-(15,31))
- │ │ ├── keyword_loc: (15,11)-(15,15) = "when"
- │ │ ├── conditions: (length: 2)
- │ │ │ ├── @ ConstantReadNode (location: (15,16)-(15,22))
- │ │ │ │ └── name: :FooBar
- │ │ │ └── @ ConstantReadNode (location: (15,24)-(15,31))
- │ │ │ └── name: :BazBonk
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (15,0)-(15,4) = "case"
- │ └── end_keyword_loc: (15,33)-(15,36) = "end"
- ├── @ CaseNode (location: (17,0)-(19,3))
- │ ├── predicate: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (18,0)-(18,15))
- │ │ ├── keyword_loc: (18,0)-(18,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ CallNode (location: (18,5)-(18,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (18,5)-(18,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (18,5)-(18,8) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :==
- │ │ │ ├── message_loc: (18,9)-(18,11) = "=="
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (18,12)-(18,15))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (18,12)-(18,15))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (18,12)-(18,15) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (17,0)-(17,4) = "case"
- │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- ├── @ CaseNode (location: (21,0)-(25,3))
- │ ├── predicate: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (22,0)-(22,6))
- │ │ ├── keyword_loc: (22,0)-(22,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ CallNode (location: (22,5)-(22,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (22,5)-(22,6) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (23,0)-(25,3))
- │ │ ├── else_keyword_loc: (23,0)-(23,4) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (25,0)-(25,3) = "end"
- │ ├── case_keyword_loc: (21,0)-(21,4) = "case"
- │ └── end_keyword_loc: (25,0)-(25,3) = "end"
- ├── @ CaseNode (location: (27,0)-(30,6))
- │ ├── predicate:
- │ │ @ CallNode (location: (27,5)-(27,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :type
- │ │ ├── message_loc: (27,5)-(27,9) = "type"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (28,3)-(28,10))
- │ │ ├── keyword_loc: (28,3)-(28,7) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ SymbolNode (location: (28,8)-(28,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (28,8)-(28,9) = ":"
- │ │ │ ├── value_loc: (28,9)-(28,10) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (29,5)-(30,6))
- │ │ ├── else_keyword_loc: (29,5)-(29,9) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (30,3)-(30,6) = "end"
- │ ├── case_keyword_loc: (27,0)-(27,4) = "case"
- │ └── end_keyword_loc: (30,3)-(30,6) = "end"
- ├── @ CaseNode (location: (32,0)-(32,25))
- │ ├── predicate: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (32,14)-(32,20))
- │ │ ├── keyword_loc: (32,14)-(32,18) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ IntegerNode (location: (32,19)-(32,20))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (32,0)-(32,4) = "case"
- │ └── end_keyword_loc: (32,22)-(32,25) = "end"
- ├── @ CaseNode (location: (34,0)-(36,3))
- │ ├── predicate:
- │ │ @ MatchPredicateNode (location: (34,5)-(34,11))
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (34,5)-(34,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (34,10)-(34,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (34,7)-(34,9) = "in"
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (35,0)-(35,6))
- │ │ ├── keyword_loc: (35,0)-(35,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ IntegerNode (location: (35,5)-(35,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (34,0)-(34,4) = "case"
- │ └── end_keyword_loc: (36,0)-(36,3) = "end"
- ├── @ CaseNode (location: (38,0)-(38,24))
- │ ├── predicate:
- │ │ @ MatchPredicateNode (location: (38,5)-(38,11))
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (38,5)-(38,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (38,10)-(38,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (38,7)-(38,9) = "in"
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (38,13)-(38,19))
- │ │ ├── keyword_loc: (38,13)-(38,17) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ IntegerNode (location: (38,18)-(38,19))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (38,0)-(38,4) = "case"
- │ └── end_keyword_loc: (38,21)-(38,24) = "end"
- ├── @ CaseMatchNode (location: (40,0)-(42,3))
- │ ├── predicate:
- │ │ @ MatchPredicateNode (location: (40,5)-(40,11))
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (40,5)-(40,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (40,10)-(40,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (40,7)-(40,9) = "in"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (41,0)-(41,4))
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (41,3)-(41,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (41,0)-(41,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (40,0)-(40,4) = "case"
- │ └── end_keyword_loc: (42,0)-(42,3) = "end"
- ├── @ CaseMatchNode (location: (44,0)-(44,22))
- │ ├── predicate:
- │ │ @ MatchPredicateNode (location: (44,5)-(44,11))
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (44,5)-(44,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (44,10)-(44,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (44,7)-(44,9) = "in"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (44,13)-(44,17))
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (44,16)-(44,17))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (44,13)-(44,15) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (44,0)-(44,4) = "case"
- │ └── end_keyword_loc: (44,19)-(44,22) = "end"
- ├── @ CaseMatchNode (location: (46,0)-(49,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (46,5)-(46,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (46,5)-(46,6) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (47,0)-(48,3))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (47,3)-(47,15))
- │ │ │ ├── if_keyword_loc: (47,5)-(47,7) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ AndNode (location: (47,8)-(47,15))
- │ │ │ │ ├── left:
- │ │ │ │ │ @ CallNode (location: (47,8)-(47,9))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :c
- │ │ │ │ │ ├── message_loc: (47,8)-(47,9) = "c"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── right:
- │ │ │ │ │ @ CallNode (location: (47,14)-(47,15))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :d
- │ │ │ │ │ ├── message_loc: (47,14)-(47,15) = "d"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── operator_loc: (47,10)-(47,13) = "and"
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (47,3)-(47,4))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableTargetNode (location: (47,3)-(47,4))
- │ │ │ │ ├── name: :b
- │ │ │ │ └── depth: 0
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (48,2)-(48,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (48,2)-(48,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :e
- │ │ │ ├── message_loc: (48,2)-(48,3) = "e"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── in_loc: (47,0)-(47,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (46,0)-(46,4) = "case"
- │ └── end_keyword_loc: (49,0)-(49,3) = "end"
- └── @ CallNode (location: (51,0)-(55,3))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (51,0)-(51,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: (51,1)-(51,2) = "."
- ├── name: :then
- ├── message_loc: (51,2)-(51,6) = "then"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (51,7)-(55,3))
- ├── locals: [:_1]
- ├── parameters:
- │ @ NumberedParametersNode (location: (51,7)-(55,3))
- │ └── maximum: 1
- ├── body:
- │ @ StatementsNode (location: (52,2)-(54,5))
- │ └── body: (length: 1)
- │ └── @ CaseMatchNode (location: (52,2)-(54,5))
- │ ├── predicate:
- │ │ @ IntegerNode (location: (52,7)-(52,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (53,2)-(53,8))
- │ │ ├── pattern:
- │ │ │ @ PinnedVariableNode (location: (53,5)-(53,8))
- │ │ │ ├── variable:
- │ │ │ │ @ LocalVariableReadNode (location: (53,6)-(53,8))
- │ │ │ │ ├── name: :_1
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (53,5)-(53,6) = "^"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (53,2)-(53,4) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (52,2)-(52,6) = "case"
- │ └── end_keyword_loc: (54,2)-(54,5) = "end"
- ├── opening_loc: (51,7)-(51,9) = "do"
- └── closing_loc: (55,0)-(55,3) = "end"
diff --git a/test/prism/snapshots/classes.txt b/test/prism/snapshots/classes.txt
deleted file mode 100644
index 4a36bd5cdc..0000000000
--- a/test/prism/snapshots/classes.txt
+++ /dev/null
@@ -1,365 +0,0 @@
-@ ProgramNode (location: (1,0)-(35,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(35,3))
- └── body: (length: 14)
- ├── @ ClassNode (location: (1,0)-(1,17))
- │ ├── locals: [:a]
- │ ├── class_keyword_loc: (1,0)-(1,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (1,6)-(1,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,8)-(1,13))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (1,8)-(1,13))
- │ │ ├── name: :a
- │ │ ├── depth: 0
- │ │ ├── name_loc: (1,8)-(1,9) = "a"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (1,10)-(1,11) = "="
- │ ├── end_keyword_loc: (1,14)-(1,17) = "end"
- │ └── name: :A
- ├── @ ClassNode (location: (3,0)-(3,20))
- │ ├── locals: []
- │ ├── class_keyword_loc: (3,0)-(3,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (3,6)-(3,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (3,0)-(3,20))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (3,9)-(3,20))
- │ │ │ ├── ensure_keyword_loc: (3,9)-(3,15) = "ensure"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (3,17)-(3,20) = "end"
- │ │ └── end_keyword_loc: (3,17)-(3,20) = "end"
- │ ├── end_keyword_loc: (3,17)-(3,20) = "end"
- │ └── name: :A
- ├── @ ClassNode (location: (5,0)-(5,34))
- │ ├── locals: []
- │ ├── class_keyword_loc: (5,0)-(5,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (5,6)-(5,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (5,0)-(5,34))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (5,9)-(5,15))
- │ │ │ ├── keyword_loc: (5,9)-(5,15) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause:
- │ │ │ @ ElseNode (location: (5,17)-(5,29))
- │ │ │ ├── else_keyword_loc: (5,17)-(5,21) = "else"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (5,23)-(5,29) = "ensure"
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (5,23)-(5,34))
- │ │ │ ├── ensure_keyword_loc: (5,23)-(5,29) = "ensure"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (5,31)-(5,34) = "end"
- │ │ └── end_keyword_loc: (5,31)-(5,34) = "end"
- │ ├── end_keyword_loc: (5,31)-(5,34) = "end"
- │ └── name: :A
- ├── @ ClassNode (location: (7,0)-(9,3))
- │ ├── locals: [:a]
- │ ├── class_keyword_loc: (7,0)-(7,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (7,6)-(7,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: (7,8)-(7,9) = "<"
- │ ├── superclass:
- │ │ @ ConstantReadNode (location: (7,10)-(7,11))
- │ │ └── name: :B
- │ ├── body:
- │ │ @ StatementsNode (location: (8,0)-(8,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (8,0)-(8,5))
- │ │ ├── name: :a
- │ │ ├── depth: 0
- │ │ ├── name_loc: (8,0)-(8,1) = "a"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (8,4)-(8,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (8,2)-(8,3) = "="
- │ ├── end_keyword_loc: (9,0)-(9,3) = "end"
- │ └── name: :A
- ├── @ SingletonClassNode (location: (11,0)-(12,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (11,0)-(11,5) = "class"
- │ ├── operator_loc: (11,6)-(11,8) = "<<"
- │ ├── expression:
- │ │ @ CallNode (location: (11,9)-(11,16))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (11,13)-(11,16))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (11,13)-(11,16) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (11,9)-(11,12) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ └── end_keyword_loc: (12,0)-(12,3) = "end"
- ├── @ ClassNode (location: (14,0)-(14,40))
- │ ├── locals: []
- │ ├── class_keyword_loc: (14,0)-(14,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (14,6)-(14,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (14,9)-(14,35))
- │ │ └── body: (length: 1)
- │ │ └── @ SingletonClassNode (location: (14,9)-(14,35))
- │ │ ├── locals: []
- │ │ ├── class_keyword_loc: (14,9)-(14,14) = "class"
- │ │ ├── operator_loc: (14,15)-(14,17) = "<<"
- │ │ ├── expression:
- │ │ │ @ SelfNode (location: (14,18)-(14,22))
- │ │ ├── body:
- │ │ │ @ BeginNode (location: (14,9)-(14,35))
- │ │ │ ├── begin_keyword_loc: ∅
- │ │ │ ├── statements: ∅
- │ │ │ ├── rescue_clause: ∅
- │ │ │ ├── else_clause: ∅
- │ │ │ ├── ensure_clause:
- │ │ │ │ @ EnsureNode (location: (14,24)-(14,35))
- │ │ │ │ ├── ensure_keyword_loc: (14,24)-(14,30) = "ensure"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── end_keyword_loc: (14,32)-(14,35) = "end"
- │ │ │ └── end_keyword_loc: (14,32)-(14,35) = "end"
- │ │ └── end_keyword_loc: (14,32)-(14,35) = "end"
- │ ├── end_keyword_loc: (14,37)-(14,40) = "end"
- │ └── name: :A
- ├── @ ClassNode (location: (16,0)-(16,54))
- │ ├── locals: []
- │ ├── class_keyword_loc: (16,0)-(16,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (16,6)-(16,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (16,9)-(16,49))
- │ │ └── body: (length: 1)
- │ │ └── @ SingletonClassNode (location: (16,9)-(16,49))
- │ │ ├── locals: []
- │ │ ├── class_keyword_loc: (16,9)-(16,14) = "class"
- │ │ ├── operator_loc: (16,15)-(16,17) = "<<"
- │ │ ├── expression:
- │ │ │ @ SelfNode (location: (16,18)-(16,22))
- │ │ ├── body:
- │ │ │ @ BeginNode (location: (16,9)-(16,49))
- │ │ │ ├── begin_keyword_loc: ∅
- │ │ │ ├── statements: ∅
- │ │ │ ├── rescue_clause:
- │ │ │ │ @ RescueNode (location: (16,24)-(16,30))
- │ │ │ │ ├── keyword_loc: (16,24)-(16,30) = "rescue"
- │ │ │ │ ├── exceptions: (length: 0)
- │ │ │ │ ├── operator_loc: ∅
- │ │ │ │ ├── reference: ∅
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── consequent: ∅
- │ │ │ ├── else_clause:
- │ │ │ │ @ ElseNode (location: (16,32)-(16,44))
- │ │ │ │ ├── else_keyword_loc: (16,32)-(16,36) = "else"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── end_keyword_loc: (16,38)-(16,44) = "ensure"
- │ │ │ ├── ensure_clause:
- │ │ │ │ @ EnsureNode (location: (16,38)-(16,49))
- │ │ │ │ ├── ensure_keyword_loc: (16,38)-(16,44) = "ensure"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── end_keyword_loc: (16,46)-(16,49) = "end"
- │ │ │ └── end_keyword_loc: (16,46)-(16,49) = "end"
- │ │ └── end_keyword_loc: (16,46)-(16,49) = "end"
- │ ├── end_keyword_loc: (16,51)-(16,54) = "end"
- │ └── name: :A
- ├── @ SingletonClassNode (location: (18,0)-(19,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (18,0)-(18,5) = "class"
- │ ├── operator_loc: (18,6)-(18,8) = "<<"
- │ ├── expression:
- │ │ @ CallNode (location: (18,9)-(18,16))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (18,9)-(18,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (18,9)-(18,12) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (18,12)-(18,13) = "."
- │ │ ├── name: :bar
- │ │ ├── message_loc: (18,13)-(18,16) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- ├── @ SingletonClassNode (location: (21,0)-(21,20))
- │ ├── locals: []
- │ ├── class_keyword_loc: (21,0)-(21,5) = "class"
- │ ├── operator_loc: (21,6)-(21,8) = "<<"
- │ ├── expression:
- │ │ @ CallNode (location: (21,9)-(21,16))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (21,9)-(21,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (21,9)-(21,12) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (21,12)-(21,13) = "."
- │ │ ├── name: :bar
- │ │ ├── message_loc: (21,13)-(21,16) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ └── end_keyword_loc: (21,17)-(21,20) = "end"
- ├── @ SingletonClassNode (location: (23,0)-(24,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (23,0)-(23,5) = "class"
- │ ├── operator_loc: (23,6)-(23,8) = "<<"
- │ ├── expression:
- │ │ @ SelfNode (location: (23,9)-(23,13))
- │ ├── body: ∅
- │ └── end_keyword_loc: (24,0)-(24,3) = "end"
- ├── @ SingletonClassNode (location: (26,0)-(26,17))
- │ ├── locals: []
- │ ├── class_keyword_loc: (26,0)-(26,5) = "class"
- │ ├── operator_loc: (26,6)-(26,8) = "<<"
- │ ├── expression:
- │ │ @ SelfNode (location: (26,9)-(26,13))
- │ ├── body: ∅
- │ └── end_keyword_loc: (26,14)-(26,17) = "end"
- ├── @ SingletonClassNode (location: (28,0)-(30,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (28,0)-(28,5) = "class"
- │ ├── operator_loc: (28,6)-(28,8) = "<<"
- │ ├── expression:
- │ │ @ SelfNode (location: (28,9)-(28,13))
- │ ├── body:
- │ │ @ StatementsNode (location: (29,0)-(29,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (29,0)-(29,5))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (29,0)-(29,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :+
- │ │ ├── message_loc: (29,2)-(29,3) = "+"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (29,4)-(29,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (29,4)-(29,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── end_keyword_loc: (30,0)-(30,3) = "end"
- ├── @ SingletonClassNode (location: (32,0)-(32,23))
- │ ├── locals: []
- │ ├── class_keyword_loc: (32,0)-(32,5) = "class"
- │ ├── operator_loc: (32,6)-(32,8) = "<<"
- │ ├── expression:
- │ │ @ SelfNode (location: (32,9)-(32,13))
- │ ├── body:
- │ │ @ StatementsNode (location: (32,14)-(32,19))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (32,14)-(32,19))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (32,14)-(32,15))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :+
- │ │ ├── message_loc: (32,16)-(32,17) = "+"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (32,18)-(32,19))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (32,18)-(32,19))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── end_keyword_loc: (32,20)-(32,23) = "end"
- └── @ ClassNode (location: (34,0)-(35,3))
- ├── locals: []
- ├── class_keyword_loc: (34,0)-(34,5) = "class"
- ├── constant_path:
- │ @ ConstantReadNode (location: (34,6)-(34,7))
- │ └── name: :A
- ├── inheritance_operator_loc: (34,8)-(34,9) = "<"
- ├── superclass:
- │ @ CallNode (location: (34,10)-(34,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (34,10)-(34,11))
- │ │ └── name: :B
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (34,11)-(34,14) = "[1]"
- │ ├── opening_loc: (34,11)-(34,12) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (34,12)-(34,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (34,12)-(34,13))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: (34,13)-(34,14) = "]"
- │ └── block: ∅
- ├── body: ∅
- ├── end_keyword_loc: (35,0)-(35,3) = "end"
- └── name: :A
diff --git a/test/prism/snapshots/command_method_call.txt b/test/prism/snapshots/command_method_call.txt
deleted file mode 100644
index 7fd6341304..0000000000
--- a/test/prism/snapshots/command_method_call.txt
+++ /dev/null
@@ -1,755 +0,0 @@
-@ ProgramNode (location: (1,0)-(41,10))
-├── locals: [:foo, :bar]
-└── statements:
- @ StatementsNode (location: (1,0)-(41,10))
- └── body: (length: 21)
- ├── @ CallNode (location: (1,0)-(1,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,9))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (3,0)-(3,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,4)-(3,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (3,4)-(3,9))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (3,4)-(3,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (3,8)-(3,9))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (3,8)-(3,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ IfNode (location: (5,0)-(5,14))
- │ ├── if_keyword_loc: (5,6)-(5,8) = "if"
- │ ├── predicate:
- │ │ @ CallNode (location: (5,9)-(5,14))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (5,9)-(5,12) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,13)-(5,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,13)-(5,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,0)-(5,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (5,0)-(5,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (5,0)-(5,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,4)-(5,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,4)-(5,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- ├── @ UnlessNode (location: (7,0)-(7,18))
- │ ├── keyword_loc: (7,6)-(7,12) = "unless"
- │ ├── predicate:
- │ │ @ CallNode (location: (7,13)-(7,18))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (7,13)-(7,16) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (7,17)-(7,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (7,17)-(7,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (7,0)-(7,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (7,0)-(7,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (7,0)-(7,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (7,4)-(7,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (7,4)-(7,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- ├── @ WhileNode (location: (9,0)-(9,17))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,6)-(9,11) = "while"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (9,12)-(9,17))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (9,12)-(9,15) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (9,16)-(9,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (9,16)-(9,17))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── statements:
- │ @ StatementsNode (location: (9,0)-(9,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (9,0)-(9,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (9,0)-(9,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (9,4)-(9,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (9,4)-(9,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ UntilNode (location: (11,0)-(11,17))
- │ ├── flags: ∅
- │ ├── keyword_loc: (11,6)-(11,11) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (11,12)-(11,17))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (11,12)-(11,15) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (11,16)-(11,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (11,16)-(11,17))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── statements:
- │ @ StatementsNode (location: (11,0)-(11,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (11,0)-(11,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (11,0)-(11,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,4)-(11,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (11,4)-(11,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ RescueModifierNode (location: (13,0)-(13,18))
- │ ├── expression:
- │ │ @ CallNode (location: (13,0)-(13,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (13,0)-(13,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (13,4)-(13,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (13,4)-(13,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (13,6)-(13,12) = "rescue"
- │ └── rescue_expression:
- │ @ CallNode (location: (13,13)-(13,18))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (13,13)-(13,16) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (13,17)-(13,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (13,17)-(13,18))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (15,0)-(15,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (15,0)-(15,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (15,0)-(15,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (15,3)-(15,10) = "[bar 1]"
- │ ├── opening_loc: (15,3)-(15,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (15,4)-(15,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (15,4)-(15,9))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (15,4)-(15,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (15,8)-(15,9))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (15,8)-(15,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (15,9)-(15,10) = "]"
- │ └── block: ∅
- ├── @ AndNode (location: (17,0)-(17,15))
- │ ├── left:
- │ │ @ CallNode (location: (17,0)-(17,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (17,0)-(17,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (17,4)-(17,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (17,4)-(17,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (17,10)-(17,15))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (17,10)-(17,13) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (17,14)-(17,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (17,14)-(17,15))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (17,6)-(17,9) = "and"
- ├── @ OrNode (location: (19,0)-(19,14))
- │ ├── left:
- │ │ @ CallNode (location: (19,0)-(19,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (19,0)-(19,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (19,4)-(19,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (19,4)-(19,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (19,9)-(19,14))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (19,9)-(19,12) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (19,13)-(19,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (19,13)-(19,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (19,6)-(19,8) = "or"
- ├── @ CallNode (location: (21,0)-(21,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (21,4)-(21,9))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (21,4)-(21,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (21,8)-(21,9))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (21,8)-(21,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (21,0)-(21,3) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ LocalVariableWriteNode (location: (23,0)-(23,17))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (23,0)-(23,3) = "foo"
- │ ├── value:
- │ │ @ LocalVariableWriteNode (location: (23,6)-(23,17))
- │ │ ├── name: :bar
- │ │ ├── depth: 0
- │ │ ├── name_loc: (23,6)-(23,9) = "bar"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (23,12)-(23,17))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (23,12)-(23,15) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (23,16)-(23,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (23,16)-(23,17))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (23,10)-(23,11) = "="
- │ └── operator_loc: (23,4)-(23,5) = "="
- ├── @ DefNode (location: (25,0)-(25,15))
- │ ├── name: :foo
- │ ├── name_loc: (25,4)-(25,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (25,10)-(25,15))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (25,10)-(25,15))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (25,10)-(25,13) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (25,14)-(25,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (25,14)-(25,15))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: (25,8)-(25,9) = "="
- │ └── end_keyword_loc: ∅
- ├── @ CallNode (location: (27,0)-(27,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (27,0)-(27,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: (27,1)-(27,2) = "."
- │ ├── name: :foo
- │ ├── message_loc: (27,2)-(27,5) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (27,6)-(27,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (27,6)-(27,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (29,0)-(29,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (29,0)-(29,5))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (29,0)-(29,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: (29,1)-(29,2) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (29,2)-(29,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (29,5)-(29,6) = "."
- │ ├── name: :bar
- │ ├── message_loc: (29,6)-(29,9) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (29,10)-(29,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (29,10)-(29,11))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (31,0)-(31,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (31,0)-(31,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (31,0)-(31,5))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ IntegerNode (location: (31,0)-(31,1))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── call_operator_loc: (31,1)-(31,2) = "."
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (31,2)-(31,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]
- │ │ ├── message_loc: (31,5)-(31,8) = "[2]"
- │ │ ├── opening_loc: (31,5)-(31,6) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (31,6)-(31,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (31,6)-(31,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: (31,7)-(31,8) = "]"
- │ │ └── block: ∅
- │ ├── call_operator_loc: (31,8)-(31,9) = "."
- │ ├── name: :bar
- │ ├── message_loc: (31,9)-(31,12) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (31,13)-(31,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (31,13)-(31,14))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (33,0)-(33,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (33,0)-(33,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (33,0)-(33,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: (33,1)-(33,2) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (33,2)-(33,5) = "foo"
- │ │ ├── opening_loc: (33,5)-(33,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (33,6)-(33,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (33,6)-(33,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: (33,7)-(33,8) = ")"
- │ │ └── block: ∅
- │ ├── call_operator_loc: (33,8)-(33,9) = "."
- │ ├── name: :bar
- │ ├── message_loc: (33,9)-(33,12) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (33,13)-(33,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (33,13)-(33,14))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (35,0)-(35,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (35,0)-(35,9))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (35,0)-(35,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: (35,1)-(35,2) = "."
- │ │ ├── name: :foo
- │ │ ├── message_loc: (35,2)-(35,5) = "foo"
- │ │ ├── opening_loc: (35,5)-(35,6) = "("
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: (35,8)-(35,9) = ")"
- │ │ └── block:
- │ │ @ BlockArgumentNode (location: (35,6)-(35,8))
- │ │ ├── expression:
- │ │ │ @ IntegerNode (location: (35,7)-(35,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (35,6)-(35,7) = "&"
- │ ├── call_operator_loc: (35,9)-(35,10) = "."
- │ ├── name: :bar
- │ ├── message_loc: (35,10)-(35,13) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (35,14)-(35,15))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (35,14)-(35,15))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ AndNode (location: (37,0)-(37,17))
- │ ├── left:
- │ │ @ CallNode (location: (37,0)-(37,6))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (37,1)-(37,6))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (37,1)-(37,4) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (37,5)-(37,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (37,5)-(37,6))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (37,0)-(37,1) = "!"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (37,11)-(37,17))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (37,12)-(37,17))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (37,12)-(37,15) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (37,16)-(37,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (37,16)-(37,17))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (37,11)-(37,12) = "!"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (37,7)-(37,10) = "and"
- ├── @ OrNode (location: (39,0)-(39,16))
- │ ├── left:
- │ │ @ CallNode (location: (39,0)-(39,6))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (39,1)-(39,6))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (39,1)-(39,4) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (39,5)-(39,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (39,5)-(39,6))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (39,0)-(39,1) = "!"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (39,10)-(39,16))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (39,11)-(39,16))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (39,11)-(39,14) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (39,15)-(39,16))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (39,15)-(39,16))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (39,10)-(39,11) = "!"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (39,7)-(39,9) = "or"
- └── @ CallNode (location: (41,0)-(41,10))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (41,4)-(41,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (41,5)-(41,10))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (41,5)-(41,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (41,9)-(41,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (41,9)-(41,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (41,4)-(41,5) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :!
- ├── message_loc: (41,0)-(41,3) = "not"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/comments.txt b/test/prism/snapshots/comments.txt
deleted file mode 100644
index b7088adcd5..0000000000
--- a/test/prism/snapshots/comments.txt
+++ /dev/null
@@ -1,145 +0,0 @@
-@ ProgramNode (location: (1,0)-(24,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(24,5))
- └── body: (length: 9)
- ├── @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (3,0)-(3,1) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (5,0)-(5,1) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (6,0)-(6,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :d
- │ ├── message_loc: (6,0)-(6,1) = "d"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (8,0)-(10,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (8,0)-(8,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :e
- │ │ ├── message_loc: (8,0)-(8,1) = "e"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (10,2)-(10,3) = "."
- │ ├── name: :f
- │ ├── message_loc: (10,3)-(10,4) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (12,0)-(14,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (12,0)-(12,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :g
- │ │ ├── message_loc: (12,0)-(12,1) = "g"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (14,0)-(14,1) = "."
- │ ├── name: :h
- │ ├── message_loc: (14,1)-(14,2) = "h"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (16,0)-(17,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (16,0)-(16,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :i
- │ │ ├── message_loc: (16,0)-(16,1) = "i"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (17,0)-(17,1) = "."
- │ ├── name: :j
- │ ├── message_loc: (17,1)-(17,2) = "j"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (19,0)-(20,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (19,0)-(19,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :k
- │ │ ├── message_loc: (19,0)-(19,1) = "k"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (20,2)-(20,3) = "."
- │ ├── name: :l
- │ ├── message_loc: (20,3)-(20,4) = "l"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (22,0)-(24,5))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (22,0)-(22,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (22,0)-(22,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (24,2)-(24,4) = "&."
- ├── name: :n
- ├── message_loc: (24,4)-(24,5) = "n"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/constants.txt b/test/prism/snapshots/constants.txt
deleted file mode 100644
index 1251833663..0000000000
--- a/test/prism/snapshots/constants.txt
+++ /dev/null
@@ -1,1225 +0,0 @@
-@ ProgramNode (location: (1,0)-(184,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(184,10))
- └── body: (length: 90)
- ├── @ ConstantPathNode (location: (1,0)-(1,4))
- │ ├── parent:
- │ │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ │ └── name: :A
- │ ├── name: :B
- │ ├── delimiter_loc: (1,1)-(1,3) = "::"
- │ └── name_loc: (1,3)-(1,4) = "B"
- ├── @ ConstantPathNode (location: (3,0)-(3,7))
- │ ├── parent:
- │ │ @ ConstantPathNode (location: (3,0)-(3,4))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (3,0)-(3,1))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (3,1)-(3,3) = "::"
- │ │ └── name_loc: (3,3)-(3,4) = "B"
- │ ├── name: :C
- │ ├── delimiter_loc: (3,4)-(3,6) = "::"
- │ └── name_loc: (3,6)-(3,7) = "C"
- ├── @ ConstantPathNode (location: (5,0)-(5,4))
- │ ├── parent:
- │ │ @ CallNode (location: (5,0)-(5,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (5,0)-(5,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── name: :B
- │ ├── delimiter_loc: (5,1)-(5,3) = "::"
- │ └── name_loc: (5,3)-(5,4) = "B"
- ├── @ ConstantPathWriteNode (location: (7,0)-(7,8))
- │ ├── target:
- │ │ @ ConstantPathNode (location: (7,0)-(7,4))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (7,0)-(7,1))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (7,1)-(7,3) = "::"
- │ │ └── name_loc: (7,3)-(7,4) = "B"
- │ ├── operator_loc: (7,5)-(7,6) = "="
- │ └── value:
- │ @ IntegerNode (location: (7,7)-(7,8))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ConstantWriteNode (location: (9,0)-(9,5))
- │ ├── name: :A
- │ ├── name_loc: (9,0)-(9,1) = "A"
- │ ├── value:
- │ │ @ IntegerNode (location: (9,4)-(9,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (9,2)-(9,3) = "="
- ├── @ ConstantReadNode (location: (11,0)-(11,3))
- │ └── name: :ABC
- ├── @ CallNode (location: (13,0)-(13,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :Foo
- │ ├── message_loc: (13,0)-(13,3) = "Foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (13,4)-(13,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (13,4)-(13,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (15,0)-(15,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :Foo
- │ ├── message_loc: (15,0)-(15,3) = "Foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (15,4)-(15,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (15,4)-(15,8))
- │ │ ├── operator_loc: (15,4)-(15,5) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (15,5)-(15,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (15,5)-(15,8) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (17,0)-(17,9))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :Foo
- │ ├── message_loc: (17,0)-(17,3) = "Foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (17,4)-(17,9))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (17,4)-(17,9))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (17,4)-(17,9))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (17,6)-(17,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (17,6)-(17,9) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (17,4)-(17,6) = "**"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (19,0)-(19,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :Foo
- │ ├── message_loc: (19,0)-(19,3) = "Foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockArgumentNode (location: (19,4)-(19,8))
- │ ├── expression:
- │ │ @ CallNode (location: (19,5)-(19,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (19,5)-(19,8) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (19,4)-(19,5) = "&"
- ├── @ CallNode (location: (21,0)-(21,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (21,0)-(21,3))
- │ │ └── name: :Foo
- │ ├── call_operator_loc: (21,3)-(21,5) = "::"
- │ ├── name: :Bar
- │ ├── message_loc: (21,5)-(21,8) = "Bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (21,9)-(21,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (21,9)-(21,13))
- │ │ ├── operator_loc: (21,9)-(21,10) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (21,10)-(21,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (21,10)-(21,13) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (23,0)-(23,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (23,0)-(23,3))
- │ │ └── name: :Foo
- │ ├── call_operator_loc: (23,3)-(23,5) = "::"
- │ ├── name: :Bar
- │ ├── message_loc: (23,5)-(23,8) = "Bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (23,9)-(23,14))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (23,9)-(23,14))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (23,9)-(23,14))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (23,11)-(23,14))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (23,11)-(23,14) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (23,9)-(23,11) = "**"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (25,0)-(25,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (25,0)-(25,3))
- │ │ └── name: :Foo
- │ ├── call_operator_loc: (25,3)-(25,5) = "::"
- │ ├── name: :Bar
- │ ├── message_loc: (25,5)-(25,8) = "Bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockArgumentNode (location: (25,9)-(25,13))
- │ ├── expression:
- │ │ @ CallNode (location: (25,10)-(25,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (25,10)-(25,13) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (25,9)-(25,10) = "&"
- ├── @ CallNode (location: (27,0)-(27,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantPathNode (location: (27,0)-(27,3))
- │ │ ├── parent: ∅
- │ │ ├── name: :A
- │ │ ├── delimiter_loc: (27,0)-(27,2) = "::"
- │ │ └── name_loc: (27,2)-(27,3) = "A"
- │ ├── call_operator_loc: (27,3)-(27,5) = "::"
- │ ├── name: :foo
- │ ├── message_loc: (27,5)-(27,8) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ConstantPathWriteNode (location: (29,0)-(29,7))
- │ ├── target:
- │ │ @ ConstantPathNode (location: (29,0)-(29,3))
- │ │ ├── parent: ∅
- │ │ ├── name: :A
- │ │ ├── delimiter_loc: (29,0)-(29,2) = "::"
- │ │ └── name_loc: (29,2)-(29,3) = "A"
- │ ├── operator_loc: (29,4)-(29,5) = "="
- │ └── value:
- │ @ IntegerNode (location: (29,6)-(29,7))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ConstantPathWriteNode (location: (31,0)-(31,10))
- │ ├── target:
- │ │ @ ConstantPathNode (location: (31,0)-(31,6))
- │ │ ├── parent:
- │ │ │ @ ConstantPathNode (location: (31,0)-(31,3))
- │ │ │ ├── parent: ∅
- │ │ │ ├── name: :A
- │ │ │ ├── delimiter_loc: (31,0)-(31,2) = "::"
- │ │ │ └── name_loc: (31,2)-(31,3) = "A"
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (31,3)-(31,5) = "::"
- │ │ └── name_loc: (31,5)-(31,6) = "B"
- │ ├── operator_loc: (31,7)-(31,8) = "="
- │ └── value:
- │ @ IntegerNode (location: (31,9)-(31,10))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ConstantPathNode (location: (33,0)-(33,6))
- │ ├── parent:
- │ │ @ ConstantPathNode (location: (33,0)-(33,3))
- │ │ ├── parent: ∅
- │ │ ├── name: :A
- │ │ ├── delimiter_loc: (33,0)-(33,2) = "::"
- │ │ └── name_loc: (33,2)-(33,3) = "A"
- │ ├── name: :B
- │ ├── delimiter_loc: (33,3)-(33,5) = "::"
- │ └── name_loc: (33,5)-(33,6) = "B"
- ├── @ ConstantPathNode (location: (35,0)-(35,3))
- │ ├── parent: ∅
- │ ├── name: :A
- │ ├── delimiter_loc: (35,0)-(35,2) = "::"
- │ └── name_loc: (35,2)-(35,3) = "A"
- ├── @ CallNode (location: (37,0)-(37,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (37,0)-(37,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (37,1)-(37,3) = "::"
- │ ├── name: :false
- │ ├── message_loc: (37,3)-(37,8) = "false"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (39,0)-(39,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantPathNode (location: (39,0)-(39,4))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (39,0)-(39,1))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (39,1)-(39,3) = "::"
- │ │ └── name_loc: (39,3)-(39,4) = "B"
- │ ├── call_operator_loc: (39,4)-(39,6) = "::"
- │ ├── name: :true
- │ ├── message_loc: (39,6)-(39,10) = "true"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (41,0)-(41,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (41,0)-(41,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (41,1)-(41,3) = "::"
- │ ├── name: :&
- │ ├── message_loc: (41,3)-(41,4) = "&"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (43,0)-(43,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (43,0)-(43,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (43,1)-(43,3) = "::"
- │ ├── name: :`
- │ ├── message_loc: (43,3)-(43,4) = "`"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (45,0)-(45,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (45,1)-(45,3) = "::"
- │ ├── name: :!
- │ ├── message_loc: (45,3)-(45,4) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (47,0)-(47,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (47,0)-(47,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (47,1)-(47,3) = "::"
- │ ├── name: :!=
- │ ├── message_loc: (47,3)-(47,5) = "!="
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (49,0)-(49,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (49,0)-(49,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (49,1)-(49,3) = "::"
- │ ├── name: :^
- │ ├── message_loc: (49,3)-(49,4) = "^"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (51,0)-(51,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (51,0)-(51,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (51,1)-(51,3) = "::"
- │ ├── name: :==
- │ ├── message_loc: (51,3)-(51,5) = "=="
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (53,0)-(53,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (53,0)-(53,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (53,1)-(53,3) = "::"
- │ ├── name: :===
- │ ├── message_loc: (53,3)-(53,6) = "==="
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (55,0)-(55,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (55,0)-(55,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (55,1)-(55,3) = "::"
- │ ├── name: :=~
- │ ├── message_loc: (55,3)-(55,5) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (57,0)-(57,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (57,0)-(57,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (57,1)-(57,3) = "::"
- │ ├── name: :>
- │ ├── message_loc: (57,3)-(57,4) = ">"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (59,0)-(59,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (59,0)-(59,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (59,1)-(59,3) = "::"
- │ ├── name: :>=
- │ ├── message_loc: (59,3)-(59,5) = ">="
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (61,0)-(61,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (61,0)-(61,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (61,1)-(61,3) = "::"
- │ ├── name: :>>
- │ ├── message_loc: (61,3)-(61,5) = ">>"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (63,0)-(63,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (63,0)-(63,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (63,1)-(63,3) = "::"
- │ ├── name: :<<
- │ ├── message_loc: (63,3)-(63,5) = "<<"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ConstantPathNode (location: (65,0)-(67,1))
- │ ├── parent:
- │ │ @ ConstantReadNode (location: (65,0)-(65,1))
- │ │ └── name: :A
- │ ├── name: :C
- │ ├── delimiter_loc: (65,1)-(65,3) = "::"
- │ └── name_loc: (67,0)-(67,1) = "C"
- ├── @ CallNode (location: (69,0)-(69,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (69,0)-(69,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (69,1)-(69,3) = "::"
- │ ├── name: :alias
- │ ├── message_loc: (69,3)-(69,8) = "alias"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (71,0)-(71,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (71,0)-(71,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (71,1)-(71,3) = "::"
- │ ├── name: :and
- │ ├── message_loc: (71,3)-(71,6) = "and"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (73,0)-(73,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (73,0)-(73,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (73,1)-(73,3) = "::"
- │ ├── name: :begin
- │ ├── message_loc: (73,3)-(73,8) = "begin"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ConstantPathNode (location: (75,0)-(75,8))
- │ ├── parent:
- │ │ @ ConstantReadNode (location: (75,0)-(75,1))
- │ │ └── name: :A
- │ ├── name: :BEGIN
- │ ├── delimiter_loc: (75,1)-(75,3) = "::"
- │ └── name_loc: (75,3)-(75,8) = "BEGIN"
- ├── @ CallNode (location: (77,0)-(77,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (77,0)-(77,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (77,1)-(77,3) = "::"
- │ ├── name: :break
- │ ├── message_loc: (77,3)-(77,8) = "break"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (79,0)-(79,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (79,0)-(79,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (79,1)-(79,3) = "::"
- │ ├── name: :class
- │ ├── message_loc: (79,3)-(79,8) = "class"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (81,0)-(81,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (81,0)-(81,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (81,1)-(81,3) = "::"
- │ ├── name: :def
- │ ├── message_loc: (81,3)-(81,6) = "def"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (83,0)-(83,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (83,0)-(83,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (83,1)-(83,3) = "::"
- │ ├── name: :defined
- │ ├── message_loc: (83,3)-(83,10) = "defined"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (85,0)-(85,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (85,0)-(85,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (85,1)-(85,3) = "::"
- │ ├── name: :do
- │ ├── message_loc: (85,3)-(85,5) = "do"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (87,0)-(87,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (87,0)-(87,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (87,1)-(87,3) = "::"
- │ ├── name: :else
- │ ├── message_loc: (87,3)-(87,7) = "else"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (89,0)-(89,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (89,0)-(89,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (89,1)-(89,3) = "::"
- │ ├── name: :elsif
- │ ├── message_loc: (89,3)-(89,8) = "elsif"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (91,0)-(91,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (91,0)-(91,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (91,1)-(91,3) = "::"
- │ ├── name: :end
- │ ├── message_loc: (91,3)-(91,6) = "end"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ConstantPathNode (location: (93,0)-(93,6))
- │ ├── parent:
- │ │ @ ConstantReadNode (location: (93,0)-(93,1))
- │ │ └── name: :A
- │ ├── name: :END
- │ ├── delimiter_loc: (93,1)-(93,3) = "::"
- │ └── name_loc: (93,3)-(93,6) = "END"
- ├── @ CallNode (location: (95,0)-(95,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (95,0)-(95,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (95,1)-(95,3) = "::"
- │ ├── name: :ensure
- │ ├── message_loc: (95,3)-(95,9) = "ensure"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (97,0)-(97,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (97,0)-(97,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (97,1)-(97,3) = "::"
- │ ├── name: :false
- │ ├── message_loc: (97,3)-(97,8) = "false"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (99,0)-(99,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (99,0)-(99,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (99,1)-(99,3) = "::"
- │ ├── name: :for
- │ ├── message_loc: (99,3)-(99,6) = "for"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (101,0)-(101,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (101,0)-(101,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (101,1)-(101,3) = "::"
- │ ├── name: :if
- │ ├── message_loc: (101,3)-(101,5) = "if"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (103,0)-(103,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (103,0)-(103,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (103,1)-(103,3) = "::"
- │ ├── name: :in
- │ ├── message_loc: (103,3)-(103,5) = "in"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (105,0)-(105,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (105,0)-(105,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (105,1)-(105,3) = "::"
- │ ├── name: :next
- │ ├── message_loc: (105,3)-(105,7) = "next"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (107,0)-(107,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (107,0)-(107,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (107,1)-(107,3) = "::"
- │ ├── name: :nil
- │ ├── message_loc: (107,3)-(107,6) = "nil"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (109,0)-(109,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (109,0)-(109,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (109,1)-(109,3) = "::"
- │ ├── name: :not
- │ ├── message_loc: (109,3)-(109,6) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (111,0)-(111,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (111,0)-(111,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (111,1)-(111,3) = "::"
- │ ├── name: :or
- │ ├── message_loc: (111,3)-(111,5) = "or"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (113,0)-(113,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (113,0)-(113,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (113,1)-(113,3) = "::"
- │ ├── name: :redo
- │ ├── message_loc: (113,3)-(113,7) = "redo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (115,0)-(115,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (115,0)-(115,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (115,1)-(115,3) = "::"
- │ ├── name: :rescue
- │ ├── message_loc: (115,3)-(115,9) = "rescue"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (117,0)-(117,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (117,0)-(117,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (117,1)-(117,3) = "::"
- │ ├── name: :retry
- │ ├── message_loc: (117,3)-(117,8) = "retry"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (119,0)-(119,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (119,0)-(119,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (119,1)-(119,3) = "::"
- │ ├── name: :return
- │ ├── message_loc: (119,3)-(119,9) = "return"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (121,0)-(121,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (121,0)-(121,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (121,1)-(121,3) = "::"
- │ ├── name: :self
- │ ├── message_loc: (121,3)-(121,7) = "self"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (123,0)-(123,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (123,0)-(123,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (123,1)-(123,3) = "::"
- │ ├── name: :super
- │ ├── message_loc: (123,3)-(123,8) = "super"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (125,0)-(125,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (125,0)-(125,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (125,1)-(125,3) = "::"
- │ ├── name: :then
- │ ├── message_loc: (125,3)-(125,7) = "then"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (127,0)-(127,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (127,0)-(127,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (127,1)-(127,3) = "::"
- │ ├── name: :true
- │ ├── message_loc: (127,3)-(127,7) = "true"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (129,0)-(129,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (129,0)-(129,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (129,1)-(129,3) = "::"
- │ ├── name: :undef
- │ ├── message_loc: (129,3)-(129,8) = "undef"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (131,0)-(131,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (131,0)-(131,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (131,1)-(131,3) = "::"
- │ ├── name: :unless
- │ ├── message_loc: (131,3)-(131,9) = "unless"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (133,0)-(133,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (133,0)-(133,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (133,1)-(133,3) = "::"
- │ ├── name: :until
- │ ├── message_loc: (133,3)-(133,8) = "until"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (135,0)-(135,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (135,0)-(135,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (135,1)-(135,3) = "::"
- │ ├── name: :when
- │ ├── message_loc: (135,3)-(135,7) = "when"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (137,0)-(137,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (137,0)-(137,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (137,1)-(137,3) = "::"
- │ ├── name: :while
- │ ├── message_loc: (137,3)-(137,8) = "while"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (139,0)-(139,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (139,0)-(139,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (139,1)-(139,3) = "::"
- │ ├── name: :yield
- │ ├── message_loc: (139,3)-(139,8) = "yield"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (141,0)-(141,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (141,0)-(141,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (141,1)-(141,3) = "::"
- │ ├── name: :__ENCODING__
- │ ├── message_loc: (141,3)-(141,15) = "__ENCODING__"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (143,0)-(143,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (143,0)-(143,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (143,1)-(143,3) = "::"
- │ ├── name: :__FILE__
- │ ├── message_loc: (143,3)-(143,11) = "__FILE__"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (145,0)-(145,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (145,0)-(145,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (145,1)-(145,3) = "::"
- │ ├── name: :__LINE__
- │ ├── message_loc: (145,3)-(145,11) = "__LINE__"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (147,0)-(147,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (147,0)-(147,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (147,1)-(147,3) = "::"
- │ ├── name: :<
- │ ├── message_loc: (147,3)-(147,4) = "<"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (149,0)-(149,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (149,0)-(149,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (149,1)-(149,3) = "::"
- │ ├── name: :<=>
- │ ├── message_loc: (149,3)-(149,6) = "<=>"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (151,0)-(151,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (151,0)-(151,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (151,1)-(151,3) = "::"
- │ ├── name: :<<
- │ ├── message_loc: (151,3)-(151,5) = "<<"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (153,0)-(153,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (153,0)-(153,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (153,1)-(153,3) = "::"
- │ ├── name: :-
- │ ├── message_loc: (153,3)-(153,4) = "-"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (155,0)-(155,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (155,0)-(155,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (155,1)-(155,3) = "::"
- │ ├── name: :%
- │ ├── message_loc: (155,3)-(155,4) = "%"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (157,0)-(157,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (157,0)-(157,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (157,1)-(157,3) = "::"
- │ ├── name: :%
- │ ├── message_loc: (157,3)-(157,4) = "%"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (157,4)-(157,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (157,4)-(157,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :i
- │ │ ├── message_loc: (157,4)-(157,5) = "i"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (159,0)-(159,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (159,0)-(159,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (159,1)-(159,3) = "::"
- │ ├── name: :%
- │ ├── message_loc: (159,3)-(159,4) = "%"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (159,4)-(159,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (159,4)-(159,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :w
- │ │ ├── message_loc: (159,4)-(159,5) = "w"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (161,0)-(161,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (161,0)-(161,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (161,1)-(161,3) = "::"
- │ ├── name: :%
- │ ├── message_loc: (161,3)-(161,4) = "%"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (161,4)-(161,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (161,4)-(161,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :x
- │ │ ├── message_loc: (161,4)-(161,5) = "x"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (163,0)-(163,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (163,0)-(163,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (163,1)-(163,3) = "::"
- │ ├── name: :%
- │ ├── message_loc: (163,3)-(163,4) = "%"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (163,4)-(163,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ConstantReadNode (location: (163,4)-(163,5))
- │ │ └── name: :I
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (165,0)-(165,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (165,0)-(165,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (165,1)-(165,3) = "::"
- │ ├── name: :%
- │ ├── message_loc: (165,3)-(165,4) = "%"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (165,4)-(165,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ConstantReadNode (location: (165,4)-(165,5))
- │ │ └── name: :W
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (167,0)-(167,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (167,0)-(167,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (167,1)-(167,3) = "::"
- │ ├── name: :|
- │ ├── message_loc: (167,3)-(167,4) = "|"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (169,0)-(169,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (169,0)-(169,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (169,1)-(169,3) = "::"
- │ ├── name: :+
- │ ├── message_loc: (169,3)-(169,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (171,0)-(171,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (171,0)-(171,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (171,1)-(171,3) = "::"
- │ ├── name: :/
- │ ├── message_loc: (171,3)-(171,4) = "/"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (173,0)-(173,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (173,0)-(173,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (173,1)-(173,3) = "::"
- │ ├── name: :*
- │ ├── message_loc: (173,3)-(173,4) = "*"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (175,0)-(175,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (175,0)-(175,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (175,1)-(175,3) = "::"
- │ ├── name: :**
- │ ├── message_loc: (175,3)-(175,5) = "**"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (177,0)-(177,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (177,0)-(177,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (177,1)-(177,3) = "::"
- │ ├── name: :~
- │ ├── message_loc: (177,3)-(177,4) = "~"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ConstantPathNode (location: (179,0)-(180,1))
- │ ├── parent:
- │ │ @ CallNode (location: (179,0)-(179,4))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ ConstantReadNode (location: (179,0)-(179,1))
- │ │ │ └── name: :A
- │ │ ├── call_operator_loc: (179,1)-(179,3) = "::"
- │ │ ├── name: :_
- │ │ ├── message_loc: (179,3)-(179,4) = "_"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── name: :C
- │ ├── delimiter_loc: (179,4)-(179,6) = "::"
- │ └── name_loc: (180,0)-(180,1) = "C"
- └── @ RangeNode (location: (182,0)-(184,10))
- ├── flags: ∅
- ├── left:
- │ @ CallNode (location: (182,0)-(182,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (182,0)-(182,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (182,1)-(182,3) = "::"
- │ ├── name: :_
- │ ├── message_loc: (182,3)-(182,4) = "_"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── right:
- │ @ CallNode (location: (184,0)-(184,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (184,0)-(184,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (184,1)-(184,3) = "::"
- │ ├── name: :__END__
- │ ├── message_loc: (184,3)-(184,10) = "__END__"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── operator_loc: (182,4)-(182,6) = ".."
diff --git a/test/prism/snapshots/dash_heredocs.txt b/test/prism/snapshots/dash_heredocs.txt
deleted file mode 100644
index bd2b05ea0d..0000000000
--- a/test/prism/snapshots/dash_heredocs.txt
+++ /dev/null
@@ -1,260 +0,0 @@
-@ ProgramNode (location: (1,0)-(57,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(57,11))
- └── body: (length: 13)
- ├── @ StringNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,6) = "<<-EOF"
- │ ├── content_loc: (2,0)-(3,0) = " a\n"
- │ ├── closing_loc: (3,0)-(4,0) = "EOF\n"
- │ └── unescaped: " a\n"
- ├── @ CallNode (location: (5,0)-(5,20))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (5,0)-(5,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (5,0)-(5,8) = "<<-FIRST"
- │ │ ├── content_loc: (6,0)-(7,0) = " a\n"
- │ │ ├── closing_loc: (7,0)-(8,0) = "FIRST\n"
- │ │ └── unescaped: " a\n"
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (5,9)-(5,10) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,11)-(5,20))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (5,11)-(5,20))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (5,11)-(5,20) = "<<-SECOND"
- │ │ ├── content_loc: (8,0)-(9,0) = " b\n"
- │ │ ├── closing_loc: (9,0)-(10,0) = "SECOND\n"
- │ │ └── unescaped: " b\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ InterpolatedXStringNode (location: (11,0)-(11,8))
- │ ├── opening_loc: (11,0)-(11,8) = "<<-`EOF`"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (12,0)-(13,0))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (12,0)-(13,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (13,0)-(13,4))
- │ │ │ ├── opening_loc: (13,0)-(13,2) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (13,2)-(13,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (13,2)-(13,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (13,2)-(13,3) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (13,3)-(13,4) = "}"
- │ │ └── @ StringNode (location: (13,4)-(14,0))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (13,4)-(14,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (14,0)-(15,0) = "EOF\n"
- ├── @ StringNode (location: (16,0)-(16,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (16,0)-(16,6) = "<<-EOF"
- │ ├── content_loc: (17,0)-(18,0) = " a\n"
- │ ├── closing_loc: (18,0)-(19,0) = "EOF\n"
- │ └── unescaped: " a\n"
- ├── @ StringNode (location: (20,0)-(20,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (20,0)-(20,6) = "<<-EOF"
- │ ├── content_loc: (21,0)-(23,0) = " a\n b\n"
- │ ├── closing_loc: (23,0)-(24,0) = " EOF\n"
- │ └── unescaped: " a\n b\n"
- ├── @ InterpolatedStringNode (location: (25,0)-(25,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (25,0)-(25,8) = "<<-\"EOF\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (26,0)-(27,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (26,0)-(27,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (27,0)-(27,4))
- │ │ │ ├── opening_loc: (27,0)-(27,2) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (27,2)-(27,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (27,2)-(27,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (27,2)-(27,3) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (27,3)-(27,4) = "}"
- │ │ └── @ StringNode (location: (27,4)-(28,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (27,4)-(28,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (28,0)-(29,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (30,0)-(30,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (30,0)-(30,6) = "<<-EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (31,0)-(32,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (31,0)-(32,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (32,0)-(32,4))
- │ │ │ ├── opening_loc: (32,0)-(32,2) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (32,2)-(32,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (32,2)-(32,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (32,2)-(32,3) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (32,3)-(32,4) = "}"
- │ │ └── @ StringNode (location: (32,4)-(33,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (32,4)-(33,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (33,0)-(34,0) = "EOF\n"
- ├── @ StringNode (location: (35,0)-(35,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (35,0)-(35,2) = "%#"
- │ ├── content_loc: (35,2)-(35,5) = "abc"
- │ ├── closing_loc: (35,5)-(35,6) = "#"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (37,0)-(37,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (37,0)-(37,6) = "<<-EOF"
- │ ├── content_loc: (38,0)-(40,0) = " a\n b\n"
- │ ├── closing_loc: (40,0)-(41,0) = "EOF\n"
- │ └── unescaped: " a\n b\n"
- ├── @ StringNode (location: (42,0)-(42,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (42,0)-(42,5) = "<<-''"
- │ ├── content_loc: (43,0)-(43,0) = ""
- │ ├── closing_loc: (43,0)-(44,0) = "\n"
- │ └── unescaped: ""
- ├── @ StringNode (location: (45,0)-(45,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (45,0)-(45,8) = "<<-'EOF'"
- │ ├── content_loc: (46,0)-(47,0) = " a \#{1}\n"
- │ ├── closing_loc: (47,0)-(48,0) = "EOF\n"
- │ └── unescaped: " a \#{1}\n"
- ├── @ CallNode (location: (49,0)-(49,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (49,0)-(49,4))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (49,0)-(49,4) = "<<-A"
- │ │ ├── content_loc: (50,0)-(51,0) = " a\n"
- │ │ ├── closing_loc: (51,0)-(52,0) = "A\n"
- │ │ └── unescaped: " a\n"
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (49,5)-(49,6) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (49,7)-(49,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (49,7)-(49,11))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (49,7)-(49,11) = "<<-B"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (52,0)-(53,2))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (52,0)-(53,2) = " b\n "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " b\n "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (53,2)-(54,3))
- │ │ │ │ ├── opening_loc: (53,2)-(53,4) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (53,4)-(53,5))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (53,4)-(53,5))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ └── closing_loc: (54,2)-(54,3) = "}"
- │ │ │ └── @ StringNode (location: (54,3)-(55,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (54,3)-(55,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (55,0)-(56,0) = "B\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (57,0)-(57,11))
- ├── flags: ∅
- ├── receiver:
- │ @ StringNode (location: (57,0)-(57,4))
- │ ├── flags: ∅
- │ ├── opening_loc: (57,0)-(57,4) = "<<-A"
- │ ├── content_loc: (58,0)-(59,0) = " a\n"
- │ ├── closing_loc: (59,0)-(60,0) = "A\n"
- │ └── unescaped: " a\n"
- ├── call_operator_loc: ∅
- ├── name: :+
- ├── message_loc: (57,5)-(57,6) = "+"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (57,7)-(57,11))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ InterpolatedStringNode (location: (57,7)-(57,11))
- │ ├── flags: ∅
- │ ├── opening_loc: (57,7)-(57,11) = "<<-B"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (60,0)-(61,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (60,0)-(61,2) = " b\n "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " b\n "
- │ │ ├── @ EmbeddedStatementsNode (location: (61,2)-(62,4))
- │ │ │ ├── opening_loc: (61,2)-(61,4) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (62,2)-(62,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (62,2)-(62,3))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── closing_loc: (62,3)-(62,4) = "}"
- │ │ └── @ StringNode (location: (62,4)-(63,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (62,4)-(63,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (63,0)-(64,0) = "B\n"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/defined.txt b/test/prism/snapshots/defined.txt
deleted file mode 100644
index c60173ff37..0000000000
--- a/test/prism/snapshots/defined.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-@ ProgramNode (location: (1,0)-(10,1))
-├── locals: [:x]
-└── statements:
- @ StatementsNode (location: (1,0)-(10,1))
- └── body: (length: 5)
- ├── @ AndNode (location: (1,0)-(1,25))
- │ ├── left:
- │ │ @ DefinedNode (location: (1,0)-(1,10))
- │ │ ├── lparen_loc: ∅
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rparen_loc: ∅
- │ │ └── keyword_loc: (1,0)-(1,8) = "defined?"
- │ ├── right:
- │ │ @ DefinedNode (location: (1,15)-(1,25))
- │ │ ├── lparen_loc: ∅
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,24)-(1,25))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── rparen_loc: ∅
- │ │ └── keyword_loc: (1,15)-(1,23) = "defined?"
- │ └── operator_loc: (1,11)-(1,14) = "and"
- ├── @ DefinedNode (location: (3,0)-(3,16))
- │ ├── lparen_loc: (3,8)-(3,9) = "("
- │ ├── value:
- │ │ @ LocalVariableOperatorWriteNode (location: (3,9)-(3,15))
- │ │ ├── name_loc: (3,9)-(3,10) = "x"
- │ │ ├── binary_operator_loc: (3,11)-(3,13) = "%="
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (3,14)-(3,15))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── name: :x
- │ │ ├── binary_operator: :%
- │ │ └── depth: 0
- │ ├── rparen_loc: (3,15)-(3,16) = ")"
- │ └── keyword_loc: (3,0)-(3,8) = "defined?"
- ├── @ DefinedNode (location: (5,0)-(5,21))
- │ ├── lparen_loc: (5,8)-(5,9) = "("
- │ ├── value:
- │ │ @ AndNode (location: (5,9)-(5,20))
- │ │ ├── left:
- │ │ │ @ CallNode (location: (5,9)-(5,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (5,17)-(5,20))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (5,17)-(5,20) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (5,13)-(5,16) = "and"
- │ ├── rparen_loc: (5,20)-(5,21) = ")"
- │ └── keyword_loc: (5,0)-(5,8) = "defined?"
- ├── @ DefinedNode (location: (7,0)-(7,10))
- │ ├── lparen_loc: ∅
- │ ├── value:
- │ │ @ IntegerNode (location: (7,9)-(7,10))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── rparen_loc: ∅
- │ └── keyword_loc: (7,0)-(7,8) = "defined?"
- └── @ DefinedNode (location: (9,0)-(10,1))
- ├── lparen_loc: (9,8)-(9,9) = "("
- ├── value:
- │ @ StringNode (location: (9,9)-(9,14))
- │ ├── flags: ∅
- │ ├── opening_loc: (9,9)-(9,10) = "\""
- │ ├── content_loc: (9,10)-(9,13) = "foo"
- │ ├── closing_loc: (9,13)-(9,14) = "\""
- │ └── unescaped: "foo"
- ├── rparen_loc: (10,0)-(10,1) = ")"
- └── keyword_loc: (9,0)-(9,8) = "defined?"
diff --git a/test/prism/snapshots/dos_endings.txt b/test/prism/snapshots/dos_endings.txt
deleted file mode 100644
index 1ae15e1e87..0000000000
--- a/test/prism/snapshots/dos_endings.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-@ ProgramNode (location: (1,0)-(17,20))
-├── locals: [:x, :a]
-└── statements:
- @ StatementsNode (location: (1,0)-(17,20))
- └── body: (length: 5)
- ├── @ CallNode (location: (1,0)-(2,12))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :puts
- │ ├── message_loc: (1,0)-(1,4) = "puts"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,5)-(2,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (1,5)-(2,12))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (1,5)-(1,9))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "\""
- │ │ │ │ ├── content_loc: (1,6)-(1,8) = "hi"
- │ │ │ │ ├── closing_loc: (1,8)-(1,9) = "\""
- │ │ │ │ └── unescaped: "hi"
- │ │ │ └── @ StringNode (location: (2,5)-(2,12))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (2,5)-(2,6) = "\""
- │ │ │ ├── content_loc: (2,6)-(2,11) = "there"
- │ │ │ ├── closing_loc: (2,11)-(2,12) = "\""
- │ │ │ └── unescaped: "there"
- │ │ └── closing_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ArrayNode (location: (4,0)-(5,2))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ SymbolNode (location: (4,3)-(5,1))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (4,3)-(5,1) = "a\\\r\nb"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\nb"
- │ ├── opening_loc: (4,0)-(4,3) = "%I{"
- │ └── closing_loc: (5,1)-(5,2) = "}"
- ├── @ StringNode (location: (7,0)-(7,4))
- │ ├── flags: ∅
- │ ├── opening_loc: (7,0)-(7,4) = "<<-E"
- │ ├── content_loc: (8,0)-(11,0) = " 1 \\\r\n 2\r\n 3\r\n"
- │ ├── closing_loc: (11,0)-(12,0) = "E\r\n"
- │ └── unescaped: " 1 2\n 3\n"
- ├── @ LocalVariableWriteNode (location: (13,0)-(15,0))
- │ ├── name: :x
- │ ├── depth: 0
- │ ├── name_loc: (13,0)-(13,1) = "x"
- │ ├── value:
- │ │ @ StringNode (location: (13,4)-(15,0))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (13,4)-(14,0) = "%\r\n"
- │ │ ├── content_loc: (14,0)-(14,0) = ""
- │ │ ├── closing_loc: (14,0)-(15,0) = "\r\n"
- │ │ └── unescaped: ""
- │ └── operator_loc: (13,2)-(13,3) = "="
- └── @ LocalVariableWriteNode (location: (17,0)-(17,20))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (17,0)-(17,1) = "a"
- ├── value:
- │ @ CallNode (location: (17,4)-(17,20))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (17,4)-(17,7) = "foo"
- │ ├── opening_loc: (17,7)-(17,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (17,8)-(17,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (17,8)-(17,19))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ InterpolatedStringNode (location: (17,8)-(17,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (17,8)-(17,14) = "<<~EOF"
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (18,0)-(19,0))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (18,0)-(19,0) = "\r\n"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "\n"
- │ │ │ │ └── @ StringNode (location: (19,0)-(20,0))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (19,0)-(20,0) = " baz\r\n"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "baz\n"
- │ │ │ └── closing_loc: (20,0)-(21,0) = " EOF\r\n"
- │ │ ├── call_operator_loc: (17,14)-(17,15) = "."
- │ │ ├── name: :chop
- │ │ ├── message_loc: (17,15)-(17,19) = "chop"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (17,19)-(17,20) = ")"
- │ └── block: ∅
- └── operator_loc: (17,2)-(17,3) = "="
diff --git a/test/prism/snapshots/dstring.txt b/test/prism/snapshots/dstring.txt
deleted file mode 100644
index 3978a2f087..0000000000
--- a/test/prism/snapshots/dstring.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-@ ProgramNode (location: (1,0)-(29,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(29,1))
- └── body: (length: 8)
- ├── @ StringNode (location: (1,0)-(2,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ ├── content_loc: (1,1)-(2,5) = "foo\n bar"
- │ ├── closing_loc: (2,5)-(2,6) = "\""
- │ └── unescaped: "foo\n bar"
- ├── @ InterpolatedStringNode (location: (4,0)-(5,9))
- │ ├── flags: ∅
- │ ├── opening_loc: (4,0)-(4,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (4,1)-(5,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (4,1)-(5,2) = "foo\n "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo\n "
- │ │ └── @ EmbeddedStatementsNode (location: (5,2)-(5,8))
- │ │ ├── opening_loc: (5,2)-(5,4) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (5,4)-(5,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (5,4)-(5,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (5,4)-(5,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (5,7)-(5,8) = "}"
- │ └── closing_loc: (5,8)-(5,9) = "\""
- ├── @ InterpolatedStringNode (location: (7,0)-(9,2))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (7,0)-(8,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (7,0)-(7,1) = "\""
- │ │ │ ├── content_loc: (7,1)-(8,1) = "fo\no"
- │ │ │ ├── closing_loc: (8,1)-(8,2) = "\""
- │ │ │ └── unescaped: "fo\no"
- │ │ └── @ StringNode (location: (8,3)-(9,2))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (8,3)-(8,4) = "\""
- │ │ ├── content_loc: (8,4)-(9,1) = "ba\nr"
- │ │ ├── closing_loc: (9,1)-(9,2) = "\""
- │ │ └── unescaped: "ba\nr"
- │ └── closing_loc: ∅
- ├── @ StringNode (location: (11,0)-(13,1))
- │ ├── flags: ∅
- │ ├── opening_loc: (11,0)-(11,1) = "\""
- │ ├── content_loc: (11,1)-(13,0) = "\nfoo\\\n"
- │ ├── closing_loc: (13,0)-(13,1) = "\""
- │ └── unescaped: "\nfoo"
- ├── @ StringNode (location: (15,0)-(17,1))
- │ ├── flags: ∅
- │ ├── opening_loc: (15,0)-(15,1) = "\""
- │ ├── content_loc: (15,1)-(17,0) = "\nfoo\\\\\n"
- │ ├── closing_loc: (17,0)-(17,1) = "\""
- │ └── unescaped: "\nfoo\\\n"
- ├── @ StringNode (location: (19,0)-(21,1))
- │ ├── flags: ∅
- │ ├── opening_loc: (19,0)-(19,1) = "\""
- │ ├── content_loc: (19,1)-(21,0) = "\nfoo\\\\\\\n"
- │ ├── closing_loc: (21,0)-(21,1) = "\""
- │ └── unescaped: "\nfoo\\"
- ├── @ StringNode (location: (23,0)-(25,1))
- │ ├── flags: ∅
- │ ├── opening_loc: (23,0)-(23,1) = "\""
- │ ├── content_loc: (23,1)-(25,0) = "\nfoo\\\\\\\\\n"
- │ ├── closing_loc: (25,0)-(25,1) = "\""
- │ └── unescaped: "\nfoo\\\\\n"
- └── @ StringNode (location: (27,0)-(29,1))
- ├── flags: ∅
- ├── opening_loc: (27,0)-(27,1) = "\""
- ├── content_loc: (27,1)-(29,0) = "\nfoo\\\\\\\\\\\n"
- ├── closing_loc: (29,0)-(29,1) = "\""
- └── unescaped: "\nfoo\\\\"
diff --git a/test/prism/snapshots/dsym_str.txt b/test/prism/snapshots/dsym_str.txt
deleted file mode 100644
index 33a5e2da21..0000000000
--- a/test/prism/snapshots/dsym_str.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,6))
- └── body: (length: 1)
- └── @ SymbolNode (location: (1,0)-(2,6))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (1,0)-(1,2) = ":\""
- ├── value_loc: (1,2)-(2,5) = "foo\n bar"
- ├── closing_loc: (2,5)-(2,6) = "\""
- └── unescaped: "foo\n bar"
diff --git a/test/prism/snapshots/embdoc_no_newline_at_end.txt b/test/prism/snapshots/embdoc_no_newline_at_end.txt
deleted file mode 100644
index 3a21ce5559..0000000000
--- a/test/prism/snapshots/embdoc_no_newline_at_end.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,0))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,0))
- └── body: (length: 0)
diff --git a/test/prism/snapshots/emoji_method_calls.txt b/test/prism/snapshots/emoji_method_calls.txt
deleted file mode 100644
index 8f71181ac1..0000000000
--- a/test/prism/snapshots/emoji_method_calls.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,12))
- ├── flags: attribute_write
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,3)-(1,4) = "."
- ├── name: :🌊=
- ├── message_loc: (1,4)-(1,8) = "🌊"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,11)-(1,12))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,11)-(1,12))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/endless_methods.txt b/test/prism/snapshots/endless_methods.txt
deleted file mode 100644
index 6e20c0deec..0000000000
--- a/test/prism/snapshots/endless_methods.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,22))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,22))
- └── body: (length: 3)
- ├── @ DefNode (location: (1,0)-(1,11))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,10)-(1,11))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: (1,8)-(1,9) = "="
- │ └── end_keyword_loc: ∅
- ├── @ DefNode (location: (3,0)-(3,14))
- │ ├── name: :bar
- │ ├── name_loc: (3,4)-(3,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (3,10)-(3,14))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (3,10)-(3,14))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :A
- │ │ ├── message_loc: (3,10)-(3,11) = "A"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (3,12)-(3,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (3,12)-(3,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (3,12)-(3,13) = "\""
- │ │ │ ├── content_loc: (3,13)-(3,13) = ""
- │ │ │ ├── closing_loc: (3,13)-(3,14) = "\""
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: (3,8)-(3,9) = "="
- │ └── end_keyword_loc: ∅
- └── @ DefNode (location: (5,0)-(5,22))
- ├── name: :method
- ├── name_loc: (5,4)-(5,10) = "method"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (5,13)-(5,22))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (5,13)-(5,22))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (5,13)-(5,18))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (5,13)-(5,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :+
- │ │ ├── message_loc: (5,15)-(5,16) = "+"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,17)-(5,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,17)-(5,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (5,19)-(5,20) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,21)-(5,22))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (5,21)-(5,22))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (5,0)-(5,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: (5,11)-(5,12) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/endless_range_in_conditional.txt b/test/prism/snapshots/endless_range_in_conditional.txt
deleted file mode 100644
index 1802c4faed..0000000000
--- a/test/prism/snapshots/endless_range_in_conditional.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,12))
- └── body: (length: 3)
- ├── @ IfNode (location: (1,0)-(1,13))
- │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
- │ ├── predicate:
- │ │ @ FlipFlopNode (location: (1,3)-(1,7))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (1,4)-(1,6) = ".."
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (1,10)-(1,13) = "end"
- ├── @ IfNode (location: (2,0)-(2,12))
- │ ├── if_keyword_loc: (2,0)-(2,2) = "if"
- │ ├── predicate:
- │ │ @ FlipFlopNode (location: (2,3)-(2,6))
- │ │ ├── flags: ∅
- │ │ ├── left: ∅
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (2,5)-(2,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (2,3)-(2,5) = ".."
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (2,9)-(2,12) = "end"
- └── @ IfNode (location: (3,0)-(3,12))
- ├── if_keyword_loc: (3,0)-(3,2) = "if"
- ├── predicate:
- │ @ FlipFlopNode (location: (3,3)-(3,6))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (3,3)-(3,4))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right: ∅
- │ └── operator_loc: (3,4)-(3,6) = ".."
- ├── then_keyword_loc: ∅
- ├── statements: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (3,9)-(3,12) = "end"
diff --git a/test/prism/snapshots/for.txt b/test/prism/snapshots/for.txt
deleted file mode 100644
index cc4bbc1166..0000000000
--- a/test/prism/snapshots/for.txt
+++ /dev/null
@@ -1,188 +0,0 @@
-@ ProgramNode (location: (1,0)-(19,22))
-├── locals: [:i, :j, :k]
-└── statements:
- @ StatementsNode (location: (1,0)-(19,22))
- └── body: (length: 6)
- ├── @ ForNode (location: (1,0)-(3,3))
- │ ├── index:
- │ │ @ LocalVariableTargetNode (location: (1,4)-(1,5))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── collection:
- │ │ @ RangeNode (location: (1,9)-(1,14))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 10
- │ │ └── operator_loc: (1,10)-(1,12) = ".."
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,0)-(2,1))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (2,0)-(2,1))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── for_keyword_loc: (1,0)-(1,3) = "for"
- │ ├── in_keyword_loc: (1,6)-(1,8) = "in"
- │ ├── do_keyword_loc: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ ForNode (location: (5,0)-(5,22))
- │ ├── index:
- │ │ @ LocalVariableTargetNode (location: (5,4)-(5,5))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── collection:
- │ │ @ RangeNode (location: (5,9)-(5,14))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (5,9)-(5,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (5,12)-(5,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 10
- │ │ └── operator_loc: (5,10)-(5,12) = ".."
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,16)-(5,17))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (5,16)-(5,17))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── for_keyword_loc: (5,0)-(5,3) = "for"
- │ ├── in_keyword_loc: (5,6)-(5,8) = "in"
- │ ├── do_keyword_loc: ∅
- │ └── end_keyword_loc: (5,19)-(5,22) = "end"
- ├── @ ForNode (location: (7,0)-(9,3))
- │ ├── index:
- │ │ @ MultiTargetNode (location: (7,4)-(7,7))
- │ │ ├── lefts: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (7,4)-(7,5))
- │ │ │ │ ├── name: :i
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (7,6)-(7,7))
- │ │ │ ├── name: :j
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── rights: (length: 0)
- │ │ ├── lparen_loc: ∅
- │ │ └── rparen_loc: ∅
- │ ├── collection:
- │ │ @ RangeNode (location: (7,11)-(7,16))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (7,11)-(7,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (7,14)-(7,16))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 10
- │ │ └── operator_loc: (7,12)-(7,14) = ".."
- │ ├── statements:
- │ │ @ StatementsNode (location: (8,0)-(8,1))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (8,0)-(8,1))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── for_keyword_loc: (7,0)-(7,3) = "for"
- │ ├── in_keyword_loc: (7,8)-(7,10) = "in"
- │ ├── do_keyword_loc: ∅
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- ├── @ ForNode (location: (11,0)-(13,3))
- │ ├── index:
- │ │ @ MultiTargetNode (location: (11,4)-(11,9))
- │ │ ├── lefts: (length: 3)
- │ │ │ ├── @ LocalVariableTargetNode (location: (11,4)-(11,5))
- │ │ │ │ ├── name: :i
- │ │ │ │ └── depth: 0
- │ │ │ ├── @ LocalVariableTargetNode (location: (11,6)-(11,7))
- │ │ │ │ ├── name: :j
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (11,8)-(11,9))
- │ │ │ ├── name: :k
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── rights: (length: 0)
- │ │ ├── lparen_loc: ∅
- │ │ └── rparen_loc: ∅
- │ ├── collection:
- │ │ @ RangeNode (location: (11,13)-(11,18))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (11,13)-(11,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (11,16)-(11,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 10
- │ │ └── operator_loc: (11,14)-(11,16) = ".."
- │ ├── statements:
- │ │ @ StatementsNode (location: (12,0)-(12,1))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (12,0)-(12,1))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── for_keyword_loc: (11,0)-(11,3) = "for"
- │ ├── in_keyword_loc: (11,10)-(11,12) = "in"
- │ ├── do_keyword_loc: ∅
- │ └── end_keyword_loc: (13,0)-(13,3) = "end"
- ├── @ ForNode (location: (15,0)-(17,3))
- │ ├── index:
- │ │ @ LocalVariableTargetNode (location: (15,4)-(15,5))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── collection:
- │ │ @ RangeNode (location: (15,9)-(15,14))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (15,9)-(15,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (15,12)-(15,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 10
- │ │ └── operator_loc: (15,10)-(15,12) = ".."
- │ ├── statements:
- │ │ @ StatementsNode (location: (16,0)-(16,1))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (16,0)-(16,1))
- │ │ ├── name: :i
- │ │ └── depth: 0
- │ ├── for_keyword_loc: (15,0)-(15,3) = "for"
- │ ├── in_keyword_loc: (15,6)-(15,8) = "in"
- │ ├── do_keyword_loc: (15,15)-(15,17) = "do"
- │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- └── @ ForNode (location: (19,0)-(19,22))
- ├── index:
- │ @ LocalVariableTargetNode (location: (19,4)-(19,5))
- │ ├── name: :i
- │ └── depth: 0
- ├── collection:
- │ @ RangeNode (location: (19,9)-(19,14))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (19,9)-(19,10))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (19,12)-(19,14))
- │ │ ├── flags: decimal
- │ │ └── value: 10
- │ └── operator_loc: (19,10)-(19,12) = ".."
- ├── statements:
- │ @ StatementsNode (location: (19,16)-(19,17))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (19,16)-(19,17))
- │ ├── name: :i
- │ └── depth: 0
- ├── for_keyword_loc: (19,0)-(19,3) = "for"
- ├── in_keyword_loc: (19,6)-(19,8) = "in"
- ├── do_keyword_loc: ∅
- └── end_keyword_loc: (19,19)-(19,22) = "end"
diff --git a/test/prism/snapshots/global_variables.txt b/test/prism/snapshots/global_variables.txt
deleted file mode 100644
index 9f775ed80d..0000000000
--- a/test/prism/snapshots/global_variables.txt
+++ /dev/null
@@ -1,191 +0,0 @@
-@ ProgramNode (location: (1,0)-(93,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(93,4))
- └── body: (length: 47)
- ├── @ GlobalVariableReadNode (location: (1,0)-(1,16))
- │ └── name: :$global_variable
- ├── @ GlobalVariableReadNode (location: (3,0)-(3,2))
- │ └── name: :$_
- ├── @ GlobalVariableReadNode (location: (5,0)-(5,3))
- │ └── name: :$-w
- ├── @ GlobalVariableReadNode (location: (7,0)-(7,10))
- │ └── name: :$LOAD_PATH
- ├── @ GlobalVariableReadNode (location: (9,0)-(9,6))
- │ └── name: :$stdin
- ├── @ GlobalVariableReadNode (location: (11,0)-(11,7))
- │ └── name: :$stdout
- ├── @ GlobalVariableReadNode (location: (13,0)-(13,7))
- │ └── name: :$stderr
- ├── @ GlobalVariableReadNode (location: (15,0)-(15,2))
- │ └── name: :$!
- ├── @ GlobalVariableReadNode (location: (17,0)-(17,2))
- │ └── name: :$?
- ├── @ GlobalVariableReadNode (location: (19,0)-(19,2))
- │ └── name: :$~
- ├── @ BackReferenceReadNode (location: (21,0)-(21,2))
- │ └── name: :$&
- ├── @ BackReferenceReadNode (location: (23,0)-(23,2))
- │ └── name: :$`
- ├── @ BackReferenceReadNode (location: (25,0)-(25,2))
- │ └── name: :$'
- ├── @ BackReferenceReadNode (location: (27,0)-(27,2))
- │ └── name: :$+
- ├── @ GlobalVariableReadNode (location: (29,0)-(29,2))
- │ └── name: :$:
- ├── @ GlobalVariableReadNode (location: (31,0)-(31,2))
- │ └── name: :$;
- ├── @ GlobalVariableReadNode (location: (33,0)-(33,2))
- │ └── name: :$,
- ├── @ GlobalVariableReadNode (location: (35,0)-(35,6))
- │ └── name: :$DEBUG
- ├── @ GlobalVariableReadNode (location: (37,0)-(37,9))
- │ └── name: :$FILENAME
- ├── @ GlobalVariableReadNode (location: (39,0)-(39,2))
- │ └── name: :$0
- ├── @ GlobalVariableReadNode (location: (41,0)-(41,3))
- │ └── name: :$-0
- ├── @ GlobalVariableReadNode (location: (43,0)-(43,16))
- │ └── name: :$LOADED_FEATURES
- ├── @ GlobalVariableReadNode (location: (45,0)-(45,8))
- │ └── name: :$VERBOSE
- ├── @ GlobalVariableReadNode (location: (47,0)-(47,3))
- │ └── name: :$-K
- ├── @ SymbolNode (location: (49,0)-(49,17))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (49,0)-(49,1) = ":"
- │ ├── value_loc: (49,1)-(49,17) = "$global_variable"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$global_variable"
- ├── @ SymbolNode (location: (51,0)-(51,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (51,0)-(51,1) = ":"
- │ ├── value_loc: (51,1)-(51,3) = "$_"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$_"
- ├── @ SymbolNode (location: (53,0)-(53,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (53,0)-(53,1) = ":"
- │ ├── value_loc: (53,1)-(53,4) = "$-w"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$-w"
- ├── @ SymbolNode (location: (55,0)-(55,11))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (55,0)-(55,1) = ":"
- │ ├── value_loc: (55,1)-(55,11) = "$LOAD_PATH"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$LOAD_PATH"
- ├── @ SymbolNode (location: (57,0)-(57,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (57,0)-(57,1) = ":"
- │ ├── value_loc: (57,1)-(57,7) = "$stdin"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$stdin"
- ├── @ SymbolNode (location: (59,0)-(59,8))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (59,0)-(59,1) = ":"
- │ ├── value_loc: (59,1)-(59,8) = "$stdout"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$stdout"
- ├── @ SymbolNode (location: (61,0)-(61,8))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (61,0)-(61,1) = ":"
- │ ├── value_loc: (61,1)-(61,8) = "$stderr"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$stderr"
- ├── @ SymbolNode (location: (63,0)-(63,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (63,0)-(63,1) = ":"
- │ ├── value_loc: (63,1)-(63,3) = "$!"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$!"
- ├── @ SymbolNode (location: (65,0)-(65,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (65,0)-(65,1) = ":"
- │ ├── value_loc: (65,1)-(65,3) = "$?"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$?"
- ├── @ SymbolNode (location: (67,0)-(67,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (67,0)-(67,1) = ":"
- │ ├── value_loc: (67,1)-(67,3) = "$~"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$~"
- ├── @ SymbolNode (location: (69,0)-(69,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (69,0)-(69,1) = ":"
- │ ├── value_loc: (69,1)-(69,3) = "$&"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$&"
- ├── @ SymbolNode (location: (71,0)-(71,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (71,0)-(71,1) = ":"
- │ ├── value_loc: (71,1)-(71,3) = "$`"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$`"
- ├── @ SymbolNode (location: (73,0)-(73,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (73,0)-(73,1) = ":"
- │ ├── value_loc: (73,1)-(73,3) = "$'"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$'"
- ├── @ SymbolNode (location: (75,0)-(75,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (75,0)-(75,1) = ":"
- │ ├── value_loc: (75,1)-(75,3) = "$+"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$+"
- ├── @ SymbolNode (location: (77,0)-(77,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (77,0)-(77,1) = ":"
- │ ├── value_loc: (77,1)-(77,3) = "$:"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$:"
- ├── @ SymbolNode (location: (79,0)-(79,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (79,0)-(79,1) = ":"
- │ ├── value_loc: (79,1)-(79,3) = "$;"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$;"
- ├── @ SymbolNode (location: (81,0)-(81,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (81,0)-(81,1) = ":"
- │ ├── value_loc: (81,1)-(81,7) = "$DEBUG"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$DEBUG"
- ├── @ SymbolNode (location: (83,0)-(83,10))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (83,0)-(83,1) = ":"
- │ ├── value_loc: (83,1)-(83,10) = "$FILENAME"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$FILENAME"
- ├── @ SymbolNode (location: (85,0)-(85,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (85,0)-(85,1) = ":"
- │ ├── value_loc: (85,1)-(85,3) = "$0"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$0"
- ├── @ SymbolNode (location: (87,0)-(87,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (87,0)-(87,1) = ":"
- │ ├── value_loc: (87,1)-(87,4) = "$-0"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$-0"
- ├── @ SymbolNode (location: (89,0)-(89,17))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (89,0)-(89,1) = ":"
- │ ├── value_loc: (89,1)-(89,17) = "$LOADED_FEATURES"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$LOADED_FEATURES"
- ├── @ SymbolNode (location: (91,0)-(91,9))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (91,0)-(91,1) = ":"
- │ ├── value_loc: (91,1)-(91,9) = "$VERBOSE"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$VERBOSE"
- └── @ SymbolNode (location: (93,0)-(93,4))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (93,0)-(93,1) = ":"
- ├── value_loc: (93,1)-(93,4) = "$-K"
- ├── closing_loc: ∅
- └── unescaped: "$-K"
diff --git a/test/prism/snapshots/hashes.txt b/test/prism/snapshots/hashes.txt
deleted file mode 100644
index 7a3ac4b0ea..0000000000
--- a/test/prism/snapshots/hashes.txt
+++ /dev/null
@@ -1,384 +0,0 @@
-@ ProgramNode (location: (1,0)-(28,9))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(28,9))
- └── body: (length: 10)
- ├── @ HashNode (location: (1,0)-(1,2))
- │ ├── opening_loc: (1,0)-(1,1) = "{"
- │ ├── elements: (length: 0)
- │ └── closing_loc: (1,1)-(1,2) = "}"
- ├── @ HashNode (location: (3,0)-(4,1))
- │ ├── opening_loc: (3,0)-(3,1) = "{"
- │ ├── elements: (length: 0)
- │ └── closing_loc: (4,0)-(4,1) = "}"
- ├── @ HashNode (location: (6,0)-(6,18))
- │ ├── opening_loc: (6,0)-(6,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (6,2)-(6,8))
- │ │ │ ├── key:
- │ │ │ │ @ CallNode (location: (6,2)-(6,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (6,2)-(6,3) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (6,7)-(6,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (6,7)-(6,8) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (6,4)-(6,6) = "=>"
- │ │ └── @ AssocNode (location: (6,10)-(6,16))
- │ │ ├── key:
- │ │ │ @ CallNode (location: (6,10)-(6,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (6,10)-(6,11) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── value:
- │ │ │ @ CallNode (location: (6,15)-(6,16))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (6,15)-(6,16) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (6,12)-(6,14) = "=>"
- │ └── closing_loc: (6,17)-(6,18) = "}"
- ├── @ HashNode (location: (8,0)-(8,15))
- │ ├── opening_loc: (8,0)-(8,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (8,2)-(8,8))
- │ │ │ ├── key:
- │ │ │ │ @ CallNode (location: (8,2)-(8,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (8,2)-(8,3) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (8,7)-(8,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (8,7)-(8,8) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (8,4)-(8,6) = "=>"
- │ │ └── @ AssocSplatNode (location: (8,10)-(8,13))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (8,12)-(8,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (8,12)-(8,13) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (8,10)-(8,12) = "**"
- │ └── closing_loc: (8,14)-(8,15) = "}"
- ├── @ HashNode (location: (10,0)-(16,5))
- │ ├── opening_loc: (10,0)-(10,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (11,6)-(11,10))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (11,6)-(11,8))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (11,6)-(11,7) = "a"
- │ │ │ │ ├── closing_loc: (11,7)-(11,8) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (11,9)-(11,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (11,9)-(11,10) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: ∅
- │ │ └── @ AssocNode (location: (12,6)-(12,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (12,6)-(12,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (12,6)-(12,7) = "c"
- │ │ │ ├── closing_loc: (12,7)-(12,8) = ":"
- │ │ │ └── unescaped: "c"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (12,9)-(12,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (12,9)-(12,10) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (16,4)-(16,5) = "}"
- ├── @ HashNode (location: (18,0)-(18,25))
- │ ├── opening_loc: (18,0)-(18,1) = "{"
- │ ├── elements: (length: 4)
- │ │ ├── @ AssocNode (location: (18,2)-(18,6))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (18,2)-(18,4))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (18,2)-(18,3) = "a"
- │ │ │ │ ├── closing_loc: (18,3)-(18,4) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (18,5)-(18,6))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (18,5)-(18,6) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: ∅
- │ │ ├── @ AssocNode (location: (18,8)-(18,12))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (18,8)-(18,10))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (18,8)-(18,9) = "c"
- │ │ │ │ ├── closing_loc: (18,9)-(18,10) = ":"
- │ │ │ │ └── unescaped: "c"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (18,11)-(18,12))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :d
- │ │ │ │ ├── message_loc: (18,11)-(18,12) = "d"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: ∅
- │ │ ├── @ AssocSplatNode (location: (18,14)-(18,17))
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (18,16)-(18,17))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :e
- │ │ │ │ ├── message_loc: (18,16)-(18,17) = "e"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (18,14)-(18,16) = "**"
- │ │ └── @ AssocNode (location: (18,19)-(18,23))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (18,19)-(18,21))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (18,19)-(18,20) = "f"
- │ │ │ ├── closing_loc: (18,20)-(18,21) = ":"
- │ │ │ └── unescaped: "f"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (18,22)-(18,23))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :g
- │ │ │ ├── message_loc: (18,22)-(18,23) = "g"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (18,24)-(18,25) = "}"
- ├── @ HashNode (location: (20,0)-(20,12))
- │ ├── opening_loc: (20,0)-(20,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (20,2)-(20,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (20,2)-(20,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (20,2)-(20,3) = "\""
- │ │ │ ├── value_loc: (20,3)-(20,4) = "a"
- │ │ │ ├── closing_loc: (20,4)-(20,6) = "\":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (20,7)-(20,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (20,8)-(20,10))
- │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b?
- │ │ │ │ ├── message_loc: (20,8)-(20,10) = "b?"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :!
- │ │ │ ├── message_loc: (20,7)-(20,8) = "!"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (20,11)-(20,12) = "}"
- ├── @ LocalVariableWriteNode (location: (22,0)-(22,5))
- │ ├── name: :a
- │ ├── depth: 0
- │ ├── name_loc: (22,0)-(22,1) = "a"
- │ ├── value:
- │ │ @ IntegerNode (location: (22,4)-(22,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (22,2)-(22,3) = "="
- ├── @ CallNode (location: (23,0)-(26,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (23,0)-(23,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (23,4)-(26,3))
- │ ├── locals: [:b]
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (24,2)-(25,20))
- │ │ └── body: (length: 2)
- │ │ ├── @ LocalVariableWriteNode (location: (24,2)-(24,7))
- │ │ │ ├── name: :b
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (24,2)-(24,3) = "b"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (24,6)-(24,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: (24,4)-(24,5) = "="
- │ │ └── @ HashNode (location: (25,2)-(25,20))
- │ │ ├── opening_loc: (25,2)-(25,3) = "{"
- │ │ ├── elements: (length: 4)
- │ │ │ ├── @ AssocNode (location: (25,4)-(25,6))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (25,4)-(25,6))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (25,4)-(25,5) = "a"
- │ │ │ │ │ ├── closing_loc: (25,5)-(25,6) = ":"
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ ImplicitNode (location: (25,4)-(25,6))
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ LocalVariableReadNode (location: (25,4)-(25,6))
- │ │ │ │ │ ├── name: :a
- │ │ │ │ │ └── depth: 1
- │ │ │ │ └── operator_loc: ∅
- │ │ │ ├── @ AssocNode (location: (25,8)-(25,10))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (25,8)-(25,10))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (25,8)-(25,9) = "b"
- │ │ │ │ │ ├── closing_loc: (25,9)-(25,10) = ":"
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ ImplicitNode (location: (25,8)-(25,10))
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ LocalVariableReadNode (location: (25,8)-(25,10))
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── operator_loc: ∅
- │ │ │ ├── @ AssocNode (location: (25,12)-(25,14))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (25,12)-(25,14))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (25,12)-(25,13) = "c"
- │ │ │ │ │ ├── closing_loc: (25,13)-(25,14) = ":"
- │ │ │ │ │ └── unescaped: "c"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ ImplicitNode (location: (25,12)-(25,14))
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ CallNode (location: (25,12)-(25,14))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :c
- │ │ │ │ │ ├── message_loc: (25,12)-(25,13) = "c"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ AssocNode (location: (25,16)-(25,18))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (25,16)-(25,18))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (25,16)-(25,17) = "D"
- │ │ │ │ ├── closing_loc: (25,17)-(25,18) = ":"
- │ │ │ │ └── unescaped: "D"
- │ │ │ ├── value:
- │ │ │ │ @ ImplicitNode (location: (25,16)-(25,18))
- │ │ │ │ └── value:
- │ │ │ │ @ ConstantReadNode (location: (25,16)-(25,18))
- │ │ │ │ └── name: :D
- │ │ │ └── operator_loc: ∅
- │ │ └── closing_loc: (25,19)-(25,20) = "}"
- │ ├── opening_loc: (23,4)-(23,6) = "do"
- │ └── closing_loc: (26,0)-(26,3) = "end"
- └── @ HashNode (location: (28,0)-(28,9))
- ├── opening_loc: (28,0)-(28,1) = "{"
- ├── elements: (length: 1)
- │ └── @ AssocNode (location: (28,2)-(28,7))
- │ ├── key:
- │ │ @ SymbolNode (location: (28,2)-(28,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (28,2)-(28,3) = "a"
- │ │ ├── closing_loc: (28,3)-(28,4) = ":"
- │ │ └── unescaped: "a"
- │ ├── value:
- │ │ @ IntegerNode (location: (28,5)-(28,7))
- │ │ ├── flags: decimal
- │ │ └── value: -1
- │ └── operator_loc: ∅
- └── closing_loc: (28,8)-(28,9) = "}"
diff --git a/test/prism/snapshots/heredoc.txt b/test/prism/snapshots/heredoc.txt
deleted file mode 100644
index 3ca66dd989..0000000000
--- a/test/prism/snapshots/heredoc.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,6) = "<<TEXT"
- ├── content_loc: (2,0)-(2,0) = ""
- ├── closing_loc: (2,0)-(3,0) = "TEXT\n"
- └── unescaped: ""
diff --git a/test/prism/snapshots/heredoc_with_carriage_returns.txt b/test/prism/snapshots/heredoc_with_carriage_returns.txt
deleted file mode 100644
index 134f863234..0000000000
--- a/test/prism/snapshots/heredoc_with_carriage_returns.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,6) = "<<TEXT"
- ├── content_loc: (2,0)-(2,0) = ""
- ├── closing_loc: (2,0)-(3,0) = "TEXT\r\n"
- └── unescaped: ""
diff --git a/test/prism/snapshots/heredoc_with_comment.txt b/test/prism/snapshots/heredoc_with_comment.txt
deleted file mode 100644
index f2225ca981..0000000000
--- a/test/prism/snapshots/heredoc_with_comment.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,15))
- ├── flags: ∅
- ├── receiver:
- │ @ StringNode (location: (1,0)-(1,9))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,9) = "<<-TARGET"
- │ ├── content_loc: (2,0)-(3,0) = " content makes for an obvious error\r\n"
- │ ├── closing_loc: (3,0)-(3,6) = "TARGET"
- │ └── unescaped: " content makes for an obvious error\n"
- ├── call_operator_loc: (1,9)-(1,10) = "."
- ├── name: :chomp
- ├── message_loc: (1,10)-(1,15) = "chomp"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt b/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt
deleted file mode 100644
index acc6b082fc..0000000000
--- a/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,25))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,25))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,25))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (1,0)-(1,9))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,0)-(1,9) = "<<-TARGET"
- │ │ ├── content_loc: (2,0)-(2,0) = ""
- │ │ ├── closing_loc: (2,0)-(3,0) = "TARGET\n"
- │ │ └── unescaped: ""
- │ ├── call_operator_loc: (1,9)-(1,10) = "."
- │ ├── name: :gsub
- │ ├── message_loc: (1,10)-(1,14) = "gsub"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,15)-(1,25))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ RegularExpressionNode (location: (1,15)-(1,21))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,15)-(1,16) = "/"
- │ │ │ ├── content_loc: (1,16)-(1,20) = "^\\s{"
- │ │ │ ├── closing_loc: (1,20)-(1,21) = "/"
- │ │ │ └── unescaped: "^\\s{"
- │ │ └── @ StringNode (location: (1,23)-(1,25))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,23)-(1,24) = "'"
- │ │ ├── content_loc: (1,24)-(1,24) = ""
- │ │ ├── closing_loc: (1,24)-(1,25) = "'"
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (5,0)-(5,25))
- ├── flags: ∅
- ├── receiver:
- │ @ StringNode (location: (5,0)-(5,9))
- │ ├── flags: ∅
- │ ├── opening_loc: (5,0)-(5,9) = "<<-TARGET"
- │ ├── content_loc: (6,0)-(6,0) = ""
- │ ├── closing_loc: (6,0)-(7,0) = "TARGET\r\n"
- │ └── unescaped: ""
- ├── call_operator_loc: (5,9)-(5,10) = "."
- ├── name: :gsub
- ├── message_loc: (5,10)-(5,14) = "gsub"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (5,15)-(5,25))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ RegularExpressionNode (location: (5,15)-(5,21))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,15)-(5,16) = "/"
- │ │ ├── content_loc: (5,16)-(5,20) = "^\\s{"
- │ │ ├── closing_loc: (5,20)-(5,21) = "/"
- │ │ └── unescaped: "^\\s{"
- │ └── @ StringNode (location: (5,23)-(5,25))
- │ ├── flags: ∅
- │ ├── opening_loc: (5,23)-(5,24) = "'"
- │ ├── content_loc: (5,24)-(5,24) = ""
- │ ├── closing_loc: (5,24)-(5,25) = "'"
- │ └── unescaped: ""
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/heredoc_with_trailing_newline.txt b/test/prism/snapshots/heredoc_with_trailing_newline.txt
deleted file mode 100644
index b064931aa8..0000000000
--- a/test/prism/snapshots/heredoc_with_trailing_newline.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,6) = "<<-END"
- ├── content_loc: (2,0)-(2,0) = ""
- ├── closing_loc: (2,0)-(2,3) = "END"
- └── unescaped: ""
diff --git a/test/prism/snapshots/heredocs_leading_whitespace.txt b/test/prism/snapshots/heredocs_leading_whitespace.txt
deleted file mode 100644
index dbcb0d5a19..0000000000
--- a/test/prism/snapshots/heredocs_leading_whitespace.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-@ ProgramNode (location: (1,0)-(26,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(26,10))
- └── body: (length: 6)
- ├── @ StringNode (location: (1,0)-(1,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,10) = "<<-' FOO'"
- │ ├── content_loc: (2,0)-(4,0) = "a\nb\n"
- │ ├── closing_loc: (4,0)-(5,0) = " FOO\n"
- │ └── unescaped: "a\nb\n"
- ├── @ StringNode (location: (6,0)-(6,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (6,0)-(6,10) = "<<-\" FOO\""
- │ ├── content_loc: (7,0)-(9,0) = "a\nb\n"
- │ ├── closing_loc: (9,0)-(10,0) = " FOO\n"
- │ └── unescaped: "a\nb\n"
- ├── @ XStringNode (location: (11,0)-(11,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (11,0)-(11,10) = "<<-` FOO`"
- │ ├── content_loc: (12,0)-(14,0) = "a\nb\n"
- │ ├── closing_loc: (14,0)-(15,0) = " FOO\n"
- │ └── unescaped: "a\nb\n"
- ├── @ StringNode (location: (16,0)-(16,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (16,0)-(16,10) = "<<-' FOO'"
- │ ├── content_loc: (17,0)-(19,0) = "a\nb\n"
- │ ├── closing_loc: (19,0)-(20,0) = " FOO\n"
- │ └── unescaped: "a\nb\n"
- ├── @ InterpolatedStringNode (location: (21,0)-(21,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (21,0)-(21,10) = "<<~' FOO'"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (22,0)-(23,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (22,0)-(23,0) = "a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ StringNode (location: (23,0)-(24,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (23,0)-(24,0) = "b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (24,0)-(25,0) = " FOO\n"
- └── @ InterpolatedStringNode (location: (26,0)-(26,10))
- ├── flags: ∅
- ├── opening_loc: (26,0)-(26,10) = "<<~' FOO'"
- ├── parts: (length: 2)
- │ ├── @ StringNode (location: (27,0)-(28,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (27,0)-(28,0) = "a\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\n"
- │ └── @ StringNode (location: (28,0)-(29,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (28,0)-(29,0) = "b\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "b\n"
- └── closing_loc: (29,0)-(30,0) = " FOO\n"
diff --git a/test/prism/snapshots/heredocs_nested.txt b/test/prism/snapshots/heredocs_nested.txt
deleted file mode 100644
index da13e48c51..0000000000
--- a/test/prism/snapshots/heredocs_nested.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-@ ProgramNode (location: (1,0)-(12,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(12,4))
- └── body: (length: 2)
- ├── @ InterpolatedStringNode (location: (1,0)-(1,7))
- │ ├── flags: mutable
- │ ├── opening_loc: (1,0)-(1,7) = "<<~RUBY"
- │ ├── parts: (length: 4)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = "pre\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "pre\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (3,0)-(7,1))
- │ │ │ ├── opening_loc: (3,0)-(3,2) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (4,0)-(4,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ StringNode (location: (4,0)-(4,6))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: (4,0)-(4,6) = "<<RUBY"
- │ │ │ │ ├── content_loc: (5,0)-(6,0) = " hello\n"
- │ │ │ │ ├── closing_loc: (6,0)-(7,0) = "RUBY\n"
- │ │ │ │ └── unescaped: " hello\n"
- │ │ │ └── closing_loc: (7,0)-(7,1) = "}"
- │ │ ├── @ StringNode (location: (7,1)-(8,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (7,1)-(8,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (8,0)-(9,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (8,0)-(9,0) = "post\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "post\n"
- │ └── closing_loc: (9,0)-(10,0) = "RUBY\n"
- └── @ InterpolatedStringNode (location: (12,0)-(12,4))
- ├── flags: ∅
- ├── opening_loc: (12,0)-(12,4) = "<<-A"
- ├── parts: (length: 2)
- │ ├── @ EmbeddedStatementsNode (location: (13,0)-(21,1))
- │ │ ├── opening_loc: (13,0)-(13,2) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (14,0)-(14,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ InterpolatedStringNode (location: (14,0)-(14,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (14,0)-(14,4) = "<<-B"
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ EmbeddedStatementsNode (location: (15,0)-(19,1))
- │ │ │ │ │ ├── opening_loc: (15,0)-(15,2) = "\#{"
- │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ @ StatementsNode (location: (16,0)-(16,4))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ InterpolatedStringNode (location: (16,0)-(16,4))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ ├── opening_loc: (16,0)-(16,4) = "<<-C"
- │ │ │ │ │ │ ├── parts: (length: 2)
- │ │ │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (17,0)-(17,4))
- │ │ │ │ │ │ │ │ ├── opening_loc: (17,0)-(17,2) = "\#{"
- │ │ │ │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ │ │ │ @ StatementsNode (location: (17,2)-(17,3))
- │ │ │ │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ │ │ │ └── @ IntegerNode (location: (17,2)-(17,3))
- │ │ │ │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ │ │ │ └── value: 3
- │ │ │ │ │ │ │ │ └── closing_loc: (17,3)-(17,4) = "}"
- │ │ │ │ │ │ │ └── @ StringNode (location: (17,4)-(18,0))
- │ │ │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ │ ├── content_loc: (17,4)-(18,0) = "\n"
- │ │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ │ └── unescaped: "\n"
- │ │ │ │ │ │ └── closing_loc: (18,0)-(19,0) = "C\n"
- │ │ │ │ │ └── closing_loc: (19,0)-(19,1) = "}"
- │ │ │ │ └── @ StringNode (location: (19,1)-(20,0))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (19,1)-(20,0) = "\n"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "\n"
- │ │ │ └── closing_loc: (20,0)-(21,0) = "B\n"
- │ │ └── closing_loc: (21,0)-(21,1) = "}"
- │ └── @ StringNode (location: (21,1)-(22,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (21,1)-(22,0) = "\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\n"
- └── closing_loc: (22,0)-(23,0) = "A\n"
diff --git a/test/prism/snapshots/heredocs_with_ignored_newlines.txt b/test/prism/snapshots/heredocs_with_ignored_newlines.txt
deleted file mode 100644
index 0f964ec294..0000000000
--- a/test/prism/snapshots/heredocs_with_ignored_newlines.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,8))
- └── body: (length: 2)
- ├── @ StringNode (location: (1,0)-(1,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,7) = "<<-HERE"
- │ ├── content_loc: (2,0)-(2,0) = ""
- │ ├── closing_loc: (2,0)-(3,0) = "HERE\n"
- │ └── unescaped: ""
- └── @ InterpolatedStringNode (location: (4,0)-(4,8))
- ├── flags: ∅
- ├── opening_loc: (4,0)-(4,8) = "<<~THERE"
- ├── parts: (length: 9)
- │ ├── @ StringNode (location: (5,0)-(6,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (5,0)-(6,0) = " way over\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "way over\n"
- │ ├── @ StringNode (location: (6,0)-(7,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (6,0)-(7,0) = " <<HERE\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "<<HERE\n"
- │ ├── @ StringNode (location: (7,0)-(8,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (7,0)-(8,0) = " not here\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " not here\n"
- │ ├── @ StringNode (location: (8,0)-(9,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (8,0)-(9,0) = " HERE\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "HERE\n"
- │ ├── @ StringNode (location: (9,0)-(10,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (9,0)-(10,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ ├── @ StringNode (location: (10,0)-(11,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (10,0)-(11,0) = " <<~BUT\\\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "<<~BUT"
- │ ├── @ StringNode (location: (11,0)-(12,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (11,0)-(12,0) = " but\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " but\n"
- │ ├── @ StringNode (location: (12,0)-(13,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (12,0)-(13,0) = " BUT\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "BUT\n"
- │ └── @ StringNode (location: (13,0)-(14,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (13,0)-(14,0) = " there\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: " there\n"
- └── closing_loc: (14,0)-(15,0) = "THERE\n"
diff --git a/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt b/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt
deleted file mode 100644
index df422f0c1c..0000000000
--- a/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,6) = "<<-EOE"
- ├── content_loc: (2,0)-(4,0) = " some\n heredocs\n"
- ├── closing_loc: (4,0)-(4,3) = "EOE"
- └── unescaped: " some\n heredocs\n"
diff --git a/test/prism/snapshots/if.txt b/test/prism/snapshots/if.txt
deleted file mode 100644
index 4114d22722..0000000000
--- a/test/prism/snapshots/if.txt
+++ /dev/null
@@ -1,531 +0,0 @@
-@ ProgramNode (location: (1,0)-(42,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(42,3))
- └── body: (length: 13)
- ├── @ IfNode (location: (1,0)-(1,15))
- │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (1,3)-(1,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,9)-(1,10))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (1,9)-(1,10))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (1,12)-(1,15) = "end"
- ├── @ IfNode (location: (3,0)-(4,12))
- │ ├── if_keyword_loc: (3,0)-(3,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (3,3)-(3,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (4,0)-(4,1))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (4,0)-(4,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── consequent:
- │ │ @ ElseNode (location: (4,2)-(4,12))
- │ │ ├── else_keyword_loc: (4,2)-(4,6) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (4,7)-(4,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (4,7)-(4,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── end_keyword_loc: (4,9)-(4,12) = "end"
- │ └── end_keyword_loc: (4,9)-(4,12) = "end"
- ├── @ IfNode (location: (6,0)-(6,73))
- │ ├── if_keyword_loc: (6,0)-(6,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (6,3)-(6,7))
- │ ├── then_keyword_loc: (6,8)-(6,12) = "then"
- │ ├── statements:
- │ │ @ StatementsNode (location: (6,13)-(6,17))
- │ │ └── body: (length: 1)
- │ │ └── @ TrueNode (location: (6,13)-(6,17))
- │ ├── consequent:
- │ │ @ IfNode (location: (6,18)-(6,73))
- │ │ ├── if_keyword_loc: (6,18)-(6,23) = "elsif"
- │ │ ├── predicate:
- │ │ │ @ FalseNode (location: (6,24)-(6,29))
- │ │ ├── then_keyword_loc: (6,30)-(6,34) = "then"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (6,35)-(6,40))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ FalseNode (location: (6,35)-(6,40))
- │ │ ├── consequent:
- │ │ │ @ IfNode (location: (6,41)-(6,73))
- │ │ │ ├── if_keyword_loc: (6,41)-(6,46) = "elsif"
- │ │ │ ├── predicate:
- │ │ │ │ @ NilNode (location: (6,47)-(6,50))
- │ │ │ ├── then_keyword_loc: (6,51)-(6,55) = "then"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (6,56)-(6,59))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ NilNode (location: (6,56)-(6,59))
- │ │ │ ├── consequent:
- │ │ │ │ @ ElseNode (location: (6,60)-(6,73))
- │ │ │ │ ├── else_keyword_loc: (6,60)-(6,64) = "else"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (6,65)-(6,69))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ SelfNode (location: (6,65)-(6,69))
- │ │ │ │ └── end_keyword_loc: (6,70)-(6,73) = "end"
- │ │ │ └── end_keyword_loc: (6,70)-(6,73) = "end"
- │ │ └── end_keyword_loc: (6,70)-(6,73) = "end"
- │ └── end_keyword_loc: (6,70)-(6,73) = "end"
- ├── @ IfNode (location: (8,0)-(8,9))
- │ ├── if_keyword_loc: (8,2)-(8,4) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (8,5)-(8,9))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (8,0)-(8,1))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (8,0)-(8,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- ├── @ CallNode (location: (10,0)-(10,21))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (10,0)-(10,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (10,4)-(10,21))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (10,6)-(10,19))
- │ │ └── body: (length: 1)
- │ │ └── @ IfNode (location: (10,6)-(10,19))
- │ │ ├── if_keyword_loc: (10,12)-(10,14) = "if"
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (10,15)-(10,19))
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (10,6)-(10,11))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ BreakNode (location: (10,6)-(10,11))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (10,6)-(10,11) = "break"
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── opening_loc: (10,4)-(10,5) = "{"
- │ └── closing_loc: (10,20)-(10,21) = "}"
- ├── @ CallNode (location: (12,0)-(12,20))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (12,0)-(12,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (12,4)-(12,20))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (12,6)-(12,18))
- │ │ └── body: (length: 1)
- │ │ └── @ IfNode (location: (12,6)-(12,18))
- │ │ ├── if_keyword_loc: (12,11)-(12,13) = "if"
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (12,14)-(12,18))
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (12,6)-(12,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ NextNode (location: (12,6)-(12,10))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (12,6)-(12,10) = "next"
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── opening_loc: (12,4)-(12,5) = "{"
- │ └── closing_loc: (12,19)-(12,20) = "}"
- ├── @ IfNode (location: (14,0)-(14,14))
- │ ├── if_keyword_loc: (14,7)-(14,9) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (14,10)-(14,14))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (14,0)-(14,6))
- │ │ └── body: (length: 1)
- │ │ └── @ ReturnNode (location: (14,0)-(14,6))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (14,0)-(14,6) = "return"
- │ │ └── arguments: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- ├── @ CallNode (location: (16,0)-(16,38))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (16,0)-(16,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (16,4)-(16,38))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (16,6)-(16,36))
- │ │ └── body: (length: 1)
- │ │ └── @ IfNode (location: (16,6)-(16,36))
- │ │ ├── if_keyword_loc: (16,6)-(16,8) = "if"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (16,9)-(16,18))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :exit_loop
- │ │ │ ├── message_loc: (16,9)-(16,18) = "exit_loop"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: (16,19)-(16,23) = "then"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (16,24)-(16,32))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ BreakNode (location: (16,24)-(16,32))
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (16,30)-(16,32))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (16,30)-(16,32))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── keyword_loc: (16,24)-(16,29) = "break"
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: (16,33)-(16,36) = "end"
- │ ├── opening_loc: (16,4)-(16,5) = "{"
- │ └── closing_loc: (16,37)-(16,38) = "}"
- ├── @ IfNode (location: (18,0)-(20,3))
- │ ├── if_keyword_loc: (18,0)-(18,2) = "if"
- │ ├── predicate:
- │ │ @ CallNode (location: (18,3)-(18,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (18,3)-(18,6) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (19,0)-(19,4) = "then"
- │ ├── statements:
- │ │ @ StatementsNode (location: (19,5)-(19,8))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (19,5)-(19,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (19,5)-(19,8) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (20,0)-(20,3) = "end"
- ├── @ IfNode (location: (22,0)-(22,11))
- │ ├── if_keyword_loc: (22,7)-(22,9) = "if"
- │ ├── predicate:
- │ │ @ CallNode (location: (22,10)-(22,11))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (22,10)-(22,11) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (22,0)-(22,6))
- │ │ └── body: (length: 1)
- │ │ └── @ IfNode (location: (22,0)-(22,6))
- │ │ ├── if_keyword_loc: (22,2)-(22,4) = "if"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (22,5)-(22,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (22,5)-(22,6) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (22,0)-(22,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (22,0)-(22,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (22,0)-(22,1) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- ├── @ IfNode (location: (24,0)-(27,3))
- │ ├── if_keyword_loc: (24,0)-(24,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (24,3)-(24,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (25,2)-(25,6))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (25,2)-(25,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (25,2)-(25,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (25,4)-(25,6))
- │ │ │ ├── flags: contains_keywords
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ KeywordHashNode (location: (25,4)-(25,6))
- │ │ │ ├── flags: symbol_keys
- │ │ │ └── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (25,4)-(25,6))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (25,4)-(25,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (25,4)-(25,5) = "b"
- │ │ │ │ ├── closing_loc: (25,5)-(25,6) = ":"
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── value:
- │ │ │ │ @ ImplicitNode (location: (25,4)-(25,6))
- │ │ │ │ └── value:
- │ │ │ │ @ CallNode (location: (25,4)-(25,6))
- │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (25,4)-(25,5) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (26,0)-(27,3))
- │ │ ├── else_keyword_loc: (26,0)-(26,4) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (27,0)-(27,3) = "end"
- │ └── end_keyword_loc: (27,0)-(27,3) = "end"
- ├── @ IfNode (location: (29,0)-(31,3))
- │ ├── if_keyword_loc: (29,0)-(29,2) = "if"
- │ ├── predicate:
- │ │ @ MatchPredicateNode (location: (29,3)-(29,12))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (29,3)-(29,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :type
- │ │ │ ├── message_loc: (29,3)-(29,7) = "type"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (29,11)-(29,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (29,8)-(29,10) = "in"
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent:
- │ │ @ IfNode (location: (30,0)-(31,3))
- │ │ ├── if_keyword_loc: (30,0)-(30,5) = "elsif"
- │ │ ├── predicate:
- │ │ │ @ MatchPredicateNode (location: (30,6)-(30,15))
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (30,6)-(30,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :type
- │ │ │ │ ├── message_loc: (30,6)-(30,10) = "type"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── pattern:
- │ │ │ │ @ ConstantReadNode (location: (30,14)-(30,15))
- │ │ │ │ └── name: :B
- │ │ │ └── operator_loc: (30,11)-(30,13) = "in"
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- └── @ IfNode (location: (33,0)-(42,3))
- ├── if_keyword_loc: (33,0)-(33,2) = "if"
- ├── predicate:
- │ @ CallNode (location: (33,3)-(33,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f1
- │ ├── message_loc: (33,3)-(33,5) = "f1"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: ∅
- ├── statements:
- │ @ StatementsNode (location: (34,2)-(35,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (34,2)-(35,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :lambda
- │ ├── message_loc: (34,2)-(34,8) = "lambda"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (34,9)-(35,5))
- │ ├── locals: [:_]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (34,12)-(34,15))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (34,13)-(34,14))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (34,13)-(34,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :_
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (34,12)-(34,13) = "|"
- │ │ └── closing_loc: (34,14)-(34,15) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (34,9)-(34,11) = "do"
- │ └── closing_loc: (35,2)-(35,5) = "end"
- ├── consequent:
- │ @ IfNode (location: (36,0)-(42,3))
- │ ├── if_keyword_loc: (36,0)-(36,5) = "elsif"
- │ ├── predicate:
- │ │ @ CallNode (location: (36,6)-(36,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :f2
- │ │ ├── message_loc: (36,6)-(36,8) = "f2"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (37,2)-(38,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (37,2)-(38,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :lambda
- │ │ ├── message_loc: (37,2)-(37,8) = "lambda"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (37,9)-(38,5))
- │ │ ├── locals: [:_]
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (37,12)-(37,15))
- │ │ │ ├── parameters:
- │ │ │ │ @ ParametersNode (location: (37,13)-(37,14))
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (37,13)-(37,14))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :_
- │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (37,12)-(37,13) = "|"
- │ │ │ └── closing_loc: (37,14)-(37,15) = "|"
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (37,9)-(37,11) = "do"
- │ │ └── closing_loc: (38,2)-(38,5) = "end"
- │ ├── consequent:
- │ │ @ ElseNode (location: (39,0)-(42,3))
- │ │ ├── else_keyword_loc: (39,0)-(39,4) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (40,2)-(41,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (40,2)-(41,5))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :lambda
- │ │ │ ├── message_loc: (40,2)-(40,8) = "lambda"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (40,9)-(41,5))
- │ │ │ ├── locals: [:_]
- │ │ │ ├── parameters:
- │ │ │ │ @ BlockParametersNode (location: (40,12)-(40,15))
- │ │ │ │ ├── parameters:
- │ │ │ │ │ @ ParametersNode (location: (40,13)-(40,14))
- │ │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ │ └── @ RequiredParameterNode (location: (40,13)-(40,14))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :_
- │ │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── locals: (length: 0)
- │ │ │ │ ├── opening_loc: (40,12)-(40,13) = "|"
- │ │ │ │ └── closing_loc: (40,14)-(40,15) = "|"
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (40,9)-(40,11) = "do"
- │ │ │ └── closing_loc: (41,2)-(41,5) = "end"
- │ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
- │ └── end_keyword_loc: (42,0)-(42,3) = "end"
- └── end_keyword_loc: (42,0)-(42,3) = "end"
diff --git a/test/prism/snapshots/indented_file_end.txt b/test/prism/snapshots/indented_file_end.txt
deleted file mode 100644
index aa43ec5a1e..0000000000
--- a/test/prism/snapshots/indented_file_end.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,4)-(3,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,4)-(3,7))
- └── body: (length: 1)
- └── @ DefNode (location: (1,4)-(3,7))
- ├── name: :hi
- ├── name_loc: (1,8)-(1,10) = "hi"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,4)-(1,7) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (3,4)-(3,7) = "end"
diff --git a/test/prism/snapshots/integer_operations.txt b/test/prism/snapshots/integer_operations.txt
deleted file mode 100644
index 4660928ad2..0000000000
--- a/test/prism/snapshots/integer_operations.txt
+++ /dev/null
@@ -1,635 +0,0 @@
-@ ProgramNode (location: (1,0)-(63,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(63,7))
- └── body: (length: 32)
- ├── @ CallNode (location: (1,0)-(1,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (1,1)-(1,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,0)-(1,1) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (3,1)-(3,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :~
- │ ├── message_loc: (3,0)-(3,1) = "~"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (5,0)-(5,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :!=
- │ ├── message_loc: (5,2)-(5,4) = "!="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,5)-(5,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (5,5)-(5,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (7,0)-(7,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (7,0)-(7,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :!~
- │ ├── message_loc: (7,2)-(7,4) = "!~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,5)-(7,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (7,5)-(7,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (9,0)-(9,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (9,0)-(9,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :%
- │ ├── message_loc: (9,2)-(9,3) = "%"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (9,4)-(9,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (9,4)-(9,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (11,0)-(11,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (11,0)-(11,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :&
- │ ├── message_loc: (11,2)-(11,3) = "&"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,4)-(11,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (11,4)-(11,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (13,0)-(13,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (13,0)-(13,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :*
- │ ├── message_loc: (13,2)-(13,3) = "*"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (13,4)-(13,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (13,4)-(13,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (15,0)-(15,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (15,0)-(15,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :**
- │ ├── message_loc: (15,1)-(15,3) = "**"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (15,3)-(15,4))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (15,3)-(15,4))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (17,0)-(17,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (17,0)-(17,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (17,2)-(17,3) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (17,4)-(17,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (17,4)-(17,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (19,0)-(19,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (19,0)-(19,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :-
- │ ├── message_loc: (19,2)-(19,3) = "-"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (19,4)-(19,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (19,4)-(19,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (21,0)-(21,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (21,0)-(21,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :/
- │ ├── message_loc: (21,2)-(21,3) = "/"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (21,4)-(21,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (21,4)-(21,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (23,0)-(23,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (23,0)-(23,3))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (23,0)-(23,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :/
- │ │ ├── message_loc: (23,1)-(23,2) = "/"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (23,2)-(23,3))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (23,2)-(23,3))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :/
- │ ├── message_loc: (23,3)-(23,4) = "/"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (23,4)-(23,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (23,4)-(23,5))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (25,0)-(25,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (25,0)-(25,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :<
- │ ├── message_loc: (25,2)-(25,3) = "<"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (25,4)-(25,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (25,4)-(25,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (27,0)-(27,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (27,0)-(27,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :<<
- │ ├── message_loc: (27,2)-(27,4) = "<<"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (27,5)-(27,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (27,5)-(27,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (29,0)-(29,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (29,0)-(29,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :<=
- │ ├── message_loc: (29,2)-(29,4) = "<="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (29,5)-(29,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (29,5)-(29,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (31,0)-(31,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (31,0)-(31,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :<=>
- │ ├── message_loc: (31,2)-(31,5) = "<=>"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (31,6)-(31,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (31,6)-(31,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (33,0)-(33,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (33,0)-(33,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :==
- │ ├── message_loc: (33,2)-(33,4) = "=="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (33,5)-(33,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (33,5)-(33,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (35,0)-(35,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (35,0)-(35,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :===
- │ ├── message_loc: (35,2)-(35,5) = "==="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (35,6)-(35,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (35,6)-(35,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (37,0)-(37,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (37,0)-(37,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (37,2)-(37,4) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (37,5)-(37,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (37,5)-(37,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (39,0)-(39,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (39,0)-(39,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :>
- │ ├── message_loc: (39,2)-(39,3) = ">"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (39,4)-(39,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (39,4)-(39,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (41,0)-(41,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (41,0)-(41,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :>=
- │ ├── message_loc: (41,2)-(41,4) = ">="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (41,5)-(41,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (41,5)-(41,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (43,0)-(43,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (43,0)-(43,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :>>
- │ ├── message_loc: (43,2)-(43,4) = ">>"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (43,5)-(43,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (43,5)-(43,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (45,0)-(45,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :^
- │ ├── message_loc: (45,2)-(45,3) = "^"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (45,4)-(45,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (45,4)-(45,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (47,0)-(47,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (47,0)-(47,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :|
- │ ├── message_loc: (47,2)-(47,3) = "|"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (47,4)-(47,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (47,4)-(47,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ AndNode (location: (49,0)-(49,6))
- │ ├── left:
- │ │ @ IntegerNode (location: (49,0)-(49,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (49,5)-(49,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (49,2)-(49,4) = "&&"
- ├── @ AndNode (location: (51,0)-(51,7))
- │ ├── left:
- │ │ @ IntegerNode (location: (51,0)-(51,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (51,6)-(51,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (51,2)-(51,5) = "and"
- ├── @ CallNode (location: (53,0)-(53,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (53,0)-(53,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :*
- │ ├── message_loc: (53,2)-(53,3) = "*"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (53,4)-(53,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (53,4)-(53,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (53,4)-(53,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :**
- │ │ ├── message_loc: (53,6)-(53,8) = "**"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (53,9)-(53,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (53,9)-(53,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (55,0)-(55,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (55,0)-(55,5))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (55,0)-(55,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :*
- │ │ ├── message_loc: (55,2)-(55,3) = "*"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (55,4)-(55,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (55,4)-(55,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (55,6)-(55,7) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (55,8)-(55,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (55,8)-(55,9))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ OrNode (location: (57,0)-(57,6))
- │ ├── left:
- │ │ @ IntegerNode (location: (57,0)-(57,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (57,5)-(57,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (57,2)-(57,4) = "or"
- ├── @ OrNode (location: (59,0)-(59,6))
- │ ├── left:
- │ │ @ IntegerNode (location: (59,0)-(59,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (59,5)-(59,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (59,2)-(59,4) = "||"
- ├── @ CallNode (location: (61,0)-(61,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (61,0)-(61,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (61,2)-(61,3) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (61,4)-(61,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (61,4)-(61,9))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (61,4)-(61,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :*
- │ │ ├── message_loc: (61,6)-(61,7) = "*"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (61,8)-(61,9))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (61,8)-(61,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ ParenthesesNode (location: (63,0)-(63,7))
- ├── body:
- │ @ StatementsNode (location: (63,1)-(63,6))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (63,1)-(63,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (63,1)-(63,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (63,3)-(63,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (63,5)-(63,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (63,5)-(63,6))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (63,0)-(63,1) = "("
- └── closing_loc: (63,6)-(63,7) = ")"
diff --git a/test/prism/snapshots/keyword_method_names.txt b/test/prism/snapshots/keyword_method_names.txt
deleted file mode 100644
index 6d59790b07..0000000000
--- a/test/prism/snapshots/keyword_method_names.txt
+++ /dev/null
@@ -1,173 +0,0 @@
-@ ProgramNode (location: (1,0)-(29,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(29,3))
- └── body: (length: 10)
- ├── @ DefNode (location: (1,0)-(2,3))
- │ ├── name: :def
- │ ├── name_loc: (1,4)-(1,7) = "def"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (2,0)-(2,3) = "end"
- ├── @ DefNode (location: (4,0)-(5,3))
- │ ├── name: :ensure
- │ ├── name_loc: (4,9)-(4,15) = "ensure"
- │ ├── receiver:
- │ │ @ SelfNode (location: (4,4)-(4,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
- │ ├── operator_loc: (4,8)-(4,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ CallNode (location: (7,0)-(10,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :private
- │ ├── message_loc: (7,0)-(7,7) = "private"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,8)-(10,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ DefNode (location: (7,8)-(10,3))
- │ │ ├── name: :foo
- │ │ ├── name_loc: (7,12)-(7,15) = "foo"
- │ │ ├── receiver: ∅
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (8,2)-(9,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (8,2)-(9,5))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (8,2)-(8,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (8,6)-(9,5))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (8,6)-(8,8) = "do"
- │ │ │ └── closing_loc: (9,2)-(9,5) = "end"
- │ │ ├── locals: []
- │ │ ├── def_keyword_loc: (7,8)-(7,11) = "def"
- │ │ ├── operator_loc: ∅
- │ │ ├── lparen_loc: ∅
- │ │ ├── rparen_loc: ∅
- │ │ ├── equal_loc: ∅
- │ │ └── end_keyword_loc: (10,0)-(10,3) = "end"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ DefNode (location: (12,0)-(13,3))
- │ ├── name: :m
- │ ├── name_loc: (12,4)-(12,5) = "m"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (12,6)-(12,14))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (12,6)-(12,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ NoKeywordsParameterNode (location: (12,9)-(12,14))
- │ │ │ ├── operator_loc: (12,9)-(12,11) = "**"
- │ │ │ └── keyword_loc: (12,11)-(12,14) = "nil"
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (12,0)-(12,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (12,5)-(12,6) = "("
- │ ├── rparen_loc: (12,14)-(12,15) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (13,0)-(13,3) = "end"
- ├── @ DefNode (location: (15,0)-(16,3))
- │ ├── name: :a
- │ ├── name_loc: (15,17)-(15,18) = "a"
- │ ├── receiver:
- │ │ @ SourceEncodingNode (location: (15,4)-(15,16))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (15,0)-(15,3) = "def"
- │ ├── operator_loc: (15,16)-(15,17) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (16,0)-(16,3) = "end"
- ├── @ StringNode (location: (18,0)-(18,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (18,0)-(18,2) = "%{"
- │ ├── content_loc: (18,2)-(18,5) = "abc"
- │ ├── closing_loc: (18,5)-(18,6) = "}"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (20,0)-(20,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (20,0)-(20,2) = "%\""
- │ ├── content_loc: (20,2)-(20,5) = "abc"
- │ ├── closing_loc: (20,5)-(20,6) = "\""
- │ └── unescaped: "abc"
- ├── @ DefNode (location: (22,0)-(23,3))
- │ ├── name: :a
- │ ├── name_loc: (22,13)-(22,14) = "a"
- │ ├── receiver:
- │ │ @ SourceFileNode (location: (22,4)-(22,12))
- │ │ ├── flags: ∅
- │ │ └── filepath: "keyword_method_names.txt"
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
- │ ├── operator_loc: (22,12)-(22,13) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (23,0)-(23,3) = "end"
- ├── @ DefNode (location: (25,0)-(26,3))
- │ ├── name: :a
- │ ├── name_loc: (25,13)-(25,14) = "a"
- │ ├── receiver:
- │ │ @ SourceLineNode (location: (25,4)-(25,12))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
- │ ├── operator_loc: (25,12)-(25,13) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (26,0)-(26,3) = "end"
- └── @ DefNode (location: (28,0)-(29,3))
- ├── name: :a
- ├── name_loc: (28,9)-(28,10) = "a"
- ├── receiver:
- │ @ NilNode (location: (28,4)-(28,7))
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (28,0)-(28,3) = "def"
- ├── operator_loc: (28,7)-(28,9) = "::"
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (29,0)-(29,3) = "end"
diff --git a/test/prism/snapshots/keywords.txt b/test/prism/snapshots/keywords.txt
deleted file mode 100644
index b3d5c5e1c3..0000000000
--- a/test/prism/snapshots/keywords.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(11,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(11,8))
- └── body: (length: 6)
- ├── @ CallNode (location: (1,0)-(1,12))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (1,0)-(1,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,4)-(1,12))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,6)-(1,10))
- │ │ └── body: (length: 1)
- │ │ └── @ RedoNode (location: (1,6)-(1,10))
- │ ├── opening_loc: (1,4)-(1,5) = "{"
- │ └── closing_loc: (1,11)-(1,12) = "}"
- ├── @ BeginNode (location: (3,0)-(3,25))
- │ ├── begin_keyword_loc: (3,0)-(3,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (3,7)-(3,20))
- │ │ ├── keyword_loc: (3,7)-(3,13) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,15)-(3,20))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ RetryNode (location: (3,15)-(3,20))
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (3,22)-(3,25) = "end"
- ├── @ SelfNode (location: (5,0)-(5,4))
- ├── @ SourceEncodingNode (location: (7,0)-(7,12))
- ├── @ SourceFileNode (location: (9,0)-(9,8))
- │ ├── flags: ∅
- │ └── filepath: "keywords.txt"
- └── @ SourceLineNode (location: (11,0)-(11,8))
diff --git a/test/prism/snapshots/lambda.txt b/test/prism/snapshots/lambda.txt
deleted file mode 100644
index 0864b10369..0000000000
--- a/test/prism/snapshots/lambda.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-@ ProgramNode (location: (1,0)-(11,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(11,18))
- └── body: (length: 5)
- ├── @ LambdaNode (location: (1,0)-(3,4))
- │ ├── locals: [:foo]
- │ ├── operator_loc: (1,0)-(1,2) = "->"
- │ ├── opening_loc: (3,2)-(3,3) = "{"
- │ ├── closing_loc: (3,3)-(3,4) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (1,2)-(3,1))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (2,2)-(2,5))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (2,2)-(2,5))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :foo
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (1,2)-(1,3) = "("
- │ │ └── closing_loc: (3,0)-(3,1) = ")"
- │ └── body: ∅
- ├── @ LambdaNode (location: (5,0)-(5,18))
- │ ├── locals: [:x]
- │ ├── operator_loc: (5,0)-(5,2) = "->"
- │ ├── opening_loc: (5,15)-(5,16) = "{"
- │ ├── closing_loc: (5,17)-(5,18) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (5,2)-(5,14))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (5,3)-(5,13))
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 1)
- │ │ │ │ └── @ OptionalKeywordParameterNode (location: (5,3)-(5,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :x
- │ │ │ │ ├── name_loc: (5,3)-(5,5) = "x:"
- │ │ │ │ └── value:
- │ │ │ │ @ InterpolatedStringNode (location: (5,6)-(5,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (5,6)-(5,7) = "\""
- │ │ │ │ ├── parts: (length: 2)
- │ │ │ │ │ ├── @ StringNode (location: (5,7)-(5,8))
- │ │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── content_loc: (5,7)-(5,8) = "b"
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ │ └── @ EmbeddedStatementsNode (location: (5,8)-(5,12))
- │ │ │ │ │ ├── opening_loc: (5,8)-(5,10) = "\#{"
- │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ @ StatementsNode (location: (5,10)-(5,11))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ CallNode (location: (5,10)-(5,11))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :a
- │ │ │ │ │ │ ├── message_loc: (5,10)-(5,11) = "a"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ └── closing_loc: (5,11)-(5,12) = "}"
- │ │ │ │ └── closing_loc: (5,12)-(5,13) = "\""
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (5,2)-(5,3) = "("
- │ │ └── closing_loc: (5,13)-(5,14) = ")"
- │ └── body: ∅
- ├── @ LambdaNode (location: (7,0)-(7,15))
- │ ├── locals: [:a]
- │ ├── operator_loc: (7,0)-(7,2) = "->"
- │ ├── opening_loc: (7,13)-(7,14) = "{"
- │ ├── closing_loc: (7,14)-(7,15) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (7,2)-(7,12))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (7,3)-(7,11))
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 1)
- │ │ │ │ └── @ OptionalKeywordParameterNode (location: (7,3)-(7,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── name_loc: (7,3)-(7,5) = "a:"
- │ │ │ │ └── value:
- │ │ │ │ @ CallNode (location: (7,6)-(7,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ CallNode (location: (7,6)-(7,7))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ ├── message_loc: (7,6)-(7,7) = "b"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :*
- │ │ │ │ ├── message_loc: (7,8)-(7,9) = "*"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments:
- │ │ │ │ │ @ ArgumentsNode (location: (7,10)-(7,11))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (7,10)-(7,11))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 3
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (7,2)-(7,3) = "("
- │ │ └── closing_loc: (7,11)-(7,12) = ")"
- │ └── body: ∅
- ├── @ LambdaNode (location: (9,0)-(9,19))
- │ ├── locals: [:foo]
- │ ├── operator_loc: (9,0)-(9,2) = "->"
- │ ├── opening_loc: (9,13)-(9,15) = "do"
- │ ├── closing_loc: (9,16)-(9,19) = "end"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (9,3)-(9,12))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (9,3)-(9,12))
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── optionals: (length: 1)
- │ │ │ │ └── @ OptionalParameterNode (location: (9,3)-(9,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── name_loc: (9,3)-(9,6) = "foo"
- │ │ │ │ ├── operator_loc: (9,7)-(9,8) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ CallNode (location: (9,9)-(9,12))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (9,9)-(9,12) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── body: ∅
- └── @ LambdaNode (location: (11,0)-(11,18))
- ├── locals: [:foo]
- ├── operator_loc: (11,0)-(11,2) = "->"
- ├── opening_loc: (11,12)-(11,14) = "do"
- ├── closing_loc: (11,15)-(11,18) = "end"
- ├── parameters:
- │ @ BlockParametersNode (location: (11,3)-(11,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (11,3)-(11,11))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (11,3)-(11,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── name_loc: (11,3)-(11,7) = "foo:"
- │ │ │ └── value:
- │ │ │ @ CallNode (location: (11,8)-(11,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (11,8)-(11,11) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- └── body: ∅
diff --git a/test/prism/snapshots/method_calls.txt b/test/prism/snapshots/method_calls.txt
deleted file mode 100644
index 6082b567f7..0000000000
--- a/test/prism/snapshots/method_calls.txt
+++ /dev/null
@@ -1,2456 +0,0 @@
-@ ProgramNode (location: (1,0)-(156,19))
-├── locals: [:foo]
-└── statements:
- @ StatementsNode (location: (1,0)-(156,19))
- └── body: (length: 67)
- ├── @ CallNode (location: (1,0)-(1,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,3)-(1,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (1,4)-(1,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,8)-(1,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,8)-(1,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,8)-(1,10) = "%{"
- │ │ ├── content_loc: (1,10)-(1,13) = "baz"
- │ │ ├── closing_loc: (1,13)-(1,14) = "}"
- │ │ └── unescaped: "baz"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (3,0)-(3,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (3,0)-(3,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (3,1)-(3,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (3,2)-(3,3) = "b"
- │ ├── opening_loc: (3,3)-(3,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,4)-(3,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (3,4)-(3,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (3,4)-(3,5) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (3,7)-(3,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (3,7)-(3,8) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (3,8)-(3,9) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (5,0)-(5,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (5,0)-(5,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (5,1)-(5,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (5,2)-(5,3) = "b"
- │ ├── opening_loc: (5,3)-(5,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (5,4)-(5,5) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (7,0)-(9,7))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (7,0)-(8,6))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (7,0)-(7,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (8,2)-(8,3) = "."
- │ │ ├── name: :bar
- │ │ ├── message_loc: (8,3)-(8,6) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (9,2)-(9,4) = "&."
- │ ├── name: :baz
- │ ├── message_loc: (9,4)-(9,7) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (11,0)-(11,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a!
- │ ├── message_loc: (11,0)-(11,2) = "a!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (13,0)-(13,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (13,0)-(13,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (13,0)-(13,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (13,1)-(13,2) = "."
- │ ├── name: :call
- │ ├── message_loc: ∅
- │ ├── opening_loc: (13,2)-(13,3) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (13,3)-(13,4) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (15,0)-(15,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (15,0)-(15,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (15,0)-(15,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (15,1)-(15,2) = "."
- │ ├── name: :call
- │ ├── message_loc: ∅
- │ ├── opening_loc: (15,2)-(15,3) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (15,3)-(15,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ IntegerNode (location: (15,3)-(15,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ IntegerNode (location: (15,6)-(15,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── @ IntegerNode (location: (15,9)-(15,10))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── closing_loc: (15,10)-(15,11) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (17,0)-(17,4))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (17,0)-(17,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (17,0)-(17,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (17,1)-(17,3) = "::"
- │ ├── name: :b
- │ ├── message_loc: (17,3)-(17,4) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (19,0)-(19,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (19,0)-(19,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (19,0)-(19,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (19,1)-(19,3) = "::"
- │ ├── name: :b
- │ ├── message_loc: (19,3)-(19,4) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (19,5)-(19,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (19,5)-(19,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (19,5)-(19,6) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (21,0)-(21,11))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ CallNode (location: (21,0)-(21,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (21,0)-(21,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (21,3)-(21,4) = "."
- │ ├── name: :bar=
- │ ├── message_loc: (21,4)-(21,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (21,10)-(21,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (21,10)-(21,11))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (23,0)-(23,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a?
- │ ├── message_loc: (23,0)-(23,2) = "a?"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (25,0)-(25,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (25,0)-(25,1) = "a"
- │ ├── opening_loc: (25,1)-(25,2) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (25,8)-(25,9) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (25,2)-(25,8))
- │ ├── expression:
- │ │ @ CallNode (location: (25,3)-(25,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :block
- │ │ ├── message_loc: (25,3)-(25,8) = "block"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (25,2)-(25,3) = "&"
- ├── @ CallNode (location: (27,0)-(27,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (27,0)-(27,1) = "a"
- │ ├── opening_loc: (27,1)-(27,2) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (27,2)-(27,10))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (27,2)-(27,10))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (27,2)-(27,10))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (27,4)-(27,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :kwargs
- │ │ │ ├── message_loc: (27,4)-(27,10) = "kwargs"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (27,2)-(27,4) = "**"
- │ ├── closing_loc: (27,10)-(27,11) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (29,0)-(29,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (29,0)-(29,3))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (29,0)-(29,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (29,0)-(29,1) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (29,1)-(29,2) = "."
- │ │ ├── name: :b
- │ │ ├── message_loc: (29,2)-(29,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (29,3)-(29,4) = "."
- │ ├── name: :c
- │ ├── message_loc: (29,4)-(29,5) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (31,0)-(31,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (31,0)-(31,1) = "a"
- │ ├── opening_loc: (31,1)-(31,2) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (31,2)-(31,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (31,2)-(31,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (31,2)-(31,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (31,5)-(31,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (31,5)-(31,6) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (31,6)-(31,7) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (33,0)-(33,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (33,0)-(33,1) = "a"
- │ ├── opening_loc: (33,1)-(33,2) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (33,2)-(33,3) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (35,0)-(35,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (35,0)-(35,1) = "a"
- │ ├── opening_loc: (35,1)-(35,2) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (35,2)-(35,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (35,2)-(35,7))
- │ │ ├── operator_loc: (35,2)-(35,3) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (35,3)-(35,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :args
- │ │ ├── message_loc: (35,3)-(35,7) = "args"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (35,7)-(35,8) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (37,0)-(37,6))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (37,0)-(37,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (37,2)-(37,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (37,2)-(37,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (37,5)-(37,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (37,5)-(37,6) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (39,0)-(39,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (39,0)-(39,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (39,0)-(39,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (39,1)-(39,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (39,2)-(39,3) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (39,4)-(39,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (39,4)-(39,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (39,4)-(39,5) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (39,7)-(39,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (39,7)-(39,8) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ MultiWriteNode (location: (41,0)-(41,23))
- │ ├── lefts: (length: 2)
- │ │ ├── @ CallTargetNode (location: (41,0)-(41,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (41,0)-(41,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: (41,3)-(41,4) = "."
- │ │ │ ├── name: :foo=
- │ │ │ └── message_loc: (41,4)-(41,7) = "foo"
- │ │ └── @ CallTargetNode (location: (41,9)-(41,16))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (41,9)-(41,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (41,9)-(41,12) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (41,12)-(41,13) = "."
- │ │ ├── name: :bar=
- │ │ └── message_loc: (41,13)-(41,16) = "bar"
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (41,17)-(41,18) = "="
- │ └── value:
- │ @ ArrayNode (location: (41,19)-(41,23))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (41,19)-(41,20))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (41,22)-(41,23))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── @ CallNode (location: (43,0)-(43,4))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (43,0)-(43,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (43,0)-(43,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (43,1)-(43,3) = "&."
- │ ├── name: :b
- │ ├── message_loc: (43,3)-(43,4) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,5))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (45,0)-(45,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (45,0)-(45,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (45,1)-(45,3) = "&."
- │ ├── name: :call
- │ ├── message_loc: ∅
- │ ├── opening_loc: (45,3)-(45,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (45,4)-(45,5) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (47,0)-(47,7))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (47,0)-(47,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (47,0)-(47,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (47,1)-(47,3) = "&."
- │ ├── name: :b
- │ ├── message_loc: (47,3)-(47,4) = "b"
- │ ├── opening_loc: (47,4)-(47,5) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (47,5)-(47,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (47,5)-(47,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (47,5)-(47,6) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (47,6)-(47,7) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (49,0)-(49,6))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (49,0)-(49,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (49,0)-(49,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (49,1)-(49,3) = "&."
- │ ├── name: :b
- │ ├── message_loc: (49,3)-(49,4) = "b"
- │ ├── opening_loc: (49,4)-(49,5) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (49,5)-(49,6) = ")"
- │ └── block: ∅
- ├── @ IfNode (location: (51,0)-(51,33))
- │ ├── if_keyword_loc: (51,11)-(51,13) = "if"
- │ ├── predicate:
- │ │ @ AndNode (location: (51,14)-(51,33))
- │ │ ├── left:
- │ │ │ @ OrNode (location: (51,14)-(51,25))
- │ │ │ ├── left:
- │ │ │ │ @ CallNode (location: (51,14)-(51,18))
- │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar?
- │ │ │ │ ├── message_loc: (51,14)-(51,18) = "bar?"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── right:
- │ │ │ │ @ CallNode (location: (51,22)-(51,25))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (51,22)-(51,25) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (51,19)-(51,21) = "or"
- │ │ ├── right:
- │ │ │ @ CallNode (location: (51,30)-(51,33))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :qux
- │ │ │ ├── message_loc: (51,30)-(51,33) = "qux"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (51,26)-(51,29) = "and"
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (51,0)-(51,10))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (51,0)-(51,10))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (51,0)-(51,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (51,4)-(51,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ SymbolNode (location: (51,4)-(51,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (51,4)-(51,5) = ":"
- │ │ │ │ ├── value_loc: (51,5)-(51,6) = "a"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "a"
- │ │ │ └── @ SymbolNode (location: (51,8)-(51,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (51,8)-(51,9) = ":"
- │ │ │ ├── value_loc: (51,9)-(51,10) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- ├── @ CallNode (location: (53,0)-(56,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (53,0)-(53,3) = "foo"
- │ ├── opening_loc: (53,3)-(53,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (53,4)-(55,4))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (53,4)-(53,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (53,4)-(53,5) = ":"
- │ │ │ ├── value_loc: (53,5)-(53,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (55,2)-(55,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (55,2)-(55,3) = ":"
- │ │ ├── value_loc: (55,3)-(55,4) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── closing_loc: (56,0)-(56,1) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (58,0)-(58,10))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (58,0)-(58,3) = "foo"
- │ ├── opening_loc: (58,3)-(58,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (58,4)-(58,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (58,4)-(58,9))
- │ │ ├── operator_loc: (58,4)-(58,5) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (58,5)-(58,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :rest
- │ │ ├── message_loc: (58,5)-(58,9) = "rest"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (58,9)-(58,10) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (60,0)-(60,39))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (60,0)-(60,3) = "foo"
- │ ├── opening_loc: (60,3)-(60,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (60,4)-(60,32))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (60,4)-(60,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (60,4)-(60,5) = ":"
- │ │ │ ├── value_loc: (60,5)-(60,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ KeywordHashNode (location: (60,8)-(60,32))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (60,8)-(60,22))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (60,8)-(60,10))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (60,8)-(60,9) = ":"
- │ │ │ │ ├── value_loc: (60,9)-(60,10) = "h"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "h"
- │ │ │ ├── value:
- │ │ │ │ @ ArrayNode (location: (60,14)-(60,22))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── elements: (length: 2)
- │ │ │ │ │ ├── @ SymbolNode (location: (60,15)-(60,17))
- │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ ├── opening_loc: (60,15)-(60,16) = ":"
- │ │ │ │ │ │ ├── value_loc: (60,16)-(60,17) = "x"
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── unescaped: "x"
- │ │ │ │ │ └── @ SymbolNode (location: (60,19)-(60,21))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (60,19)-(60,20) = ":"
- │ │ │ │ │ ├── value_loc: (60,20)-(60,21) = "y"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "y"
- │ │ │ │ ├── opening_loc: (60,14)-(60,15) = "["
- │ │ │ │ └── closing_loc: (60,21)-(60,22) = "]"
- │ │ │ └── operator_loc: (60,11)-(60,13) = "=>"
- │ │ └── @ AssocNode (location: (60,24)-(60,32))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (60,24)-(60,26))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (60,24)-(60,25) = ":"
- │ │ │ ├── value_loc: (60,25)-(60,26) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (60,30)-(60,32))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (60,30)-(60,31) = ":"
- │ │ │ ├── value_loc: (60,31)-(60,32) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── operator_loc: (60,27)-(60,29) = "=>"
- │ ├── closing_loc: (60,39)-(60,40) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (60,34)-(60,39))
- │ ├── expression:
- │ │ @ SymbolNode (location: (60,35)-(60,39))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (60,35)-(60,36) = ":"
- │ │ ├── value_loc: (60,36)-(60,39) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ └── operator_loc: (60,34)-(60,35) = "&"
- ├── @ CallNode (location: (62,0)-(62,49))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :hi
- │ ├── message_loc: (62,0)-(62,2) = "hi"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (62,3)-(62,49))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (62,3)-(62,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 123
- │ │ └── @ HashNode (location: (62,8)-(62,49))
- │ │ ├── opening_loc: (62,8)-(62,9) = "{"
- │ │ ├── elements: (length: 3)
- │ │ │ ├── @ AssocNode (location: (62,10)-(62,27))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (62,10)-(62,16))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (62,10)-(62,11) = ":"
- │ │ │ │ │ ├── value_loc: (62,11)-(62,16) = "there"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "there"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ SymbolNode (location: (62,20)-(62,27))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (62,20)-(62,21) = ":"
- │ │ │ │ │ ├── value_loc: (62,21)-(62,27) = "friend"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "friend"
- │ │ │ │ └── operator_loc: (62,17)-(62,19) = "=>"
- │ │ │ ├── @ AssocSplatNode (location: (62,29)-(62,33))
- │ │ │ │ ├── value:
- │ │ │ │ │ @ HashNode (location: (62,31)-(62,33))
- │ │ │ │ │ ├── opening_loc: (62,31)-(62,32) = "{"
- │ │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ │ └── closing_loc: (62,32)-(62,33) = "}"
- │ │ │ │ └── operator_loc: (62,29)-(62,31) = "**"
- │ │ │ └── @ AssocNode (location: (62,35)-(62,47))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (62,35)-(62,42))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (62,35)-(62,41) = "whatup"
- │ │ │ │ ├── closing_loc: (62,41)-(62,42) = ":"
- │ │ │ │ └── unescaped: "whatup"
- │ │ │ ├── value:
- │ │ │ │ @ SymbolNode (location: (62,43)-(62,47))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (62,43)-(62,44) = ":"
- │ │ │ │ ├── value_loc: (62,44)-(62,47) = "dog"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "dog"
- │ │ │ └── operator_loc: ∅
- │ │ └── closing_loc: (62,48)-(62,49) = "}"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (64,0)-(64,36))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (64,0)-(64,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (64,4)-(64,15))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (64,4)-(64,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (64,4)-(64,5) = ":"
- │ │ │ ├── value_loc: (64,5)-(64,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ KeywordHashNode (location: (64,8)-(64,15))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (64,8)-(64,15))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (64,8)-(64,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (64,8)-(64,9) = "b"
- │ │ │ ├── closing_loc: (64,9)-(64,10) = ":"
- │ │ │ └── unescaped: "b"
- │ │ ├── value:
- │ │ │ @ TrueNode (location: (64,11)-(64,15))
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (64,16)-(64,36))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (64,19)-(64,25))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (64,20)-(64,24))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (64,20)-(64,21))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (64,23)-(64,24))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (64,19)-(64,20) = "|"
- │ │ └── closing_loc: (64,24)-(64,25) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (64,26)-(64,32))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (64,26)-(64,32))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :puts
- │ │ ├── message_loc: (64,26)-(64,30) = "puts"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (64,31)-(64,32))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (64,31)-(64,32))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (64,16)-(64,18) = "do"
- │ └── closing_loc: (64,33)-(64,36) = "end"
- ├── @ CallNode (location: (66,0)-(66,17))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :hi
- │ ├── message_loc: (66,0)-(66,2) = "hi"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (66,3)-(66,17))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (66,3)-(66,17))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (66,3)-(66,17))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (66,3)-(66,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (66,3)-(66,8) = "there"
- │ │ │ ├── closing_loc: (66,8)-(66,9) = ":"
- │ │ │ └── unescaped: "there"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (66,10)-(66,17))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (66,10)-(66,11) = ":"
- │ │ │ ├── value_loc: (66,11)-(66,17) = "friend"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "friend"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (68,0)-(68,40))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :hi
- │ ├── message_loc: (68,0)-(68,2) = "hi"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (68,3)-(68,40))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (68,3)-(68,40))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 3)
- │ │ ├── @ AssocNode (location: (68,3)-(68,20))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (68,3)-(68,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (68,3)-(68,4) = ":"
- │ │ │ │ ├── value_loc: (68,4)-(68,9) = "there"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "there"
- │ │ │ ├── value:
- │ │ │ │ @ SymbolNode (location: (68,13)-(68,20))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (68,13)-(68,14) = ":"
- │ │ │ │ ├── value_loc: (68,14)-(68,20) = "friend"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "friend"
- │ │ │ └── operator_loc: (68,10)-(68,12) = "=>"
- │ │ ├── @ AssocSplatNode (location: (68,22)-(68,26))
- │ │ │ ├── value:
- │ │ │ │ @ HashNode (location: (68,24)-(68,26))
- │ │ │ │ ├── opening_loc: (68,24)-(68,25) = "{"
- │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ └── closing_loc: (68,25)-(68,26) = "}"
- │ │ │ └── operator_loc: (68,22)-(68,24) = "**"
- │ │ └── @ AssocNode (location: (68,28)-(68,40))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (68,28)-(68,35))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (68,28)-(68,34) = "whatup"
- │ │ │ ├── closing_loc: (68,34)-(68,35) = ":"
- │ │ │ └── unescaped: "whatup"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (68,36)-(68,40))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (68,36)-(68,37) = ":"
- │ │ │ ├── value_loc: (68,37)-(68,40) = "dog"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "dog"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (70,0)-(70,41))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :hi
- │ ├── message_loc: (70,0)-(70,2) = "hi"
- │ ├── opening_loc: (70,2)-(70,3) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (70,3)-(70,40))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (70,3)-(70,40))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 3)
- │ │ ├── @ AssocNode (location: (70,3)-(70,20))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (70,3)-(70,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (70,3)-(70,4) = ":"
- │ │ │ │ ├── value_loc: (70,4)-(70,9) = "there"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "there"
- │ │ │ ├── value:
- │ │ │ │ @ SymbolNode (location: (70,13)-(70,20))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (70,13)-(70,14) = ":"
- │ │ │ │ ├── value_loc: (70,14)-(70,20) = "friend"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "friend"
- │ │ │ └── operator_loc: (70,10)-(70,12) = "=>"
- │ │ ├── @ AssocSplatNode (location: (70,22)-(70,26))
- │ │ │ ├── value:
- │ │ │ │ @ HashNode (location: (70,24)-(70,26))
- │ │ │ │ ├── opening_loc: (70,24)-(70,25) = "{"
- │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ └── closing_loc: (70,25)-(70,26) = "}"
- │ │ │ └── operator_loc: (70,22)-(70,24) = "**"
- │ │ └── @ AssocNode (location: (70,28)-(70,40))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (70,28)-(70,35))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (70,28)-(70,34) = "whatup"
- │ │ │ ├── closing_loc: (70,34)-(70,35) = ":"
- │ │ │ └── unescaped: "whatup"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (70,36)-(70,40))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (70,36)-(70,37) = ":"
- │ │ │ ├── value_loc: (70,37)-(70,40) = "dog"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "dog"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (70,40)-(70,41) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (72,0)-(72,35))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (72,0)-(72,3) = "foo"
- │ ├── opening_loc: (72,3)-(72,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (72,4)-(72,26))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ HashNode (location: (72,4)-(72,26))
- │ │ ├── opening_loc: (72,4)-(72,5) = "{"
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ AssocNode (location: (72,6)-(72,13))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (72,6)-(72,8))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (72,6)-(72,7) = "a"
- │ │ │ │ │ ├── closing_loc: (72,7)-(72,8) = ":"
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ TrueNode (location: (72,9)-(72,13))
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ AssocNode (location: (72,15)-(72,23))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (72,15)-(72,17))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (72,15)-(72,16) = "b"
- │ │ │ │ ├── closing_loc: (72,16)-(72,17) = ":"
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── value:
- │ │ │ │ @ FalseNode (location: (72,18)-(72,23))
- │ │ │ └── operator_loc: ∅
- │ │ └── closing_loc: (72,25)-(72,26) = "}"
- │ ├── closing_loc: (72,35)-(72,36) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (72,28)-(72,35))
- │ ├── expression:
- │ │ @ SymbolNode (location: (72,29)-(72,35))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (72,29)-(72,30) = ":"
- │ │ ├── value_loc: (72,30)-(72,35) = "block"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "block"
- │ └── operator_loc: (72,28)-(72,29) = "&"
- ├── @ CallNode (location: (74,0)-(74,20))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :hi
- │ ├── message_loc: (74,0)-(74,2) = "hi"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (74,3)-(74,20))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (74,3)-(74,20))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (74,3)-(74,20))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (74,3)-(74,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (74,3)-(74,4) = ":"
- │ │ │ ├── value_loc: (74,4)-(74,9) = "there"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "there"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (74,13)-(74,20))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (74,13)-(74,14) = ":"
- │ │ │ ├── value_loc: (74,14)-(74,20) = "friend"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "friend"
- │ │ └── operator_loc: (74,10)-(74,12) = "=>"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (76,0)-(78,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (76,0)-(76,3) = "foo"
- │ ├── opening_loc: (76,3)-(76,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (76,4)-(77,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (76,4)-(76,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (76,4)-(76,5) = ":"
- │ │ │ ├── value_loc: (76,5)-(76,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (77,0)-(77,2))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (77,0)-(77,1) = ":"
- │ │ ├── value_loc: (77,1)-(77,2) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── closing_loc: (78,0)-(78,1) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (80,0)-(83,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (80,0)-(80,3) = "foo"
- │ ├── opening_loc: (80,3)-(80,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (81,0)-(82,5))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (81,0)-(81,2))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (81,0)-(81,1) = ":"
- │ │ │ ├── value_loc: (81,1)-(81,2) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ KeywordHashNode (location: (82,0)-(82,5))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (82,0)-(82,5))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (82,0)-(82,2))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (82,0)-(82,1) = "b"
- │ │ │ ├── closing_loc: (82,1)-(82,2) = ":"
- │ │ │ └── unescaped: "b"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (82,3)-(82,5))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (82,3)-(82,4) = ":"
- │ │ │ ├── value_loc: (82,4)-(82,5) = "c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "c"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (83,0)-(83,1) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (85,0)-(85,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (85,0)-(85,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockArgumentNode (location: (85,4)-(85,11))
- │ ├── expression:
- │ │ @ SymbolNode (location: (85,5)-(85,11))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (85,5)-(85,6) = ":"
- │ │ ├── value_loc: (85,6)-(85,11) = "block"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "block"
- │ └── operator_loc: (85,4)-(85,5) = "&"
- ├── @ CallNode (location: (87,0)-(87,30))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (87,0)-(87,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (87,4)-(87,21))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (87,4)-(87,21))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (87,4)-(87,11))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (87,4)-(87,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (87,4)-(87,5) = "a"
- │ │ │ │ ├── closing_loc: (87,5)-(87,6) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ TrueNode (location: (87,7)-(87,11))
- │ │ │ └── operator_loc: ∅
- │ │ └── @ AssocNode (location: (87,13)-(87,21))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (87,13)-(87,15))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (87,13)-(87,14) = "b"
- │ │ │ ├── closing_loc: (87,14)-(87,15) = ":"
- │ │ │ └── unescaped: "b"
- │ │ ├── value:
- │ │ │ @ FalseNode (location: (87,16)-(87,21))
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockArgumentNode (location: (87,23)-(87,30))
- │ ├── expression:
- │ │ @ SymbolNode (location: (87,24)-(87,30))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (87,24)-(87,25) = ":"
- │ │ ├── value_loc: (87,25)-(87,30) = "block"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "block"
- │ └── operator_loc: (87,23)-(87,24) = "&"
- ├── @ CallNode (location: (89,0)-(89,21))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :some_func
- │ ├── message_loc: (89,0)-(89,9) = "some_func"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (89,10)-(89,21))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (89,10)-(89,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ KeywordHashNode (location: (89,13)-(89,21))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (89,13)-(89,21))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (89,13)-(89,19))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (89,13)-(89,18) = "kwarg"
- │ │ │ ├── closing_loc: (89,18)-(89,19) = ":"
- │ │ │ └── unescaped: "kwarg"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (89,20)-(89,21))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (91,0)-(91,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (91,0)-(91,6))
- │ │ └── name: :Kernel
- │ ├── call_operator_loc: (91,6)-(91,7) = "."
- │ ├── name: :Integer
- │ ├── message_loc: (91,7)-(91,14) = "Integer"
- │ ├── opening_loc: (91,14)-(91,15) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (91,15)-(91,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (91,15)-(91,17))
- │ │ ├── flags: decimal
- │ │ └── value: 10
- │ ├── closing_loc: (91,17)-(91,18) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (93,0)-(93,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (93,0)-(93,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :x
- │ │ ├── message_loc: (93,0)-(93,1) = "x"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (93,1)-(93,2) = "."
- │ ├── name: :each
- │ ├── message_loc: (93,2)-(93,6) = "each"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (93,7)-(93,10))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (93,7)-(93,8) = "{"
- │ └── closing_loc: (93,9)-(93,10) = "}"
- ├── @ CallNode (location: (95,0)-(95,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (95,0)-(95,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (95,0)-(95,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (95,3)-(95,4) = "."
- │ ├── name: :map
- │ ├── message_loc: (95,4)-(95,7) = "map"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (95,8)-(95,14))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (95,10)-(95,12))
- │ │ └── body: (length: 1)
- │ │ └── @ BackReferenceReadNode (location: (95,10)-(95,12))
- │ │ └── name: :$&
- │ ├── opening_loc: (95,8)-(95,9) = "{"
- │ └── closing_loc: (95,13)-(95,14) = "}"
- ├── @ CallNode (location: (97,0)-(97,12))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantPathNode (location: (97,0)-(97,4))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (97,0)-(97,1))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (97,1)-(97,3) = "::"
- │ │ └── name_loc: (97,3)-(97,4) = "B"
- │ ├── call_operator_loc: (97,4)-(97,6) = "::"
- │ ├── name: :C
- │ ├── message_loc: (97,6)-(97,7) = "C"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (97,8)-(97,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (97,8)-(97,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (97,8)-(97,9) = ":"
- │ │ ├── value_loc: (97,9)-(97,12) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (99,0)-(99,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantPathNode (location: (99,0)-(99,4))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (99,0)-(99,1))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (99,1)-(99,3) = "::"
- │ │ └── name_loc: (99,3)-(99,4) = "B"
- │ ├── call_operator_loc: (99,4)-(99,6) = "::"
- │ ├── name: :C
- │ ├── message_loc: (99,6)-(99,7) = "C"
- │ ├── opening_loc: (99,7)-(99,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (99,8)-(99,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (99,8)-(99,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (99,8)-(99,9) = ":"
- │ │ ├── value_loc: (99,9)-(99,12) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── closing_loc: (99,12)-(99,13) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (101,0)-(101,17))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantPathNode (location: (101,0)-(101,4))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (101,0)-(101,1))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (101,1)-(101,3) = "::"
- │ │ └── name_loc: (101,3)-(101,4) = "B"
- │ ├── call_operator_loc: (101,4)-(101,6) = "::"
- │ ├── name: :C
- │ ├── message_loc: (101,6)-(101,7) = "C"
- │ ├── opening_loc: (101,7)-(101,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (101,8)-(101,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (101,8)-(101,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (101,8)-(101,9) = ":"
- │ │ ├── value_loc: (101,9)-(101,12) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── closing_loc: (101,12)-(101,13) = ")"
- │ └── block:
- │ @ BlockNode (location: (101,14)-(101,17))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (101,14)-(101,15) = "{"
- │ └── closing_loc: (101,16)-(101,17) = "}"
- ├── @ CallNode (location: (103,0)-(103,12))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (103,0)-(103,3) = "foo"
- │ ├── opening_loc: (103,3)-(103,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (103,4)-(103,11))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (103,4)-(103,11))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (103,4)-(103,11))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (103,4)-(103,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (103,4)-(103,5) = "\""
- │ │ │ ├── value_loc: (103,5)-(103,6) = "a"
- │ │ │ ├── closing_loc: (103,6)-(103,8) = "\":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (103,9)-(103,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: -1
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (103,11)-(103,12) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (105,0)-(105,28))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (105,0)-(105,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (105,4)-(105,28))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (105,4)-(105,28))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (105,4)-(105,28))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (105,4)-(105,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (105,4)-(105,7) = "bar"
- │ │ │ ├── closing_loc: (105,7)-(105,8) = ":"
- │ │ │ └── unescaped: "bar"
- │ │ ├── value:
- │ │ │ @ HashNode (location: (105,9)-(105,28))
- │ │ │ ├── opening_loc: (105,9)-(105,10) = "{"
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ AssocNode (location: (105,11)-(105,26))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (105,11)-(105,15))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (105,11)-(105,14) = "baz"
- │ │ │ │ │ ├── closing_loc: (105,14)-(105,15) = ":"
- │ │ │ │ │ └── unescaped: "baz"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CallNode (location: (105,16)-(105,26))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :qux
- │ │ │ │ │ ├── message_loc: (105,16)-(105,19) = "qux"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block:
- │ │ │ │ │ @ BlockNode (location: (105,20)-(105,26))
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ ├── opening_loc: (105,20)-(105,22) = "do"
- │ │ │ │ │ └── closing_loc: (105,23)-(105,26) = "end"
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── closing_loc: (105,27)-(105,28) = "}"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (107,0)-(107,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (107,0)-(107,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (107,4)-(107,24))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (107,4)-(107,24))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (107,4)-(107,24))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (107,4)-(107,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (107,4)-(107,7) = "bar"
- │ │ │ ├── closing_loc: (107,7)-(107,8) = ":"
- │ │ │ └── unescaped: "bar"
- │ │ ├── value:
- │ │ │ @ HashNode (location: (107,9)-(107,24))
- │ │ │ ├── opening_loc: (107,9)-(107,10) = "{"
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ AssocSplatNode (location: (107,11)-(107,22))
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CallNode (location: (107,13)-(107,22))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :kw
- │ │ │ │ │ ├── message_loc: (107,13)-(107,15) = "kw"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block:
- │ │ │ │ │ @ BlockNode (location: (107,16)-(107,22))
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ ├── opening_loc: (107,16)-(107,18) = "do"
- │ │ │ │ │ └── closing_loc: (107,19)-(107,22) = "end"
- │ │ │ │ └── operator_loc: (107,11)-(107,13) = "**"
- │ │ │ └── closing_loc: (107,23)-(107,24) = "}"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (109,0)-(109,36))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (109,0)-(109,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (109,4)-(109,29))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (109,4)-(109,29))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (109,4)-(109,5) = "\""
- │ │ ├── parts: (length: 1)
- │ │ │ └── @ EmbeddedStatementsNode (location: (109,5)-(109,28))
- │ │ │ ├── opening_loc: (109,5)-(109,7) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (109,7)-(109,27))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (109,7)-(109,27))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ CallNode (location: (109,7)-(109,10))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :bar
- │ │ │ │ │ ├── message_loc: (109,7)-(109,10) = "bar"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── call_operator_loc: (109,10)-(109,11) = "."
- │ │ │ │ ├── name: :map
- │ │ │ │ ├── message_loc: (109,11)-(109,14) = "map"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block:
- │ │ │ │ @ BlockNode (location: (109,15)-(109,27))
- │ │ │ │ ├── locals: []
- │ │ │ │ ├── parameters: ∅
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (109,18)-(109,23))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ StringNode (location: (109,18)-(109,23))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: (109,18)-(109,19) = "\""
- │ │ │ │ │ ├── content_loc: (109,19)-(109,22) = "baz"
- │ │ │ │ │ ├── closing_loc: (109,22)-(109,23) = "\""
- │ │ │ │ │ └── unescaped: "baz"
- │ │ │ │ ├── opening_loc: (109,15)-(109,17) = "do"
- │ │ │ │ └── closing_loc: (109,24)-(109,27) = "end"
- │ │ │ └── closing_loc: (109,27)-(109,28) = "}"
- │ │ └── closing_loc: (109,28)-(109,29) = "\""
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (109,30)-(109,36))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (109,30)-(109,32) = "do"
- │ └── closing_loc: (109,33)-(109,36) = "end"
- ├── @ CallNode (location: (111,0)-(111,28))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (111,0)-(111,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (111,4)-(111,28))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ClassNode (location: (111,4)-(111,28))
- │ │ ├── locals: []
- │ │ ├── class_keyword_loc: (111,4)-(111,9) = "class"
- │ │ ├── constant_path:
- │ │ │ @ ConstantReadNode (location: (111,10)-(111,13))
- │ │ │ └── name: :Bar
- │ │ ├── inheritance_operator_loc: ∅
- │ │ ├── superclass: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (111,14)-(111,24))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (111,14)-(111,24))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (111,14)-(111,17) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (111,18)-(111,24))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (111,18)-(111,20) = "do"
- │ │ │ └── closing_loc: (111,21)-(111,24) = "end"
- │ │ ├── end_keyword_loc: (111,25)-(111,28) = "end"
- │ │ └── name: :Bar
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (113,0)-(113,29))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (113,0)-(113,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (113,4)-(113,29))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ModuleNode (location: (113,4)-(113,29))
- │ │ ├── locals: []
- │ │ ├── module_keyword_loc: (113,4)-(113,10) = "module"
- │ │ ├── constant_path:
- │ │ │ @ ConstantReadNode (location: (113,11)-(113,14))
- │ │ │ └── name: :Bar
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (113,15)-(113,25))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (113,15)-(113,25))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (113,15)-(113,18) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (113,19)-(113,25))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (113,19)-(113,21) = "do"
- │ │ │ └── closing_loc: (113,22)-(113,25) = "end"
- │ │ ├── end_keyword_loc: (113,26)-(113,29) = "end"
- │ │ └── name: :Bar
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (115,0)-(115,16))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (115,0)-(115,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (115,4)-(115,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ArrayNode (location: (115,4)-(115,16))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ CallNode (location: (115,5)-(115,15))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (115,5)-(115,8) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (115,9)-(115,15))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (115,9)-(115,11) = "do"
- │ │ │ └── closing_loc: (115,12)-(115,15) = "end"
- │ │ ├── opening_loc: (115,4)-(115,5) = "["
- │ │ └── closing_loc: (115,15)-(115,16) = "]"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (117,0)-(117,28))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :p
- │ ├── message_loc: (117,0)-(117,1) = "p"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (117,2)-(117,28))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ BeginNode (location: (117,2)-(117,28))
- │ │ ├── begin_keyword_loc: (117,2)-(117,7) = "begin"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (117,8)-(117,24))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (117,8)-(117,24))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ IntegerNode (location: (117,8)-(117,9))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── call_operator_loc: (117,9)-(117,10) = "."
- │ │ │ ├── name: :times
- │ │ │ ├── message_loc: (117,10)-(117,15) = "times"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (117,16)-(117,24))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (117,19)-(117,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (117,19)-(117,20))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── opening_loc: (117,16)-(117,18) = "do"
- │ │ │ └── closing_loc: (117,21)-(117,24) = "end"
- │ │ ├── rescue_clause: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (117,25)-(117,28) = "end"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (119,0)-(124,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (119,0)-(119,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (119,4)-(124,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (119,4)-(119,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (119,4)-(119,5) = ":"
- │ │ │ ├── value_loc: (119,5)-(119,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ IfNode (location: (120,2)-(124,5))
- │ │ ├── if_keyword_loc: (120,2)-(120,4) = "if"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (120,5)-(120,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── message_loc: (120,5)-(120,6) = "x"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (121,4)-(123,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (121,4)-(123,7))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (121,4)-(121,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (121,8)-(123,7))
- │ │ │ ├── locals: [:a]
- │ │ │ ├── parameters:
- │ │ │ │ @ BlockParametersNode (location: (121,11)-(121,14))
- │ │ │ │ ├── parameters:
- │ │ │ │ │ @ ParametersNode (location: (121,12)-(121,13))
- │ │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ │ └── @ RequiredParameterNode (location: (121,12)-(121,13))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :a
- │ │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── locals: (length: 0)
- │ │ │ │ ├── opening_loc: (121,11)-(121,12) = "|"
- │ │ │ │ └── closing_loc: (121,13)-(121,14) = "|"
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (122,6)-(122,7))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (122,6)-(122,7))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── opening_loc: (121,8)-(121,10) = "do"
- │ │ │ └── closing_loc: (123,4)-(123,7) = "end"
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: (124,2)-(124,5) = "end"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (126,0)-(135,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (126,0)-(126,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (126,4)-(135,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ SymbolNode (location: (126,4)-(126,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (126,4)-(126,5) = ":"
- │ │ │ ├── value_loc: (126,5)-(126,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ WhileNode (location: (127,2)-(131,5))
- │ │ │ ├── flags: ∅
- │ │ │ ├── keyword_loc: (127,2)-(127,7) = "while"
- │ │ │ ├── closing_loc: (131,2)-(131,5) = "end"
- │ │ │ ├── predicate:
- │ │ │ │ @ CallNode (location: (127,8)-(127,9))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :x
- │ │ │ │ ├── message_loc: (127,8)-(127,9) = "x"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (128,4)-(130,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (128,4)-(130,7))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (128,4)-(128,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (128,8)-(130,7))
- │ │ │ ├── locals: [:a]
- │ │ │ ├── parameters:
- │ │ │ │ @ BlockParametersNode (location: (128,11)-(128,14))
- │ │ │ │ ├── parameters:
- │ │ │ │ │ @ ParametersNode (location: (128,12)-(128,13))
- │ │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ │ └── @ RequiredParameterNode (location: (128,12)-(128,13))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :a
- │ │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── locals: (length: 0)
- │ │ │ │ ├── opening_loc: (128,11)-(128,12) = "|"
- │ │ │ │ └── closing_loc: (128,13)-(128,14) = "|"
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (129,6)-(129,7))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (129,6)-(129,7))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── opening_loc: (128,8)-(128,10) = "do"
- │ │ │ └── closing_loc: (130,4)-(130,7) = "end"
- │ │ └── @ UntilNode (location: (132,2)-(135,5))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (132,2)-(132,7) = "until"
- │ │ ├── closing_loc: (135,2)-(135,5) = "end"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (132,8)-(132,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── message_loc: (132,8)-(132,9) = "x"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (133,4)-(134,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (133,4)-(134,7))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (133,4)-(133,7) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (133,8)-(134,7))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (133,8)-(133,10) = "do"
- │ │ └── closing_loc: (134,4)-(134,7) = "end"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (137,0)-(137,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ HashNode (location: (137,0)-(137,2))
- │ │ ├── opening_loc: (137,0)-(137,1) = "{"
- │ │ ├── elements: (length: 0)
- │ │ └── closing_loc: (137,1)-(137,2) = "}"
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (137,3)-(137,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (137,5)-(137,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (137,5)-(137,9))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :A
- │ │ ├── message_loc: (137,5)-(137,6) = "A"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (137,7)-(137,9))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (137,7)-(137,8) = "{"
- │ │ └── closing_loc: (137,8)-(137,9) = "}"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (139,0)-(139,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ HashNode (location: (139,0)-(139,2))
- │ │ ├── opening_loc: (139,0)-(139,1) = "{"
- │ │ ├── elements: (length: 0)
- │ │ └── closing_loc: (139,1)-(139,2) = "}"
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (139,3)-(139,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (139,5)-(139,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (139,5)-(139,16))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :A
- │ │ ├── message_loc: (139,5)-(139,6) = "A"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (139,7)-(139,16))
- │ │ ├── locals: [:a]
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (139,9)-(139,12))
- │ │ │ ├── parameters:
- │ │ │ │ @ ParametersNode (location: (139,10)-(139,11))
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (139,10)-(139,11))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (139,9)-(139,10) = "|"
- │ │ │ └── closing_loc: (139,11)-(139,12) = "|"
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (139,13)-(139,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (139,13)-(139,14))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (139,7)-(139,8) = "{"
- │ │ └── closing_loc: (139,15)-(139,16) = "}"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (141,0)-(141,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (141,0)-(141,4))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :A
- │ │ ├── message_loc: (141,0)-(141,1) = "A"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (141,2)-(141,4))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (141,2)-(141,3) = "{"
- │ │ └── closing_loc: (141,3)-(141,4) = "}"
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (141,5)-(141,6) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (141,7)-(141,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (141,7)-(141,11))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :A
- │ │ ├── message_loc: (141,7)-(141,8) = "A"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (141,9)-(141,11))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (141,9)-(141,10) = "{"
- │ │ └── closing_loc: (141,10)-(141,11) = "}"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (143,0)-(143,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (143,0)-(143,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :lst
- │ │ ├── message_loc: (143,0)-(143,3) = "lst"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :<<
- │ ├── message_loc: (143,4)-(143,6) = "<<"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (143,7)-(143,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (143,7)-(143,11))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :A
- │ │ ├── message_loc: (143,7)-(143,8) = "A"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (143,9)-(143,11))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (143,9)-(143,10) = "{"
- │ │ └── closing_loc: (143,10)-(143,11) = "}"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ InterpolatedStringNode (location: (145,0)-(145,17))
- │ ├── flags: ∅
- │ ├── opening_loc: (145,0)-(145,1) = "\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (145,1)-(145,16))
- │ │ ├── opening_loc: (145,1)-(145,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (145,4)-(145,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (145,4)-(145,14))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :join
- │ │ │ ├── message_loc: (145,4)-(145,8) = "join"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (145,9)-(145,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ ParenthesesNode (location: (145,9)-(145,14))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (145,10)-(145,13))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ StringNode (location: (145,10)-(145,13))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: (145,10)-(145,11) = "\""
- │ │ │ │ │ ├── content_loc: (145,11)-(145,12) = " "
- │ │ │ │ │ ├── closing_loc: (145,12)-(145,13) = "\""
- │ │ │ │ │ └── unescaped: " "
- │ │ │ │ ├── opening_loc: (145,9)-(145,10) = "("
- │ │ │ │ └── closing_loc: (145,13)-(145,14) = ")"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (145,15)-(145,16) = "}"
- │ └── closing_loc: (145,16)-(145,17) = "\""
- ├── @ InterpolatedStringNode (location: (147,0)-(147,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (147,0)-(147,1) = "\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (147,1)-(147,7))
- │ │ ├── opening_loc: (147,1)-(147,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (147,3)-(147,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ ParenthesesNode (location: (147,3)-(147,6))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (147,4)-(147,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (147,4)-(147,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :v
- │ │ │ │ ├── message_loc: (147,4)-(147,5) = "v"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── opening_loc: (147,3)-(147,4) = "("
- │ │ │ └── closing_loc: (147,5)-(147,6) = ")"
- │ │ └── closing_loc: (147,6)-(147,7) = "}"
- │ └── closing_loc: (147,7)-(147,8) = "\""
- ├── @ DefNode (location: (149,0)-(149,18))
- │ ├── name: :f
- │ ├── name_loc: (149,4)-(149,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (149,6)-(149,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (149,6)-(149,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (149,6)-(149,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (149,10)-(149,13))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (149,10)-(149,13))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :p
- │ │ ├── message_loc: (149,10)-(149,11) = "p"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (149,12)-(149,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ SplatNode (location: (149,12)-(149,13))
- │ │ │ ├── operator_loc: (149,12)-(149,13) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (149,0)-(149,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (149,5)-(149,6) = "("
- │ ├── rparen_loc: (149,7)-(149,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (149,15)-(149,18) = "end"
- ├── @ CallNode (location: (151,0)-(151,16))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (151,0)-(151,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (151,4)-(151,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (151,4)-(151,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ CallNode (location: (151,7)-(151,16))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :Bar
- │ │ ├── message_loc: (151,7)-(151,10) = "Bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (151,11)-(151,16))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (151,13)-(151,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (151,13)-(151,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── opening_loc: (151,11)-(151,12) = "{"
- │ │ └── closing_loc: (151,15)-(151,16) = "}"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ LocalVariableWriteNode (location: (153,0)-(153,7))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (153,0)-(153,3) = "foo"
- │ ├── value:
- │ │ @ IntegerNode (location: (153,6)-(153,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (153,4)-(153,5) = "="
- ├── @ CallNode (location: (154,0)-(154,6))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (154,0)-(154,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (154,4)-(154,6))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (154,4)-(154,5) = "{"
- │ └── closing_loc: (154,5)-(154,6) = "}"
- └── @ CallNode (location: (156,0)-(156,19))
- ├── flags: ∅
- ├── receiver:
- │ @ InstanceVariableReadNode (location: (156,0)-(156,2))
- │ └── name: :@a
- ├── call_operator_loc: (156,2)-(156,3) = "."
- ├── name: :b
- ├── message_loc: (156,3)-(156,4) = "b"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (156,5)-(156,19))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (156,5)-(156,19))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (156,5)-(156,19))
- │ ├── key:
- │ │ @ InterpolatedSymbolNode (location: (156,5)-(156,16))
- │ │ ├── opening_loc: (156,5)-(156,6) = "\""
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (156,6)-(156,7))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (156,6)-(156,7) = "c"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "c"
- │ │ │ └── @ EmbeddedStatementsNode (location: (156,7)-(156,14))
- │ │ │ ├── opening_loc: (156,7)-(156,9) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (156,9)-(156,13))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (156,9)-(156,13))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :name
- │ │ │ │ ├── message_loc: (156,9)-(156,13) = "name"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (156,13)-(156,14) = "}"
- │ │ └── closing_loc: (156,14)-(156,16) = "\":"
- │ ├── value:
- │ │ @ IntegerNode (location: (156,17)-(156,19))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ └── operator_loc: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/methods.txt b/test/prism/snapshots/methods.txt
deleted file mode 100644
index b38640399b..0000000000
--- a/test/prism/snapshots/methods.txt
+++ /dev/null
@@ -1,2054 +0,0 @@
-@ ProgramNode (location: (1,0)-(183,37))
-├── locals: [:a, :c, :foo]
-└── statements:
- @ StatementsNode (location: (1,0)-(183,37))
- └── body: (length: 69)
- ├── @ DefNode (location: (1,0)-(2,3))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,8)-(1,18))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,18))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,12))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :bar
- │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :baz
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,17)-(1,18) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar, :baz]
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (1,7)-(1,8) = "("
- │ ├── rparen_loc: (1,18)-(1,19) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (2,0)-(2,3) = "end"
- ├── @ DefNode (location: (4,0)-(5,3))
- │ ├── name: :foo
- │ ├── name_loc: (4,4)-(4,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (4,8)-(4,44))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (4,8)-(4,18))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (4,9)-(4,12))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :bar
- │ │ │ │ └── @ RequiredParameterNode (location: (4,14)-(4,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :baz
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (4,8)-(4,9) = "("
- │ │ │ └── rparen_loc: (4,17)-(4,18) = ")"
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (4,20)-(4,32))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :optional
- │ │ │ ├── name_loc: (4,20)-(4,28) = "optional"
- │ │ │ ├── operator_loc: (4,29)-(4,30) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (4,31)-(4,32))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (4,34)-(4,44))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (4,35)-(4,38))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :bin
- │ │ │ │ └── @ RequiredParameterNode (location: (4,40)-(4,43))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :bag
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (4,34)-(4,35) = "("
- │ │ │ └── rparen_loc: (4,43)-(4,44) = ")"
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar, :baz, :optional, :bin, :bag]
- │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (4,7)-(4,8) = "("
- │ ├── rparen_loc: (4,44)-(4,45) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ DefNode (location: (8,0)-(8,18))
- │ ├── name: :a
- │ ├── name_loc: (8,4)-(8,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (8,0)-(8,18))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (8,7)-(8,18))
- │ │ │ ├── ensure_keyword_loc: (8,7)-(8,13) = "ensure"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (8,15)-(8,18) = "end"
- │ │ └── end_keyword_loc: (8,15)-(8,18) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (8,15)-(8,18) = "end"
- ├── @ DefNode (location: (10,0)-(11,3))
- │ ├── name: :a
- │ ├── name_loc: (10,8)-(10,9) = "a"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (10,4)-(10,7))
- │ │ ├── body:
- │ │ │ @ CallNode (location: (10,5)-(10,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (10,5)-(10,6) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (10,4)-(10,5) = "("
- │ │ └── closing_loc: (10,6)-(10,7) = ")"
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (10,0)-(10,3) = "def"
- │ ├── operator_loc: (10,7)-(10,8) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ DefNode (location: (13,0)-(14,3))
- │ ├── name: :b
- │ ├── name_loc: (13,9)-(13,10) = "b"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (13,4)-(13,7))
- │ │ ├── body:
- │ │ │ @ CallNode (location: (13,5)-(13,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (13,5)-(13,6) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (13,4)-(13,5) = "("
- │ │ └── closing_loc: (13,6)-(13,7) = ")"
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
- │ ├── operator_loc: (13,7)-(13,9) = "::"
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (14,0)-(14,3) = "end"
- ├── @ DefNode (location: (16,0)-(17,3))
- │ ├── name: :a
- │ ├── name_loc: (16,10)-(16,11) = "a"
- │ ├── receiver:
- │ │ @ FalseNode (location: (16,4)-(16,9))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (16,0)-(16,3) = "def"
- │ ├── operator_loc: (16,9)-(16,10) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- ├── @ DefNode (location: (19,0)-(20,3))
- │ ├── name: :a
- │ ├── name_loc: (19,4)-(19,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (19,6)-(19,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ ForwardingParameterNode (location: (19,6)-(19,9))
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (19,0)-(19,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (19,5)-(19,6) = "("
- │ ├── rparen_loc: (19,9)-(19,10) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (20,0)-(20,3) = "end"
- ├── @ DefNode (location: (22,0)-(23,3))
- │ ├── name: :a
- │ ├── name_loc: (22,9)-(22,10) = "a"
- │ ├── receiver:
- │ │ @ GlobalVariableReadNode (location: (22,4)-(22,8))
- │ │ └── name: :$var
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
- │ ├── operator_loc: (22,8)-(22,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (23,0)-(23,3) = "end"
- ├── @ DefNode (location: (25,0)-(26,3))
- │ ├── name: :b
- │ ├── name_loc: (25,6)-(25,7) = "b"
- │ ├── receiver:
- │ │ @ CallNode (location: (25,4)-(25,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (25,4)-(25,5) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
- │ ├── operator_loc: (25,5)-(25,6) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (26,0)-(26,3) = "end"
- ├── @ DefNode (location: (28,0)-(29,3))
- │ ├── name: :a
- │ ├── name_loc: (28,9)-(28,10) = "a"
- │ ├── receiver:
- │ │ @ InstanceVariableReadNode (location: (28,4)-(28,8))
- │ │ └── name: :@var
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (28,0)-(28,3) = "def"
- │ ├── operator_loc: (28,8)-(28,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (29,0)-(29,3) = "end"
- ├── @ DefNode (location: (31,0)-(31,13))
- │ ├── name: :a
- │ ├── name_loc: (31,4)-(31,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (31,6)-(31,8))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ RequiredKeywordParameterNode (location: (31,6)-(31,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ └── name_loc: (31,6)-(31,8) = "b:"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (31,0)-(31,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (31,10)-(31,13) = "end"
- ├── @ StringNode (location: (33,0)-(33,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (33,0)-(33,2) = "%,"
- │ ├── content_loc: (33,2)-(33,5) = "abc"
- │ ├── closing_loc: (33,5)-(33,6) = ","
- │ └── unescaped: "abc"
- ├── @ DefNode (location: (35,0)-(36,3))
- │ ├── name: :a
- │ ├── name_loc: (35,4)-(35,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (35,6)-(35,8))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ RequiredKeywordParameterNode (location: (35,6)-(35,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ └── name_loc: (35,6)-(35,8) = "b:"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (35,0)-(35,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (35,5)-(35,6) = "("
- │ ├── rparen_loc: (35,8)-(35,9) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (36,0)-(36,3) = "end"
- ├── @ DefNode (location: (38,0)-(39,3))
- │ ├── name: :a
- │ ├── name_loc: (38,4)-(38,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (38,6)-(38,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (38,6)-(38,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (38,8)-(38,9) = "b"
- │ │ │ └── operator_loc: (38,6)-(38,8) = "**"
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (38,0)-(38,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (38,5)-(38,6) = "("
- │ ├── rparen_loc: (38,9)-(38,10) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (39,0)-(39,3) = "end"
- ├── @ DefNode (location: (41,0)-(42,3))
- │ ├── name: :a
- │ ├── name_loc: (41,4)-(41,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (41,6)-(41,8))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (41,6)-(41,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (41,6)-(41,8) = "**"
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (41,0)-(41,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (41,5)-(41,6) = "("
- │ ├── rparen_loc: (41,8)-(41,9) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (42,0)-(42,3) = "end"
- ├── @ LocalVariableWriteNode (location: (44,0)-(44,5))
- │ ├── name: :a
- │ ├── depth: 0
- │ ├── name_loc: (44,0)-(44,1) = "a"
- │ ├── value:
- │ │ @ IntegerNode (location: (44,4)-(44,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (44,2)-(44,3) = "="
- ├── @ DefNode (location: (44,7)-(45,3))
- │ ├── name: :a
- │ ├── name_loc: (44,11)-(44,12) = "a"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (44,7)-(44,10) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (45,0)-(45,3) = "end"
- ├── @ DefNode (location: (47,0)-(48,3))
- │ ├── name: :a
- │ ├── name_loc: (47,4)-(47,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (47,6)-(47,13))
- │ │ ├── requireds: (length: 3)
- │ │ │ ├── @ RequiredParameterNode (location: (47,6)-(47,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── @ RequiredParameterNode (location: (47,9)-(47,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ └── @ RequiredParameterNode (location: (47,12)-(47,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b, :c, :d]
- │ ├── def_keyword_loc: (47,0)-(47,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (48,0)-(48,3) = "end"
- ├── @ DefNode (location: (50,0)-(51,3))
- │ ├── name: :a
- │ ├── name_loc: (50,8)-(50,9) = "a"
- │ ├── receiver:
- │ │ @ NilNode (location: (50,4)-(50,7))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (50,0)-(50,3) = "def"
- │ ├── operator_loc: (50,7)-(50,8) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (51,0)-(51,3) = "end"
- ├── @ DefNode (location: (53,0)-(54,3))
- │ ├── name: :a
- │ ├── name_loc: (53,4)-(53,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (53,6)-(53,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ RequiredKeywordParameterNode (location: (53,6)-(53,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ └── name_loc: (53,6)-(53,8) = "b:"
- │ │ │ └── @ OptionalKeywordParameterNode (location: (53,10)-(53,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (53,10)-(53,12) = "c:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (53,13)-(53,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b, :c]
- │ ├── def_keyword_loc: (53,0)-(53,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (54,0)-(54,3) = "end"
- ├── @ DefNode (location: (56,0)-(57,3))
- │ ├── name: :a
- │ ├── name_loc: (56,4)-(56,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (56,6)-(56,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ RequiredKeywordParameterNode (location: (56,6)-(56,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ └── name_loc: (56,6)-(56,8) = "b:"
- │ │ │ └── @ OptionalKeywordParameterNode (location: (56,10)-(56,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (56,10)-(56,12) = "c:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (56,13)-(56,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b, :c]
- │ ├── def_keyword_loc: (56,0)-(56,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (56,5)-(56,6) = "("
- │ ├── rparen_loc: (56,14)-(56,15) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (57,0)-(57,3) = "end"
- ├── @ DefNode (location: (59,0)-(61,3))
- │ ├── name: :a
- │ ├── name_loc: (59,4)-(59,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (59,6)-(60,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ OptionalKeywordParameterNode (location: (59,6)-(60,3))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (59,6)-(59,8) = "b:"
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (60,2)-(60,3))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ RequiredKeywordParameterNode (location: (60,5)-(60,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ └── name_loc: (60,5)-(60,7) = "c:"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b, :c]
- │ ├── def_keyword_loc: (59,0)-(59,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (59,5)-(59,6) = "("
- │ ├── rparen_loc: (60,7)-(60,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (61,0)-(61,3) = "end"
- ├── @ StringNode (location: (63,0)-(63,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (63,0)-(63,2) = "%."
- │ ├── content_loc: (63,2)-(63,5) = "abc"
- │ ├── closing_loc: (63,5)-(63,6) = "."
- │ └── unescaped: "abc"
- ├── @ DefNode (location: (65,0)-(66,3))
- │ ├── name: :a
- │ ├── name_loc: (65,4)-(65,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (65,6)-(65,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 2)
- │ │ │ ├── @ OptionalParameterNode (location: (65,6)-(65,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (65,6)-(65,7) = "b"
- │ │ │ │ ├── operator_loc: (65,8)-(65,9) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (65,10)-(65,11))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ OptionalParameterNode (location: (65,13)-(65,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (65,13)-(65,14) = "c"
- │ │ │ ├── operator_loc: (65,15)-(65,16) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (65,17)-(65,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b, :c]
- │ ├── def_keyword_loc: (65,0)-(65,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (66,0)-(66,3) = "end"
- ├── @ DefNode (location: (68,0)-(69,3))
- │ ├── name: :a
- │ ├── name_loc: (68,4)-(68,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (68,0)-(68,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (68,5)-(68,6) = "("
- │ ├── rparen_loc: (68,6)-(68,7) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (69,0)-(69,3) = "end"
- ├── @ DefNode (location: (71,0)-(72,3))
- │ ├── name: :a
- │ ├── name_loc: (71,4)-(71,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (71,6)-(71,14))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (71,6)-(71,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (71,9)-(71,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (71,9)-(71,10) = "c"
- │ │ │ ├── operator_loc: (71,11)-(71,12) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (71,13)-(71,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b, :c]
- │ ├── def_keyword_loc: (71,0)-(71,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (72,0)-(72,3) = "end"
- ├── @ DefNode (location: (74,0)-(75,3))
- │ ├── name: :a
- │ ├── name_loc: (74,4)-(74,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (74,6)-(74,7))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (74,6)-(74,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (74,0)-(74,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (75,0)-(75,3) = "end"
- ├── @ DefNode (location: (77,0)-(77,32))
- │ ├── name: :a
- │ ├── name_loc: (77,4)-(77,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (77,0)-(77,32))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (77,7)-(77,13))
- │ │ │ ├── keyword_loc: (77,7)-(77,13) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause:
- │ │ │ @ ElseNode (location: (77,15)-(77,27))
- │ │ │ ├── else_keyword_loc: (77,15)-(77,19) = "else"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (77,21)-(77,27) = "ensure"
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (77,21)-(77,32))
- │ │ │ ├── ensure_keyword_loc: (77,21)-(77,27) = "ensure"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (77,29)-(77,32) = "end"
- │ │ └── end_keyword_loc: (77,29)-(77,32) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (77,0)-(77,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (77,29)-(77,32) = "end"
- ├── @ DefNode (location: (79,0)-(80,3))
- │ ├── name: :a
- │ ├── name_loc: (79,4)-(79,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (79,6)-(79,8))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (79,6)-(79,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (79,7)-(79,8) = "b"
- │ │ │ └── operator_loc: (79,6)-(79,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (79,0)-(79,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (80,0)-(80,3) = "end"
- ├── @ DefNode (location: (82,0)-(83,3))
- │ ├── name: :a
- │ ├── name_loc: (82,4)-(82,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (82,6)-(82,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (82,6)-(82,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (82,6)-(82,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (82,0)-(82,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (82,5)-(82,6) = "("
- │ ├── rparen_loc: (82,7)-(82,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (83,0)-(83,3) = "end"
- ├── @ DefNode (location: (85,0)-(87,3))
- │ ├── name: :a
- │ ├── name_loc: (85,4)-(85,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (86,0)-(86,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (86,0)-(86,5))
- │ │ ├── name: :b
- │ │ ├── depth: 0
- │ │ ├── name_loc: (86,0)-(86,1) = "b"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (86,4)-(86,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (86,2)-(86,3) = "="
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (85,0)-(85,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (87,0)-(87,3) = "end"
- ├── @ DefNode (location: (89,0)-(90,3))
- │ ├── name: :a
- │ ├── name_loc: (89,9)-(89,10) = "a"
- │ ├── receiver:
- │ │ @ SelfNode (location: (89,4)-(89,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (89,0)-(89,3) = "def"
- │ ├── operator_loc: (89,8)-(89,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (90,0)-(90,3) = "end"
- ├── @ DefNode (location: (92,0)-(93,3))
- │ ├── name: :a
- │ ├── name_loc: (92,9)-(92,10) = "a"
- │ ├── receiver:
- │ │ @ TrueNode (location: (92,4)-(92,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (92,0)-(92,3) = "def"
- │ ├── operator_loc: (92,8)-(92,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (93,0)-(93,3) = "end"
- ├── @ DefNode (location: (95,0)-(96,3))
- │ ├── name: :a
- │ ├── name_loc: (95,4)-(95,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (95,0)-(95,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (96,0)-(96,3) = "end"
- ├── @ DefNode (location: (98,0)-(101,3))
- │ ├── name: :hi
- │ ├── name_loc: (98,4)-(98,6) = "hi"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (99,0)-(100,4))
- │ │ └── body: (length: 2)
- │ │ ├── @ IfNode (location: (99,0)-(99,18))
- │ │ │ ├── if_keyword_loc: (99,11)-(99,13) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ TrueNode (location: (99,14)-(99,18))
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (99,0)-(99,10))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ ReturnNode (location: (99,0)-(99,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── keyword_loc: (99,0)-(99,6) = "return"
- │ │ │ │ └── arguments:
- │ │ │ │ @ ArgumentsNode (location: (99,7)-(99,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (99,7)-(99,10))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (99,7)-(99,8) = ":"
- │ │ │ │ ├── value_loc: (99,8)-(99,10) = "hi"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "hi"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ └── @ SymbolNode (location: (100,0)-(100,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (100,0)-(100,1) = ":"
- │ │ ├── value_loc: (100,1)-(100,4) = "bye"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bye"
- │ ├── locals: []
- │ ├── def_keyword_loc: (98,0)-(98,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (101,0)-(101,3) = "end"
- ├── @ DefNode (location: (103,0)-(103,11))
- │ ├── name: :foo
- │ ├── name_loc: (103,4)-(103,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (103,10)-(103,11))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (103,10)-(103,11))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── locals: []
- │ ├── def_keyword_loc: (103,0)-(103,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: (103,8)-(103,9) = "="
- │ └── end_keyword_loc: ∅
- ├── @ DefNode (location: (104,0)-(104,11))
- │ ├── name: :bar
- │ ├── name_loc: (104,4)-(104,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (104,10)-(104,11))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (104,10)-(104,11))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── locals: []
- │ ├── def_keyword_loc: (104,0)-(104,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: (104,8)-(104,9) = "="
- │ └── end_keyword_loc: ∅
- ├── @ DefNode (location: (106,0)-(106,18))
- │ ├── name: :foo
- │ ├── name_loc: (106,4)-(106,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (106,8)-(106,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (106,8)-(106,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (106,15)-(106,18))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (106,15)-(106,18))
- │ │ ├── flags: decimal
- │ │ └── value: 123
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (106,0)-(106,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (106,7)-(106,8) = "("
- │ ├── rparen_loc: (106,11)-(106,12) = ")"
- │ ├── equal_loc: (106,13)-(106,14) = "="
- │ └── end_keyword_loc: ∅
- ├── @ DefNode (location: (108,0)-(108,13))
- │ ├── name: :foo
- │ ├── name_loc: (108,4)-(108,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (108,10)-(108,13))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (108,10)-(108,13))
- │ │ ├── flags: decimal
- │ │ └── value: 123
- │ ├── locals: []
- │ ├── def_keyword_loc: (108,0)-(108,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: (108,8)-(108,9) = "="
- │ └── end_keyword_loc: ∅
- ├── @ DefNode (location: (110,0)-(110,19))
- │ ├── name: :a
- │ ├── name_loc: (110,4)-(110,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (110,6)-(110,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (110,6)-(110,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (110,6)-(110,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (110,10)-(110,14))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (110,10)-(110,14))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (110,10)-(110,11) = "b"
- │ │ ├── opening_loc: (110,11)-(110,12) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (110,12)-(110,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ SplatNode (location: (110,12)-(110,13))
- │ │ │ ├── operator_loc: (110,12)-(110,13) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── closing_loc: (110,13)-(110,14) = ")"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (110,0)-(110,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (110,5)-(110,6) = "("
- │ ├── rparen_loc: (110,7)-(110,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (110,16)-(110,19) = "end"
- ├── @ DefNode (location: (112,0)-(112,23))
- │ ├── name: :a
- │ ├── name_loc: (112,4)-(112,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (112,6)-(112,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ ForwardingParameterNode (location: (112,6)-(112,9))
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (112,12)-(112,18))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (112,12)-(112,18))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (112,12)-(112,13) = "b"
- │ │ ├── opening_loc: (112,13)-(112,14) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (112,14)-(112,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ForwardingArgumentsNode (location: (112,14)-(112,17))
- │ │ ├── closing_loc: (112,17)-(112,18) = ")"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (112,0)-(112,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (112,5)-(112,6) = "("
- │ ├── rparen_loc: (112,9)-(112,10) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (112,20)-(112,23) = "end"
- ├── @ DefNode (location: (114,0)-(114,29))
- │ ├── name: :a
- │ ├── name_loc: (114,4)-(114,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (114,6)-(114,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ ForwardingParameterNode (location: (114,6)-(114,9))
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (114,12)-(114,24))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (114,12)-(114,24))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (114,12)-(114,13) = "b"
- │ │ ├── opening_loc: (114,13)-(114,14) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (114,14)-(114,23))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (114,14)-(114,15))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (114,17)-(114,18))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ ForwardingArgumentsNode (location: (114,20)-(114,23))
- │ │ ├── closing_loc: (114,23)-(114,24) = ")"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (114,0)-(114,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (114,5)-(114,6) = "("
- │ ├── rparen_loc: (114,9)-(114,10) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (114,26)-(114,29) = "end"
- ├── @ DefNode (location: (116,0)-(117,3))
- │ ├── name: :a
- │ ├── name_loc: (116,12)-(116,13) = "a"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (116,4)-(116,11))
- │ │ ├── body:
- │ │ │ @ LocalVariableWriteNode (location: (116,5)-(116,10))
- │ │ │ ├── name: :c
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (116,5)-(116,6) = "c"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (116,9)-(116,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (116,9)-(116,10) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (116,7)-(116,8) = "="
- │ │ ├── opening_loc: (116,4)-(116,5) = "("
- │ │ └── closing_loc: (116,10)-(116,11) = ")"
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (116,0)-(116,3) = "def"
- │ ├── operator_loc: (116,11)-(116,12) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (117,0)-(117,3) = "end"
- ├── @ DefNode (location: (119,0)-(120,3))
- │ ├── name: :a
- │ ├── name_loc: (119,4)-(119,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (119,6)-(119,8))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (119,6)-(119,8))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (119,7)-(119,8) = "b"
- │ │ └── operator_loc: (119,6)-(119,7) = "&"
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (119,0)-(119,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (120,0)-(120,3) = "end"
- ├── @ DefNode (location: (122,0)-(123,3))
- │ ├── name: :a
- │ ├── name_loc: (122,4)-(122,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (122,6)-(122,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (122,6)-(122,7))
- │ │ ├── flags: ∅
- │ │ ├── name: ∅
- │ │ ├── name_loc: ∅
- │ │ └── operator_loc: (122,6)-(122,7) = "&"
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (122,0)-(122,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (122,5)-(122,6) = "("
- │ ├── rparen_loc: (122,7)-(122,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (123,0)-(123,3) = "end"
- ├── @ DefNode (location: (125,0)-(126,3))
- │ ├── name: :a
- │ ├── name_loc: (125,10)-(125,11) = "a"
- │ ├── receiver:
- │ │ @ ClassVariableReadNode (location: (125,4)-(125,9))
- │ │ └── name: :@@var
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (125,0)-(125,3) = "def"
- │ ├── operator_loc: (125,9)-(125,10) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (126,0)-(126,3) = "end"
- ├── @ DefNode (location: (128,0)-(129,3))
- │ ├── name: :C
- │ ├── name_loc: (128,12)-(128,13) = "C"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (128,4)-(128,11))
- │ │ ├── body:
- │ │ │ @ LocalVariableWriteNode (location: (128,5)-(128,10))
- │ │ │ ├── name: :a
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (128,5)-(128,6) = "a"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (128,9)-(128,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (128,9)-(128,10) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (128,7)-(128,8) = "="
- │ │ ├── opening_loc: (128,4)-(128,5) = "("
- │ │ └── closing_loc: (128,10)-(128,11) = ")"
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (128,0)-(128,3) = "def"
- │ ├── operator_loc: (128,11)-(128,12) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (129,0)-(129,3) = "end"
- ├── @ DefNode (location: (131,0)-(131,28))
- │ ├── name: :Array_function
- │ ├── name_loc: (131,9)-(131,23) = "Array_function"
- │ ├── receiver:
- │ │ @ SelfNode (location: (131,4)-(131,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (131,0)-(131,3) = "def"
- │ ├── operator_loc: (131,8)-(131,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (131,25)-(131,28) = "end"
- ├── @ ConstantWriteNode (location: (133,0)-(133,9))
- │ ├── name: :Const
- │ ├── name_loc: (133,0)-(133,5) = "Const"
- │ ├── value:
- │ │ @ IntegerNode (location: (133,8)-(133,9))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (133,6)-(133,7) = "="
- ├── @ DefNode (location: (133,11)-(134,3))
- │ ├── name: :a
- │ ├── name_loc: (133,21)-(133,22) = "a"
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (133,15)-(133,20))
- │ │ └── name: :Const
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (133,11)-(133,14) = "def"
- │ ├── operator_loc: (133,20)-(133,21) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (134,0)-(134,3) = "end"
- ├── @ DefNode (location: (136,0)-(136,31))
- │ ├── name: :a
- │ ├── name_loc: (136,4)-(136,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (136,6)-(136,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ ForwardingParameterNode (location: (136,6)-(136,9))
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (136,12)-(136,26))
- │ │ └── body: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (136,12)-(136,26))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (136,12)-(136,13) = "\""
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (136,13)-(136,16))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (136,13)-(136,16) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ └── @ EmbeddedStatementsNode (location: (136,16)-(136,25))
- │ │ │ ├── opening_loc: (136,16)-(136,18) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (136,18)-(136,24))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (136,18)-(136,24))
- │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (136,18)-(136,19) = "b"
- │ │ │ │ ├── opening_loc: (136,19)-(136,20) = "("
- │ │ │ │ ├── arguments:
- │ │ │ │ │ @ ArgumentsNode (location: (136,20)-(136,23))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ └── @ ForwardingArgumentsNode (location: (136,20)-(136,23))
- │ │ │ │ ├── closing_loc: (136,23)-(136,24) = ")"
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (136,24)-(136,25) = "}"
- │ │ └── closing_loc: (136,25)-(136,26) = "\""
- │ ├── locals: []
- │ ├── def_keyword_loc: (136,0)-(136,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (136,5)-(136,6) = "("
- │ ├── rparen_loc: (136,9)-(136,10) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (136,28)-(136,31) = "end"
- ├── @ DefNode (location: (138,0)-(140,3))
- │ ├── name: :foo
- │ ├── name_loc: (138,4)-(138,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (139,2)-(139,30))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (139,2)-(139,30))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ HashNode (location: (139,2)-(139,4))
- │ │ │ ├── opening_loc: (139,2)-(139,3) = "{"
- │ │ │ ├── elements: (length: 0)
- │ │ │ └── closing_loc: (139,3)-(139,4) = "}"
- │ │ ├── call_operator_loc: (139,4)-(139,5) = "."
- │ │ ├── name: :merge
- │ │ ├── message_loc: (139,5)-(139,10) = "merge"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (139,11)-(139,30))
- │ │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ KeywordHashNode (location: (139,11)-(139,30))
- │ │ │ ├── flags: ∅
- │ │ │ └── elements: (length: 3)
- │ │ │ ├── @ AssocSplatNode (location: (139,11)-(139,16))
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CallNode (location: (139,13)-(139,16))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :bar
- │ │ │ │ │ ├── message_loc: (139,13)-(139,16) = "bar"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── operator_loc: (139,11)-(139,13) = "**"
- │ │ │ ├── @ AssocSplatNode (location: (139,18)-(139,23))
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CallNode (location: (139,20)-(139,23))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :baz
- │ │ │ │ │ ├── message_loc: (139,20)-(139,23) = "baz"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── operator_loc: (139,18)-(139,20) = "**"
- │ │ │ └── @ AssocSplatNode (location: (139,25)-(139,30))
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (139,27)-(139,30))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :qux
- │ │ │ │ ├── message_loc: (139,27)-(139,30) = "qux"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (139,25)-(139,27) = "**"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (138,0)-(138,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (140,0)-(140,3) = "end"
- ├── @ DefNode (location: (142,0)-(143,3))
- │ ├── name: :bar
- │ ├── name_loc: (142,4)-(142,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (142,8)-(142,19))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (142,8)-(142,19))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (142,8)-(142,10) = "a:"
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (142,11)-(142,19))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (142,12)-(142,18))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RangeNode (location: (142,12)-(142,18))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left:
- │ │ │ │ │ @ IntegerNode (location: (142,12)-(142,13))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (142,16)-(142,18))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 10
- │ │ │ │ └── operator_loc: (142,13)-(142,16) = "..."
- │ │ │ ├── opening_loc: (142,11)-(142,12) = "("
- │ │ │ └── closing_loc: (142,18)-(142,19) = ")"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (142,0)-(142,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (142,7)-(142,8) = "("
- │ ├── rparen_loc: (142,19)-(142,20) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (143,0)-(143,3) = "end"
- ├── @ DefNode (location: (145,0)-(146,3))
- │ ├── name: :bar
- │ ├── name_loc: (145,4)-(145,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (145,8)-(145,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (145,8)-(145,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (145,8)-(145,10) = "a:"
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (145,11)-(145,18))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (145,12)-(145,17))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RangeNode (location: (145,12)-(145,17))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left: ∅
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (145,15)-(145,17))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 10
- │ │ │ │ └── operator_loc: (145,12)-(145,15) = "..."
- │ │ │ ├── opening_loc: (145,11)-(145,12) = "("
- │ │ │ └── closing_loc: (145,17)-(145,18) = ")"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (145,0)-(145,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (145,7)-(145,8) = "("
- │ ├── rparen_loc: (145,18)-(145,19) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (146,0)-(146,3) = "end"
- ├── @ DefNode (location: (148,0)-(149,3))
- │ ├── name: :bar
- │ ├── name_loc: (148,4)-(148,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (148,8)-(148,17))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (148,8)-(148,17))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (148,8)-(148,10) = "a:"
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (148,11)-(148,17))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (148,12)-(148,16))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RangeNode (location: (148,12)-(148,16))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left:
- │ │ │ │ │ @ IntegerNode (location: (148,12)-(148,13))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── right: ∅
- │ │ │ │ └── operator_loc: (148,13)-(148,16) = "..."
- │ │ │ ├── opening_loc: (148,11)-(148,12) = "("
- │ │ │ └── closing_loc: (148,16)-(148,17) = ")"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (148,0)-(148,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (148,7)-(148,8) = "("
- │ ├── rparen_loc: (148,17)-(148,18) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (149,0)-(149,3) = "end"
- ├── @ DefNode (location: (151,0)-(152,3))
- │ ├── name: :bar
- │ ├── name_loc: (151,4)-(151,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (151,8)-(151,20))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (151,8)-(151,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (151,8)-(151,9) = "a"
- │ │ │ ├── operator_loc: (151,10)-(151,11) = "="
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (151,12)-(151,20))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (151,13)-(151,19))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RangeNode (location: (151,13)-(151,19))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left:
- │ │ │ │ │ @ IntegerNode (location: (151,13)-(151,14))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (151,17)-(151,19))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 10
- │ │ │ │ └── operator_loc: (151,14)-(151,17) = "..."
- │ │ │ ├── opening_loc: (151,12)-(151,13) = "("
- │ │ │ └── closing_loc: (151,19)-(151,20) = ")"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (151,0)-(151,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (151,7)-(151,8) = "("
- │ ├── rparen_loc: (151,20)-(151,21) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (152,0)-(152,3) = "end"
- ├── @ DefNode (location: (154,0)-(155,3))
- │ ├── name: :bar
- │ ├── name_loc: (154,4)-(154,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (154,8)-(154,19))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (154,8)-(154,19))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (154,8)-(154,9) = "a"
- │ │ │ ├── operator_loc: (154,10)-(154,11) = "="
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (154,12)-(154,19))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (154,13)-(154,18))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RangeNode (location: (154,13)-(154,18))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left: ∅
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (154,16)-(154,18))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 10
- │ │ │ │ └── operator_loc: (154,13)-(154,16) = "..."
- │ │ │ ├── opening_loc: (154,12)-(154,13) = "("
- │ │ │ └── closing_loc: (154,18)-(154,19) = ")"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (154,0)-(154,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (154,7)-(154,8) = "("
- │ ├── rparen_loc: (154,19)-(154,20) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (155,0)-(155,3) = "end"
- ├── @ DefNode (location: (157,0)-(158,3))
- │ ├── name: :bar
- │ ├── name_loc: (157,4)-(157,7) = "bar"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (157,8)-(157,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (157,8)-(157,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (157,8)-(157,9) = "a"
- │ │ │ ├── operator_loc: (157,10)-(157,11) = "="
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (157,12)-(157,18))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (157,13)-(157,17))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RangeNode (location: (157,13)-(157,17))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left:
- │ │ │ │ │ @ IntegerNode (location: (157,13)-(157,14))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── right: ∅
- │ │ │ │ └── operator_loc: (157,14)-(157,17) = "..."
- │ │ │ ├── opening_loc: (157,12)-(157,13) = "("
- │ │ │ └── closing_loc: (157,17)-(157,18) = ")"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (157,0)-(157,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (157,7)-(157,8) = "("
- │ ├── rparen_loc: (157,18)-(157,19) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (158,0)-(158,3) = "end"
- ├── @ DefNode (location: (160,0)-(162,3))
- │ ├── name: :method
- │ ├── name_loc: (160,4)-(160,10) = "method"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (160,11)-(160,12))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (160,11)-(160,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (161,2)-(161,14))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (161,2)-(161,14))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (161,2)-(161,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :item
- │ │ │ ├── message_loc: (161,2)-(161,6) = "item"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :>>
- │ │ ├── message_loc: (161,7)-(161,9) = ">>"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (161,10)-(161,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (161,10)-(161,14))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (161,10)-(161,11) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (161,12)-(161,14))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (161,12)-(161,13) = "{"
- │ │ │ └── closing_loc: (161,13)-(161,14) = "}"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (160,0)-(160,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (160,10)-(160,11) = "("
- │ ├── rparen_loc: (160,12)-(160,13) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (162,0)-(162,3) = "end"
- ├── @ LocalVariableWriteNode (location: (164,0)-(164,7))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (164,0)-(164,3) = "foo"
- │ ├── value:
- │ │ @ IntegerNode (location: (164,6)-(164,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (164,4)-(164,5) = "="
- ├── @ DefNode (location: (165,0)-(165,16))
- │ ├── name: :bar
- │ ├── name_loc: (165,8)-(165,11) = "bar"
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (165,4)-(165,7))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (165,0)-(165,3) = "def"
- │ ├── operator_loc: (165,7)-(165,8) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (165,13)-(165,16) = "end"
- ├── @ DefNode (location: (167,0)-(167,18))
- │ ├── name: :f
- │ ├── name_loc: (167,4)-(167,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (167,6)-(167,7))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (167,6)-(167,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (167,6)-(167,7) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (167,10)-(167,13))
- │ │ └── body: (length: 1)
- │ │ └── @ ArrayNode (location: (167,10)-(167,13))
- │ │ ├── flags: contains_splat
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ SplatNode (location: (167,11)-(167,12))
- │ │ │ ├── operator_loc: (167,11)-(167,12) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── opening_loc: (167,10)-(167,11) = "["
- │ │ └── closing_loc: (167,12)-(167,13) = "]"
- │ ├── locals: []
- │ ├── def_keyword_loc: (167,0)-(167,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (167,5)-(167,6) = "("
- │ ├── rparen_loc: (167,7)-(167,8) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (167,15)-(167,18) = "end"
- ├── @ DefNode (location: (169,0)-(169,15))
- │ ├── name: :f
- │ ├── name_loc: (169,4)-(169,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (169,6)-(169,10))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (169,6)-(169,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── name_loc: (169,6)-(169,8) = "x:"
- │ │ │ └── value:
- │ │ │ @ CallNode (location: (169,8)-(169,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (169,9)-(169,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (169,9)-(169,10) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :-@
- │ │ │ ├── message_loc: (169,8)-(169,9) = "-"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:x]
- │ ├── def_keyword_loc: (169,0)-(169,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (169,12)-(169,15) = "end"
- ├── @ DefNode (location: (171,0)-(171,15))
- │ ├── name: :f
- │ ├── name_loc: (171,4)-(171,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (171,6)-(171,10))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (171,6)-(171,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── name_loc: (171,6)-(171,8) = "x:"
- │ │ │ └── value:
- │ │ │ @ CallNode (location: (171,8)-(171,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (171,9)-(171,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (171,9)-(171,10) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+@
- │ │ │ ├── message_loc: (171,8)-(171,9) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:x]
- │ ├── def_keyword_loc: (171,0)-(171,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (171,12)-(171,15) = "end"
- ├── @ DefNode (location: (173,0)-(173,15))
- │ ├── name: :f
- │ ├── name_loc: (173,4)-(173,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (173,6)-(173,10))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (173,6)-(173,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── name_loc: (173,6)-(173,8) = "x:"
- │ │ │ └── value:
- │ │ │ @ CallNode (location: (173,8)-(173,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (173,9)-(173,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (173,9)-(173,10) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :!
- │ │ │ ├── message_loc: (173,8)-(173,9) = "!"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:x]
- │ ├── def_keyword_loc: (173,0)-(173,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (173,12)-(173,15) = "end"
- ├── @ DefNode (location: (175,0)-(175,20))
- │ ├── name: :foo
- │ ├── name_loc: (175,4)-(175,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (175,8)-(175,15))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (175,8)-(175,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── name_loc: (175,8)-(175,10) = "x:"
- │ │ │ └── value:
- │ │ │ @ StringNode (location: (175,10)-(175,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (175,10)-(175,12) = "%("
- │ │ │ ├── content_loc: (175,12)-(175,14) = "xx"
- │ │ │ ├── closing_loc: (175,14)-(175,15) = ")"
- │ │ │ └── unescaped: "xx"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:x]
- │ ├── def_keyword_loc: (175,0)-(175,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (175,17)-(175,20) = "end"
- ├── @ DefNode (location: (177,0)-(179,3))
- │ ├── name: :foo
- │ ├── name_loc: (177,4)-(177,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (177,8)-(177,11))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ ForwardingParameterNode (location: (177,8)-(177,11))
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (178,2)-(178,10))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (178,2)-(178,10))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (178,2)-(178,5) = "bar"
- │ │ ├── opening_loc: (178,5)-(178,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (178,6)-(178,9))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ForwardingArgumentsNode (location: (178,6)-(178,9))
- │ │ ├── closing_loc: (178,9)-(178,10) = ")"
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (177,0)-(177,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (177,7)-(177,8) = "("
- │ ├── rparen_loc: (177,11)-(177,12) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (179,0)-(179,3) = "end"
- ├── @ DefNode (location: (181,0)-(181,42))
- │ ├── name: :foo
- │ ├── name_loc: (181,4)-(181,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (181,8)-(181,37))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (181,8)-(181,37))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (181,8)-(181,11) = "bar"
- │ │ │ ├── operator_loc: (181,12)-(181,13) = "="
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (181,14)-(181,37))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (181,15)-(181,36))
- │ │ │ │ └── body: (length: 2)
- │ │ │ │ ├── @ DefNode (location: (181,15)-(181,33))
- │ │ │ │ │ ├── name: :baz
- │ │ │ │ │ ├── name_loc: (181,19)-(181,22) = "baz"
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── parameters:
- │ │ │ │ │ │ @ ParametersNode (location: (181,23)-(181,26))
- │ │ │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (181,23)-(181,26))
- │ │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ │ └── name: :bar
- │ │ │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ ├── body:
- │ │ │ │ │ │ @ StatementsNode (location: (181,30)-(181,33))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ LocalVariableReadNode (location: (181,30)-(181,33))
- │ │ │ │ │ │ ├── name: :bar
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ ├── locals: [:bar]
- │ │ │ │ │ ├── def_keyword_loc: (181,15)-(181,18) = "def"
- │ │ │ │ │ ├── operator_loc: ∅
- │ │ │ │ │ ├── lparen_loc: (181,22)-(181,23) = "("
- │ │ │ │ │ ├── rparen_loc: (181,26)-(181,27) = ")"
- │ │ │ │ │ ├── equal_loc: (181,28)-(181,29) = "="
- │ │ │ │ │ └── end_keyword_loc: ∅
- │ │ │ │ └── @ IntegerNode (location: (181,35)-(181,36))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── opening_loc: (181,14)-(181,15) = "("
- │ │ │ └── closing_loc: (181,36)-(181,37) = ")"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (181,41)-(181,42))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (181,41)-(181,42))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (181,0)-(181,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (181,7)-(181,8) = "("
- │ ├── rparen_loc: (181,37)-(181,38) = ")"
- │ ├── equal_loc: (181,39)-(181,40) = "="
- │ └── end_keyword_loc: ∅
- └── @ DefNode (location: (183,0)-(183,37))
- ├── name: :foo
- ├── name_loc: (183,21)-(183,24) = "foo"
- ├── receiver:
- │ @ ParenthesesNode (location: (183,4)-(183,20))
- │ ├── body:
- │ │ @ ClassNode (location: (183,5)-(183,19))
- │ │ ├── locals: []
- │ │ ├── class_keyword_loc: (183,5)-(183,10) = "class"
- │ │ ├── constant_path:
- │ │ │ @ ConstantReadNode (location: (183,11)-(183,14))
- │ │ │ └── name: :Foo
- │ │ ├── inheritance_operator_loc: ∅
- │ │ ├── superclass: ∅
- │ │ ├── body: ∅
- │ │ ├── end_keyword_loc: (183,16)-(183,19) = "end"
- │ │ └── name: :Foo
- │ ├── opening_loc: (183,4)-(183,5) = "("
- │ └── closing_loc: (183,19)-(183,20) = ")"
- ├── parameters:
- │ @ ParametersNode (location: (183,25)-(183,32))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 1)
- │ │ └── @ OptionalParameterNode (location: (183,25)-(183,32))
- │ │ ├── flags: ∅
- │ │ ├── name: :bar
- │ │ ├── name_loc: (183,25)-(183,28) = "bar"
- │ │ ├── operator_loc: (183,29)-(183,30) = "="
- │ │ └── value:
- │ │ @ IntegerNode (location: (183,31)-(183,32))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (183,36)-(183,37))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (183,36)-(183,37))
- │ ├── flags: decimal
- │ └── value: 2
- ├── locals: [:bar]
- ├── def_keyword_loc: (183,0)-(183,3) = "def"
- ├── operator_loc: (183,20)-(183,21) = "."
- ├── lparen_loc: (183,24)-(183,25) = "("
- ├── rparen_loc: (183,32)-(183,33) = ")"
- ├── equal_loc: (183,34)-(183,35) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/modules.txt b/test/prism/snapshots/modules.txt
deleted file mode 100644
index de1ea8feeb..0000000000
--- a/test/prism/snapshots/modules.txt
+++ /dev/null
@@ -1,180 +0,0 @@
-@ ProgramNode (location: (1,0)-(18,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(18,3))
- └── body: (length: 7)
- ├── @ ModuleNode (location: (1,0)-(1,18))
- │ ├── locals: [:a]
- │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (1,7)-(1,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (1,9)-(1,14))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (1,9)-(1,14))
- │ │ ├── name: :a
- │ │ ├── depth: 0
- │ │ ├── name_loc: (1,9)-(1,10) = "a"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (1,11)-(1,12) = "="
- │ ├── end_keyword_loc: (1,15)-(1,18) = "end"
- │ └── name: :A
- ├── @ InterpolatedStringNode (location: (3,0)-(3,18))
- │ ├── flags: ∅
- │ ├── opening_loc: (3,0)-(3,3) = "%Q{"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (3,3)-(3,7))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,3)-(3,7) = "aaa "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "aaa "
- │ │ ├── @ EmbeddedStatementsNode (location: (3,7)-(3,13))
- │ │ │ ├── opening_loc: (3,7)-(3,9) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (3,9)-(3,12))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (3,9)-(3,12))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bbb
- │ │ │ │ ├── message_loc: (3,9)-(3,12) = "bbb"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (3,12)-(3,13) = "}"
- │ │ └── @ StringNode (location: (3,13)-(3,17))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (3,13)-(3,17) = " ccc"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " ccc"
- │ └── closing_loc: (3,17)-(3,18) = "}"
- ├── @ ModuleNode (location: (5,0)-(6,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (5,0)-(5,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (5,7)-(5,11))
- │ │ ├── parent:
- │ │ │ @ CallNode (location: (5,7)-(5,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :m
- │ │ │ ├── message_loc: (5,7)-(5,8) = "m"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── name: :M
- │ │ ├── delimiter_loc: (5,8)-(5,10) = "::"
- │ │ └── name_loc: (5,10)-(5,11) = "M"
- │ ├── body: ∅
- │ ├── end_keyword_loc: (6,0)-(6,3) = "end"
- │ └── name: :M
- ├── @ ModuleNode (location: (8,0)-(9,19))
- │ ├── locals: [:x]
- │ ├── module_keyword_loc: (8,0)-(8,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (8,7)-(8,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ BeginNode (location: (8,0)-(9,19))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (9,1)-(9,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableWriteNode (location: (9,1)-(9,6))
- │ │ │ ├── name: :x
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (9,1)-(9,2) = "x"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (9,5)-(9,6))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: (9,3)-(9,4) = "="
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (9,8)-(9,14))
- │ │ │ ├── keyword_loc: (9,8)-(9,14) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (9,16)-(9,19) = "end"
- │ ├── end_keyword_loc: (9,16)-(9,19) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (11,0)-(12,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (11,0)-(11,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (11,7)-(11,10))
- │ │ ├── parent: ∅
- │ │ ├── name: :A
- │ │ ├── delimiter_loc: (11,7)-(11,9) = "::"
- │ │ └── name_loc: (11,9)-(11,10) = "A"
- │ ├── body: ∅
- │ ├── end_keyword_loc: (12,0)-(12,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (14,0)-(15,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (14,0)-(14,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (14,7)-(14,13))
- │ │ ├── parent:
- │ │ │ @ CallNode (location: (14,7)-(14,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ ConstantReadNode (location: (14,7)-(14,8))
- │ │ │ │ └── name: :A
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :[]
- │ │ │ ├── message_loc: (14,8)-(14,10) = "[]"
- │ │ │ ├── opening_loc: (14,8)-(14,9) = "["
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: (14,9)-(14,10) = "]"
- │ │ │ └── block: ∅
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (14,10)-(14,12) = "::"
- │ │ └── name_loc: (14,12)-(14,13) = "B"
- │ ├── body: ∅
- │ ├── end_keyword_loc: (15,0)-(15,3) = "end"
- │ └── name: :B
- └── @ ModuleNode (location: (17,0)-(18,3))
- ├── locals: []
- ├── module_keyword_loc: (17,0)-(17,6) = "module"
- ├── constant_path:
- │ @ ConstantPathNode (location: (17,7)-(17,14))
- │ ├── parent:
- │ │ @ CallNode (location: (17,7)-(17,11))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ ConstantReadNode (location: (17,7)-(17,8))
- │ │ │ └── name: :A
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :[]
- │ │ ├── message_loc: (17,8)-(17,11) = "[1]"
- │ │ ├── opening_loc: (17,8)-(17,9) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (17,9)-(17,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (17,9)-(17,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: (17,10)-(17,11) = "]"
- │ │ └── block: ∅
- │ ├── name: :B
- │ ├── delimiter_loc: (17,11)-(17,13) = "::"
- │ └── name_loc: (17,13)-(17,14) = "B"
- ├── body: ∅
- ├── end_keyword_loc: (18,0)-(18,3) = "end"
- └── name: :B
diff --git a/test/prism/snapshots/multi_write.txt b/test/prism/snapshots/multi_write.txt
deleted file mode 100644
index d313801fdb..0000000000
--- a/test/prism/snapshots/multi_write.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,26))
-├── locals: [:foo, :bar]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,26))
- └── body: (length: 4)
- ├── @ LocalVariableWriteNode (location: (1,0)-(1,18))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (1,0)-(1,3) = "foo"
- │ ├── value:
- │ │ @ RescueModifierNode (location: (1,6)-(1,18))
- │ │ ├── expression:
- │ │ │ @ IntegerNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── keyword_loc: (1,8)-(1,14) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ NilNode (location: (1,15)-(1,18))
- │ └── operator_loc: (1,4)-(1,5) = "="
- ├── @ MultiWriteNode (location: (2,0)-(2,23))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (2,0)-(2,3))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableTargetNode (location: (2,5)-(2,8))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (2,9)-(2,10) = "="
- │ └── value:
- │ @ RescueModifierNode (location: (2,11)-(2,23))
- │ ├── expression:
- │ │ @ IntegerNode (location: (2,11)-(2,12))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_loc: (2,13)-(2,19) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (2,20)-(2,23))
- ├── @ RescueModifierNode (location: (3,0)-(3,21))
- │ ├── expression:
- │ │ @ LocalVariableWriteNode (location: (3,0)-(3,10))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (3,0)-(3,3) = "foo"
- │ │ ├── value:
- │ │ │ @ ArrayNode (location: (3,6)-(3,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ IntegerNode (location: (3,6)-(3,7))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── @ IntegerNode (location: (3,9)-(3,10))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── opening_loc: ∅
- │ │ │ └── closing_loc: ∅
- │ │ └── operator_loc: (3,4)-(3,5) = "="
- │ ├── keyword_loc: (3,11)-(3,17) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (3,18)-(3,21))
- └── @ MultiWriteNode (location: (4,0)-(4,26))
- ├── lefts: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (4,0)-(4,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (4,5)-(4,8))
- │ ├── name: :bar
- │ └── depth: 0
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (4,9)-(4,10) = "="
- └── value:
- @ RescueModifierNode (location: (4,11)-(4,26))
- ├── expression:
- │ @ ArrayNode (location: (4,11)-(4,15))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (4,11)-(4,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (4,14)-(4,15))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── keyword_loc: (4,16)-(4,22) = "rescue"
- └── rescue_expression:
- @ NilNode (location: (4,23)-(4,26))
diff --git a/test/prism/snapshots/newline_terminated.txt b/test/prism/snapshots/newline_terminated.txt
deleted file mode 100644
index 6a3b28dba9..0000000000
--- a/test/prism/snapshots/newline_terminated.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-@ ProgramNode (location: (3,0)-(41,0))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (3,0)-(41,0))
- └── body: (length: 17)
- ├── @ StringNode (location: (3,0)-(3,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (3,0)-(3,2) = "% "
- │ ├── content_loc: (3,2)-(3,5) = "abc"
- │ ├── closing_loc: (3,5)-(3,6) = " "
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (4,0)-(4,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (4,0)-(4,2) = "%\t"
- │ ├── content_loc: (4,2)-(4,5) = "abc"
- │ ├── closing_loc: (4,5)-(4,6) = "\t"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (5,0)-(5,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (5,0)-(5,2) = "%\v"
- │ ├── content_loc: (5,2)-(5,5) = "abc"
- │ ├── closing_loc: (5,5)-(5,6) = "\v"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (6,0)-(6,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (6,0)-(6,2) = "%\r"
- │ ├── content_loc: (6,2)-(6,5) = "abc"
- │ ├── closing_loc: (6,5)-(6,6) = "\r"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (7,0)-(9,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (7,0)-(8,0) = "%\n"
- │ ├── content_loc: (8,0)-(8,3) = "abc"
- │ ├── closing_loc: (8,3)-(9,0) = "\n"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (10,0)-(10,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (10,0)-(10,2) = "%\u0000"
- │ ├── content_loc: (10,2)-(10,5) = "abc"
- │ ├── closing_loc: (10,5)-(10,6) = "\u0000"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (11,0)-(13,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (11,0)-(12,0) = "%\n"
- │ ├── content_loc: (12,0)-(12,3) = "abc"
- │ ├── closing_loc: (12,3)-(13,0) = "\n"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (14,0)-(16,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (14,0)-(15,0) = "%\n"
- │ ├── content_loc: (15,0)-(15,4) = "\rabc"
- │ ├── closing_loc: (15,4)-(16,0) = "\n"
- │ └── unescaped: "\rabc"
- ├── @ StringNode (location: (17,0)-(19,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (17,0)-(18,0) = "%\n"
- │ ├── content_loc: (18,0)-(18,4) = "\rabc"
- │ ├── closing_loc: (18,4)-(19,0) = "\n"
- │ └── unescaped: "\rabc"
- ├── @ StringNode (location: (20,0)-(22,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (20,0)-(21,0) = "%\n"
- │ ├── content_loc: (21,0)-(21,3) = "abc"
- │ ├── closing_loc: (21,3)-(22,0) = "\n"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (23,0)-(23,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (23,0)-(23,2) = "%\r"
- │ ├── content_loc: (23,2)-(23,5) = "abc"
- │ ├── closing_loc: (23,5)-(23,6) = "\r"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (24,0)-(26,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (24,0)-(25,0) = "%\n"
- │ ├── content_loc: (25,0)-(25,3) = "abc"
- │ ├── closing_loc: (25,3)-(26,0) = "\n"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (27,0)-(29,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (27,0)-(28,0) = "%\n"
- │ ├── content_loc: (28,0)-(28,3) = "abc"
- │ ├── closing_loc: (28,3)-(29,0) = "\n"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (30,0)-(32,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (30,0)-(31,0) = "%\n"
- │ ├── content_loc: (31,0)-(31,3) = "foo"
- │ ├── closing_loc: (31,3)-(32,0) = "\n"
- │ └── unescaped: "foo"
- ├── @ StringNode (location: (33,0)-(35,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (33,0)-(34,0) = "%q\n"
- │ ├── content_loc: (34,0)-(34,3) = "foo"
- │ ├── closing_loc: (34,3)-(35,0) = "\n"
- │ └── unescaped: "foo"
- ├── @ StringNode (location: (36,0)-(38,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (36,0)-(37,0) = "%Q\n"
- │ ├── content_loc: (37,0)-(37,3) = "foo"
- │ ├── closing_loc: (37,3)-(38,0) = "\n"
- │ └── unescaped: "foo"
- └── @ RegularExpressionNode (location: (39,0)-(41,0))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (39,0)-(40,0) = "%r\n"
- ├── content_loc: (40,0)-(40,3) = "foo"
- ├── closing_loc: (40,3)-(41,0) = "\n"
- └── unescaped: "foo"
diff --git a/test/prism/snapshots/next.txt b/test/prism/snapshots/next.txt
deleted file mode 100644
index ce2e497de9..0000000000
--- a/test/prism/snapshots/next.txt
+++ /dev/null
@@ -1,329 +0,0 @@
-@ ProgramNode (location: (1,0)-(24,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(24,15))
- └── body: (length: 10)
- ├── @ CallNode (location: (1,0)-(1,12))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (1,0)-(1,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,4)-(1,12))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,6)-(1,10))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (1,6)-(1,10))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (1,6)-(1,10) = "next"
- │ ├── opening_loc: (1,4)-(1,5) = "{"
- │ └── closing_loc: (1,11)-(1,12) = "}"
- ├── @ CallNode (location: (3,0)-(3,26))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (3,0)-(3,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (3,4)-(3,26))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (3,6)-(3,24))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (3,6)-(3,24))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (3,11)-(3,24))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ ParenthesesNode (location: (3,11)-(3,14))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (3,12)-(3,13))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (3,12)-(3,13))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── opening_loc: (3,11)-(3,12) = "("
- │ │ │ │ └── closing_loc: (3,13)-(3,14) = ")"
- │ │ │ ├── @ ParenthesesNode (location: (3,16)-(3,19))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (3,17)-(3,18))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (3,17)-(3,18))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ ├── opening_loc: (3,16)-(3,17) = "("
- │ │ │ │ └── closing_loc: (3,18)-(3,19) = ")"
- │ │ │ └── @ ParenthesesNode (location: (3,21)-(3,24))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (3,22)-(3,23))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (3,22)-(3,23))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 3
- │ │ │ ├── opening_loc: (3,21)-(3,22) = "("
- │ │ │ └── closing_loc: (3,23)-(3,24) = ")"
- │ │ └── keyword_loc: (3,6)-(3,10) = "next"
- │ ├── opening_loc: (3,4)-(3,5) = "{"
- │ └── closing_loc: (3,25)-(3,26) = "}"
- ├── @ CallNode (location: (5,0)-(5,14))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (5,0)-(5,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (5,4)-(5,14))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (5,6)-(5,12))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (5,6)-(5,12))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,11)-(5,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,11)-(5,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── keyword_loc: (5,6)-(5,10) = "next"
- │ ├── opening_loc: (5,4)-(5,5) = "{"
- │ └── closing_loc: (5,13)-(5,14) = "}"
- ├── @ CallNode (location: (7,0)-(8,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (7,0)-(7,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (7,4)-(8,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (7,6)-(8,1))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (7,6)-(8,1))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (7,11)-(8,1))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (7,11)-(7,12))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (7,14)-(7,15))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ └── keyword_loc: (7,6)-(7,10) = "next"
- │ ├── opening_loc: (7,4)-(7,5) = "{"
- │ └── closing_loc: (8,2)-(8,3) = "}"
- ├── @ CallNode (location: (10,0)-(10,20))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (10,0)-(10,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (10,4)-(10,20))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (10,6)-(10,18))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (10,6)-(10,18))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (10,11)-(10,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (10,11)-(10,12))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (10,14)-(10,15))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (10,17)-(10,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ └── keyword_loc: (10,6)-(10,10) = "next"
- │ ├── opening_loc: (10,4)-(10,5) = "{"
- │ └── closing_loc: (10,19)-(10,20) = "}"
- ├── @ CallNode (location: (12,0)-(12,22))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (12,0)-(12,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (12,4)-(12,22))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (12,6)-(12,20))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (12,6)-(12,20))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (12,11)-(12,20))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ArrayNode (location: (12,11)-(12,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 3)
- │ │ │ │ ├── @ IntegerNode (location: (12,12)-(12,13))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── @ IntegerNode (location: (12,15)-(12,16))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ └── @ IntegerNode (location: (12,18)-(12,19))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 3
- │ │ │ ├── opening_loc: (12,11)-(12,12) = "["
- │ │ │ └── closing_loc: (12,19)-(12,20) = "]"
- │ │ └── keyword_loc: (12,6)-(12,10) = "next"
- │ ├── opening_loc: (12,4)-(12,5) = "{"
- │ └── closing_loc: (12,21)-(12,22) = "}"
- ├── @ CallNode (location: (14,0)-(17,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (14,0)-(14,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (14,4)-(17,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (14,6)-(17,1))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (14,6)-(17,1))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (14,10)-(17,1))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ParenthesesNode (location: (14,10)-(17,1))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (15,2)-(16,3))
- │ │ │ │ └── body: (length: 2)
- │ │ │ │ ├── @ IntegerNode (location: (15,2)-(15,3))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── opening_loc: (14,10)-(14,11) = "("
- │ │ │ └── closing_loc: (17,0)-(17,1) = ")"
- │ │ └── keyword_loc: (14,6)-(14,10) = "next"
- │ ├── opening_loc: (14,4)-(14,5) = "{"
- │ └── closing_loc: (17,2)-(17,3) = "}"
- ├── @ CallNode (location: (19,0)-(20,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (19,0)-(19,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (19,4)-(20,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (19,6)-(20,1))
- │ │ └── body: (length: 2)
- │ │ ├── @ NextNode (location: (19,6)-(19,10))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (19,6)-(19,10) = "next"
- │ │ └── @ IntegerNode (location: (20,0)-(20,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── opening_loc: (19,4)-(19,5) = "{"
- │ └── closing_loc: (20,2)-(20,3) = "}"
- ├── @ CallNode (location: (22,0)-(22,14))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (22,0)-(22,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (22,4)-(22,14))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (22,6)-(22,12))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (22,6)-(22,12))
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (22,10)-(22,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ ParenthesesNode (location: (22,10)-(22,12))
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (22,10)-(22,11) = "("
- │ │ │ └── closing_loc: (22,11)-(22,12) = ")"
- │ │ └── keyword_loc: (22,6)-(22,10) = "next"
- │ ├── opening_loc: (22,4)-(22,5) = "{"
- │ └── closing_loc: (22,13)-(22,14) = "}"
- └── @ CallNode (location: (24,0)-(24,15))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :tap
- ├── message_loc: (24,0)-(24,3) = "tap"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (24,4)-(24,15))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (24,6)-(24,13))
- │ └── body: (length: 1)
- │ └── @ NextNode (location: (24,6)-(24,13))
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (24,10)-(24,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ParenthesesNode (location: (24,10)-(24,13))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (24,11)-(24,12))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (24,11)-(24,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── opening_loc: (24,10)-(24,11) = "("
- │ │ └── closing_loc: (24,12)-(24,13) = ")"
- │ └── keyword_loc: (24,6)-(24,10) = "next"
- ├── opening_loc: (24,4)-(24,5) = "{"
- └── closing_loc: (24,14)-(24,15) = "}"
diff --git a/test/prism/snapshots/nils.txt b/test/prism/snapshots/nils.txt
deleted file mode 100644
index f72745560f..0000000000
--- a/test/prism/snapshots/nils.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(12,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(12,11))
- └── body: (length: 5)
- ├── @ NilNode (location: (1,0)-(1,3))
- ├── @ ParenthesesNode (location: (3,0)-(3,2))
- │ ├── body: ∅
- │ ├── opening_loc: (3,0)-(3,1) = "("
- │ └── closing_loc: (3,1)-(3,2) = ")"
- ├── @ ParenthesesNode (location: (5,0)-(8,1))
- │ ├── body: ∅
- │ ├── opening_loc: (5,0)-(5,1) = "("
- │ └── closing_loc: (8,0)-(8,1) = ")"
- ├── @ PostExecutionNode (location: (10,0)-(10,9))
- │ ├── statements:
- │ │ @ StatementsNode (location: (10,6)-(10,7))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (10,6)-(10,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_loc: (10,0)-(10,3) = "END"
- │ ├── opening_loc: (10,4)-(10,5) = "{"
- │ └── closing_loc: (10,8)-(10,9) = "}"
- └── @ PreExecutionNode (location: (12,0)-(12,11))
- ├── statements:
- │ @ StatementsNode (location: (12,8)-(12,9))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (12,8)-(12,9))
- │ ├── flags: decimal
- │ └── value: 1
- ├── keyword_loc: (12,0)-(12,5) = "BEGIN"
- ├── opening_loc: (12,6)-(12,7) = "{"
- └── closing_loc: (12,10)-(12,11) = "}"
diff --git a/test/prism/snapshots/non_alphanumeric_methods.txt b/test/prism/snapshots/non_alphanumeric_methods.txt
deleted file mode 100644
index 2ed66fe0e2..0000000000
--- a/test/prism/snapshots/non_alphanumeric_methods.txt
+++ /dev/null
@@ -1,503 +0,0 @@
-@ ProgramNode (location: (1,0)-(105,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(105,3))
- └── body: (length: 36)
- ├── @ DefNode (location: (1,0)-(2,3))
- │ ├── name: :!
- │ ├── name_loc: (1,4)-(1,5) = "!"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (2,0)-(2,3) = "end"
- ├── @ DefNode (location: (4,0)-(5,3))
- │ ├── name: :!=
- │ ├── name_loc: (4,4)-(4,6) = "!="
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ DefNode (location: (7,0)-(8,3))
- │ ├── name: :!~
- │ ├── name_loc: (7,4)-(7,6) = "!~"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (8,0)-(8,3) = "end"
- ├── @ DefNode (location: (10,0)-(11,3))
- │ ├── name: :%
- │ ├── name_loc: (10,4)-(10,5) = "%"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (10,0)-(10,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ DefNode (location: (13,0)-(14,3))
- │ ├── name: :+
- │ ├── name_loc: (13,9)-(13,10) = "+"
- │ ├── receiver:
- │ │ @ SelfNode (location: (13,4)-(13,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
- │ ├── operator_loc: (13,8)-(13,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (14,0)-(14,3) = "end"
- ├── @ DefNode (location: (16,0)-(17,3))
- │ ├── name: :&
- │ ├── name_loc: (16,4)-(16,5) = "&"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (16,0)-(16,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- ├── @ DefNode (location: (19,0)-(20,3))
- │ ├── name: :*
- │ ├── name_loc: (19,4)-(19,5) = "*"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (19,0)-(19,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (20,0)-(20,3) = "end"
- ├── @ DefNode (location: (22,0)-(23,3))
- │ ├── name: :**
- │ ├── name_loc: (22,4)-(22,6) = "**"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (23,0)-(23,3) = "end"
- ├── @ StringNode (location: (25,0)-(25,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (25,0)-(25,2) = "%|"
- │ ├── content_loc: (25,2)-(25,5) = "abc"
- │ ├── closing_loc: (25,5)-(25,6) = "|"
- │ └── unescaped: "abc"
- ├── @ DefNode (location: (27,0)-(28,3))
- │ ├── name: :+
- │ ├── name_loc: (27,4)-(27,5) = "+"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (27,6)-(27,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (27,6)-(27,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (27,8)-(27,9) = "b"
- │ │ │ └── operator_loc: (27,6)-(27,8) = "**"
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (28,0)-(28,3) = "end"
- ├── @ DefNode (location: (30,0)-(31,3))
- │ ├── name: :+
- │ ├── name_loc: (30,4)-(30,5) = "+"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (30,0)-(30,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (30,5)-(30,6) = "("
- │ ├── rparen_loc: (30,6)-(30,7) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- ├── @ DefNode (location: (33,0)-(34,3))
- │ ├── name: :+
- │ ├── name_loc: (33,4)-(33,5) = "+"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (33,6)-(33,7))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (33,6)-(33,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:b]
- │ ├── def_keyword_loc: (33,0)-(33,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (34,0)-(34,3) = "end"
- ├── @ DefNode (location: (36,0)-(37,3))
- │ ├── name: :+
- │ ├── name_loc: (36,9)-(36,10) = "+"
- │ ├── receiver:
- │ │ @ SelfNode (location: (36,4)-(36,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (36,0)-(36,3) = "def"
- │ ├── operator_loc: (36,8)-(36,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (37,0)-(37,3) = "end"
- ├── @ DefNode (location: (39,0)-(40,3))
- │ ├── name: :+
- │ ├── name_loc: (39,4)-(39,5) = "+"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (39,0)-(39,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (40,0)-(40,3) = "end"
- ├── @ DefNode (location: (42,0)-(43,3))
- │ ├── name: :+@
- │ ├── name_loc: (42,4)-(42,6) = "+@"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (42,0)-(42,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (43,0)-(43,3) = "end"
- ├── @ DefNode (location: (45,0)-(46,3))
- │ ├── name: :-
- │ ├── name_loc: (45,4)-(45,5) = "-"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (45,0)-(45,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (46,0)-(46,3) = "end"
- ├── @ DefNode (location: (48,0)-(48,11))
- │ ├── name: :-
- │ ├── name_loc: (48,6)-(48,7) = "-"
- │ ├── receiver:
- │ │ @ CallNode (location: (48,4)-(48,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (48,4)-(48,5) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (48,0)-(48,3) = "def"
- │ ├── operator_loc: (48,5)-(48,6) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (48,8)-(48,11) = "end"
- ├── @ DefNode (location: (50,0)-(51,3))
- │ ├── name: :-@
- │ ├── name_loc: (50,4)-(50,6) = "-@"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (50,0)-(50,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (51,0)-(51,3) = "end"
- ├── @ DefNode (location: (53,0)-(54,3))
- │ ├── name: :/
- │ ├── name_loc: (53,4)-(53,5) = "/"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (53,0)-(53,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (54,0)-(54,3) = "end"
- ├── @ DefNode (location: (56,0)-(57,3))
- │ ├── name: :<
- │ ├── name_loc: (56,4)-(56,5) = "<"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (56,0)-(56,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (57,0)-(57,3) = "end"
- ├── @ DefNode (location: (59,0)-(60,3))
- │ ├── name: :<<
- │ ├── name_loc: (59,4)-(59,6) = "<<"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (59,0)-(59,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (60,0)-(60,3) = "end"
- ├── @ DefNode (location: (62,0)-(63,3))
- │ ├── name: :<=
- │ ├── name_loc: (62,4)-(62,6) = "<="
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (62,0)-(62,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (63,0)-(63,3) = "end"
- ├── @ DefNode (location: (65,0)-(66,3))
- │ ├── name: :<=>
- │ ├── name_loc: (65,4)-(65,7) = "<=>"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (65,0)-(65,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (66,0)-(66,3) = "end"
- ├── @ DefNode (location: (68,0)-(69,3))
- │ ├── name: :==
- │ ├── name_loc: (68,4)-(68,6) = "=="
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (68,0)-(68,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (69,0)-(69,3) = "end"
- ├── @ DefNode (location: (71,0)-(72,3))
- │ ├── name: :===
- │ ├── name_loc: (71,4)-(71,7) = "==="
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (71,0)-(71,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (72,0)-(72,3) = "end"
- ├── @ DefNode (location: (74,0)-(75,3))
- │ ├── name: :=~
- │ ├── name_loc: (74,4)-(74,6) = "=~"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (74,0)-(74,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (75,0)-(75,3) = "end"
- ├── @ DefNode (location: (77,0)-(78,3))
- │ ├── name: :>
- │ ├── name_loc: (77,4)-(77,5) = ">"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (77,0)-(77,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (78,0)-(78,3) = "end"
- ├── @ DefNode (location: (80,0)-(81,3))
- │ ├── name: :>=
- │ ├── name_loc: (80,4)-(80,6) = ">="
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (80,0)-(80,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (81,0)-(81,3) = "end"
- ├── @ DefNode (location: (83,0)-(84,3))
- │ ├── name: :>>
- │ ├── name_loc: (83,4)-(83,6) = ">>"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (83,0)-(83,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (84,0)-(84,3) = "end"
- ├── @ DefNode (location: (86,0)-(87,3))
- │ ├── name: :[]
- │ ├── name_loc: (86,4)-(86,6) = "[]"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (86,0)-(86,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (87,0)-(87,3) = "end"
- ├── @ DefNode (location: (89,0)-(90,3))
- │ ├── name: :[]=
- │ ├── name_loc: (89,4)-(89,7) = "[]="
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (89,0)-(89,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (90,0)-(90,3) = "end"
- ├── @ DefNode (location: (92,0)-(93,3))
- │ ├── name: :^
- │ ├── name_loc: (92,4)-(92,5) = "^"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (92,0)-(92,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (93,0)-(93,3) = "end"
- ├── @ DefNode (location: (95,0)-(96,3))
- │ ├── name: :`
- │ ├── name_loc: (95,4)-(95,5) = "`"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (95,0)-(95,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (96,0)-(96,3) = "end"
- ├── @ DefNode (location: (98,0)-(99,3))
- │ ├── name: :`
- │ ├── name_loc: (98,9)-(98,10) = "`"
- │ ├── receiver:
- │ │ @ SelfNode (location: (98,4)-(98,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (98,0)-(98,3) = "def"
- │ ├── operator_loc: (98,8)-(98,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (99,0)-(99,3) = "end"
- ├── @ DefNode (location: (101,0)-(102,3))
- │ ├── name: :|
- │ ├── name_loc: (101,4)-(101,5) = "|"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (101,0)-(101,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (102,0)-(102,3) = "end"
- └── @ DefNode (location: (104,0)-(105,3))
- ├── name: :~
- ├── name_loc: (104,4)-(104,5) = "~"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (104,0)-(104,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (105,0)-(105,3) = "end"
diff --git a/test/prism/snapshots/not.txt b/test/prism/snapshots/not.txt
deleted file mode 100644
index fda61bb4b5..0000000000
--- a/test/prism/snapshots/not.txt
+++ /dev/null
@@ -1,351 +0,0 @@
-@ ProgramNode (location: (1,0)-(37,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(37,16))
- └── body: (length: 10)
- ├── @ AndNode (location: (1,0)-(1,19))
- │ ├── left:
- │ │ @ CallNode (location: (1,0)-(1,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,4)-(1,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (1,0)-(1,3) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (1,12)-(1,19))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,16)-(1,19))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (1,16)-(1,19) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (1,12)-(1,15) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (1,8)-(1,11) = "and"
- ├── @ CallNode (location: (3,0)-(3,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ AndNode (location: (3,4)-(3,15))
- │ │ ├── left:
- │ │ │ @ CallNode (location: (3,4)-(3,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (3,12)-(3,15))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (3,12)-(3,15) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (3,8)-(3,11) = "and"
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (3,0)-(3,3) = "not"
- │ ├── opening_loc: (3,3)-(3,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (3,15)-(3,16) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (5,4)-(5,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (5,4)-(5,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (5,0)-(5,3) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ AndNode (location: (7,0)-(8,5))
- │ ├── left:
- │ │ @ CallNode (location: (7,0)-(7,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (7,4)-(7,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (7,4)-(7,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (7,0)-(7,3) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (7,12)-(8,5))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (8,2)-(8,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (8,2)-(8,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (7,12)-(7,15) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (7,8)-(7,11) = "and"
- ├── @ AndNode (location: (11,0)-(13,5))
- │ ├── left:
- │ │ @ CallNode (location: (11,0)-(11,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (11,4)-(11,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (11,4)-(11,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (11,0)-(11,3) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (12,4)-(13,5))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (13,2)-(13,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (13,2)-(13,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (12,4)-(12,7) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (11,8)-(11,11) = "and"
- ├── @ AndNode (location: (16,0)-(20,5))
- │ ├── left:
- │ │ @ CallNode (location: (16,0)-(16,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (16,4)-(16,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (16,4)-(16,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (16,0)-(16,3) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (17,2)-(20,5))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (20,2)-(20,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (20,2)-(20,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (17,2)-(17,5) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (16,8)-(16,11) = "and"
- ├── @ CallNode (location: (22,0)-(25,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (22,4)-(22,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (22,4)-(22,7) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (22,0)-(22,3) = "not"
- │ ├── opening_loc: (22,3)-(22,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (25,0)-(25,1) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (27,0)-(33,3))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (30,0)-(30,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (30,0)-(30,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (27,0)-(27,3) = "not"
- │ ├── opening_loc: (27,3)-(27,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (33,2)-(33,3) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (35,0)-(35,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ FlipFlopNode (location: (35,4)-(35,14))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ CallNode (location: (35,4)-(35,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (35,4)-(35,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (35,11)-(35,14))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (35,11)-(35,14) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (35,8)-(35,10) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (35,0)-(35,3) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (37,0)-(37,16))
- ├── flags: ∅
- ├── receiver:
- │ @ ParenthesesNode (location: (37,4)-(37,16))
- │ ├── body:
- │ │ @ StatementsNode (location: (37,5)-(37,15))
- │ │ └── body: (length: 1)
- │ │ └── @ FlipFlopNode (location: (37,5)-(37,15))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ CallNode (location: (37,5)-(37,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (37,5)-(37,8) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (37,12)-(37,15))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (37,12)-(37,15) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (37,9)-(37,11) = ".."
- │ ├── opening_loc: (37,4)-(37,5) = "("
- │ └── closing_loc: (37,15)-(37,16) = ")"
- ├── call_operator_loc: ∅
- ├── name: :!
- ├── message_loc: (37,0)-(37,3) = "not"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/numbers.txt b/test/prism/snapshots/numbers.txt
deleted file mode 100644
index 740f3f5a2a..0000000000
--- a/test/prism/snapshots/numbers.txt
+++ /dev/null
@@ -1,142 +0,0 @@
-@ ProgramNode (location: (1,0)-(67,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(67,5))
- └── body: (length: 34)
- ├── @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 0
- ├── @ IntegerNode (location: (3,0)-(3,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ FloatNode (location: (5,0)-(5,3))
- │ └── value: 1.0
- ├── @ IntegerNode (location: (7,0)-(7,1))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IntegerNode (location: (9,0)-(9,3))
- │ ├── flags: binary
- │ └── value: 0
- ├── @ IntegerNode (location: (11,0)-(11,3))
- │ ├── flags: binary
- │ └── value: 1
- ├── @ IntegerNode (location: (13,0)-(13,4))
- │ ├── flags: binary
- │ └── value: 2
- ├── @ IntegerNode (location: (15,0)-(15,3))
- │ ├── flags: decimal
- │ └── value: 0
- ├── @ IntegerNode (location: (17,0)-(17,3))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IntegerNode (location: (19,0)-(19,3))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IntegerNode (location: (21,0)-(21,2))
- │ ├── flags: octal
- │ └── value: 0
- ├── @ IntegerNode (location: (23,0)-(23,2))
- │ ├── flags: octal
- │ └── value: 1
- ├── @ IntegerNode (location: (25,0)-(25,2))
- │ ├── flags: octal
- │ └── value: 2
- ├── @ IntegerNode (location: (27,0)-(27,3))
- │ ├── flags: octal
- │ └── value: 0
- ├── @ IntegerNode (location: (29,0)-(29,3))
- │ ├── flags: octal
- │ └── value: 1
- ├── @ IntegerNode (location: (31,0)-(31,3))
- │ ├── flags: octal
- │ └── value: 2
- ├── @ IntegerNode (location: (33,0)-(33,3))
- │ ├── flags: hexadecimal
- │ └── value: 0
- ├── @ IntegerNode (location: (35,0)-(35,3))
- │ ├── flags: hexadecimal
- │ └── value: 1
- ├── @ IntegerNode (location: (37,0)-(37,3))
- │ ├── flags: hexadecimal
- │ └── value: 2
- ├── @ ImaginaryNode (location: (39,0)-(39,2))
- │ └── numeric:
- │ @ IntegerNode (location: (39,0)-(39,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ RationalNode (location: (41,0)-(41,2))
- │ └── numeric:
- │ @ IntegerNode (location: (41,0)-(41,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IntegerNode (location: (43,0)-(43,2))
- │ ├── flags: decimal
- │ └── value: -1
- ├── @ ImaginaryNode (location: (45,0)-(45,3))
- │ └── numeric:
- │ @ RationalNode (location: (45,0)-(45,2))
- │ └── numeric:
- │ @ IntegerNode (location: (45,0)-(45,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ RationalNode (location: (47,0)-(47,4))
- │ └── numeric:
- │ @ FloatNode (location: (47,0)-(47,3))
- │ └── value: 1.2
- ├── @ ImaginaryNode (location: (49,0)-(49,5))
- │ └── numeric:
- │ @ RationalNode (location: (49,0)-(49,4))
- │ └── numeric:
- │ @ FloatNode (location: (49,0)-(49,3))
- │ └── value: 1.2
- ├── @ ImaginaryNode (location: (51,0)-(51,4))
- │ └── numeric:
- │ @ RationalNode (location: (51,0)-(51,3))
- │ └── numeric:
- │ @ IntegerNode (location: (51,0)-(51,2))
- │ ├── flags: decimal
- │ └── value: -1
- ├── @ RationalNode (location: (53,0)-(53,5))
- │ └── numeric:
- │ @ FloatNode (location: (53,0)-(53,4))
- │ └── value: -1.2
- ├── @ ImaginaryNode (location: (55,0)-(55,6))
- │ └── numeric:
- │ @ RationalNode (location: (55,0)-(55,5))
- │ └── numeric:
- │ @ FloatNode (location: (55,0)-(55,4))
- │ └── value: -1.2
- ├── @ RationalNode (location: (57,0)-(57,4))
- │ └── numeric:
- │ @ IntegerNode (location: (57,0)-(57,3))
- │ ├── flags: octal
- │ └── value: 1
- ├── @ ImaginaryNode (location: (59,0)-(59,4))
- │ └── numeric:
- │ @ IntegerNode (location: (59,0)-(59,3))
- │ ├── flags: octal
- │ └── value: 1
- ├── @ ImaginaryNode (location: (61,0)-(61,5))
- │ └── numeric:
- │ @ RationalNode (location: (61,0)-(61,4))
- │ └── numeric:
- │ @ IntegerNode (location: (61,0)-(61,3))
- │ ├── flags: octal
- │ └── value: 1
- ├── @ RationalNode (location: (63,0)-(63,4))
- │ └── numeric:
- │ @ IntegerNode (location: (63,0)-(63,3))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ImaginaryNode (location: (65,0)-(65,4))
- │ └── numeric:
- │ @ IntegerNode (location: (65,0)-(65,3))
- │ ├── flags: decimal
- │ └── value: 1
- └── @ ImaginaryNode (location: (67,0)-(67,5))
- └── numeric:
- @ RationalNode (location: (67,0)-(67,4))
- └── numeric:
- @ IntegerNode (location: (67,0)-(67,3))
- ├── flags: binary
- └── value: 1
diff --git a/test/prism/snapshots/patterns.txt b/test/prism/snapshots/patterns.txt
deleted file mode 100644
index 16298e7984..0000000000
--- a/test/prism/snapshots/patterns.txt
+++ /dev/null
@@ -1,4915 +0,0 @@
-@ ProgramNode (location: (1,0)-(217,5))
-├── locals: [:bar, :baz, :qux, :b, :a, :foo, :x]
-└── statements:
- @ StatementsNode (location: (1,0)-(217,5))
- └── body: (length: 180)
- ├── @ MatchRequiredNode (location: (1,0)-(1,10))
- │ ├── value:
- │ │ @ CallNode (location: (1,0)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ LocalVariableTargetNode (location: (1,7)-(1,10))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ └── operator_loc: (1,4)-(1,6) = "=>"
- ├── @ MatchRequiredNode (location: (2,0)-(2,8))
- │ ├── value:
- │ │ @ CallNode (location: (2,0)-(2,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (2,0)-(2,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ IntegerNode (location: (2,7)-(2,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (2,4)-(2,6) = "=>"
- ├── @ MatchRequiredNode (location: (3,0)-(3,10))
- │ ├── value:
- │ │ @ CallNode (location: (3,0)-(3,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (3,0)-(3,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FloatNode (location: (3,7)-(3,10))
- │ │ └── value: 1.0
- │ └── operator_loc: (3,4)-(3,6) = "=>"
- ├── @ MatchRequiredNode (location: (4,0)-(4,9))
- │ ├── value:
- │ │ @ CallNode (location: (4,0)-(4,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (4,0)-(4,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ImaginaryNode (location: (4,7)-(4,9))
- │ │ └── numeric:
- │ │ @ IntegerNode (location: (4,7)-(4,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (4,4)-(4,6) = "=>"
- ├── @ MatchRequiredNode (location: (5,0)-(5,9))
- │ ├── value:
- │ │ @ CallNode (location: (5,0)-(5,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (5,0)-(5,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RationalNode (location: (5,7)-(5,9))
- │ │ └── numeric:
- │ │ @ IntegerNode (location: (5,7)-(5,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (5,4)-(5,6) = "=>"
- ├── @ MatchRequiredNode (location: (6,0)-(6,11))
- │ ├── value:
- │ │ @ CallNode (location: (6,0)-(6,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (6,0)-(6,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SymbolNode (location: (6,7)-(6,11))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (6,7)-(6,8) = ":"
- │ │ ├── value_loc: (6,8)-(6,11) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (6,4)-(6,6) = "=>"
- ├── @ MatchRequiredNode (location: (7,0)-(7,14))
- │ ├── value:
- │ │ @ CallNode (location: (7,0)-(7,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (7,0)-(7,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SymbolNode (location: (7,7)-(7,14))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (7,7)-(7,10) = "%s["
- │ │ ├── value_loc: (7,10)-(7,13) = "foo"
- │ │ ├── closing_loc: (7,13)-(7,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (7,4)-(7,6) = "=>"
- ├── @ MatchRequiredNode (location: (8,0)-(8,13))
- │ ├── value:
- │ │ @ CallNode (location: (8,0)-(8,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (8,0)-(8,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SymbolNode (location: (8,7)-(8,13))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (8,7)-(8,9) = ":\""
- │ │ ├── value_loc: (8,9)-(8,12) = "foo"
- │ │ ├── closing_loc: (8,12)-(8,13) = "\""
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (8,4)-(8,6) = "=>"
- ├── @ MatchRequiredNode (location: (9,0)-(9,12))
- │ ├── value:
- │ │ @ CallNode (location: (9,0)-(9,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (9,0)-(9,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RegularExpressionNode (location: (9,7)-(9,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (9,7)-(9,8) = "/"
- │ │ ├── content_loc: (9,8)-(9,11) = "foo"
- │ │ ├── closing_loc: (9,11)-(9,12) = "/"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (9,4)-(9,6) = "=>"
- ├── @ MatchRequiredNode (location: (10,0)-(10,12))
- │ ├── value:
- │ │ @ CallNode (location: (10,0)-(10,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (10,0)-(10,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ XStringNode (location: (10,7)-(10,12))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (10,7)-(10,8) = "`"
- │ │ ├── content_loc: (10,8)-(10,11) = "foo"
- │ │ ├── closing_loc: (10,11)-(10,12) = "`"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (10,4)-(10,6) = "=>"
- ├── @ MatchRequiredNode (location: (11,0)-(11,14))
- │ ├── value:
- │ │ @ CallNode (location: (11,0)-(11,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (11,0)-(11,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ XStringNode (location: (11,7)-(11,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (11,7)-(11,10) = "%x["
- │ │ ├── content_loc: (11,10)-(11,13) = "foo"
- │ │ ├── closing_loc: (11,13)-(11,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (11,4)-(11,6) = "=>"
- ├── @ MatchRequiredNode (location: (12,0)-(12,14))
- │ ├── value:
- │ │ @ CallNode (location: (12,0)-(12,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (12,0)-(12,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (12,7)-(12,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ SymbolNode (location: (12,10)-(12,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (12,10)-(12,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (12,7)-(12,10) = "%i["
- │ │ └── closing_loc: (12,13)-(12,14) = "]"
- │ └── operator_loc: (12,4)-(12,6) = "=>"
- ├── @ MatchRequiredNode (location: (13,0)-(13,14))
- │ ├── value:
- │ │ @ CallNode (location: (13,0)-(13,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (13,0)-(13,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (13,7)-(13,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ SymbolNode (location: (13,10)-(13,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (13,10)-(13,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (13,7)-(13,10) = "%I["
- │ │ └── closing_loc: (13,13)-(13,14) = "]"
- │ └── operator_loc: (13,4)-(13,6) = "=>"
- ├── @ MatchRequiredNode (location: (14,0)-(14,14))
- │ ├── value:
- │ │ @ CallNode (location: (14,0)-(14,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (14,0)-(14,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (14,7)-(14,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ StringNode (location: (14,10)-(14,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (14,10)-(14,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (14,7)-(14,10) = "%w["
- │ │ └── closing_loc: (14,13)-(14,14) = "]"
- │ └── operator_loc: (14,4)-(14,6) = "=>"
- ├── @ MatchRequiredNode (location: (15,0)-(15,14))
- │ ├── value:
- │ │ @ CallNode (location: (15,0)-(15,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (15,0)-(15,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (15,7)-(15,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ StringNode (location: (15,10)-(15,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (15,10)-(15,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (15,7)-(15,10) = "%W["
- │ │ └── closing_loc: (15,13)-(15,14) = "]"
- │ └── operator_loc: (15,4)-(15,6) = "=>"
- ├── @ MatchRequiredNode (location: (16,0)-(16,14))
- │ ├── value:
- │ │ @ CallNode (location: (16,0)-(16,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (16,0)-(16,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ StringNode (location: (16,7)-(16,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (16,7)-(16,10) = "%q["
- │ │ ├── content_loc: (16,10)-(16,13) = "foo"
- │ │ ├── closing_loc: (16,13)-(16,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (16,4)-(16,6) = "=>"
- ├── @ MatchRequiredNode (location: (17,0)-(17,14))
- │ ├── value:
- │ │ @ CallNode (location: (17,0)-(17,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (17,0)-(17,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ StringNode (location: (17,7)-(17,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (17,7)-(17,10) = "%Q["
- │ │ ├── content_loc: (17,10)-(17,13) = "foo"
- │ │ ├── closing_loc: (17,13)-(17,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (17,4)-(17,6) = "=>"
- ├── @ MatchRequiredNode (location: (18,0)-(18,12))
- │ ├── value:
- │ │ @ CallNode (location: (18,0)-(18,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (18,0)-(18,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ StringNode (location: (18,7)-(18,12))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (18,7)-(18,8) = "\""
- │ │ ├── content_loc: (18,8)-(18,11) = "foo"
- │ │ ├── closing_loc: (18,11)-(18,12) = "\""
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (18,4)-(18,6) = "=>"
- ├── @ MatchRequiredNode (location: (19,0)-(19,10))
- │ ├── value:
- │ │ @ CallNode (location: (19,0)-(19,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (19,0)-(19,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ NilNode (location: (19,7)-(19,10))
- │ └── operator_loc: (19,4)-(19,6) = "=>"
- ├── @ MatchRequiredNode (location: (20,0)-(20,11))
- │ ├── value:
- │ │ @ CallNode (location: (20,0)-(20,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (20,0)-(20,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SelfNode (location: (20,7)-(20,11))
- │ └── operator_loc: (20,4)-(20,6) = "=>"
- ├── @ MatchRequiredNode (location: (21,0)-(21,11))
- │ ├── value:
- │ │ @ CallNode (location: (21,0)-(21,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (21,0)-(21,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ TrueNode (location: (21,7)-(21,11))
- │ └── operator_loc: (21,4)-(21,6) = "=>"
- ├── @ MatchRequiredNode (location: (22,0)-(22,12))
- │ ├── value:
- │ │ @ CallNode (location: (22,0)-(22,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (22,0)-(22,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FalseNode (location: (22,7)-(22,12))
- │ └── operator_loc: (22,4)-(22,6) = "=>"
- ├── @ MatchRequiredNode (location: (23,0)-(23,15))
- │ ├── value:
- │ │ @ CallNode (location: (23,0)-(23,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (23,0)-(23,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SourceFileNode (location: (23,7)-(23,15))
- │ │ ├── flags: ∅
- │ │ └── filepath: "patterns.txt"
- │ └── operator_loc: (23,4)-(23,6) = "=>"
- ├── @ MatchRequiredNode (location: (24,0)-(24,15))
- │ ├── value:
- │ │ @ CallNode (location: (24,0)-(24,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (24,0)-(24,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SourceLineNode (location: (24,7)-(24,15))
- │ └── operator_loc: (24,4)-(24,6) = "=>"
- ├── @ MatchRequiredNode (location: (25,0)-(25,19))
- │ ├── value:
- │ │ @ CallNode (location: (25,0)-(25,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (25,0)-(25,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SourceEncodingNode (location: (25,7)-(25,19))
- │ └── operator_loc: (25,4)-(25,6) = "=>"
- ├── @ MatchRequiredNode (location: (26,0)-(26,17))
- │ ├── value:
- │ │ @ CallNode (location: (26,0)-(26,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (26,0)-(26,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ LambdaNode (location: (26,7)-(26,17))
- │ │ ├── locals: []
- │ │ ├── operator_loc: (26,7)-(26,9) = "->"
- │ │ ├── opening_loc: (26,10)-(26,11) = "{"
- │ │ ├── closing_loc: (26,16)-(26,17) = "}"
- │ │ ├── parameters: ∅
- │ │ └── body:
- │ │ @ StatementsNode (location: (26,12)-(26,15))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (26,12)-(26,15))
- │ │ ├── name: :bar
- │ │ └── depth: 1
- │ └── operator_loc: (26,4)-(26,6) = "=>"
- ├── @ MatchRequiredNode (location: (28,0)-(28,13))
- │ ├── value:
- │ │ @ CallNode (location: (28,0)-(28,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (28,0)-(28,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (28,7)-(28,13))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (28,7)-(28,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (28,12)-(28,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (28,9)-(28,11) = ".."
- │ └── operator_loc: (28,4)-(28,6) = "=>"
- ├── @ MatchRequiredNode (location: (29,0)-(29,17))
- │ ├── value:
- │ │ @ CallNode (location: (29,0)-(29,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (29,0)-(29,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (29,7)-(29,17))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ FloatNode (location: (29,7)-(29,10))
- │ │ │ └── value: 1.0
- │ │ ├── right:
- │ │ │ @ FloatNode (location: (29,14)-(29,17))
- │ │ │ └── value: 1.0
- │ │ └── operator_loc: (29,11)-(29,13) = ".."
- │ └── operator_loc: (29,4)-(29,6) = "=>"
- ├── @ MatchRequiredNode (location: (30,0)-(30,15))
- │ ├── value:
- │ │ @ CallNode (location: (30,0)-(30,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (30,0)-(30,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (30,7)-(30,15))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ ImaginaryNode (location: (30,7)-(30,9))
- │ │ │ └── numeric:
- │ │ │ @ IntegerNode (location: (30,7)-(30,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ ImaginaryNode (location: (30,13)-(30,15))
- │ │ │ └── numeric:
- │ │ │ @ IntegerNode (location: (30,13)-(30,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (30,10)-(30,12) = ".."
- │ └── operator_loc: (30,4)-(30,6) = "=>"
- ├── @ MatchRequiredNode (location: (31,0)-(31,15))
- │ ├── value:
- │ │ @ CallNode (location: (31,0)-(31,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (31,0)-(31,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (31,7)-(31,15))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ RationalNode (location: (31,7)-(31,9))
- │ │ │ └── numeric:
- │ │ │ @ IntegerNode (location: (31,7)-(31,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right:
- │ │ │ @ RationalNode (location: (31,13)-(31,15))
- │ │ │ └── numeric:
- │ │ │ @ IntegerNode (location: (31,13)-(31,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (31,10)-(31,12) = ".."
- │ └── operator_loc: (31,4)-(31,6) = "=>"
- ├── @ MatchRequiredNode (location: (32,0)-(32,19))
- │ ├── value:
- │ │ @ CallNode (location: (32,0)-(32,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (32,0)-(32,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (32,7)-(32,19))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ SymbolNode (location: (32,7)-(32,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (32,7)-(32,8) = ":"
- │ │ │ ├── value_loc: (32,8)-(32,11) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ SymbolNode (location: (32,15)-(32,19))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (32,15)-(32,16) = ":"
- │ │ │ ├── value_loc: (32,16)-(32,19) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (32,12)-(32,14) = ".."
- │ └── operator_loc: (32,4)-(32,6) = "=>"
- ├── @ MatchRequiredNode (location: (33,0)-(33,25))
- │ ├── value:
- │ │ @ CallNode (location: (33,0)-(33,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (33,0)-(33,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (33,7)-(33,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ SymbolNode (location: (33,7)-(33,14))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (33,7)-(33,10) = "%s["
- │ │ │ ├── value_loc: (33,10)-(33,13) = "foo"
- │ │ │ ├── closing_loc: (33,13)-(33,14) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ SymbolNode (location: (33,18)-(33,25))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (33,18)-(33,21) = "%s["
- │ │ │ ├── value_loc: (33,21)-(33,24) = "foo"
- │ │ │ ├── closing_loc: (33,24)-(33,25) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (33,15)-(33,17) = ".."
- │ └── operator_loc: (33,4)-(33,6) = "=>"
- ├── @ MatchRequiredNode (location: (34,0)-(34,23))
- │ ├── value:
- │ │ @ CallNode (location: (34,0)-(34,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (34,0)-(34,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (34,7)-(34,23))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ SymbolNode (location: (34,7)-(34,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (34,7)-(34,9) = ":\""
- │ │ │ ├── value_loc: (34,9)-(34,12) = "foo"
- │ │ │ ├── closing_loc: (34,12)-(34,13) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ SymbolNode (location: (34,17)-(34,23))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (34,17)-(34,19) = ":\""
- │ │ │ ├── value_loc: (34,19)-(34,22) = "foo"
- │ │ │ ├── closing_loc: (34,22)-(34,23) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (34,14)-(34,16) = ".."
- │ └── operator_loc: (34,4)-(34,6) = "=>"
- ├── @ MatchRequiredNode (location: (35,0)-(35,21))
- │ ├── value:
- │ │ @ CallNode (location: (35,0)-(35,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (35,0)-(35,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (35,7)-(35,21))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ RegularExpressionNode (location: (35,7)-(35,12))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (35,7)-(35,8) = "/"
- │ │ │ ├── content_loc: (35,8)-(35,11) = "foo"
- │ │ │ ├── closing_loc: (35,11)-(35,12) = "/"
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ RegularExpressionNode (location: (35,16)-(35,21))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (35,16)-(35,17) = "/"
- │ │ │ ├── content_loc: (35,17)-(35,20) = "foo"
- │ │ │ ├── closing_loc: (35,20)-(35,21) = "/"
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (35,13)-(35,15) = ".."
- │ └── operator_loc: (35,4)-(35,6) = "=>"
- ├── @ MatchRequiredNode (location: (36,0)-(36,21))
- │ ├── value:
- │ │ @ CallNode (location: (36,0)-(36,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (36,0)-(36,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (36,7)-(36,21))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ XStringNode (location: (36,7)-(36,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (36,7)-(36,8) = "`"
- │ │ │ ├── content_loc: (36,8)-(36,11) = "foo"
- │ │ │ ├── closing_loc: (36,11)-(36,12) = "`"
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ XStringNode (location: (36,16)-(36,21))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (36,16)-(36,17) = "`"
- │ │ │ ├── content_loc: (36,17)-(36,20) = "foo"
- │ │ │ ├── closing_loc: (36,20)-(36,21) = "`"
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (36,13)-(36,15) = ".."
- │ └── operator_loc: (36,4)-(36,6) = "=>"
- ├── @ MatchRequiredNode (location: (37,0)-(37,25))
- │ ├── value:
- │ │ @ CallNode (location: (37,0)-(37,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (37,0)-(37,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (37,7)-(37,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ XStringNode (location: (37,7)-(37,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (37,7)-(37,10) = "%x["
- │ │ │ ├── content_loc: (37,10)-(37,13) = "foo"
- │ │ │ ├── closing_loc: (37,13)-(37,14) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ XStringNode (location: (37,18)-(37,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (37,18)-(37,21) = "%x["
- │ │ │ ├── content_loc: (37,21)-(37,24) = "foo"
- │ │ │ ├── closing_loc: (37,24)-(37,25) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (37,15)-(37,17) = ".."
- │ └── operator_loc: (37,4)-(37,6) = "=>"
- ├── @ MatchRequiredNode (location: (38,0)-(38,25))
- │ ├── value:
- │ │ @ CallNode (location: (38,0)-(38,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (38,0)-(38,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (38,7)-(38,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ ArrayNode (location: (38,7)-(38,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (38,10)-(38,13))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (38,10)-(38,13) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (38,7)-(38,10) = "%i["
- │ │ │ └── closing_loc: (38,13)-(38,14) = "]"
- │ │ ├── right:
- │ │ │ @ ArrayNode (location: (38,18)-(38,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (38,21)-(38,24))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (38,21)-(38,24) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (38,18)-(38,21) = "%i["
- │ │ │ └── closing_loc: (38,24)-(38,25) = "]"
- │ │ └── operator_loc: (38,15)-(38,17) = ".."
- │ └── operator_loc: (38,4)-(38,6) = "=>"
- ├── @ MatchRequiredNode (location: (39,0)-(39,25))
- │ ├── value:
- │ │ @ CallNode (location: (39,0)-(39,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (39,0)-(39,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (39,7)-(39,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ ArrayNode (location: (39,7)-(39,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (39,10)-(39,13))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (39,10)-(39,13) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (39,7)-(39,10) = "%I["
- │ │ │ └── closing_loc: (39,13)-(39,14) = "]"
- │ │ ├── right:
- │ │ │ @ ArrayNode (location: (39,18)-(39,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (39,21)-(39,24))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (39,21)-(39,24) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (39,18)-(39,21) = "%I["
- │ │ │ └── closing_loc: (39,24)-(39,25) = "]"
- │ │ └── operator_loc: (39,15)-(39,17) = ".."
- │ └── operator_loc: (39,4)-(39,6) = "=>"
- ├── @ MatchRequiredNode (location: (40,0)-(40,25))
- │ ├── value:
- │ │ @ CallNode (location: (40,0)-(40,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (40,0)-(40,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (40,7)-(40,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ ArrayNode (location: (40,7)-(40,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ StringNode (location: (40,10)-(40,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (40,10)-(40,13) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (40,7)-(40,10) = "%w["
- │ │ │ └── closing_loc: (40,13)-(40,14) = "]"
- │ │ ├── right:
- │ │ │ @ ArrayNode (location: (40,18)-(40,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ StringNode (location: (40,21)-(40,24))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (40,21)-(40,24) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (40,18)-(40,21) = "%w["
- │ │ │ └── closing_loc: (40,24)-(40,25) = "]"
- │ │ └── operator_loc: (40,15)-(40,17) = ".."
- │ └── operator_loc: (40,4)-(40,6) = "=>"
- ├── @ MatchRequiredNode (location: (41,0)-(41,25))
- │ ├── value:
- │ │ @ CallNode (location: (41,0)-(41,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (41,0)-(41,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (41,7)-(41,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ ArrayNode (location: (41,7)-(41,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ StringNode (location: (41,10)-(41,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (41,10)-(41,13) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (41,7)-(41,10) = "%W["
- │ │ │ └── closing_loc: (41,13)-(41,14) = "]"
- │ │ ├── right:
- │ │ │ @ ArrayNode (location: (41,18)-(41,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ StringNode (location: (41,21)-(41,24))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (41,21)-(41,24) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (41,18)-(41,21) = "%W["
- │ │ │ └── closing_loc: (41,24)-(41,25) = "]"
- │ │ └── operator_loc: (41,15)-(41,17) = ".."
- │ └── operator_loc: (41,4)-(41,6) = "=>"
- ├── @ MatchRequiredNode (location: (42,0)-(42,25))
- │ ├── value:
- │ │ @ CallNode (location: (42,0)-(42,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (42,0)-(42,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (42,7)-(42,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ StringNode (location: (42,7)-(42,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (42,7)-(42,10) = "%q["
- │ │ │ ├── content_loc: (42,10)-(42,13) = "foo"
- │ │ │ ├── closing_loc: (42,13)-(42,14) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ StringNode (location: (42,18)-(42,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (42,18)-(42,21) = "%q["
- │ │ │ ├── content_loc: (42,21)-(42,24) = "foo"
- │ │ │ ├── closing_loc: (42,24)-(42,25) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (42,15)-(42,17) = ".."
- │ └── operator_loc: (42,4)-(42,6) = "=>"
- ├── @ MatchRequiredNode (location: (43,0)-(43,25))
- │ ├── value:
- │ │ @ CallNode (location: (43,0)-(43,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (43,0)-(43,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (43,7)-(43,25))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ StringNode (location: (43,7)-(43,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (43,7)-(43,10) = "%Q["
- │ │ │ ├── content_loc: (43,10)-(43,13) = "foo"
- │ │ │ ├── closing_loc: (43,13)-(43,14) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ StringNode (location: (43,18)-(43,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (43,18)-(43,21) = "%Q["
- │ │ │ ├── content_loc: (43,21)-(43,24) = "foo"
- │ │ │ ├── closing_loc: (43,24)-(43,25) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (43,15)-(43,17) = ".."
- │ └── operator_loc: (43,4)-(43,6) = "=>"
- ├── @ MatchRequiredNode (location: (44,0)-(44,21))
- │ ├── value:
- │ │ @ CallNode (location: (44,0)-(44,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (44,0)-(44,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (44,7)-(44,21))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ StringNode (location: (44,7)-(44,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (44,7)-(44,8) = "\""
- │ │ │ ├── content_loc: (44,8)-(44,11) = "foo"
- │ │ │ ├── closing_loc: (44,11)-(44,12) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ ├── right:
- │ │ │ @ StringNode (location: (44,16)-(44,21))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (44,16)-(44,17) = "\""
- │ │ │ ├── content_loc: (44,17)-(44,20) = "foo"
- │ │ │ ├── closing_loc: (44,20)-(44,21) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (44,13)-(44,15) = ".."
- │ └── operator_loc: (44,4)-(44,6) = "=>"
- ├── @ MatchRequiredNode (location: (45,0)-(45,17))
- │ ├── value:
- │ │ @ CallNode (location: (45,0)-(45,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (45,0)-(45,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (45,7)-(45,17))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ NilNode (location: (45,7)-(45,10))
- │ │ ├── right:
- │ │ │ @ NilNode (location: (45,14)-(45,17))
- │ │ └── operator_loc: (45,11)-(45,13) = ".."
- │ └── operator_loc: (45,4)-(45,6) = "=>"
- ├── @ MatchRequiredNode (location: (46,0)-(46,19))
- │ ├── value:
- │ │ @ CallNode (location: (46,0)-(46,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (46,0)-(46,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (46,7)-(46,19))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ SelfNode (location: (46,7)-(46,11))
- │ │ ├── right:
- │ │ │ @ SelfNode (location: (46,15)-(46,19))
- │ │ └── operator_loc: (46,12)-(46,14) = ".."
- │ └── operator_loc: (46,4)-(46,6) = "=>"
- ├── @ MatchRequiredNode (location: (47,0)-(47,19))
- │ ├── value:
- │ │ @ CallNode (location: (47,0)-(47,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (47,0)-(47,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (47,7)-(47,19))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ TrueNode (location: (47,7)-(47,11))
- │ │ ├── right:
- │ │ │ @ TrueNode (location: (47,15)-(47,19))
- │ │ └── operator_loc: (47,12)-(47,14) = ".."
- │ └── operator_loc: (47,4)-(47,6) = "=>"
- ├── @ MatchRequiredNode (location: (48,0)-(48,21))
- │ ├── value:
- │ │ @ CallNode (location: (48,0)-(48,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (48,0)-(48,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (48,7)-(48,21))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ FalseNode (location: (48,7)-(48,12))
- │ │ ├── right:
- │ │ │ @ FalseNode (location: (48,16)-(48,21))
- │ │ └── operator_loc: (48,13)-(48,15) = ".."
- │ └── operator_loc: (48,4)-(48,6) = "=>"
- ├── @ MatchRequiredNode (location: (49,0)-(49,27))
- │ ├── value:
- │ │ @ CallNode (location: (49,0)-(49,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (49,0)-(49,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (49,7)-(49,27))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ SourceFileNode (location: (49,7)-(49,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── filepath: "patterns.txt"
- │ │ ├── right:
- │ │ │ @ SourceFileNode (location: (49,19)-(49,27))
- │ │ │ ├── flags: ∅
- │ │ │ └── filepath: "patterns.txt"
- │ │ └── operator_loc: (49,16)-(49,18) = ".."
- │ └── operator_loc: (49,4)-(49,6) = "=>"
- ├── @ MatchRequiredNode (location: (50,0)-(50,27))
- │ ├── value:
- │ │ @ CallNode (location: (50,0)-(50,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (50,0)-(50,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (50,7)-(50,27))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ SourceLineNode (location: (50,7)-(50,15))
- │ │ ├── right:
- │ │ │ @ SourceLineNode (location: (50,19)-(50,27))
- │ │ └── operator_loc: (50,16)-(50,18) = ".."
- │ └── operator_loc: (50,4)-(50,6) = "=>"
- ├── @ MatchRequiredNode (location: (51,0)-(51,35))
- │ ├── value:
- │ │ @ CallNode (location: (51,0)-(51,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (51,0)-(51,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (51,7)-(51,35))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ SourceEncodingNode (location: (51,7)-(51,19))
- │ │ ├── right:
- │ │ │ @ SourceEncodingNode (location: (51,23)-(51,35))
- │ │ └── operator_loc: (51,20)-(51,22) = ".."
- │ └── operator_loc: (51,4)-(51,6) = "=>"
- ├── @ MatchRequiredNode (location: (52,0)-(52,31))
- │ ├── value:
- │ │ @ CallNode (location: (52,0)-(52,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (52,0)-(52,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RangeNode (location: (52,7)-(52,31))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ LambdaNode (location: (52,7)-(52,17))
- │ │ │ ├── locals: []
- │ │ │ ├── operator_loc: (52,7)-(52,9) = "->"
- │ │ │ ├── opening_loc: (52,10)-(52,11) = "{"
- │ │ │ ├── closing_loc: (52,16)-(52,17) = "}"
- │ │ │ ├── parameters: ∅
- │ │ │ └── body:
- │ │ │ @ StatementsNode (location: (52,12)-(52,15))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (52,12)-(52,15))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 1
- │ │ ├── right:
- │ │ │ @ LambdaNode (location: (52,21)-(52,31))
- │ │ │ ├── locals: []
- │ │ │ ├── operator_loc: (52,21)-(52,23) = "->"
- │ │ │ ├── opening_loc: (52,24)-(52,25) = "{"
- │ │ │ ├── closing_loc: (52,30)-(52,31) = "}"
- │ │ │ ├── parameters: ∅
- │ │ │ └── body:
- │ │ │ @ StatementsNode (location: (52,26)-(52,29))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (52,26)-(52,29))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 1
- │ │ └── operator_loc: (52,18)-(52,20) = ".."
- │ └── operator_loc: (52,4)-(52,6) = "=>"
- ├── @ LocalVariableWriteNode (location: (54,0)-(54,7))
- │ ├── name: :bar
- │ ├── depth: 0
- │ ├── name_loc: (54,0)-(54,3) = "bar"
- │ ├── value:
- │ │ @ IntegerNode (location: (54,6)-(54,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (54,4)-(54,5) = "="
- ├── @ MatchRequiredNode (location: (54,9)-(54,20))
- │ ├── value:
- │ │ @ CallNode (location: (54,9)-(54,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (54,9)-(54,12) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ PinnedVariableNode (location: (54,16)-(54,20))
- │ │ ├── variable:
- │ │ │ @ LocalVariableReadNode (location: (54,17)-(54,20))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ └── operator_loc: (54,16)-(54,17) = "^"
- │ └── operator_loc: (54,13)-(54,15) = "=>"
- ├── @ MatchRequiredNode (location: (55,0)-(55,12))
- │ ├── value:
- │ │ @ CallNode (location: (55,0)-(55,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (55,0)-(55,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ PinnedVariableNode (location: (55,7)-(55,12))
- │ │ ├── variable:
- │ │ │ @ InstanceVariableReadNode (location: (55,8)-(55,12))
- │ │ │ └── name: :@bar
- │ │ └── operator_loc: (55,7)-(55,8) = "^"
- │ └── operator_loc: (55,4)-(55,6) = "=>"
- ├── @ MatchRequiredNode (location: (56,0)-(56,13))
- │ ├── value:
- │ │ @ CallNode (location: (56,0)-(56,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (56,0)-(56,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ PinnedVariableNode (location: (56,7)-(56,13))
- │ │ ├── variable:
- │ │ │ @ ClassVariableReadNode (location: (56,8)-(56,13))
- │ │ │ └── name: :@@bar
- │ │ └── operator_loc: (56,7)-(56,8) = "^"
- │ └── operator_loc: (56,4)-(56,6) = "=>"
- ├── @ MatchRequiredNode (location: (57,0)-(57,12))
- │ ├── value:
- │ │ @ CallNode (location: (57,0)-(57,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (57,0)-(57,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ PinnedVariableNode (location: (57,7)-(57,12))
- │ │ ├── variable:
- │ │ │ @ GlobalVariableReadNode (location: (57,8)-(57,12))
- │ │ │ └── name: :$bar
- │ │ └── operator_loc: (57,7)-(57,8) = "^"
- │ └── operator_loc: (57,4)-(57,6) = "=>"
- ├── @ MatchRequiredNode (location: (59,0)-(59,11))
- │ ├── value:
- │ │ @ CallNode (location: (59,0)-(59,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (59,0)-(59,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ PinnedExpressionNode (location: (59,7)-(59,11))
- │ │ ├── expression:
- │ │ │ @ IntegerNode (location: (59,9)-(59,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── operator_loc: (59,7)-(59,8) = "^"
- │ │ ├── lparen_loc: (59,8)-(59,9) = "("
- │ │ └── rparen_loc: (59,10)-(59,11) = ")"
- │ └── operator_loc: (59,4)-(59,6) = "=>"
- ├── @ MatchRequiredNode (location: (60,0)-(60,13))
- │ ├── value:
- │ │ @ CallNode (location: (60,0)-(60,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (60,0)-(60,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ PinnedExpressionNode (location: (60,7)-(60,13))
- │ │ ├── expression:
- │ │ │ @ NilNode (location: (60,9)-(60,12))
- │ │ ├── operator_loc: (60,7)-(60,8) = "^"
- │ │ ├── lparen_loc: (60,8)-(60,9) = "("
- │ │ └── rparen_loc: (60,12)-(60,13) = ")"
- │ └── operator_loc: (60,4)-(60,6) = "=>"
- ├── @ MatchRequiredNode (location: (61,0)-(61,23))
- │ ├── value:
- │ │ @ CallNode (location: (61,0)-(61,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (61,0)-(61,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ PinnedExpressionNode (location: (61,7)-(61,23))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (61,9)-(61,22))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ StringNode (location: (61,9)-(61,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (61,9)-(61,10) = "\""
- │ │ │ │ ├── content_loc: (61,10)-(61,13) = "bar"
- │ │ │ │ ├── closing_loc: (61,13)-(61,14) = "\""
- │ │ │ │ └── unescaped: "bar"
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+
- │ │ │ ├── message_loc: (61,15)-(61,16) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (61,17)-(61,22))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ StringNode (location: (61,17)-(61,22))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (61,17)-(61,18) = "\""
- │ │ │ │ ├── content_loc: (61,18)-(61,21) = "baz"
- │ │ │ │ ├── closing_loc: (61,21)-(61,22) = "\""
- │ │ │ │ └── unescaped: "baz"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── operator_loc: (61,7)-(61,8) = "^"
- │ │ ├── lparen_loc: (61,8)-(61,9) = "("
- │ │ └── rparen_loc: (61,22)-(61,23) = ")"
- │ └── operator_loc: (61,4)-(61,6) = "=>"
- ├── @ MatchRequiredNode (location: (63,0)-(63,10))
- │ ├── value:
- │ │ @ CallNode (location: (63,0)-(63,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (63,0)-(63,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ConstantReadNode (location: (63,7)-(63,10))
- │ │ └── name: :Foo
- │ └── operator_loc: (63,4)-(63,6) = "=>"
- ├── @ MatchRequiredNode (location: (64,0)-(64,20))
- │ ├── value:
- │ │ @ CallNode (location: (64,0)-(64,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (64,0)-(64,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ConstantPathNode (location: (64,7)-(64,20))
- │ │ ├── parent:
- │ │ │ @ ConstantPathNode (location: (64,7)-(64,15))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (64,7)-(64,10))
- │ │ │ │ └── name: :Foo
- │ │ │ ├── name: :Bar
- │ │ │ ├── delimiter_loc: (64,10)-(64,12) = "::"
- │ │ │ └── name_loc: (64,12)-(64,15) = "Bar"
- │ │ ├── name: :Baz
- │ │ ├── delimiter_loc: (64,15)-(64,17) = "::"
- │ │ └── name_loc: (64,17)-(64,20) = "Baz"
- │ └── operator_loc: (64,4)-(64,6) = "=>"
- ├── @ MatchRequiredNode (location: (65,0)-(65,12))
- │ ├── value:
- │ │ @ CallNode (location: (65,0)-(65,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (65,0)-(65,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ConstantPathNode (location: (65,7)-(65,12))
- │ │ ├── parent: ∅
- │ │ ├── name: :Foo
- │ │ ├── delimiter_loc: (65,7)-(65,9) = "::"
- │ │ └── name_loc: (65,9)-(65,12) = "Foo"
- │ └── operator_loc: (65,4)-(65,6) = "=>"
- ├── @ MatchRequiredNode (location: (66,0)-(66,22))
- │ ├── value:
- │ │ @ CallNode (location: (66,0)-(66,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (66,0)-(66,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ConstantPathNode (location: (66,7)-(66,22))
- │ │ ├── parent:
- │ │ │ @ ConstantPathNode (location: (66,7)-(66,17))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantPathNode (location: (66,7)-(66,12))
- │ │ │ │ ├── parent: ∅
- │ │ │ │ ├── name: :Foo
- │ │ │ │ ├── delimiter_loc: (66,7)-(66,9) = "::"
- │ │ │ │ └── name_loc: (66,9)-(66,12) = "Foo"
- │ │ │ ├── name: :Bar
- │ │ │ ├── delimiter_loc: (66,12)-(66,14) = "::"
- │ │ │ └── name_loc: (66,14)-(66,17) = "Bar"
- │ │ ├── name: :Baz
- │ │ ├── delimiter_loc: (66,17)-(66,19) = "::"
- │ │ └── name_loc: (66,19)-(66,22) = "Baz"
- │ └── operator_loc: (66,4)-(66,6) = "=>"
- ├── @ MatchRequiredNode (location: (68,0)-(68,12))
- │ ├── value:
- │ │ @ CallNode (location: (68,0)-(68,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (68,0)-(68,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (68,7)-(68,12))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (68,7)-(68,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (68,10)-(68,11) = "("
- │ │ └── closing_loc: (68,11)-(68,12) = ")"
- │ └── operator_loc: (68,4)-(68,6) = "=>"
- ├── @ MatchRequiredNode (location: (69,0)-(69,13))
- │ ├── value:
- │ │ @ CallNode (location: (69,0)-(69,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (69,0)-(69,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (69,7)-(69,13))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (69,7)-(69,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ IntegerNode (location: (69,11)-(69,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (69,10)-(69,11) = "("
- │ │ └── closing_loc: (69,12)-(69,13) = ")"
- │ └── operator_loc: (69,4)-(69,6) = "=>"
- ├── @ MatchRequiredNode (location: (70,0)-(70,19))
- │ ├── value:
- │ │ @ CallNode (location: (70,0)-(70,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (70,0)-(70,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (70,7)-(70,19))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (70,7)-(70,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (70,11)-(70,12))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (70,14)-(70,15))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (70,17)-(70,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (70,10)-(70,11) = "("
- │ │ └── closing_loc: (70,18)-(70,19) = ")"
- │ └── operator_loc: (70,4)-(70,6) = "=>"
- ├── @ MatchRequiredNode (location: (71,0)-(71,15))
- │ ├── value:
- │ │ @ CallNode (location: (71,0)-(71,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (71,0)-(71,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (71,7)-(71,15))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (71,7)-(71,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (71,11)-(71,14))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (71,10)-(71,11) = "("
- │ │ └── closing_loc: (71,14)-(71,15) = ")"
- │ └── operator_loc: (71,4)-(71,6) = "=>"
- ├── @ MatchRequiredNode (location: (72,0)-(72,21))
- │ ├── value:
- │ │ @ CallNode (location: (72,0)-(72,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (72,0)-(72,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (72,7)-(72,21))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (72,7)-(72,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (72,11)-(72,15))
- │ │ │ ├── operator_loc: (72,11)-(72,12) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (72,12)-(72,15))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (72,17)-(72,20))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (72,10)-(72,11) = "("
- │ │ └── closing_loc: (72,20)-(72,21) = ")"
- │ └── operator_loc: (72,4)-(72,6) = "=>"
- ├── @ MatchRequiredNode (location: (73,0)-(73,21))
- │ ├── value:
- │ │ @ CallNode (location: (73,0)-(73,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (73,0)-(73,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (73,7)-(73,21))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (73,7)-(73,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (73,11)-(73,14))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (73,16)-(73,20))
- │ │ │ ├── operator_loc: (73,16)-(73,17) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (73,17)-(73,20))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (73,10)-(73,11) = "("
- │ │ └── closing_loc: (73,20)-(73,21) = ")"
- │ └── operator_loc: (73,4)-(73,6) = "=>"
- ├── @ MatchRequiredNode (location: (74,0)-(74,27))
- │ ├── value:
- │ │ @ CallNode (location: (74,0)-(74,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (74,0)-(74,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FindPatternNode (location: (74,7)-(74,27))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (74,7)-(74,10))
- │ │ │ └── name: :Foo
- │ │ ├── left:
- │ │ │ @ SplatNode (location: (74,11)-(74,15))
- │ │ │ ├── operator_loc: (74,11)-(74,12) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (74,12)-(74,15))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (74,17)-(74,20))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── right:
- │ │ │ @ SplatNode (location: (74,22)-(74,26))
- │ │ │ ├── operator_loc: (74,22)-(74,23) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (74,23)-(74,26))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (74,10)-(74,11) = "("
- │ │ └── closing_loc: (74,26)-(74,27) = ")"
- │ └── operator_loc: (74,4)-(74,6) = "=>"
- ├── @ MatchRequiredNode (location: (76,0)-(76,12))
- │ ├── value:
- │ │ @ CallNode (location: (76,0)-(76,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (76,0)-(76,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (76,7)-(76,12))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (76,7)-(76,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (76,10)-(76,11) = "["
- │ │ └── closing_loc: (76,11)-(76,12) = "]"
- │ └── operator_loc: (76,4)-(76,6) = "=>"
- ├── @ MatchRequiredNode (location: (77,0)-(77,13))
- │ ├── value:
- │ │ @ CallNode (location: (77,0)-(77,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (77,0)-(77,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (77,7)-(77,13))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (77,7)-(77,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ IntegerNode (location: (77,11)-(77,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (77,10)-(77,11) = "["
- │ │ └── closing_loc: (77,12)-(77,13) = "]"
- │ └── operator_loc: (77,4)-(77,6) = "=>"
- ├── @ MatchRequiredNode (location: (78,0)-(78,19))
- │ ├── value:
- │ │ @ CallNode (location: (78,0)-(78,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (78,0)-(78,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (78,7)-(78,19))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (78,7)-(78,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 3)
- │ │ │ ├── @ IntegerNode (location: (78,11)-(78,12))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── @ IntegerNode (location: (78,14)-(78,15))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (78,17)-(78,18))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (78,10)-(78,11) = "["
- │ │ └── closing_loc: (78,18)-(78,19) = "]"
- │ └── operator_loc: (78,4)-(78,6) = "=>"
- ├── @ MatchRequiredNode (location: (79,0)-(79,17))
- │ ├── value:
- │ │ @ CallNode (location: (79,0)-(79,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (79,0)-(79,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (79,7)-(79,17))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (79,7)-(79,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ ArrayPatternNode (location: (79,11)-(79,16))
- │ │ │ ├── constant:
- │ │ │ │ @ ConstantReadNode (location: (79,11)-(79,14))
- │ │ │ │ └── name: :Foo
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (79,14)-(79,15) = "["
- │ │ │ └── closing_loc: (79,15)-(79,16) = "]"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (79,10)-(79,11) = "["
- │ │ └── closing_loc: (79,16)-(79,17) = "]"
- │ └── operator_loc: (79,4)-(79,6) = "=>"
- ├── @ MatchRequiredNode (location: (80,0)-(80,15))
- │ ├── value:
- │ │ @ CallNode (location: (80,0)-(80,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (80,0)-(80,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (80,7)-(80,15))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (80,7)-(80,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (80,11)-(80,14))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (80,10)-(80,11) = "["
- │ │ └── closing_loc: (80,14)-(80,15) = "]"
- │ └── operator_loc: (80,4)-(80,6) = "=>"
- ├── @ MatchRequiredNode (location: (81,0)-(81,21))
- │ ├── value:
- │ │ @ CallNode (location: (81,0)-(81,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (81,0)-(81,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (81,7)-(81,21))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (81,7)-(81,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (81,11)-(81,15))
- │ │ │ ├── operator_loc: (81,11)-(81,12) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (81,12)-(81,15))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (81,17)-(81,20))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (81,10)-(81,11) = "["
- │ │ └── closing_loc: (81,20)-(81,21) = "]"
- │ └── operator_loc: (81,4)-(81,6) = "=>"
- ├── @ MatchRequiredNode (location: (82,0)-(82,21))
- │ ├── value:
- │ │ @ CallNode (location: (82,0)-(82,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (82,0)-(82,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (82,7)-(82,21))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (82,7)-(82,10))
- │ │ │ └── name: :Foo
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (82,11)-(82,14))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (82,16)-(82,20))
- │ │ │ ├── operator_loc: (82,16)-(82,17) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (82,17)-(82,20))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (82,10)-(82,11) = "["
- │ │ └── closing_loc: (82,20)-(82,21) = "]"
- │ └── operator_loc: (82,4)-(82,6) = "=>"
- ├── @ MatchRequiredNode (location: (83,0)-(83,27))
- │ ├── value:
- │ │ @ CallNode (location: (83,0)-(83,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (83,0)-(83,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FindPatternNode (location: (83,7)-(83,27))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (83,7)-(83,10))
- │ │ │ └── name: :Foo
- │ │ ├── left:
- │ │ │ @ SplatNode (location: (83,11)-(83,15))
- │ │ │ ├── operator_loc: (83,11)-(83,12) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (83,12)-(83,15))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (83,17)-(83,20))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── right:
- │ │ │ @ SplatNode (location: (83,22)-(83,26))
- │ │ │ ├── operator_loc: (83,22)-(83,23) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (83,23)-(83,26))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (83,10)-(83,11) = "["
- │ │ └── closing_loc: (83,26)-(83,27) = "]"
- │ └── operator_loc: (83,4)-(83,6) = "=>"
- ├── @ MatchRequiredNode (location: (85,0)-(85,11))
- │ ├── value:
- │ │ @ CallNode (location: (85,0)-(85,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (85,0)-(85,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (85,7)-(85,11))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (85,7)-(85,11))
- │ │ │ ├── operator_loc: (85,7)-(85,8) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (85,8)-(85,11))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (85,4)-(85,6) = "=>"
- ├── @ MatchRequiredNode (location: (86,0)-(86,21))
- │ ├── value:
- │ │ @ CallNode (location: (86,0)-(86,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (86,0)-(86,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (86,7)-(86,21))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (86,7)-(86,11))
- │ │ │ ├── operator_loc: (86,7)-(86,8) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (86,8)-(86,11))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (86,13)-(86,16))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (86,18)-(86,21))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (86,4)-(86,6) = "=>"
- ├── @ MatchRequiredNode (location: (87,0)-(87,21))
- │ ├── value:
- │ │ @ CallNode (location: (87,0)-(87,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (87,0)-(87,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (87,7)-(87,21))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (87,7)-(87,10))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (87,12)-(87,16))
- │ │ │ ├── operator_loc: (87,12)-(87,13) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (87,13)-(87,16))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (87,18)-(87,21))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (87,4)-(87,6) = "=>"
- ├── @ MatchRequiredNode (location: (88,0)-(88,21))
- │ ├── value:
- │ │ @ CallNode (location: (88,0)-(88,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (88,0)-(88,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (88,7)-(88,21))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (88,7)-(88,10))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (88,12)-(88,15))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (88,17)-(88,21))
- │ │ │ ├── operator_loc: (88,17)-(88,18) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (88,18)-(88,21))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (88,4)-(88,6) = "=>"
- ├── @ MatchRequiredNode (location: (89,0)-(89,22))
- │ ├── value:
- │ │ @ CallNode (location: (89,0)-(89,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (89,0)-(89,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FindPatternNode (location: (89,7)-(89,22))
- │ │ ├── constant: ∅
- │ │ ├── left:
- │ │ │ @ SplatNode (location: (89,7)-(89,11))
- │ │ │ ├── operator_loc: (89,7)-(89,8) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (89,8)-(89,11))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (89,13)-(89,16))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── right:
- │ │ │ @ SplatNode (location: (89,18)-(89,22))
- │ │ │ ├── operator_loc: (89,18)-(89,19) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (89,19)-(89,22))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (89,4)-(89,6) = "=>"
- ├── @ MatchRequiredNode (location: (91,0)-(91,11))
- │ ├── value:
- │ │ @ CallNode (location: (91,0)-(91,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (91,0)-(91,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (91,7)-(91,11))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (91,7)-(91,10))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ ImplicitRestNode (location: (91,10)-(91,11))
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (91,4)-(91,6) = "=>"
- ├── @ MatchRequiredNode (location: (95,0)-(95,9))
- │ ├── value:
- │ │ @ CallNode (location: (95,0)-(95,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (95,0)-(95,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (95,7)-(95,9))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (95,7)-(95,8) = "["
- │ │ └── closing_loc: (95,8)-(95,9) = "]"
- │ └── operator_loc: (95,4)-(95,6) = "=>"
- ├── @ MatchRequiredNode (location: (96,0)-(96,17))
- │ ├── value:
- │ │ @ CallNode (location: (96,0)-(96,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (96,0)-(96,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (96,7)-(96,17))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ ArrayPatternNode (location: (96,8)-(96,16))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ ArrayPatternNode (location: (96,9)-(96,15))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ ArrayPatternNode (location: (96,10)-(96,14))
- │ │ │ │ │ ├── constant: ∅
- │ │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ │ └── @ ArrayPatternNode (location: (96,11)-(96,13))
- │ │ │ │ │ │ ├── constant: ∅
- │ │ │ │ │ │ ├── requireds: (length: 0)
- │ │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ │ ├── opening_loc: (96,11)-(96,12) = "["
- │ │ │ │ │ │ └── closing_loc: (96,12)-(96,13) = "]"
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ ├── opening_loc: (96,10)-(96,11) = "["
- │ │ │ │ │ └── closing_loc: (96,13)-(96,14) = "]"
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── opening_loc: (96,9)-(96,10) = "["
- │ │ │ │ └── closing_loc: (96,14)-(96,15) = "]"
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (96,8)-(96,9) = "["
- │ │ │ └── closing_loc: (96,15)-(96,16) = "]"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (96,7)-(96,8) = "["
- │ │ └── closing_loc: (96,16)-(96,17) = "]"
- │ └── operator_loc: (96,4)-(96,6) = "=>"
- ├── @ MatchRequiredNode (location: (98,0)-(98,13))
- │ ├── value:
- │ │ @ CallNode (location: (98,0)-(98,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (98,0)-(98,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (98,7)-(98,13))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (98,8)-(98,12))
- │ │ │ ├── operator_loc: (98,8)-(98,9) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (98,9)-(98,12))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (98,7)-(98,8) = "["
- │ │ └── closing_loc: (98,12)-(98,13) = "]"
- │ └── operator_loc: (98,4)-(98,6) = "=>"
- ├── @ MatchRequiredNode (location: (99,0)-(99,23))
- │ ├── value:
- │ │ @ CallNode (location: (99,0)-(99,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (99,0)-(99,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (99,7)-(99,23))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (99,8)-(99,12))
- │ │ │ ├── operator_loc: (99,8)-(99,9) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (99,9)-(99,12))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (99,14)-(99,17))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (99,19)-(99,22))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (99,7)-(99,8) = "["
- │ │ └── closing_loc: (99,22)-(99,23) = "]"
- │ └── operator_loc: (99,4)-(99,6) = "=>"
- ├── @ MatchRequiredNode (location: (100,0)-(100,23))
- │ ├── value:
- │ │ @ CallNode (location: (100,0)-(100,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (100,0)-(100,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (100,7)-(100,23))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (100,8)-(100,11))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (100,13)-(100,17))
- │ │ │ ├── operator_loc: (100,13)-(100,14) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (100,14)-(100,17))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (100,19)-(100,22))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (100,7)-(100,8) = "["
- │ │ └── closing_loc: (100,22)-(100,23) = "]"
- │ └── operator_loc: (100,4)-(100,6) = "=>"
- ├── @ MatchRequiredNode (location: (101,0)-(101,23))
- │ ├── value:
- │ │ @ CallNode (location: (101,0)-(101,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (101,0)-(101,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (101,7)-(101,23))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (101,8)-(101,11))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (101,13)-(101,16))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (101,18)-(101,22))
- │ │ │ ├── operator_loc: (101,18)-(101,19) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (101,19)-(101,22))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (101,7)-(101,8) = "["
- │ │ └── closing_loc: (101,22)-(101,23) = "]"
- │ └── operator_loc: (101,4)-(101,6) = "=>"
- ├── @ MatchRequiredNode (location: (102,0)-(102,24))
- │ ├── value:
- │ │ @ CallNode (location: (102,0)-(102,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (102,0)-(102,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FindPatternNode (location: (102,7)-(102,24))
- │ │ ├── constant: ∅
- │ │ ├── left:
- │ │ │ @ SplatNode (location: (102,8)-(102,12))
- │ │ │ ├── operator_loc: (102,8)-(102,9) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (102,9)-(102,12))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (102,14)-(102,17))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── right:
- │ │ │ @ SplatNode (location: (102,19)-(102,23))
- │ │ │ ├── operator_loc: (102,19)-(102,20) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (102,20)-(102,23))
- │ │ │ ├── name: :qux
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (102,7)-(102,8) = "["
- │ │ └── closing_loc: (102,23)-(102,24) = "]"
- │ └── operator_loc: (102,4)-(102,6) = "=>"
- ├── @ MatchPredicateNode (location: (104,0)-(104,10))
- │ ├── value:
- │ │ @ CallNode (location: (104,0)-(104,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (104,0)-(104,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ LocalVariableTargetNode (location: (104,7)-(104,10))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ └── operator_loc: (104,4)-(104,6) = "in"
- ├── @ MatchPredicateNode (location: (105,0)-(105,8))
- │ ├── value:
- │ │ @ CallNode (location: (105,0)-(105,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (105,0)-(105,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ IntegerNode (location: (105,7)-(105,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (105,4)-(105,6) = "in"
- ├── @ MatchPredicateNode (location: (106,0)-(106,10))
- │ ├── value:
- │ │ @ CallNode (location: (106,0)-(106,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (106,0)-(106,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FloatNode (location: (106,7)-(106,10))
- │ │ └── value: 1.0
- │ └── operator_loc: (106,4)-(106,6) = "in"
- ├── @ MatchPredicateNode (location: (107,0)-(107,9))
- │ ├── value:
- │ │ @ CallNode (location: (107,0)-(107,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (107,0)-(107,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ImaginaryNode (location: (107,7)-(107,9))
- │ │ └── numeric:
- │ │ @ IntegerNode (location: (107,7)-(107,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (107,4)-(107,6) = "in"
- ├── @ MatchPredicateNode (location: (108,0)-(108,9))
- │ ├── value:
- │ │ @ CallNode (location: (108,0)-(108,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (108,0)-(108,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RationalNode (location: (108,7)-(108,9))
- │ │ └── numeric:
- │ │ @ IntegerNode (location: (108,7)-(108,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (108,4)-(108,6) = "in"
- ├── @ MatchPredicateNode (location: (109,0)-(109,11))
- │ ├── value:
- │ │ @ CallNode (location: (109,0)-(109,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (109,0)-(109,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SymbolNode (location: (109,7)-(109,11))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (109,7)-(109,8) = ":"
- │ │ ├── value_loc: (109,8)-(109,11) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (109,4)-(109,6) = "in"
- ├── @ MatchPredicateNode (location: (110,0)-(110,14))
- │ ├── value:
- │ │ @ CallNode (location: (110,0)-(110,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (110,0)-(110,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SymbolNode (location: (110,7)-(110,14))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (110,7)-(110,10) = "%s["
- │ │ ├── value_loc: (110,10)-(110,13) = "foo"
- │ │ ├── closing_loc: (110,13)-(110,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (110,4)-(110,6) = "in"
- ├── @ MatchPredicateNode (location: (111,0)-(111,13))
- │ ├── value:
- │ │ @ CallNode (location: (111,0)-(111,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (111,0)-(111,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SymbolNode (location: (111,7)-(111,13))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (111,7)-(111,9) = ":\""
- │ │ ├── value_loc: (111,9)-(111,12) = "foo"
- │ │ ├── closing_loc: (111,12)-(111,13) = "\""
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (111,4)-(111,6) = "in"
- ├── @ MatchPredicateNode (location: (112,0)-(112,12))
- │ ├── value:
- │ │ @ CallNode (location: (112,0)-(112,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (112,0)-(112,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ RegularExpressionNode (location: (112,7)-(112,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (112,7)-(112,8) = "/"
- │ │ ├── content_loc: (112,8)-(112,11) = "foo"
- │ │ ├── closing_loc: (112,11)-(112,12) = "/"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (112,4)-(112,6) = "in"
- ├── @ MatchPredicateNode (location: (113,0)-(113,12))
- │ ├── value:
- │ │ @ CallNode (location: (113,0)-(113,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (113,0)-(113,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ XStringNode (location: (113,7)-(113,12))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (113,7)-(113,8) = "`"
- │ │ ├── content_loc: (113,8)-(113,11) = "foo"
- │ │ ├── closing_loc: (113,11)-(113,12) = "`"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (113,4)-(113,6) = "in"
- ├── @ MatchPredicateNode (location: (114,0)-(114,14))
- │ ├── value:
- │ │ @ CallNode (location: (114,0)-(114,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (114,0)-(114,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ XStringNode (location: (114,7)-(114,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (114,7)-(114,10) = "%x["
- │ │ ├── content_loc: (114,10)-(114,13) = "foo"
- │ │ ├── closing_loc: (114,13)-(114,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (114,4)-(114,6) = "in"
- ├── @ MatchPredicateNode (location: (115,0)-(115,14))
- │ ├── value:
- │ │ @ CallNode (location: (115,0)-(115,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (115,0)-(115,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (115,7)-(115,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ SymbolNode (location: (115,10)-(115,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (115,10)-(115,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (115,7)-(115,10) = "%i["
- │ │ └── closing_loc: (115,13)-(115,14) = "]"
- │ └── operator_loc: (115,4)-(115,6) = "in"
- ├── @ MatchPredicateNode (location: (116,0)-(116,14))
- │ ├── value:
- │ │ @ CallNode (location: (116,0)-(116,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (116,0)-(116,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (116,7)-(116,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ SymbolNode (location: (116,10)-(116,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (116,10)-(116,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (116,7)-(116,10) = "%I["
- │ │ └── closing_loc: (116,13)-(116,14) = "]"
- │ └── operator_loc: (116,4)-(116,6) = "in"
- ├── @ MatchPredicateNode (location: (117,0)-(117,14))
- │ ├── value:
- │ │ @ CallNode (location: (117,0)-(117,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (117,0)-(117,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (117,7)-(117,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ StringNode (location: (117,10)-(117,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (117,10)-(117,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (117,7)-(117,10) = "%w["
- │ │ └── closing_loc: (117,13)-(117,14) = "]"
- │ └── operator_loc: (117,4)-(117,6) = "in"
- ├── @ MatchPredicateNode (location: (118,0)-(118,14))
- │ ├── value:
- │ │ @ CallNode (location: (118,0)-(118,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (118,0)-(118,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayNode (location: (118,7)-(118,14))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ StringNode (location: (118,10)-(118,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (118,10)-(118,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── opening_loc: (118,7)-(118,10) = "%W["
- │ │ └── closing_loc: (118,13)-(118,14) = "]"
- │ └── operator_loc: (118,4)-(118,6) = "in"
- ├── @ MatchPredicateNode (location: (119,0)-(119,14))
- │ ├── value:
- │ │ @ CallNode (location: (119,0)-(119,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (119,0)-(119,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ StringNode (location: (119,7)-(119,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (119,7)-(119,10) = "%q["
- │ │ ├── content_loc: (119,10)-(119,13) = "foo"
- │ │ ├── closing_loc: (119,13)-(119,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (119,4)-(119,6) = "in"
- ├── @ MatchPredicateNode (location: (120,0)-(120,14))
- │ ├── value:
- │ │ @ CallNode (location: (120,0)-(120,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (120,0)-(120,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ StringNode (location: (120,7)-(120,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (120,7)-(120,10) = "%Q["
- │ │ ├── content_loc: (120,10)-(120,13) = "foo"
- │ │ ├── closing_loc: (120,13)-(120,14) = "]"
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (120,4)-(120,6) = "in"
- ├── @ MatchPredicateNode (location: (121,0)-(121,12))
- │ ├── value:
- │ │ @ CallNode (location: (121,0)-(121,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (121,0)-(121,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ StringNode (location: (121,7)-(121,12))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (121,7)-(121,8) = "\""
- │ │ ├── content_loc: (121,8)-(121,11) = "foo"
- │ │ ├── closing_loc: (121,11)-(121,12) = "\""
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (121,4)-(121,6) = "in"
- ├── @ MatchPredicateNode (location: (122,0)-(122,10))
- │ ├── value:
- │ │ @ CallNode (location: (122,0)-(122,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (122,0)-(122,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ NilNode (location: (122,7)-(122,10))
- │ └── operator_loc: (122,4)-(122,6) = "in"
- ├── @ MatchPredicateNode (location: (123,0)-(123,11))
- │ ├── value:
- │ │ @ CallNode (location: (123,0)-(123,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (123,0)-(123,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SelfNode (location: (123,7)-(123,11))
- │ └── operator_loc: (123,4)-(123,6) = "in"
- ├── @ MatchPredicateNode (location: (124,0)-(124,11))
- │ ├── value:
- │ │ @ CallNode (location: (124,0)-(124,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (124,0)-(124,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ TrueNode (location: (124,7)-(124,11))
- │ └── operator_loc: (124,4)-(124,6) = "in"
- ├── @ MatchPredicateNode (location: (125,0)-(125,12))
- │ ├── value:
- │ │ @ CallNode (location: (125,0)-(125,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (125,0)-(125,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ FalseNode (location: (125,7)-(125,12))
- │ └── operator_loc: (125,4)-(125,6) = "in"
- ├── @ MatchPredicateNode (location: (126,0)-(126,15))
- │ ├── value:
- │ │ @ CallNode (location: (126,0)-(126,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (126,0)-(126,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SourceFileNode (location: (126,7)-(126,15))
- │ │ ├── flags: ∅
- │ │ └── filepath: "patterns.txt"
- │ └── operator_loc: (126,4)-(126,6) = "in"
- ├── @ MatchPredicateNode (location: (127,0)-(127,15))
- │ ├── value:
- │ │ @ CallNode (location: (127,0)-(127,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (127,0)-(127,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SourceLineNode (location: (127,7)-(127,15))
- │ └── operator_loc: (127,4)-(127,6) = "in"
- ├── @ MatchPredicateNode (location: (128,0)-(128,19))
- │ ├── value:
- │ │ @ CallNode (location: (128,0)-(128,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (128,0)-(128,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ SourceEncodingNode (location: (128,7)-(128,19))
- │ └── operator_loc: (128,4)-(128,6) = "in"
- ├── @ MatchPredicateNode (location: (129,0)-(129,17))
- │ ├── value:
- │ │ @ CallNode (location: (129,0)-(129,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (129,0)-(129,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ LambdaNode (location: (129,7)-(129,17))
- │ │ ├── locals: []
- │ │ ├── operator_loc: (129,7)-(129,9) = "->"
- │ │ ├── opening_loc: (129,10)-(129,11) = "{"
- │ │ ├── closing_loc: (129,16)-(129,17) = "}"
- │ │ ├── parameters: ∅
- │ │ └── body:
- │ │ @ StatementsNode (location: (129,12)-(129,15))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (129,12)-(129,15))
- │ │ ├── name: :bar
- │ │ └── depth: 1
- │ └── operator_loc: (129,4)-(129,6) = "in"
- ├── @ MatchPredicateNode (location: (131,0)-(131,11))
- │ ├── value:
- │ │ @ CallNode (location: (131,0)-(131,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (131,0)-(131,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (131,7)-(131,11))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (131,7)-(131,10))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ ImplicitRestNode (location: (131,10)-(131,11))
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (131,4)-(131,6) = "in"
- ├── @ CaseMatchNode (location: (135,0)-(135,25))
- │ ├── predicate:
- │ │ @ CallNode (location: (135,5)-(135,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (135,5)-(135,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (135,10)-(135,21))
- │ │ ├── pattern:
- │ │ │ @ LocalVariableTargetNode (location: (135,13)-(135,16))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (135,10)-(135,12) = "in"
- │ │ └── then_loc: (135,17)-(135,21) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (135,0)-(135,4) = "case"
- │ └── end_keyword_loc: (135,22)-(135,25) = "end"
- ├── @ CaseMatchNode (location: (136,0)-(136,23))
- │ ├── predicate:
- │ │ @ CallNode (location: (136,5)-(136,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (136,5)-(136,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (136,10)-(136,19))
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (136,13)-(136,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (136,10)-(136,12) = "in"
- │ │ └── then_loc: (136,15)-(136,19) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (136,0)-(136,4) = "case"
- │ └── end_keyword_loc: (136,20)-(136,23) = "end"
- ├── @ CaseMatchNode (location: (137,0)-(137,25))
- │ ├── predicate:
- │ │ @ CallNode (location: (137,5)-(137,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (137,5)-(137,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (137,10)-(137,21))
- │ │ ├── pattern:
- │ │ │ @ FloatNode (location: (137,13)-(137,16))
- │ │ │ └── value: 1.0
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (137,10)-(137,12) = "in"
- │ │ └── then_loc: (137,17)-(137,21) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (137,0)-(137,4) = "case"
- │ └── end_keyword_loc: (137,22)-(137,25) = "end"
- ├── @ CaseMatchNode (location: (138,0)-(138,24))
- │ ├── predicate:
- │ │ @ CallNode (location: (138,5)-(138,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (138,5)-(138,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (138,10)-(138,20))
- │ │ ├── pattern:
- │ │ │ @ ImaginaryNode (location: (138,13)-(138,15))
- │ │ │ └── numeric:
- │ │ │ @ IntegerNode (location: (138,13)-(138,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (138,10)-(138,12) = "in"
- │ │ └── then_loc: (138,16)-(138,20) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (138,0)-(138,4) = "case"
- │ └── end_keyword_loc: (138,21)-(138,24) = "end"
- ├── @ CaseMatchNode (location: (139,0)-(139,24))
- │ ├── predicate:
- │ │ @ CallNode (location: (139,5)-(139,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (139,5)-(139,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (139,10)-(139,20))
- │ │ ├── pattern:
- │ │ │ @ RationalNode (location: (139,13)-(139,15))
- │ │ │ └── numeric:
- │ │ │ @ IntegerNode (location: (139,13)-(139,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (139,10)-(139,12) = "in"
- │ │ └── then_loc: (139,16)-(139,20) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (139,0)-(139,4) = "case"
- │ └── end_keyword_loc: (139,21)-(139,24) = "end"
- ├── @ CaseMatchNode (location: (140,0)-(140,26))
- │ ├── predicate:
- │ │ @ CallNode (location: (140,5)-(140,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (140,5)-(140,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (140,10)-(140,22))
- │ │ ├── pattern:
- │ │ │ @ SymbolNode (location: (140,13)-(140,17))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (140,13)-(140,14) = ":"
- │ │ │ ├── value_loc: (140,14)-(140,17) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (140,10)-(140,12) = "in"
- │ │ └── then_loc: (140,18)-(140,22) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (140,0)-(140,4) = "case"
- │ └── end_keyword_loc: (140,23)-(140,26) = "end"
- ├── @ CaseMatchNode (location: (141,0)-(141,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (141,5)-(141,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (141,5)-(141,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (141,10)-(141,25))
- │ │ ├── pattern:
- │ │ │ @ SymbolNode (location: (141,13)-(141,20))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (141,13)-(141,16) = "%s["
- │ │ │ ├── value_loc: (141,16)-(141,19) = "foo"
- │ │ │ ├── closing_loc: (141,19)-(141,20) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (141,10)-(141,12) = "in"
- │ │ └── then_loc: (141,21)-(141,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (141,0)-(141,4) = "case"
- │ └── end_keyword_loc: (141,26)-(141,29) = "end"
- ├── @ CaseMatchNode (location: (142,0)-(142,28))
- │ ├── predicate:
- │ │ @ CallNode (location: (142,5)-(142,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (142,5)-(142,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (142,10)-(142,24))
- │ │ ├── pattern:
- │ │ │ @ SymbolNode (location: (142,13)-(142,19))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (142,13)-(142,15) = ":\""
- │ │ │ ├── value_loc: (142,15)-(142,18) = "foo"
- │ │ │ ├── closing_loc: (142,18)-(142,19) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (142,10)-(142,12) = "in"
- │ │ └── then_loc: (142,20)-(142,24) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (142,0)-(142,4) = "case"
- │ └── end_keyword_loc: (142,25)-(142,28) = "end"
- ├── @ CaseMatchNode (location: (143,0)-(143,27))
- │ ├── predicate:
- │ │ @ CallNode (location: (143,5)-(143,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (143,5)-(143,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (143,10)-(143,23))
- │ │ ├── pattern:
- │ │ │ @ RegularExpressionNode (location: (143,13)-(143,18))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (143,13)-(143,14) = "/"
- │ │ │ ├── content_loc: (143,14)-(143,17) = "foo"
- │ │ │ ├── closing_loc: (143,17)-(143,18) = "/"
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (143,10)-(143,12) = "in"
- │ │ └── then_loc: (143,19)-(143,23) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (143,0)-(143,4) = "case"
- │ └── end_keyword_loc: (143,24)-(143,27) = "end"
- ├── @ CaseMatchNode (location: (144,0)-(144,27))
- │ ├── predicate:
- │ │ @ CallNode (location: (144,5)-(144,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (144,5)-(144,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (144,10)-(144,23))
- │ │ ├── pattern:
- │ │ │ @ XStringNode (location: (144,13)-(144,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (144,13)-(144,14) = "`"
- │ │ │ ├── content_loc: (144,14)-(144,17) = "foo"
- │ │ │ ├── closing_loc: (144,17)-(144,18) = "`"
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (144,10)-(144,12) = "in"
- │ │ └── then_loc: (144,19)-(144,23) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (144,0)-(144,4) = "case"
- │ └── end_keyword_loc: (144,24)-(144,27) = "end"
- ├── @ CaseMatchNode (location: (145,0)-(145,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (145,5)-(145,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (145,5)-(145,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (145,10)-(145,25))
- │ │ ├── pattern:
- │ │ │ @ XStringNode (location: (145,13)-(145,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (145,13)-(145,16) = "%x["
- │ │ │ ├── content_loc: (145,16)-(145,19) = "foo"
- │ │ │ ├── closing_loc: (145,19)-(145,20) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (145,10)-(145,12) = "in"
- │ │ └── then_loc: (145,21)-(145,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (145,0)-(145,4) = "case"
- │ └── end_keyword_loc: (145,26)-(145,29) = "end"
- ├── @ CaseMatchNode (location: (146,0)-(146,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (146,5)-(146,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (146,5)-(146,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (146,10)-(146,25))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (146,13)-(146,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (146,16)-(146,19))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (146,16)-(146,19) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (146,13)-(146,16) = "%i["
- │ │ │ └── closing_loc: (146,19)-(146,20) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (146,10)-(146,12) = "in"
- │ │ └── then_loc: (146,21)-(146,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (146,0)-(146,4) = "case"
- │ └── end_keyword_loc: (146,26)-(146,29) = "end"
- ├── @ CaseMatchNode (location: (147,0)-(147,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (147,5)-(147,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (147,5)-(147,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (147,10)-(147,25))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (147,13)-(147,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (147,16)-(147,19))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (147,16)-(147,19) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (147,13)-(147,16) = "%I["
- │ │ │ └── closing_loc: (147,19)-(147,20) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (147,10)-(147,12) = "in"
- │ │ └── then_loc: (147,21)-(147,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (147,0)-(147,4) = "case"
- │ └── end_keyword_loc: (147,26)-(147,29) = "end"
- ├── @ CaseMatchNode (location: (148,0)-(148,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (148,5)-(148,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (148,5)-(148,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (148,10)-(148,25))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (148,13)-(148,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ StringNode (location: (148,16)-(148,19))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (148,16)-(148,19) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (148,13)-(148,16) = "%w["
- │ │ │ └── closing_loc: (148,19)-(148,20) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (148,10)-(148,12) = "in"
- │ │ └── then_loc: (148,21)-(148,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (148,0)-(148,4) = "case"
- │ └── end_keyword_loc: (148,26)-(148,29) = "end"
- ├── @ CaseMatchNode (location: (149,0)-(149,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (149,5)-(149,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (149,5)-(149,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (149,10)-(149,25))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (149,13)-(149,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ StringNode (location: (149,16)-(149,19))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (149,16)-(149,19) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── opening_loc: (149,13)-(149,16) = "%W["
- │ │ │ └── closing_loc: (149,19)-(149,20) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (149,10)-(149,12) = "in"
- │ │ └── then_loc: (149,21)-(149,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (149,0)-(149,4) = "case"
- │ └── end_keyword_loc: (149,26)-(149,29) = "end"
- ├── @ CaseMatchNode (location: (150,0)-(150,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (150,5)-(150,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (150,5)-(150,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (150,10)-(150,25))
- │ │ ├── pattern:
- │ │ │ @ StringNode (location: (150,13)-(150,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (150,13)-(150,16) = "%q["
- │ │ │ ├── content_loc: (150,16)-(150,19) = "foo"
- │ │ │ ├── closing_loc: (150,19)-(150,20) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (150,10)-(150,12) = "in"
- │ │ └── then_loc: (150,21)-(150,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (150,0)-(150,4) = "case"
- │ └── end_keyword_loc: (150,26)-(150,29) = "end"
- ├── @ CaseMatchNode (location: (151,0)-(151,29))
- │ ├── predicate:
- │ │ @ CallNode (location: (151,5)-(151,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (151,5)-(151,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (151,10)-(151,25))
- │ │ ├── pattern:
- │ │ │ @ StringNode (location: (151,13)-(151,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (151,13)-(151,16) = "%Q["
- │ │ │ ├── content_loc: (151,16)-(151,19) = "foo"
- │ │ │ ├── closing_loc: (151,19)-(151,20) = "]"
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (151,10)-(151,12) = "in"
- │ │ └── then_loc: (151,21)-(151,25) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (151,0)-(151,4) = "case"
- │ └── end_keyword_loc: (151,26)-(151,29) = "end"
- ├── @ CaseMatchNode (location: (152,0)-(152,27))
- │ ├── predicate:
- │ │ @ CallNode (location: (152,5)-(152,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (152,5)-(152,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (152,10)-(152,23))
- │ │ ├── pattern:
- │ │ │ @ StringNode (location: (152,13)-(152,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (152,13)-(152,14) = "\""
- │ │ │ ├── content_loc: (152,14)-(152,17) = "foo"
- │ │ │ ├── closing_loc: (152,17)-(152,18) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (152,10)-(152,12) = "in"
- │ │ └── then_loc: (152,19)-(152,23) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (152,0)-(152,4) = "case"
- │ └── end_keyword_loc: (152,24)-(152,27) = "end"
- ├── @ CaseMatchNode (location: (153,0)-(153,25))
- │ ├── predicate:
- │ │ @ CallNode (location: (153,5)-(153,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (153,5)-(153,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (153,10)-(153,21))
- │ │ ├── pattern:
- │ │ │ @ NilNode (location: (153,13)-(153,16))
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (153,10)-(153,12) = "in"
- │ │ └── then_loc: (153,17)-(153,21) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (153,0)-(153,4) = "case"
- │ └── end_keyword_loc: (153,22)-(153,25) = "end"
- ├── @ CaseMatchNode (location: (154,0)-(154,26))
- │ ├── predicate:
- │ │ @ CallNode (location: (154,5)-(154,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (154,5)-(154,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (154,10)-(154,22))
- │ │ ├── pattern:
- │ │ │ @ SelfNode (location: (154,13)-(154,17))
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (154,10)-(154,12) = "in"
- │ │ └── then_loc: (154,18)-(154,22) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (154,0)-(154,4) = "case"
- │ └── end_keyword_loc: (154,23)-(154,26) = "end"
- ├── @ CaseMatchNode (location: (155,0)-(155,26))
- │ ├── predicate:
- │ │ @ CallNode (location: (155,5)-(155,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (155,5)-(155,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (155,10)-(155,22))
- │ │ ├── pattern:
- │ │ │ @ TrueNode (location: (155,13)-(155,17))
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (155,10)-(155,12) = "in"
- │ │ └── then_loc: (155,18)-(155,22) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (155,0)-(155,4) = "case"
- │ └── end_keyword_loc: (155,23)-(155,26) = "end"
- ├── @ CaseMatchNode (location: (156,0)-(156,27))
- │ ├── predicate:
- │ │ @ CallNode (location: (156,5)-(156,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (156,5)-(156,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (156,10)-(156,23))
- │ │ ├── pattern:
- │ │ │ @ FalseNode (location: (156,13)-(156,18))
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (156,10)-(156,12) = "in"
- │ │ └── then_loc: (156,19)-(156,23) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (156,0)-(156,4) = "case"
- │ └── end_keyword_loc: (156,24)-(156,27) = "end"
- ├── @ CaseMatchNode (location: (157,0)-(157,30))
- │ ├── predicate:
- │ │ @ CallNode (location: (157,5)-(157,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (157,5)-(157,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (157,10)-(157,26))
- │ │ ├── pattern:
- │ │ │ @ SourceFileNode (location: (157,13)-(157,21))
- │ │ │ ├── flags: ∅
- │ │ │ └── filepath: "patterns.txt"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (157,10)-(157,12) = "in"
- │ │ └── then_loc: (157,22)-(157,26) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (157,0)-(157,4) = "case"
- │ └── end_keyword_loc: (157,27)-(157,30) = "end"
- ├── @ CaseMatchNode (location: (158,0)-(158,30))
- │ ├── predicate:
- │ │ @ CallNode (location: (158,5)-(158,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (158,5)-(158,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (158,10)-(158,26))
- │ │ ├── pattern:
- │ │ │ @ SourceLineNode (location: (158,13)-(158,21))
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (158,10)-(158,12) = "in"
- │ │ └── then_loc: (158,22)-(158,26) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (158,0)-(158,4) = "case"
- │ └── end_keyword_loc: (158,27)-(158,30) = "end"
- ├── @ CaseMatchNode (location: (159,0)-(159,34))
- │ ├── predicate:
- │ │ @ CallNode (location: (159,5)-(159,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (159,5)-(159,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (159,10)-(159,30))
- │ │ ├── pattern:
- │ │ │ @ SourceEncodingNode (location: (159,13)-(159,25))
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (159,10)-(159,12) = "in"
- │ │ └── then_loc: (159,26)-(159,30) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (159,0)-(159,4) = "case"
- │ └── end_keyword_loc: (159,31)-(159,34) = "end"
- ├── @ CaseMatchNode (location: (160,0)-(160,32))
- │ ├── predicate:
- │ │ @ CallNode (location: (160,5)-(160,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (160,5)-(160,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (160,10)-(160,28))
- │ │ ├── pattern:
- │ │ │ @ LambdaNode (location: (160,13)-(160,23))
- │ │ │ ├── locals: []
- │ │ │ ├── operator_loc: (160,13)-(160,15) = "->"
- │ │ │ ├── opening_loc: (160,16)-(160,17) = "{"
- │ │ │ ├── closing_loc: (160,22)-(160,23) = "}"
- │ │ │ ├── parameters: ∅
- │ │ │ └── body:
- │ │ │ @ StatementsNode (location: (160,18)-(160,21))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (160,18)-(160,21))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 1
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (160,10)-(160,12) = "in"
- │ │ └── then_loc: (160,24)-(160,28) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (160,0)-(160,4) = "case"
- │ └── end_keyword_loc: (160,29)-(160,32) = "end"
- ├── @ CaseMatchNode (location: (162,0)-(162,32))
- │ ├── predicate:
- │ │ @ CallNode (location: (162,5)-(162,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (162,5)-(162,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (162,10)-(162,28))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (162,13)-(162,23))
- │ │ │ ├── if_keyword_loc: (162,17)-(162,19) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (162,20)-(162,23))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (162,13)-(162,16))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableTargetNode (location: (162,13)-(162,16))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 0
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (162,10)-(162,12) = "in"
- │ │ └── then_loc: (162,24)-(162,28) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (162,0)-(162,4) = "case"
- │ └── end_keyword_loc: (162,29)-(162,32) = "end"
- ├── @ CaseMatchNode (location: (163,0)-(163,30))
- │ ├── predicate:
- │ │ @ CallNode (location: (163,5)-(163,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (163,5)-(163,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (163,10)-(163,26))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (163,13)-(163,21))
- │ │ │ ├── if_keyword_loc: (163,15)-(163,17) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (163,18)-(163,21))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (163,13)-(163,14))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (163,13)-(163,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (163,10)-(163,12) = "in"
- │ │ └── then_loc: (163,22)-(163,26) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (163,0)-(163,4) = "case"
- │ └── end_keyword_loc: (163,27)-(163,30) = "end"
- ├── @ CaseMatchNode (location: (164,0)-(164,32))
- │ ├── predicate:
- │ │ @ CallNode (location: (164,5)-(164,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (164,5)-(164,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (164,10)-(164,28))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (164,13)-(164,23))
- │ │ │ ├── if_keyword_loc: (164,17)-(164,19) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (164,20)-(164,23))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (164,13)-(164,16))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ FloatNode (location: (164,13)-(164,16))
- │ │ │ │ └── value: 1.0
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (164,10)-(164,12) = "in"
- │ │ └── then_loc: (164,24)-(164,28) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (164,0)-(164,4) = "case"
- │ └── end_keyword_loc: (164,29)-(164,32) = "end"
- ├── @ CaseMatchNode (location: (165,0)-(165,31))
- │ ├── predicate:
- │ │ @ CallNode (location: (165,5)-(165,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (165,5)-(165,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (165,10)-(165,27))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (165,13)-(165,22))
- │ │ │ ├── if_keyword_loc: (165,16)-(165,18) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (165,19)-(165,22))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (165,13)-(165,15))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ ImaginaryNode (location: (165,13)-(165,15))
- │ │ │ │ └── numeric:
- │ │ │ │ @ IntegerNode (location: (165,13)-(165,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (165,10)-(165,12) = "in"
- │ │ └── then_loc: (165,23)-(165,27) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (165,0)-(165,4) = "case"
- │ └── end_keyword_loc: (165,28)-(165,31) = "end"
- ├── @ CaseMatchNode (location: (166,0)-(166,31))
- │ ├── predicate:
- │ │ @ CallNode (location: (166,5)-(166,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (166,5)-(166,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (166,10)-(166,27))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (166,13)-(166,22))
- │ │ │ ├── if_keyword_loc: (166,16)-(166,18) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (166,19)-(166,22))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (166,13)-(166,15))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RationalNode (location: (166,13)-(166,15))
- │ │ │ │ └── numeric:
- │ │ │ │ @ IntegerNode (location: (166,13)-(166,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (166,10)-(166,12) = "in"
- │ │ └── then_loc: (166,23)-(166,27) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (166,0)-(166,4) = "case"
- │ └── end_keyword_loc: (166,28)-(166,31) = "end"
- ├── @ CaseMatchNode (location: (167,0)-(167,33))
- │ ├── predicate:
- │ │ @ CallNode (location: (167,5)-(167,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (167,5)-(167,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (167,10)-(167,29))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (167,13)-(167,24))
- │ │ │ ├── if_keyword_loc: (167,18)-(167,20) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (167,21)-(167,24))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (167,13)-(167,17))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (167,13)-(167,17))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (167,13)-(167,14) = ":"
- │ │ │ │ ├── value_loc: (167,14)-(167,17) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (167,10)-(167,12) = "in"
- │ │ └── then_loc: (167,25)-(167,29) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (167,0)-(167,4) = "case"
- │ └── end_keyword_loc: (167,30)-(167,33) = "end"
- ├── @ CaseMatchNode (location: (168,0)-(168,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (168,5)-(168,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (168,5)-(168,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (168,10)-(168,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (168,13)-(168,27))
- │ │ │ ├── if_keyword_loc: (168,21)-(168,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (168,24)-(168,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (168,13)-(168,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (168,13)-(168,20))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (168,13)-(168,16) = "%s["
- │ │ │ │ ├── value_loc: (168,16)-(168,19) = "foo"
- │ │ │ │ ├── closing_loc: (168,19)-(168,20) = "]"
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (168,10)-(168,12) = "in"
- │ │ └── then_loc: (168,28)-(168,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (168,0)-(168,4) = "case"
- │ └── end_keyword_loc: (168,33)-(168,36) = "end"
- ├── @ CaseMatchNode (location: (169,0)-(169,35))
- │ ├── predicate:
- │ │ @ CallNode (location: (169,5)-(169,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (169,5)-(169,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (169,10)-(169,31))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (169,13)-(169,26))
- │ │ │ ├── if_keyword_loc: (169,20)-(169,22) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (169,23)-(169,26))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (169,13)-(169,19))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (169,13)-(169,19))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (169,13)-(169,15) = ":\""
- │ │ │ │ ├── value_loc: (169,15)-(169,18) = "foo"
- │ │ │ │ ├── closing_loc: (169,18)-(169,19) = "\""
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (169,10)-(169,12) = "in"
- │ │ └── then_loc: (169,27)-(169,31) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (169,0)-(169,4) = "case"
- │ └── end_keyword_loc: (169,32)-(169,35) = "end"
- ├── @ CaseMatchNode (location: (170,0)-(170,34))
- │ ├── predicate:
- │ │ @ CallNode (location: (170,5)-(170,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (170,5)-(170,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (170,10)-(170,30))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (170,13)-(170,25))
- │ │ │ ├── if_keyword_loc: (170,19)-(170,21) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (170,22)-(170,25))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (170,13)-(170,18))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ RegularExpressionNode (location: (170,13)-(170,18))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (170,13)-(170,14) = "/"
- │ │ │ │ ├── content_loc: (170,14)-(170,17) = "foo"
- │ │ │ │ ├── closing_loc: (170,17)-(170,18) = "/"
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (170,10)-(170,12) = "in"
- │ │ └── then_loc: (170,26)-(170,30) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (170,0)-(170,4) = "case"
- │ └── end_keyword_loc: (170,31)-(170,34) = "end"
- ├── @ CaseMatchNode (location: (171,0)-(171,34))
- │ ├── predicate:
- │ │ @ CallNode (location: (171,5)-(171,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (171,5)-(171,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (171,10)-(171,30))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (171,13)-(171,25))
- │ │ │ ├── if_keyword_loc: (171,19)-(171,21) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (171,22)-(171,25))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (171,13)-(171,18))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ XStringNode (location: (171,13)-(171,18))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (171,13)-(171,14) = "`"
- │ │ │ │ ├── content_loc: (171,14)-(171,17) = "foo"
- │ │ │ │ ├── closing_loc: (171,17)-(171,18) = "`"
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (171,10)-(171,12) = "in"
- │ │ └── then_loc: (171,26)-(171,30) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (171,0)-(171,4) = "case"
- │ └── end_keyword_loc: (171,31)-(171,34) = "end"
- ├── @ CaseMatchNode (location: (172,0)-(172,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (172,5)-(172,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (172,5)-(172,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (172,10)-(172,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (172,13)-(172,27))
- │ │ │ ├── if_keyword_loc: (172,21)-(172,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (172,24)-(172,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (172,13)-(172,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ XStringNode (location: (172,13)-(172,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (172,13)-(172,16) = "%x["
- │ │ │ │ ├── content_loc: (172,16)-(172,19) = "foo"
- │ │ │ │ ├── closing_loc: (172,19)-(172,20) = "]"
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (172,10)-(172,12) = "in"
- │ │ └── then_loc: (172,28)-(172,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (172,0)-(172,4) = "case"
- │ └── end_keyword_loc: (172,33)-(172,36) = "end"
- ├── @ CaseMatchNode (location: (173,0)-(173,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (173,5)-(173,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (173,5)-(173,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (173,10)-(173,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (173,13)-(173,27))
- │ │ │ ├── if_keyword_loc: (173,21)-(173,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (173,24)-(173,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (173,13)-(173,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ ArrayNode (location: (173,13)-(173,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── elements: (length: 1)
- │ │ │ │ │ └── @ SymbolNode (location: (173,16)-(173,19))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (173,16)-(173,19) = "foo"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "foo"
- │ │ │ │ ├── opening_loc: (173,13)-(173,16) = "%i["
- │ │ │ │ └── closing_loc: (173,19)-(173,20) = "]"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (173,10)-(173,12) = "in"
- │ │ └── then_loc: (173,28)-(173,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (173,0)-(173,4) = "case"
- │ └── end_keyword_loc: (173,33)-(173,36) = "end"
- ├── @ CaseMatchNode (location: (174,0)-(174,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (174,5)-(174,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (174,5)-(174,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (174,10)-(174,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (174,13)-(174,27))
- │ │ │ ├── if_keyword_loc: (174,21)-(174,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (174,24)-(174,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (174,13)-(174,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ ArrayNode (location: (174,13)-(174,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── elements: (length: 1)
- │ │ │ │ │ └── @ SymbolNode (location: (174,16)-(174,19))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (174,16)-(174,19) = "foo"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "foo"
- │ │ │ │ ├── opening_loc: (174,13)-(174,16) = "%I["
- │ │ │ │ └── closing_loc: (174,19)-(174,20) = "]"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (174,10)-(174,12) = "in"
- │ │ └── then_loc: (174,28)-(174,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (174,0)-(174,4) = "case"
- │ └── end_keyword_loc: (174,33)-(174,36) = "end"
- ├── @ CaseMatchNode (location: (175,0)-(175,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (175,5)-(175,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (175,5)-(175,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (175,10)-(175,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (175,13)-(175,27))
- │ │ │ ├── if_keyword_loc: (175,21)-(175,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (175,24)-(175,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (175,13)-(175,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ ArrayNode (location: (175,13)-(175,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── elements: (length: 1)
- │ │ │ │ │ └── @ StringNode (location: (175,16)-(175,19))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (175,16)-(175,19) = "foo"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "foo"
- │ │ │ │ ├── opening_loc: (175,13)-(175,16) = "%w["
- │ │ │ │ └── closing_loc: (175,19)-(175,20) = "]"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (175,10)-(175,12) = "in"
- │ │ └── then_loc: (175,28)-(175,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (175,0)-(175,4) = "case"
- │ └── end_keyword_loc: (175,33)-(175,36) = "end"
- ├── @ CaseMatchNode (location: (176,0)-(176,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (176,5)-(176,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (176,5)-(176,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (176,10)-(176,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (176,13)-(176,27))
- │ │ │ ├── if_keyword_loc: (176,21)-(176,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (176,24)-(176,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (176,13)-(176,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ ArrayNode (location: (176,13)-(176,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── elements: (length: 1)
- │ │ │ │ │ └── @ StringNode (location: (176,16)-(176,19))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (176,16)-(176,19) = "foo"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "foo"
- │ │ │ │ ├── opening_loc: (176,13)-(176,16) = "%W["
- │ │ │ │ └── closing_loc: (176,19)-(176,20) = "]"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (176,10)-(176,12) = "in"
- │ │ └── then_loc: (176,28)-(176,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (176,0)-(176,4) = "case"
- │ └── end_keyword_loc: (176,33)-(176,36) = "end"
- ├── @ CaseMatchNode (location: (177,0)-(177,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (177,5)-(177,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (177,5)-(177,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (177,10)-(177,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (177,13)-(177,27))
- │ │ │ ├── if_keyword_loc: (177,21)-(177,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (177,24)-(177,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (177,13)-(177,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ StringNode (location: (177,13)-(177,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (177,13)-(177,16) = "%q["
- │ │ │ │ ├── content_loc: (177,16)-(177,19) = "foo"
- │ │ │ │ ├── closing_loc: (177,19)-(177,20) = "]"
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (177,10)-(177,12) = "in"
- │ │ └── then_loc: (177,28)-(177,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (177,0)-(177,4) = "case"
- │ └── end_keyword_loc: (177,33)-(177,36) = "end"
- ├── @ CaseMatchNode (location: (178,0)-(178,36))
- │ ├── predicate:
- │ │ @ CallNode (location: (178,5)-(178,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (178,5)-(178,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (178,10)-(178,32))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (178,13)-(178,27))
- │ │ │ ├── if_keyword_loc: (178,21)-(178,23) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (178,24)-(178,27))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (178,13)-(178,20))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ StringNode (location: (178,13)-(178,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (178,13)-(178,16) = "%Q["
- │ │ │ │ ├── content_loc: (178,16)-(178,19) = "foo"
- │ │ │ │ ├── closing_loc: (178,19)-(178,20) = "]"
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (178,10)-(178,12) = "in"
- │ │ └── then_loc: (178,28)-(178,32) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (178,0)-(178,4) = "case"
- │ └── end_keyword_loc: (178,33)-(178,36) = "end"
- ├── @ CaseMatchNode (location: (179,0)-(179,34))
- │ ├── predicate:
- │ │ @ CallNode (location: (179,5)-(179,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (179,5)-(179,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (179,10)-(179,30))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (179,13)-(179,25))
- │ │ │ ├── if_keyword_loc: (179,19)-(179,21) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (179,22)-(179,25))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (179,13)-(179,18))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ StringNode (location: (179,13)-(179,18))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (179,13)-(179,14) = "\""
- │ │ │ │ ├── content_loc: (179,14)-(179,17) = "foo"
- │ │ │ │ ├── closing_loc: (179,17)-(179,18) = "\""
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (179,10)-(179,12) = "in"
- │ │ └── then_loc: (179,26)-(179,30) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (179,0)-(179,4) = "case"
- │ └── end_keyword_loc: (179,31)-(179,34) = "end"
- ├── @ CaseMatchNode (location: (180,0)-(180,32))
- │ ├── predicate:
- │ │ @ CallNode (location: (180,5)-(180,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (180,5)-(180,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (180,10)-(180,28))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (180,13)-(180,23))
- │ │ │ ├── if_keyword_loc: (180,17)-(180,19) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (180,20)-(180,23))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (180,13)-(180,16))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ NilNode (location: (180,13)-(180,16))
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (180,10)-(180,12) = "in"
- │ │ └── then_loc: (180,24)-(180,28) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (180,0)-(180,4) = "case"
- │ └── end_keyword_loc: (180,29)-(180,32) = "end"
- ├── @ CaseMatchNode (location: (181,0)-(181,33))
- │ ├── predicate:
- │ │ @ CallNode (location: (181,5)-(181,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (181,5)-(181,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (181,10)-(181,29))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (181,13)-(181,24))
- │ │ │ ├── if_keyword_loc: (181,18)-(181,20) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (181,21)-(181,24))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (181,13)-(181,17))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SelfNode (location: (181,13)-(181,17))
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (181,10)-(181,12) = "in"
- │ │ └── then_loc: (181,25)-(181,29) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (181,0)-(181,4) = "case"
- │ └── end_keyword_loc: (181,30)-(181,33) = "end"
- ├── @ CaseMatchNode (location: (182,0)-(182,33))
- │ ├── predicate:
- │ │ @ CallNode (location: (182,5)-(182,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (182,5)-(182,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (182,10)-(182,29))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (182,13)-(182,24))
- │ │ │ ├── if_keyword_loc: (182,18)-(182,20) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (182,21)-(182,24))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (182,13)-(182,17))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (182,13)-(182,17))
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (182,10)-(182,12) = "in"
- │ │ └── then_loc: (182,25)-(182,29) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (182,0)-(182,4) = "case"
- │ └── end_keyword_loc: (182,30)-(182,33) = "end"
- ├── @ CaseMatchNode (location: (183,0)-(183,34))
- │ ├── predicate:
- │ │ @ CallNode (location: (183,5)-(183,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (183,5)-(183,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (183,10)-(183,30))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (183,13)-(183,25))
- │ │ │ ├── if_keyword_loc: (183,19)-(183,21) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (183,22)-(183,25))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (183,13)-(183,18))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ FalseNode (location: (183,13)-(183,18))
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (183,10)-(183,12) = "in"
- │ │ └── then_loc: (183,26)-(183,30) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (183,0)-(183,4) = "case"
- │ └── end_keyword_loc: (183,31)-(183,34) = "end"
- ├── @ CaseMatchNode (location: (184,0)-(184,37))
- │ ├── predicate:
- │ │ @ CallNode (location: (184,5)-(184,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (184,5)-(184,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (184,10)-(184,33))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (184,13)-(184,28))
- │ │ │ ├── if_keyword_loc: (184,22)-(184,24) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (184,25)-(184,28))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (184,13)-(184,21))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SourceFileNode (location: (184,13)-(184,21))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── filepath: "patterns.txt"
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (184,10)-(184,12) = "in"
- │ │ └── then_loc: (184,29)-(184,33) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (184,0)-(184,4) = "case"
- │ └── end_keyword_loc: (184,34)-(184,37) = "end"
- ├── @ CaseMatchNode (location: (185,0)-(185,37))
- │ ├── predicate:
- │ │ @ CallNode (location: (185,5)-(185,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (185,5)-(185,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (185,10)-(185,33))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (185,13)-(185,28))
- │ │ │ ├── if_keyword_loc: (185,22)-(185,24) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (185,25)-(185,28))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (185,13)-(185,21))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SourceLineNode (location: (185,13)-(185,21))
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (185,10)-(185,12) = "in"
- │ │ └── then_loc: (185,29)-(185,33) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (185,0)-(185,4) = "case"
- │ └── end_keyword_loc: (185,34)-(185,37) = "end"
- ├── @ CaseMatchNode (location: (186,0)-(186,41))
- │ ├── predicate:
- │ │ @ CallNode (location: (186,5)-(186,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (186,5)-(186,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (186,10)-(186,37))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (186,13)-(186,32))
- │ │ │ ├── if_keyword_loc: (186,26)-(186,28) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (186,29)-(186,32))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (186,13)-(186,25))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SourceEncodingNode (location: (186,13)-(186,25))
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (186,10)-(186,12) = "in"
- │ │ └── then_loc: (186,33)-(186,37) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (186,0)-(186,4) = "case"
- │ └── end_keyword_loc: (186,38)-(186,41) = "end"
- ├── @ CaseMatchNode (location: (187,0)-(187,39))
- │ ├── predicate:
- │ │ @ CallNode (location: (187,5)-(187,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (187,5)-(187,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (187,10)-(187,35))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (187,13)-(187,30))
- │ │ │ ├── if_keyword_loc: (187,24)-(187,26) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (187,27)-(187,30))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 0
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (187,13)-(187,23))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LambdaNode (location: (187,13)-(187,23))
- │ │ │ │ ├── locals: []
- │ │ │ │ ├── operator_loc: (187,13)-(187,15) = "->"
- │ │ │ │ ├── opening_loc: (187,16)-(187,17) = "{"
- │ │ │ │ ├── closing_loc: (187,22)-(187,23) = "}"
- │ │ │ │ ├── parameters: ∅
- │ │ │ │ └── body:
- │ │ │ │ @ StatementsNode (location: (187,18)-(187,21))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (187,18)-(187,21))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 1
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (187,10)-(187,12) = "in"
- │ │ └── then_loc: (187,31)-(187,35) = "then"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (187,0)-(187,4) = "case"
- │ └── end_keyword_loc: (187,36)-(187,39) = "end"
- ├── @ IfNode (location: (189,0)-(190,3))
- │ ├── if_keyword_loc: (189,0)-(189,2) = "if"
- │ ├── predicate:
- │ │ @ MatchPredicateNode (location: (189,3)-(189,10))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (189,3)-(189,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (189,3)-(189,4) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (189,8)-(189,10))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (189,8)-(189,9) = "["
- │ │ │ └── closing_loc: (189,9)-(189,10) = "]"
- │ │ └── operator_loc: (189,5)-(189,7) = "in"
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (190,0)-(190,3) = "end"
- ├── @ MatchRequiredNode (location: (192,0)-(194,1))
- │ ├── value:
- │ │ @ CallNode (location: (192,0)-(192,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (192,0)-(192,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (192,5)-(194,1))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (193,2)-(193,3))
- │ │ │ ├── name: :b
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (192,5)-(192,6) = "["
- │ │ └── closing_loc: (194,0)-(194,1) = "]"
- │ └── operator_loc: (192,2)-(192,4) = "=>"
- ├── @ MatchPredicateNode (location: (196,0)-(200,1))
- │ ├── value:
- │ │ @ CallNode (location: (196,0)-(196,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (196,0)-(196,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (196,7)-(200,1))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (196,7)-(196,8))
- │ │ │ └── name: :A
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (197,2)-(199,3))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (197,2)-(197,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (197,2)-(197,5) = "bar"
- │ │ │ │ ├── closing_loc: (197,5)-(197,6) = ":"
- │ │ │ │ └── unescaped: "bar"
- │ │ │ ├── value:
- │ │ │ │ @ HashPatternNode (location: (197,7)-(199,3))
- │ │ │ │ ├── constant:
- │ │ │ │ │ @ ConstantReadNode (location: (197,7)-(197,8))
- │ │ │ │ │ └── name: :B
- │ │ │ │ ├── elements: (length: 1)
- │ │ │ │ │ └── @ AssocNode (location: (198,4)-(198,12))
- │ │ │ │ │ ├── key:
- │ │ │ │ │ │ @ SymbolNode (location: (198,4)-(198,10))
- │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── value_loc: (198,4)-(198,9) = "value"
- │ │ │ │ │ │ ├── closing_loc: (198,9)-(198,10) = ":"
- │ │ │ │ │ │ └── unescaped: "value"
- │ │ │ │ │ ├── value:
- │ │ │ │ │ │ @ LocalVariableTargetNode (location: (198,11)-(198,12))
- │ │ │ │ │ │ ├── name: :a
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ └── operator_loc: ∅
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── opening_loc: (197,8)-(197,9) = "["
- │ │ │ │ └── closing_loc: (199,2)-(199,3) = "]"
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: (196,8)-(196,9) = "["
- │ │ └── closing_loc: (200,0)-(200,1) = "]"
- │ └── operator_loc: (196,4)-(196,6) = "in"
- ├── @ MatchPredicateNode (location: (202,0)-(202,17))
- │ ├── value:
- │ │ @ CallNode (location: (202,0)-(202,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (202,0)-(202,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ CapturePatternNode (location: (202,7)-(202,17))
- │ │ ├── value:
- │ │ │ @ LocalVariableTargetNode (location: (202,7)-(202,10))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── target:
- │ │ │ @ LocalVariableTargetNode (location: (202,14)-(202,17))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ └── operator_loc: (202,11)-(202,13) = "=>"
- │ └── operator_loc: (202,4)-(202,6) = "in"
- ├── @ MatchRequiredNode (location: (203,0)-(203,17))
- │ ├── value:
- │ │ @ CallNode (location: (203,0)-(203,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (203,0)-(203,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ CapturePatternNode (location: (203,7)-(203,17))
- │ │ ├── value:
- │ │ │ @ LocalVariableTargetNode (location: (203,7)-(203,10))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── target:
- │ │ │ @ LocalVariableTargetNode (location: (203,14)-(203,17))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ └── operator_loc: (203,11)-(203,13) = "=>"
- │ └── operator_loc: (203,4)-(203,6) = "=>"
- ├── @ MultiWriteNode (location: (205,0)-(205,20))
- │ ├── lefts: (length: 3)
- │ │ ├── @ LocalVariableTargetNode (location: (205,0)-(205,3))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ ├── @ LocalVariableTargetNode (location: (205,5)-(205,8))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableTargetNode (location: (205,10)-(205,13))
- │ │ ├── name: :baz
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (205,14)-(205,15) = "="
- │ └── value:
- │ @ ArrayNode (location: (205,16)-(205,20))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (205,16)-(205,17))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (205,19)-(205,20))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── @ CallNode (location: (206,0)-(208,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (206,0)-(206,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (206,4)-(208,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (207,2)-(207,29))
- │ │ └── body: (length: 1)
- │ │ └── @ MatchRequiredNode (location: (207,2)-(207,29))
- │ │ ├── value:
- │ │ │ @ ArrayNode (location: (207,2)-(207,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ IntegerNode (location: (207,3)-(207,4))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── @ IntegerNode (location: (207,6)-(207,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── opening_loc: (207,2)-(207,3) = "["
- │ │ │ └── closing_loc: (207,7)-(207,8) = "]"
- │ │ ├── pattern:
- │ │ │ @ CapturePatternNode (location: (207,12)-(207,29))
- │ │ │ ├── value:
- │ │ │ │ @ ArrayPatternNode (location: (207,12)-(207,22))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 2)
- │ │ │ │ │ ├── @ LocalVariableTargetNode (location: (207,13)-(207,16))
- │ │ │ │ │ │ ├── name: :foo
- │ │ │ │ │ │ └── depth: 1
- │ │ │ │ │ └── @ LocalVariableTargetNode (location: (207,18)-(207,21))
- │ │ │ │ │ ├── name: :bar
- │ │ │ │ │ └── depth: 1
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── opening_loc: (207,12)-(207,13) = "["
- │ │ │ │ └── closing_loc: (207,21)-(207,22) = "]"
- │ │ │ ├── target:
- │ │ │ │ @ LocalVariableTargetNode (location: (207,26)-(207,29))
- │ │ │ │ ├── name: :baz
- │ │ │ │ └── depth: 1
- │ │ │ └── operator_loc: (207,23)-(207,25) = "=>"
- │ │ └── operator_loc: (207,9)-(207,11) = "=>"
- │ ├── opening_loc: (206,4)-(206,6) = "do"
- │ └── closing_loc: (208,0)-(208,3) = "end"
- ├── @ MatchRequiredNode (location: (210,0)-(210,19))
- │ ├── value:
- │ │ @ LocalVariableReadNode (location: (210,0)-(210,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (210,7)-(210,19))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (210,7)-(210,13))
- │ │ │ └── name: :Object
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ HashPatternNode (location: (210,14)-(210,18))
- │ │ │ ├── constant: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ AssocNode (location: (210,15)-(210,17))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (210,15)-(210,17))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (210,15)-(210,16) = "x"
- │ │ │ │ │ ├── closing_loc: (210,16)-(210,17) = ":"
- │ │ │ │ │ └── unescaped: "x"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ ImplicitNode (location: (210,15)-(210,16))
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ LocalVariableTargetNode (location: (210,15)-(210,16))
- │ │ │ │ │ ├── name: :x
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── operator_loc: ∅
- │ │ │ ├── rest: ∅
- │ │ │ ├── opening_loc: (210,14)-(210,15) = "{"
- │ │ │ └── closing_loc: (210,17)-(210,18) = "}"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (210,13)-(210,14) = "["
- │ │ └── closing_loc: (210,18)-(210,19) = "]"
- │ └── operator_loc: (210,4)-(210,6) = "=>"
- ├── @ CallNode (location: (212,0)-(212,19))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (212,0)-(212,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: (212,1)-(212,2) = "."
- │ ├── name: :then
- │ ├── message_loc: (212,2)-(212,6) = "then"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (212,7)-(212,19))
- │ ├── locals: [:_1]
- │ ├── parameters:
- │ │ @ NumberedParametersNode (location: (212,7)-(212,19))
- │ │ └── maximum: 1
- │ ├── body:
- │ │ @ StatementsNode (location: (212,9)-(212,17))
- │ │ └── body: (length: 1)
- │ │ └── @ MatchPredicateNode (location: (212,9)-(212,17))
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (212,9)-(212,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── pattern:
- │ │ │ @ PinnedVariableNode (location: (212,14)-(212,17))
- │ │ │ ├── variable:
- │ │ │ │ @ LocalVariableReadNode (location: (212,15)-(212,17))
- │ │ │ │ ├── name: :_1
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (212,14)-(212,15) = "^"
- │ │ └── operator_loc: (212,11)-(212,13) = "in"
- │ ├── opening_loc: (212,7)-(212,8) = "{"
- │ └── closing_loc: (212,18)-(212,19) = "}"
- └── @ MultiWriteNode (location: (214,0)-(217,5))
- ├── lefts: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (215,2)-(215,3))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (216,2)-(216,3))
- │ ├── name: :b
- │ └── depth: 0
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: (214,0)-(214,1) = "("
- ├── rparen_loc: (217,0)-(217,1) = ")"
- ├── operator_loc: (217,2)-(217,3) = "="
- └── value:
- @ CallNode (location: (217,4)-(217,5))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (217,4)-(217,5) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/procs.txt b/test/prism/snapshots/procs.txt
deleted file mode 100644
index 1329ae6a5f..0000000000
--- a/test/prism/snapshots/procs.txt
+++ /dev/null
@@ -1,403 +0,0 @@
-@ ProgramNode (location: (1,0)-(27,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(27,19))
- └── body: (length: 10)
- ├── @ LambdaNode (location: (1,0)-(1,21))
- │ ├── locals: [:a, :b, :c, :d]
- │ ├── operator_loc: (1,0)-(1,2) = "->"
- │ ├── opening_loc: (1,16)-(1,17) = "{"
- │ ├── closing_loc: (1,20)-(1,21) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (1,3)-(1,15))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (1,4)-(1,5))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,4)-(1,5))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 3)
- │ │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── @ BlockLocalVariableNode (location: (1,10)-(1,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ └── @ BlockLocalVariableNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── opening_loc: (1,3)-(1,4) = "("
- │ │ └── closing_loc: (1,14)-(1,15) = ")"
- │ └── body:
- │ @ StatementsNode (location: (1,18)-(1,19))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (1,18)-(1,19))
- │ ├── name: :b
- │ └── depth: 0
- ├── @ LambdaNode (location: (3,0)-(5,3))
- │ ├── locals: []
- │ ├── operator_loc: (3,0)-(3,2) = "->"
- │ ├── opening_loc: (3,3)-(3,5) = "do"
- │ ├── closing_loc: (5,0)-(5,3) = "end"
- │ ├── parameters: ∅
- │ └── body:
- │ @ BeginNode (location: (3,3)-(5,3))
- │ ├── begin_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (4,0)-(5,3))
- │ │ ├── ensure_keyword_loc: (4,0)-(4,6) = "ensure"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ LambdaNode (location: (7,0)-(11,3))
- │ ├── locals: []
- │ ├── operator_loc: (7,0)-(7,2) = "->"
- │ ├── opening_loc: (7,3)-(7,5) = "do"
- │ ├── closing_loc: (11,0)-(11,3) = "end"
- │ ├── parameters: ∅
- │ └── body:
- │ @ BeginNode (location: (7,3)-(11,3))
- │ ├── begin_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (8,0)-(8,6))
- │ │ ├── keyword_loc: (8,0)-(8,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (9,0)-(10,6))
- │ │ ├── else_keyword_loc: (9,0)-(9,4) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (10,0)-(10,6) = "ensure"
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (10,0)-(11,3))
- │ │ ├── ensure_keyword_loc: (10,0)-(10,6) = "ensure"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ LambdaNode (location: (13,0)-(13,10))
- │ ├── locals: []
- │ ├── operator_loc: (13,0)-(13,2) = "->"
- │ ├── opening_loc: (13,3)-(13,4) = "{"
- │ ├── closing_loc: (13,9)-(13,10) = "}"
- │ ├── parameters: ∅
- │ └── body:
- │ @ StatementsNode (location: (13,5)-(13,8))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (13,5)-(13,8))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (13,5)-(13,8) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ LambdaNode (location: (15,0)-(15,15))
- │ ├── locals: []
- │ ├── operator_loc: (15,0)-(15,2) = "->"
- │ ├── opening_loc: (15,3)-(15,5) = "do"
- │ ├── closing_loc: (15,12)-(15,15) = "end"
- │ ├── parameters: ∅
- │ └── body:
- │ @ StatementsNode (location: (15,7)-(15,10))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (15,7)-(15,10))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (15,7)-(15,10) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ LambdaNode (location: (17,0)-(17,29))
- │ ├── locals: [:a, :b, :c, :d, :e]
- │ ├── operator_loc: (17,0)-(17,2) = "->"
- │ ├── opening_loc: (17,24)-(17,25) = "{"
- │ ├── closing_loc: (17,28)-(17,29) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (17,3)-(17,23))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (17,3)-(17,23))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (17,3)-(17,4))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 1)
- │ │ │ │ └── @ OptionalParameterNode (location: (17,6)-(17,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (17,6)-(17,7) = "b"
- │ │ │ │ ├── operator_loc: (17,8)-(17,9) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (17,10)-(17,11))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 2)
- │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (17,13)-(17,15))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── name: :c
- │ │ │ │ │ └── name_loc: (17,13)-(17,15) = "c:"
- │ │ │ │ └── @ RequiredKeywordParameterNode (location: (17,17)-(17,19))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :d
- │ │ │ │ └── name_loc: (17,17)-(17,19) = "d:"
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block:
- │ │ │ @ BlockParameterNode (location: (17,21)-(17,23))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :e
- │ │ │ ├── name_loc: (17,22)-(17,23) = "e"
- │ │ │ └── operator_loc: (17,21)-(17,22) = "&"
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── body:
- │ @ StatementsNode (location: (17,26)-(17,27))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (17,26)-(17,27))
- │ ├── name: :a
- │ └── depth: 0
- ├── @ LambdaNode (location: (19,0)-(19,40))
- │ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
- │ ├── operator_loc: (19,0)-(19,2) = "->"
- │ ├── opening_loc: (19,35)-(19,36) = "{"
- │ ├── closing_loc: (19,39)-(19,40) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (19,3)-(19,34))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (19,4)-(19,33))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (19,4)-(19,5))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 1)
- │ │ │ │ └── @ OptionalParameterNode (location: (19,7)-(19,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (19,7)-(19,8) = "b"
- │ │ │ │ ├── operator_loc: (19,9)-(19,10) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (19,11)-(19,12))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── rest:
- │ │ │ │ @ RestParameterNode (location: (19,14)-(19,16))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :c
- │ │ │ │ ├── name_loc: (19,15)-(19,16) = "c"
- │ │ │ │ └── operator_loc: (19,14)-(19,15) = "*"
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 2)
- │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (19,18)-(19,20))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── name: :d
- │ │ │ │ │ └── name_loc: (19,18)-(19,20) = "d:"
- │ │ │ │ └── @ RequiredKeywordParameterNode (location: (19,22)-(19,24))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :e
- │ │ │ │ └── name_loc: (19,22)-(19,24) = "e:"
- │ │ │ ├── keyword_rest:
- │ │ │ │ @ KeywordRestParameterNode (location: (19,26)-(19,29))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :f
- │ │ │ │ ├── name_loc: (19,28)-(19,29) = "f"
- │ │ │ │ └── operator_loc: (19,26)-(19,28) = "**"
- │ │ │ └── block:
- │ │ │ @ BlockParameterNode (location: (19,31)-(19,33))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :g
- │ │ │ ├── name_loc: (19,32)-(19,33) = "g"
- │ │ │ └── operator_loc: (19,31)-(19,32) = "&"
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (19,3)-(19,4) = "("
- │ │ └── closing_loc: (19,33)-(19,34) = ")"
- │ └── body:
- │ @ StatementsNode (location: (19,37)-(19,38))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (19,37)-(19,38))
- │ ├── name: :a
- │ └── depth: 0
- ├── @ LambdaNode (location: (21,0)-(23,3))
- │ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
- │ ├── operator_loc: (21,0)-(21,2) = "->"
- │ ├── opening_loc: (21,35)-(21,37) = "do"
- │ ├── closing_loc: (23,0)-(23,3) = "end"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (21,3)-(21,34))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (21,4)-(21,33))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (21,4)-(21,5))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 1)
- │ │ │ │ └── @ OptionalParameterNode (location: (21,7)-(21,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (21,7)-(21,8) = "b"
- │ │ │ │ ├── operator_loc: (21,9)-(21,10) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (21,11)-(21,12))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── rest:
- │ │ │ │ @ RestParameterNode (location: (21,14)-(21,16))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :c
- │ │ │ │ ├── name_loc: (21,15)-(21,16) = "c"
- │ │ │ │ └── operator_loc: (21,14)-(21,15) = "*"
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 2)
- │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (21,18)-(21,20))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── name: :d
- │ │ │ │ │ └── name_loc: (21,18)-(21,20) = "d:"
- │ │ │ │ └── @ RequiredKeywordParameterNode (location: (21,22)-(21,24))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :e
- │ │ │ │ └── name_loc: (21,22)-(21,24) = "e:"
- │ │ │ ├── keyword_rest:
- │ │ │ │ @ KeywordRestParameterNode (location: (21,26)-(21,29))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :f
- │ │ │ │ ├── name_loc: (21,28)-(21,29) = "f"
- │ │ │ │ └── operator_loc: (21,26)-(21,28) = "**"
- │ │ │ └── block:
- │ │ │ @ BlockParameterNode (location: (21,31)-(21,33))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :g
- │ │ │ ├── name_loc: (21,32)-(21,33) = "g"
- │ │ │ └── operator_loc: (21,31)-(21,32) = "&"
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (21,3)-(21,4) = "("
- │ │ └── closing_loc: (21,33)-(21,34) = ")"
- │ └── body:
- │ @ StatementsNode (location: (22,2)-(22,3))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (22,2)-(22,3))
- │ ├── name: :a
- │ └── depth: 0
- ├── @ LambdaNode (location: (25,0)-(25,25))
- │ ├── locals: [:a]
- │ ├── operator_loc: (25,0)-(25,2) = "->"
- │ ├── opening_loc: (25,7)-(25,8) = "{"
- │ ├── closing_loc: (25,24)-(25,25) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (25,3)-(25,6))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (25,4)-(25,5))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (25,4)-(25,5))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (25,3)-(25,4) = "("
- │ │ └── closing_loc: (25,5)-(25,6) = ")"
- │ └── body:
- │ @ StatementsNode (location: (25,9)-(25,23))
- │ └── body: (length: 1)
- │ └── @ LambdaNode (location: (25,9)-(25,23))
- │ ├── locals: [:b]
- │ ├── operator_loc: (25,9)-(25,11) = "->"
- │ ├── opening_loc: (25,14)-(25,15) = "{"
- │ ├── closing_loc: (25,22)-(25,23) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (25,12)-(25,13))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (25,12)-(25,13))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (25,12)-(25,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── body:
- │ @ StatementsNode (location: (25,16)-(25,21))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (25,16)-(25,21))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (25,16)-(25,17))
- │ │ ├── name: :a
- │ │ └── depth: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :*
- │ ├── message_loc: (25,18)-(25,19) = "*"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (25,20)-(25,21))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (25,20)-(25,21))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ LambdaNode (location: (27,0)-(27,19))
- ├── locals: [:a, :b, :c]
- ├── operator_loc: (27,0)-(27,2) = "->"
- ├── opening_loc: (27,16)-(27,17) = "{"
- ├── closing_loc: (27,18)-(27,19) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (27,3)-(27,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (27,4)-(27,14))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (27,4)-(27,10))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (27,5)-(27,6))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (27,8)-(27,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (27,4)-(27,5) = "("
- │ │ │ └── rparen_loc: (27,9)-(27,10) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (27,12)-(27,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (27,13)-(27,14) = "c"
- │ │ │ └── operator_loc: (27,12)-(27,13) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (27,3)-(27,4) = "("
- │ └── closing_loc: (27,14)-(27,15) = ")"
- └── body: ∅
diff --git a/test/prism/snapshots/range_begin_open_exclusive.txt b/test/prism/snapshots/range_begin_open_exclusive.txt
deleted file mode 100644
index a630b01ef1..0000000000
--- a/test/prism/snapshots/range_begin_open_exclusive.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ RangeNode (location: (1,0)-(1,4))
- ├── flags: exclude_end
- ├── left: ∅
- ├── right:
- │ @ IntegerNode (location: (1,3)-(1,4))
- │ ├── flags: decimal
- │ └── value: 2
- └── operator_loc: (1,0)-(1,3) = "..."
diff --git a/test/prism/snapshots/range_begin_open_inclusive.txt b/test/prism/snapshots/range_begin_open_inclusive.txt
deleted file mode 100644
index dc8ef0d2db..0000000000
--- a/test/prism/snapshots/range_begin_open_inclusive.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,3))
- └── body: (length: 1)
- └── @ RangeNode (location: (1,0)-(1,3))
- ├── flags: ∅
- ├── left: ∅
- ├── right:
- │ @ IntegerNode (location: (1,2)-(1,3))
- │ ├── flags: decimal
- │ └── value: 2
- └── operator_loc: (1,0)-(1,2) = ".."
diff --git a/test/prism/snapshots/range_end_open_exclusive.txt b/test/prism/snapshots/range_end_open_exclusive.txt
deleted file mode 100644
index 17a75f8945..0000000000
--- a/test/prism/snapshots/range_end_open_exclusive.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ RangeNode (location: (1,0)-(1,4))
- ├── flags: exclude_end
- ├── left:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 2
- ├── right: ∅
- └── operator_loc: (1,1)-(1,4) = "..."
diff --git a/test/prism/snapshots/range_end_open_inclusive.txt b/test/prism/snapshots/range_end_open_inclusive.txt
deleted file mode 100644
index b49272d8cd..0000000000
--- a/test/prism/snapshots/range_end_open_inclusive.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,3))
- └── body: (length: 1)
- └── @ RangeNode (location: (1,0)-(1,3))
- ├── flags: ∅
- ├── left:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 2
- ├── right: ∅
- └── operator_loc: (1,1)-(1,3) = ".."
diff --git a/test/prism/snapshots/ranges.txt b/test/prism/snapshots/ranges.txt
deleted file mode 100644
index 2fffe80537..0000000000
--- a/test/prism/snapshots/ranges.txt
+++ /dev/null
@@ -1,533 +0,0 @@
-@ ProgramNode (location: (1,0)-(49,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(49,7))
- └── body: (length: 25)
- ├── @ ParenthesesNode (location: (1,0)-(1,6))
- │ ├── body:
- │ │ @ StatementsNode (location: (1,1)-(1,5))
- │ │ └── body: (length: 1)
- │ │ └── @ RangeNode (location: (1,1)-(1,5))
- │ │ ├── flags: exclude_end
- │ │ ├── left: ∅
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (1,4)-(1,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (1,1)-(1,4) = "..."
- │ ├── opening_loc: (1,0)-(1,1) = "("
- │ └── closing_loc: (1,5)-(1,6) = ")"
- ├── @ ParenthesesNode (location: (3,0)-(3,5))
- │ ├── body:
- │ │ @ StatementsNode (location: (3,1)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ RangeNode (location: (3,1)-(3,4))
- │ │ ├── flags: ∅
- │ │ ├── left: ∅
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (3,3)-(3,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (3,1)-(3,3) = ".."
- │ ├── opening_loc: (3,0)-(3,1) = "("
- │ └── closing_loc: (3,4)-(3,5) = ")"
- ├── @ RangeNode (location: (5,0)-(5,5))
- │ ├── flags: exclude_end
- │ ├── left:
- │ │ @ IntegerNode (location: (5,0)-(5,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (5,4)-(5,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (5,1)-(5,4) = "..."
- ├── @ CallNode (location: (7,0)-(7,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (7,0)-(7,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (7,0)-(7,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (7,3)-(7,9) = "[...2]"
- │ ├── opening_loc: (7,3)-(7,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,4)-(7,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ RangeNode (location: (7,4)-(7,8))
- │ │ ├── flags: exclude_end
- │ │ ├── left: ∅
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (7,7)-(7,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (7,4)-(7,7) = "..."
- │ ├── closing_loc: (7,8)-(7,9) = "]"
- │ └── block: ∅
- ├── @ HashNode (location: (9,0)-(9,15))
- │ ├── opening_loc: (9,0)-(9,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (9,2)-(9,13))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (9,2)-(9,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (9,2)-(9,5) = "foo"
- │ │ │ ├── closing_loc: (9,5)-(9,6) = ":"
- │ │ │ └── unescaped: "foo"
- │ │ ├── value:
- │ │ │ @ RangeNode (location: (9,7)-(9,13))
- │ │ │ ├── flags: exclude_end
- │ │ │ ├── left: ∅
- │ │ │ ├── right:
- │ │ │ │ @ CallNode (location: (9,10)-(9,13))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (9,10)-(9,13) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (9,7)-(9,10) = "..."
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (9,14)-(9,15) = "}"
- ├── @ ParenthesesNode (location: (11,0)-(11,6))
- │ ├── body:
- │ │ @ StatementsNode (location: (11,1)-(11,5))
- │ │ └── body: (length: 1)
- │ │ └── @ RangeNode (location: (11,1)-(11,5))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (11,1)-(11,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (11,2)-(11,5) = "..."
- │ ├── opening_loc: (11,0)-(11,1) = "("
- │ └── closing_loc: (11,5)-(11,6) = ")"
- ├── @ RangeNode (location: (13,0)-(13,4))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (13,0)-(13,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (13,3)-(13,4))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (13,1)-(13,3) = ".."
- ├── @ HashNode (location: (15,0)-(15,14))
- │ ├── opening_loc: (15,0)-(15,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (15,2)-(15,12))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (15,2)-(15,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (15,2)-(15,5) = "foo"
- │ │ │ ├── closing_loc: (15,5)-(15,6) = ":"
- │ │ │ └── unescaped: "foo"
- │ │ ├── value:
- │ │ │ @ RangeNode (location: (15,7)-(15,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── left: ∅
- │ │ │ ├── right:
- │ │ │ │ @ CallNode (location: (15,9)-(15,12))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (15,9)-(15,12) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (15,7)-(15,9) = ".."
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (15,13)-(15,14) = "}"
- ├── @ ParenthesesNode (location: (17,0)-(17,5))
- │ ├── body:
- │ │ @ StatementsNode (location: (17,1)-(17,4))
- │ │ └── body: (length: 1)
- │ │ └── @ RangeNode (location: (17,1)-(17,4))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (17,1)-(17,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (17,2)-(17,4) = ".."
- │ ├── opening_loc: (17,0)-(17,1) = "("
- │ └── closing_loc: (17,4)-(17,5) = ")"
- ├── @ RangeNode (location: (19,0)-(19,8))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (19,0)-(19,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ RangeNode (location: (19,5)-(19,8))
- │ │ ├── flags: ∅
- │ │ ├── left: ∅
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (19,7)-(19,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (19,5)-(19,7) = ".."
- │ └── operator_loc: (19,2)-(19,4) = ".."
- ├── @ AndNode (location: (21,0)-(21,8))
- │ ├── left:
- │ │ @ RangeNode (location: (21,0)-(21,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (21,0)-(21,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (21,1)-(21,3) = ".."
- │ ├── right:
- │ │ @ IntegerNode (location: (21,7)-(21,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (21,4)-(21,6) = "&&"
- ├── @ CallNode (location: (23,0)-(23,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (23,0)-(23,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (23,0)-(23,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (23,1)-(23,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :==
- │ ├── message_loc: (23,4)-(23,6) = "=="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (23,7)-(23,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (23,7)-(23,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (25,0)-(25,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (25,0)-(25,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (25,0)-(25,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (25,1)-(25,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :!=
- │ ├── message_loc: (25,4)-(25,6) = "!="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (25,7)-(25,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (25,7)-(25,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (27,0)-(27,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (27,0)-(27,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (27,0)-(27,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (27,1)-(27,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :===
- │ ├── message_loc: (27,4)-(27,7) = "==="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (27,8)-(27,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (27,8)-(27,9))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (29,0)-(29,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (29,0)-(29,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (29,0)-(29,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (29,1)-(29,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :<=>
- │ ├── message_loc: (29,4)-(29,7) = "<=>"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (29,8)-(29,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (29,8)-(29,9))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (31,0)-(31,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (31,0)-(31,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (31,0)-(31,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (31,1)-(31,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (31,4)-(31,6) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (31,7)-(31,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (31,7)-(31,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (33,0)-(33,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (33,0)-(33,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (33,0)-(33,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (33,1)-(33,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :!~
- │ ├── message_loc: (33,4)-(33,6) = "!~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (33,7)-(33,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (33,7)-(33,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (35,0)-(35,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (35,0)-(35,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (35,0)-(35,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (35,1)-(35,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :<
- │ ├── message_loc: (35,4)-(35,5) = "<"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (35,6)-(35,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (35,6)-(35,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (37,0)-(37,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (37,0)-(37,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (37,0)-(37,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (37,1)-(37,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :>
- │ ├── message_loc: (37,4)-(37,5) = ">"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (37,6)-(37,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (37,6)-(37,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (39,0)-(39,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (39,0)-(39,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (39,0)-(39,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (39,1)-(39,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :<=
- │ ├── message_loc: (39,4)-(39,6) = "<="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (39,7)-(39,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (39,7)-(39,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (41,0)-(41,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (41,0)-(41,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (41,0)-(41,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (41,1)-(41,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :>=
- │ ├── message_loc: (41,4)-(41,6) = ">="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (41,7)-(41,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (41,7)-(41,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (43,0)-(43,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (43,0)-(43,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (43,0)-(43,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (43,1)-(43,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :<<
- │ ├── message_loc: (43,4)-(43,6) = "<<"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (43,7)-(43,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (43,7)-(43,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RangeNode (location: (45,0)-(45,3))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (45,0)-(45,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (45,1)-(45,3) = ".."
- │ ├── call_operator_loc: ∅
- │ ├── name: :>>
- │ ├── message_loc: (45,4)-(45,6) = ">>"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (45,7)-(45,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (45,7)-(45,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ RangeNode (location: (47,0)-(47,7))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (47,0)-(47,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ CallNode (location: (47,4)-(47,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (47,6)-(47,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :+@
- │ │ ├── message_loc: (47,4)-(47,5) = "+"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (47,1)-(47,3) = ".."
- └── @ RangeNode (location: (49,0)-(49,7))
- ├── flags: ∅
- ├── left:
- │ @ IntegerNode (location: (49,0)-(49,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── right:
- │ @ CallNode (location: (49,4)-(49,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (49,6)-(49,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── call_operator_loc: ∅
- │ ├── name: :-@
- │ ├── message_loc: (49,4)-(49,5) = "-"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── operator_loc: (49,1)-(49,3) = ".."
diff --git a/test/prism/snapshots/regex.txt b/test/prism/snapshots/regex.txt
deleted file mode 100644
index d4d153e8d5..0000000000
--- a/test/prism/snapshots/regex.txt
+++ /dev/null
@@ -1,510 +0,0 @@
-@ ProgramNode (location: (1,0)-(46,32))
-├── locals: [:foo, :ab, :abc, :a]
-└── statements:
- @ StatementsNode (location: (1,0)-(46,32))
- └── body: (length: 25)
- ├── @ CallNode (location: (1,0)-(1,9))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ RegularExpressionNode (location: (1,4)-(1,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,4)-(1,5) = "/"
- │ │ ├── content_loc: (1,5)-(1,8) = "bar"
- │ │ ├── closing_loc: (1,8)-(1,9) = "/"
- │ │ └── unescaped: "bar"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ RegularExpressionNode (location: (3,0)-(3,8))
- │ ├── flags: ignore_case, forced_us_ascii_encoding
- │ ├── opening_loc: (3,0)-(3,3) = "%r{"
- │ ├── content_loc: (3,3)-(3,6) = "abc"
- │ ├── closing_loc: (3,6)-(3,8) = "}i"
- │ └── unescaped: "abc"
- ├── @ RegularExpressionNode (location: (5,0)-(5,5))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (5,0)-(5,1) = "/"
- │ ├── content_loc: (5,1)-(5,4) = "a\\b"
- │ ├── closing_loc: (5,4)-(5,5) = "/"
- │ └── unescaped: "a\\b"
- ├── @ InterpolatedRegularExpressionNode (location: (7,0)-(7,11))
- │ ├── flags: ∅
- │ ├── opening_loc: (7,0)-(7,1) = "/"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (7,1)-(7,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (7,1)-(7,5) = "aaa "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "aaa "
- │ │ └── @ EmbeddedVariableNode (location: (7,5)-(7,10))
- │ │ ├── operator_loc: (7,5)-(7,6) = "#"
- │ │ └── variable:
- │ │ @ GlobalVariableReadNode (location: (7,6)-(7,10))
- │ │ └── name: :$bbb
- │ └── closing_loc: (7,10)-(7,11) = "/"
- ├── @ InterpolatedRegularExpressionNode (location: (9,0)-(9,16))
- │ ├── flags: ∅
- │ ├── opening_loc: (9,0)-(9,1) = "/"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (9,1)-(9,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (9,1)-(9,5) = "aaa "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "aaa "
- │ │ ├── @ EmbeddedStatementsNode (location: (9,5)-(9,11))
- │ │ │ ├── opening_loc: (9,5)-(9,7) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (9,7)-(9,10))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (9,7)-(9,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bbb
- │ │ │ │ ├── message_loc: (9,7)-(9,10) = "bbb"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (9,10)-(9,11) = "}"
- │ │ └── @ StringNode (location: (9,11)-(9,15))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (9,11)-(9,15) = " ccc"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " ccc"
- │ └── closing_loc: (9,15)-(9,16) = "/"
- ├── @ ArrayNode (location: (11,0)-(11,27))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ MatchWriteNode (location: (11,1)-(11,21))
- │ │ │ ├── call:
- │ │ │ │ @ CallNode (location: (11,1)-(11,21))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ RegularExpressionNode (location: (11,1)-(11,14))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (11,1)-(11,2) = "/"
- │ │ │ │ │ ├── content_loc: (11,2)-(11,13) = "(?<foo>bar)"
- │ │ │ │ │ ├── closing_loc: (11,13)-(11,14) = "/"
- │ │ │ │ │ └── unescaped: "(?<foo>bar)"
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :=~
- │ │ │ │ ├── message_loc: (11,15)-(11,17) = "=~"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments:
- │ │ │ │ │ @ ArgumentsNode (location: (11,18)-(11,21))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (11,18)-(11,21))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :baz
- │ │ │ │ │ ├── message_loc: (11,18)-(11,21) = "baz"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── targets: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (11,5)-(11,8))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableReadNode (location: (11,23)-(11,26))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── opening_loc: (11,0)-(11,1) = "["
- │ └── closing_loc: (11,26)-(11,27) = "]"
- ├── @ RegularExpressionNode (location: (13,0)-(13,6))
- │ ├── flags: ignore_case, forced_us_ascii_encoding
- │ ├── opening_loc: (13,0)-(13,1) = "/"
- │ ├── content_loc: (13,1)-(13,4) = "abc"
- │ ├── closing_loc: (13,4)-(13,6) = "/i"
- │ └── unescaped: "abc"
- ├── @ RegularExpressionNode (location: (15,0)-(15,26))
- │ ├── flags: ignore_case, forced_us_ascii_encoding
- │ ├── opening_loc: (15,0)-(15,3) = "%r/"
- │ ├── content_loc: (15,3)-(15,24) = "[a-z$._?][\\w$.?\#@~]*:"
- │ ├── closing_loc: (15,24)-(15,26) = "/i"
- │ └── unescaped: "[a-z$._?][\\w$.?\#@~]*:"
- ├── @ RegularExpressionNode (location: (17,0)-(17,37))
- │ ├── flags: ignore_case, forced_us_ascii_encoding
- │ ├── opening_loc: (17,0)-(17,3) = "%r/"
- │ ├── content_loc: (17,3)-(17,35) = "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)"
- │ ├── closing_loc: (17,35)-(17,37) = "/i"
- │ └── unescaped: "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)"
- ├── @ RegularExpressionNode (location: (19,0)-(19,25))
- │ ├── flags: ignore_case, forced_us_ascii_encoding
- │ ├── opening_loc: (19,0)-(19,3) = "%r/"
- │ ├── content_loc: (19,3)-(19,23) = "[a-z$._?][\\w$.?\#@~]*"
- │ ├── closing_loc: (19,23)-(19,25) = "/i"
- │ └── unescaped: "[a-z$._?][\\w$.?\#@~]*"
- ├── @ RegularExpressionNode (location: (21,0)-(24,1))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (21,0)-(21,3) = "%r("
- │ ├── content_loc: (21,3)-(24,0) = "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n"
- │ ├── closing_loc: (24,0)-(24,1) = ")"
- │ └── unescaped: "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n"
- ├── @ CallNode (location: (26,0)-(26,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RegularExpressionNode (location: (26,0)-(26,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (26,0)-(26,1) = "/"
- │ │ ├── content_loc: (26,1)-(26,7) = "(?#\\))"
- │ │ ├── closing_loc: (26,7)-(26,8) = "/"
- │ │ └── unescaped: "(?#\\))"
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (26,9)-(26,11) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (26,12)-(26,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (26,12)-(26,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (26,12)-(26,13) = "\""
- │ │ ├── content_loc: (26,13)-(26,15) = "hi"
- │ │ ├── closing_loc: (26,15)-(26,16) = "\""
- │ │ └── unescaped: "hi"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ RegularExpressionNode (location: (28,0)-(28,9))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (28,0)-(28,3) = "%r#"
- │ ├── content_loc: (28,3)-(28,8) = "pound"
- │ ├── closing_loc: (28,8)-(28,9) = "#"
- │ └── unescaped: "pound"
- ├── @ InterpolatedRegularExpressionNode (location: (30,0)-(30,13))
- │ ├── flags: once
- │ ├── opening_loc: (30,0)-(30,1) = "/"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (30,1)-(30,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (30,1)-(30,5) = "aaa "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "aaa "
- │ │ └── @ EmbeddedStatementsNode (location: (30,5)-(30,11))
- │ │ ├── opening_loc: (30,5)-(30,7) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (30,7)-(30,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (30,7)-(30,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bbb
- │ │ │ ├── message_loc: (30,7)-(30,10) = "bbb"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (30,10)-(30,11) = "}"
- │ └── closing_loc: (30,11)-(30,13) = "/o"
- ├── @ MatchWriteNode (location: (32,0)-(33,10))
- │ ├── call:
- │ │ @ CallNode (location: (32,0)-(33,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ RegularExpressionNode (location: (32,0)-(33,4))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (32,0)-(32,1) = "/"
- │ │ │ ├── content_loc: (32,1)-(33,3) = "(?<a\\\nb>)"
- │ │ │ ├── closing_loc: (33,3)-(33,4) = "/"
- │ │ │ └── unescaped: "(?<ab>)"
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :=~
- │ │ ├── message_loc: (33,5)-(33,7) = "=~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (33,8)-(33,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (33,8)-(33,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (33,8)-(33,9) = "\""
- │ │ │ ├── content_loc: (33,9)-(33,9) = ""
- │ │ │ ├── closing_loc: (33,9)-(33,10) = "\""
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── targets: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (32,0)-(33,4))
- │ ├── name: :ab
- │ └── depth: 0
- ├── @ LocalVariableReadNode (location: (33,12)-(33,14))
- │ ├── name: :ab
- │ └── depth: 0
- ├── @ MatchWriteNode (location: (35,0)-(35,24))
- │ ├── call:
- │ │ @ CallNode (location: (35,0)-(35,24))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ RegularExpressionNode (location: (35,0)-(35,18))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (35,0)-(35,1) = "/"
- │ │ │ ├── content_loc: (35,1)-(35,17) = "(?<abc>)(?<abc>)"
- │ │ │ ├── closing_loc: (35,17)-(35,18) = "/"
- │ │ │ └── unescaped: "(?<abc>)(?<abc>)"
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :=~
- │ │ ├── message_loc: (35,19)-(35,21) = "=~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (35,22)-(35,24))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (35,22)-(35,24))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (35,22)-(35,23) = "\""
- │ │ │ ├── content_loc: (35,23)-(35,23) = ""
- │ │ │ ├── closing_loc: (35,23)-(35,24) = "\""
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── targets: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (35,4)-(35,7))
- │ ├── name: :abc
- │ └── depth: 0
- ├── @ LocalVariableReadNode (location: (35,26)-(35,29))
- │ ├── name: :abc
- │ └── depth: 0
- ├── @ CallNode (location: (37,0)-(37,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RegularExpressionNode (location: (37,0)-(37,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (37,0)-(37,1) = "/"
- │ │ ├── content_loc: (37,1)-(37,9) = "(?<a b>)"
- │ │ ├── closing_loc: (37,9)-(37,10) = "/"
- │ │ └── unescaped: "(?<a b>)"
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (37,11)-(37,13) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (37,14)-(37,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (37,14)-(37,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (37,14)-(37,15) = "\""
- │ │ ├── content_loc: (37,15)-(37,15) = ""
- │ │ ├── closing_loc: (37,15)-(37,16) = "\""
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ LocalVariableWriteNode (location: (39,0)-(39,5))
- │ ├── name: :a
- │ ├── depth: 0
- │ ├── name_loc: (39,0)-(39,1) = "a"
- │ ├── value:
- │ │ @ IntegerNode (location: (39,4)-(39,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (39,2)-(39,3) = "="
- ├── @ CallNode (location: (40,0)-(40,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (40,0)-(40,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (40,4)-(40,24))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (40,6)-(40,22))
- │ │ └── body: (length: 1)
- │ │ └── @ MatchWriteNode (location: (40,6)-(40,22))
- │ │ ├── call:
- │ │ │ @ CallNode (location: (40,6)-(40,22))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ RegularExpressionNode (location: (40,6)-(40,14))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (40,6)-(40,7) = "/"
- │ │ │ │ ├── content_loc: (40,7)-(40,13) = "(?<a>)"
- │ │ │ │ ├── closing_loc: (40,13)-(40,14) = "/"
- │ │ │ │ └── unescaped: "(?<a>)"
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :=~
- │ │ │ ├── message_loc: (40,15)-(40,17) = "=~"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (40,18)-(40,22))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (40,18)-(40,22))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :to_s
- │ │ │ │ ├── message_loc: (40,18)-(40,22) = "to_s"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── targets: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (40,10)-(40,11))
- │ │ ├── name: :a
- │ │ └── depth: 1
- │ ├── opening_loc: (40,4)-(40,5) = "{"
- │ └── closing_loc: (40,23)-(40,24) = "}"
- ├── @ MatchWriteNode (location: (42,0)-(42,16))
- │ ├── call:
- │ │ @ CallNode (location: (42,0)-(42,16))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ RegularExpressionNode (location: (42,0)-(42,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (42,0)-(42,1) = "/"
- │ │ │ ├── content_loc: (42,1)-(42,9) = "(?<foo>)"
- │ │ │ ├── closing_loc: (42,9)-(42,10) = "/"
- │ │ │ └── unescaped: "(?<foo>)"
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :=~
- │ │ ├── message_loc: (42,11)-(42,13) = "=~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (42,14)-(42,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (42,14)-(42,16))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (42,14)-(42,15) = "\""
- │ │ │ ├── content_loc: (42,15)-(42,15) = ""
- │ │ │ ├── closing_loc: (42,15)-(42,16) = "\""
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── targets: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (42,4)-(42,7))
- │ ├── name: :foo
- │ └── depth: 0
- ├── @ CallNode (location: (43,0)-(43,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RegularExpressionNode (location: (43,0)-(43,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (43,0)-(43,1) = "/"
- │ │ ├── content_loc: (43,1)-(43,9) = "(?<Foo>)"
- │ │ ├── closing_loc: (43,9)-(43,10) = "/"
- │ │ └── unescaped: "(?<Foo>)"
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (43,11)-(43,13) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (43,14)-(43,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (43,14)-(43,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (43,14)-(43,15) = "\""
- │ │ ├── content_loc: (43,15)-(43,15) = ""
- │ │ ├── closing_loc: (43,15)-(43,16) = "\""
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RegularExpressionNode (location: (45,0)-(45,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (45,0)-(45,1) = "/"
- │ │ ├── content_loc: (45,1)-(45,9) = "(?<nil>)"
- │ │ ├── closing_loc: (45,9)-(45,10) = "/"
- │ │ └── unescaped: "(?<nil>)"
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (45,11)-(45,13) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (45,14)-(45,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (45,14)-(45,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (45,14)-(45,15) = "\""
- │ │ ├── content_loc: (45,15)-(45,15) = ""
- │ │ ├── closing_loc: (45,15)-(45,16) = "\""
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ DefNode (location: (46,0)-(46,32))
- ├── name: :foo
- ├── name_loc: (46,4)-(46,7) = "foo"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (46,8)-(46,12))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ RequiredKeywordParameterNode (location: (46,8)-(46,12))
- │ │ ├── flags: ∅
- │ │ ├── name: :nil
- │ │ └── name_loc: (46,8)-(46,12) = "nil:"
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (46,16)-(46,32))
- │ └── body: (length: 1)
- │ └── @ MatchWriteNode (location: (46,16)-(46,32))
- │ ├── call:
- │ │ @ CallNode (location: (46,16)-(46,32))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ RegularExpressionNode (location: (46,16)-(46,26))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (46,16)-(46,17) = "/"
- │ │ │ ├── content_loc: (46,17)-(46,25) = "(?<nil>)"
- │ │ │ ├── closing_loc: (46,25)-(46,26) = "/"
- │ │ │ └── unescaped: "(?<nil>)"
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :=~
- │ │ ├── message_loc: (46,27)-(46,29) = "=~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (46,30)-(46,32))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (46,30)-(46,32))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (46,30)-(46,31) = "\""
- │ │ │ ├── content_loc: (46,31)-(46,31) = ""
- │ │ │ ├── closing_loc: (46,31)-(46,32) = "\""
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── targets: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (46,20)-(46,23))
- │ ├── name: :nil
- │ └── depth: 0
- ├── locals: [:nil]
- ├── def_keyword_loc: (46,0)-(46,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (46,7)-(46,8) = "("
- ├── rparen_loc: (46,12)-(46,13) = ")"
- ├── equal_loc: (46,14)-(46,15) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/regex_char_width.txt b/test/prism/snapshots/regex_char_width.txt
deleted file mode 100644
index 6bf2169b2f..0000000000
--- a/test/prism/snapshots/regex_char_width.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ ProgramNode (location: (2,0)-(3,6))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (2,0)-(3,6))
- └── body: (length: 2)
- ├── @ MatchWriteNode (location: (2,0)-(2,36))
- │ ├── call:
- │ │ @ CallNode (location: (2,0)-(2,36))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ RegularExpressionNode (location: (2,0)-(2,22))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (2,0)-(2,1) = "/"
- │ │ │ ├── content_loc: (2,1)-(2,21) = "\x{E285}\xA7(?<a>.)\x{E285}\xA9(?<b>.)"
- │ │ │ ├── closing_loc: (2,21)-(2,22) = "/"
- │ │ │ └── unescaped: "\x{E285}\xA7(?<a>.)\x{E285}\xA9(?<b>.)"
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :=~
- │ │ ├── message_loc: (2,23)-(2,25) = "=~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (2,26)-(2,36))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (2,26)-(2,36))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (2,26)-(2,27) = "'"
- │ │ │ ├── content_loc: (2,27)-(2,35) = "\x{E285}\xA7a\x{E285}\xA9b"
- │ │ │ ├── closing_loc: (2,35)-(2,36) = "'"
- │ │ │ └── unescaped: "\x{E285}\xA7a\x{E285}\xA9b"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── targets: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (2,7)-(2,8))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (2,17)-(2,18))
- │ ├── name: :b
- │ └── depth: 0
- └── @ ArrayNode (location: (3,0)-(3,6))
- ├── flags: ∅
- ├── elements: (length: 2)
- │ ├── @ LocalVariableReadNode (location: (3,1)-(3,2))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ LocalVariableReadNode (location: (3,4)-(3,5))
- │ ├── name: :b
- │ └── depth: 0
- ├── opening_loc: (3,0)-(3,1) = "["
- └── closing_loc: (3,5)-(3,6) = "]"
diff --git a/test/prism/snapshots/repeat_parameters.txt b/test/prism/snapshots/repeat_parameters.txt
deleted file mode 100644
index fd98294ce6..0000000000
--- a/test/prism/snapshots/repeat_parameters.txt
+++ /dev/null
@@ -1,473 +0,0 @@
-@ ProgramNode (location: (1,0)-(38,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(38,3))
- └── body: (length: 13)
- ├── @ DefNode (location: (1,0)-(2,3))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,8)-(1,12))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,8)-(1,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :_
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a, :_]
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (1,7)-(1,8) = "("
- │ ├── rparen_loc: (1,12)-(1,13) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (2,0)-(2,3) = "end"
- ├── @ DefNode (location: (4,0)-(5,3))
- │ ├── name: :foo
- │ ├── name_loc: (4,4)-(4,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (4,8)-(4,15))
- │ │ ├── requireds: (length: 3)
- │ │ │ ├── @ RequiredParameterNode (location: (4,8)-(4,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── @ RequiredParameterNode (location: (4,11)-(4,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :_
- │ │ │ └── @ RequiredParameterNode (location: (4,14)-(4,15))
- │ │ │ ├── flags: repeated_parameter
- │ │ │ └── name: :_
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a, :_]
- │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (4,7)-(4,8) = "("
- │ ├── rparen_loc: (4,15)-(4,16) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ DefNode (location: (7,0)-(8,3))
- │ ├── name: :foo
- │ ├── name_loc: (7,4)-(7,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (7,8)-(7,19))
- │ │ ├── requireds: (length: 4)
- │ │ │ ├── @ RequiredParameterNode (location: (7,8)-(7,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── @ RequiredParameterNode (location: (7,11)-(7,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :_
- │ │ │ ├── @ RequiredParameterNode (location: (7,14)-(7,15))
- │ │ │ │ ├── flags: repeated_parameter
- │ │ │ │ └── name: :_
- │ │ │ └── @ RequiredParameterNode (location: (7,17)-(7,19))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :_b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a, :_, :_b]
- │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (7,7)-(7,8) = "("
- │ ├── rparen_loc: (7,19)-(7,20) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (8,0)-(8,3) = "end"
- ├── @ DefNode (location: (10,0)-(11,3))
- │ ├── name: :foo
- │ ├── name_loc: (10,4)-(10,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (10,8)-(10,23))
- │ │ ├── requireds: (length: 5)
- │ │ │ ├── @ RequiredParameterNode (location: (10,8)-(10,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── @ RequiredParameterNode (location: (10,11)-(10,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :_
- │ │ │ ├── @ RequiredParameterNode (location: (10,14)-(10,15))
- │ │ │ │ ├── flags: repeated_parameter
- │ │ │ │ └── name: :_
- │ │ │ ├── @ RequiredParameterNode (location: (10,17)-(10,19))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :_b
- │ │ │ └── @ RequiredParameterNode (location: (10,21)-(10,23))
- │ │ │ ├── flags: repeated_parameter
- │ │ │ └── name: :_b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a, :_, :_b]
- │ ├── def_keyword_loc: (10,0)-(10,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (10,7)-(10,8) = "("
- │ ├── rparen_loc: (10,23)-(10,24) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ DefNode (location: (13,0)-(14,3))
- │ ├── name: :foo
- │ ├── name_loc: (13,4)-(13,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (13,8)-(13,35))
- │ │ ├── requireds: (length: 3)
- │ │ │ ├── @ RequiredParameterNode (location: (13,8)-(13,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── @ MultiTargetNode (location: (13,11)-(13,22))
- │ │ │ │ ├── lefts: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (13,12)-(13,13))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :b
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ SplatNode (location: (13,15)-(13,18))
- │ │ │ │ │ ├── operator_loc: (13,15)-(13,16) = "*"
- │ │ │ │ │ └── expression:
- │ │ │ │ │ @ RequiredParameterNode (location: (13,16)-(13,18))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :_c
- │ │ │ │ ├── rights: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (13,20)-(13,21))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :d
- │ │ │ │ ├── lparen_loc: (13,11)-(13,12) = "("
- │ │ │ │ └── rparen_loc: (13,21)-(13,22) = ")"
- │ │ │ └── @ MultiTargetNode (location: (13,24)-(13,35))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (13,25)-(13,26))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :e
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (13,28)-(13,31))
- │ │ │ │ ├── operator_loc: (13,28)-(13,29) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (13,29)-(13,31))
- │ │ │ │ ├── flags: repeated_parameter
- │ │ │ │ └── name: :_c
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (13,33)-(13,34))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :f
- │ │ │ ├── lparen_loc: (13,24)-(13,25) = "("
- │ │ │ └── rparen_loc: (13,34)-(13,35) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a, :b, :_c, :d, :e, :f]
- │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (13,7)-(13,8) = "("
- │ ├── rparen_loc: (13,35)-(13,36) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (14,0)-(14,3) = "end"
- ├── @ DefNode (location: (16,0)-(17,3))
- │ ├── name: :foo
- │ ├── name_loc: (16,4)-(16,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (16,8)-(16,20))
- │ │ ├── requireds: (length: 4)
- │ │ │ ├── @ RequiredParameterNode (location: (16,8)-(16,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :_a
- │ │ │ ├── @ RequiredParameterNode (location: (16,12)-(16,14))
- │ │ │ │ ├── flags: repeated_parameter
- │ │ │ │ └── name: :_a
- │ │ │ ├── @ RequiredParameterNode (location: (16,16)-(16,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ └── @ RequiredParameterNode (location: (16,19)-(16,20))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:_a, :b, :c]
- │ ├── def_keyword_loc: (16,0)-(16,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (16,7)-(16,8) = "("
- │ ├── rparen_loc: (16,20)-(16,21) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- ├── @ DefNode (location: (19,0)-(20,3))
- │ ├── name: :foo
- │ ├── name_loc: (19,4)-(19,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (19,8)-(19,32))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ MultiTargetNode (location: (19,8)-(19,19))
- │ │ │ │ ├── lefts: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (19,9)-(19,10))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ SplatNode (location: (19,12)-(19,15))
- │ │ │ │ │ ├── operator_loc: (19,12)-(19,13) = "*"
- │ │ │ │ │ └── expression:
- │ │ │ │ │ @ RequiredParameterNode (location: (19,13)-(19,15))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :_b
- │ │ │ │ ├── rights: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (19,17)-(19,18))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :c
- │ │ │ │ ├── lparen_loc: (19,8)-(19,9) = "("
- │ │ │ │ └── rparen_loc: (19,18)-(19,19) = ")"
- │ │ │ └── @ MultiTargetNode (location: (19,21)-(19,32))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (19,22)-(19,23))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :d
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (19,25)-(19,28))
- │ │ │ │ ├── operator_loc: (19,25)-(19,26) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (19,26)-(19,28))
- │ │ │ │ ├── flags: repeated_parameter
- │ │ │ │ └── name: :_b
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (19,30)-(19,31))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :e
- │ │ │ ├── lparen_loc: (19,21)-(19,22) = "("
- │ │ │ └── rparen_loc: (19,31)-(19,32) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a, :_b, :c, :d, :e]
- │ ├── def_keyword_loc: (19,0)-(19,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (19,7)-(19,8) = "("
- │ ├── rparen_loc: (19,32)-(19,33) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (20,0)-(20,3) = "end"
- ├── @ DefNode (location: (22,0)-(23,3))
- │ ├── name: :foo
- │ ├── name_loc: (22,4)-(22,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (22,8)-(22,22))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 2)
- │ │ │ ├── @ OptionalParameterNode (location: (22,8)-(22,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :_a
- │ │ │ │ ├── name_loc: (22,8)-(22,10) = "_a"
- │ │ │ │ ├── operator_loc: (22,11)-(22,12) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (22,13)-(22,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ OptionalParameterNode (location: (22,16)-(22,22))
- │ │ │ ├── flags: repeated_parameter
- │ │ │ ├── name: :_a
- │ │ │ ├── name_loc: (22,16)-(22,18) = "_a"
- │ │ │ ├── operator_loc: (22,19)-(22,20) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (22,21)-(22,22))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:_a]
- │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (22,7)-(22,8) = "("
- │ ├── rparen_loc: (22,22)-(22,23) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (23,0)-(23,3) = "end"
- ├── @ DefNode (location: (25,0)-(26,3))
- │ ├── name: :foo
- │ ├── name_loc: (25,4)-(25,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (25,8)-(25,16))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ RequiredKeywordParameterNode (location: (25,8)-(25,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :_a
- │ │ │ │ └── name_loc: (25,8)-(25,11) = "_a:"
- │ │ │ └── @ RequiredKeywordParameterNode (location: (25,13)-(25,16))
- │ │ │ ├── flags: repeated_parameter
- │ │ │ ├── name: :_a
- │ │ │ └── name_loc: (25,13)-(25,16) = "_a:"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:_a]
- │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (25,7)-(25,8) = "("
- │ ├── rparen_loc: (25,16)-(25,17) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (26,0)-(26,3) = "end"
- ├── @ DefNode (location: (28,0)-(29,3))
- │ ├── name: :foo
- │ ├── name_loc: (28,4)-(28,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (28,8)-(28,20))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ OptionalKeywordParameterNode (location: (28,8)-(28,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :_a
- │ │ │ │ ├── name_loc: (28,8)-(28,11) = "_a:"
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (28,12)-(28,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ OptionalKeywordParameterNode (location: (28,15)-(28,20))
- │ │ │ ├── flags: repeated_parameter
- │ │ │ ├── name: :_a
- │ │ │ ├── name_loc: (28,15)-(28,18) = "_a:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (28,19)-(28,20))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:_a]
- │ ├── def_keyword_loc: (28,0)-(28,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (28,7)-(28,8) = "("
- │ ├── rparen_loc: (28,20)-(28,21) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (29,0)-(29,3) = "end"
- ├── @ DefNode (location: (31,0)-(32,3))
- │ ├── name: :foo
- │ ├── name_loc: (31,4)-(31,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (31,8)-(31,16))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (31,8)-(31,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :_a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (31,12)-(31,16))
- │ │ │ ├── flags: repeated_parameter
- │ │ │ ├── name: :_a
- │ │ │ ├── name_loc: (31,14)-(31,16) = "_a"
- │ │ │ └── operator_loc: (31,12)-(31,14) = "**"
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:_a]
- │ ├── def_keyword_loc: (31,0)-(31,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (31,7)-(31,8) = "("
- │ ├── rparen_loc: (31,16)-(31,17) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (32,0)-(32,3) = "end"
- ├── @ DefNode (location: (34,0)-(35,3))
- │ ├── name: :foo
- │ ├── name_loc: (34,4)-(34,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (34,8)-(34,15))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (34,8)-(34,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :_a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (34,12)-(34,15))
- │ │ ├── flags: repeated_parameter
- │ │ ├── name: :_a
- │ │ ├── name_loc: (34,13)-(34,15) = "_a"
- │ │ └── operator_loc: (34,12)-(34,13) = "&"
- │ ├── body: ∅
- │ ├── locals: [:_a]
- │ ├── def_keyword_loc: (34,0)-(34,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (34,7)-(34,8) = "("
- │ ├── rparen_loc: (34,15)-(34,16) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (35,0)-(35,3) = "end"
- └── @ DefNode (location: (37,0)-(38,3))
- ├── name: :foo
- ├── name_loc: (37,4)-(37,7) = "foo"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (37,8)-(37,15))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (37,8)-(37,10))
- │ │ ├── flags: ∅
- │ │ └── name: :_a
- │ ├── optionals: (length: 0)
- │ ├── rest:
- │ │ @ RestParameterNode (location: (37,12)-(37,15))
- │ │ ├── flags: repeated_parameter
- │ │ ├── name: :_a
- │ │ ├── name_loc: (37,13)-(37,15) = "_a"
- │ │ └── operator_loc: (37,12)-(37,13) = "*"
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:_a]
- ├── def_keyword_loc: (37,0)-(37,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (37,7)-(37,8) = "("
- ├── rparen_loc: (37,15)-(37,16) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (38,0)-(38,3) = "end"
diff --git a/test/prism/snapshots/rescue.txt b/test/prism/snapshots/rescue.txt
deleted file mode 100644
index 390b08ae0e..0000000000
--- a/test/prism/snapshots/rescue.txt
+++ /dev/null
@@ -1,528 +0,0 @@
-@ ProgramNode (location: (1,0)-(35,18))
-├── locals: [:a, :z]
-└── statements:
- @ StatementsNode (location: (1,0)-(35,18))
- └── body: (length: 14)
- ├── @ RescueModifierNode (location: (1,0)-(1,14))
- │ ├── expression:
- │ │ @ CallNode (location: (1,0)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,4)-(1,10) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (1,11)-(1,14))
- ├── @ RescueModifierNode (location: (3,0)-(4,3))
- │ ├── expression:
- │ │ @ CallNode (location: (3,0)-(3,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (3,0)-(3,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (3,4)-(3,10) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (4,0)-(4,3))
- ├── @ CallNode (location: (6,0)-(6,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (6,0)-(6,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (6,4)-(6,24))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (6,6)-(6,22))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (6,6)-(6,22))
- │ │ ├── expression:
- │ │ │ @ BreakNode (location: (6,6)-(6,11))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (6,6)-(6,11) = "break"
- │ │ ├── keyword_loc: (6,12)-(6,18) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ NilNode (location: (6,19)-(6,22))
- │ ├── opening_loc: (6,4)-(6,5) = "{"
- │ └── closing_loc: (6,23)-(6,24) = "}"
- ├── @ CallNode (location: (8,0)-(8,23))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (8,0)-(8,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (8,4)-(8,23))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (8,6)-(8,21))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (8,6)-(8,21))
- │ │ ├── expression:
- │ │ │ @ NextNode (location: (8,6)-(8,10))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (8,6)-(8,10) = "next"
- │ │ ├── keyword_loc: (8,11)-(8,17) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ NilNode (location: (8,18)-(8,21))
- │ ├── opening_loc: (8,4)-(8,5) = "{"
- │ └── closing_loc: (8,22)-(8,23) = "}"
- ├── @ RescueModifierNode (location: (10,0)-(10,17))
- │ ├── expression:
- │ │ @ ReturnNode (location: (10,0)-(10,6))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (10,0)-(10,6) = "return"
- │ │ └── arguments: ∅
- │ ├── keyword_loc: (10,7)-(10,13) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (10,14)-(10,17))
- ├── @ RescueModifierNode (location: (12,0)-(12,19))
- │ ├── expression:
- │ │ @ CallNode (location: (12,0)-(12,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (12,0)-(12,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (12,4)-(12,10) = "rescue"
- │ └── rescue_expression:
- │ @ OrNode (location: (12,11)-(12,19))
- │ ├── left:
- │ │ @ NilNode (location: (12,11)-(12,14))
- │ ├── right:
- │ │ @ IntegerNode (location: (12,18)-(12,19))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (12,15)-(12,17) = "||"
- ├── @ RescueModifierNode (location: (14,0)-(14,22))
- │ ├── expression:
- │ │ @ CallNode (location: (14,0)-(14,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (14,0)-(14,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (14,4)-(14,10) = "rescue"
- │ └── rescue_expression:
- │ @ IfNode (location: (14,11)-(14,22))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ NilNode (location: (14,11)-(14,14))
- │ ├── then_keyword_loc: (14,15)-(14,16) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (14,17)-(14,18))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (14,17)-(14,18))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── consequent:
- │ │ @ ElseNode (location: (14,19)-(14,22))
- │ │ ├── else_keyword_loc: (14,19)-(14,20) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (14,21)-(14,22))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (14,21)-(14,22))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- ├── @ BeginNode (location: (16,0)-(16,24))
- │ ├── begin_keyword_loc: (16,0)-(16,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (16,7)-(16,8))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (16,7)-(16,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (16,7)-(16,8) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (16,10)-(16,19))
- │ │ ├── keyword_loc: (16,10)-(16,16) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ SplatNode (location: (16,17)-(16,19))
- │ │ │ ├── operator_loc: (16,17)-(16,18) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (16,18)-(16,19))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (16,18)-(16,19) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (16,21)-(16,24) = "end"
- ├── @ CallNode (location: (18,0)-(20,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (18,0)-(18,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (18,4)-(20,3))
- │ ├── locals: [:x]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (18,7)-(18,10))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (18,8)-(18,9))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (18,8)-(18,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :x
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (18,7)-(18,8) = "|"
- │ │ └── closing_loc: (18,9)-(18,10) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (19,2)-(19,40))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (19,2)-(19,40))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (19,2)-(19,8))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (19,2)-(19,5) = "bar"
- │ │ │ ├── opening_loc: (19,5)-(19,6) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (19,6)-(19,7))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :y
- │ │ │ │ ├── message_loc: (19,6)-(19,7) = "y"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: (19,7)-(19,8) = ")"
- │ │ │ └── block: ∅
- │ │ ├── keyword_loc: (19,9)-(19,15) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ CallNode (location: (19,16)-(19,40))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :ArgumentError
- │ │ ├── message_loc: (19,16)-(19,29) = "ArgumentError"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (19,30)-(19,40))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (19,30)-(19,40))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :fail
- │ │ │ ├── message_loc: (19,30)-(19,34) = "fail"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (19,35)-(19,40))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ StringNode (location: (19,35)-(19,40))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (19,35)-(19,36) = "\""
- │ │ │ │ ├── content_loc: (19,36)-(19,39) = "baz"
- │ │ │ │ ├── closing_loc: (19,39)-(19,40) = "\""
- │ │ │ │ └── unescaped: "baz"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (18,4)-(18,6) = "do"
- │ └── closing_loc: (20,0)-(20,3) = "end"
- ├── @ IfNode (location: (22,0)-(24,3))
- │ ├── if_keyword_loc: (22,0)-(22,2) = "if"
- │ ├── predicate:
- │ │ @ LocalVariableWriteNode (location: (22,3)-(22,21))
- │ │ ├── name: :a
- │ │ ├── depth: 0
- │ │ ├── name_loc: (22,3)-(22,4) = "a"
- │ │ ├── value:
- │ │ │ @ RescueModifierNode (location: (22,7)-(22,21))
- │ │ │ ├── expression:
- │ │ │ │ @ CallNode (location: (22,7)-(22,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (22,7)-(22,10) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── keyword_loc: (22,11)-(22,17) = "rescue"
- │ │ │ └── rescue_expression:
- │ │ │ @ NilNode (location: (22,18)-(22,21))
- │ │ └── operator_loc: (22,5)-(22,6) = "="
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (23,2)-(23,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (23,2)-(23,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (23,2)-(23,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (24,0)-(24,3) = "end"
- ├── @ DefNode (location: (26,0)-(26,44))
- │ ├── name: :some_method
- │ ├── name_loc: (26,4)-(26,15) = "some_method"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (26,18)-(26,44))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (26,18)-(26,44))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (26,18)-(26,33))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :other_method
- │ │ │ ├── message_loc: (26,18)-(26,30) = "other_method"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (26,31)-(26,33))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (26,31)-(26,33))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_loc: (26,34)-(26,40) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ NilNode (location: (26,41)-(26,44))
- │ ├── locals: []
- │ ├── def_keyword_loc: (26,0)-(26,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: (26,16)-(26,17) = "="
- │ └── end_keyword_loc: ∅
- ├── @ DefNode (location: (28,0)-(31,3))
- │ ├── name: :a
- │ ├── name_loc: (28,4)-(28,5) = "a"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (28,0)-(31,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (29,2)-(29,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (29,2)-(29,6))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (29,2)-(29,3) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (29,4)-(29,6))
- │ │ │ │ ├── flags: contains_keywords
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ KeywordHashNode (location: (29,4)-(29,6))
- │ │ │ │ ├── flags: symbol_keys
- │ │ │ │ └── elements: (length: 1)
- │ │ │ │ └── @ AssocNode (location: (29,4)-(29,6))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (29,4)-(29,6))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (29,4)-(29,5) = "b"
- │ │ │ │ │ ├── closing_loc: (29,5)-(29,6) = ":"
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ ImplicitNode (location: (29,4)-(29,6))
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ CallNode (location: (29,4)-(29,6))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ ├── message_loc: (29,4)-(29,5) = "b"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── operator_loc: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (30,0)-(30,6))
- │ │ │ ├── keyword_loc: (30,0)-(30,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (28,0)-(28,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- ├── @ RescueModifierNode (location: (33,0)-(33,21))
- │ ├── expression:
- │ │ @ IfNode (location: (33,0)-(33,10))
- │ │ ├── if_keyword_loc: (33,4)-(33,6) = "if"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (33,7)-(33,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (33,7)-(33,10) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (33,0)-(33,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (33,0)-(33,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (33,0)-(33,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── keyword_loc: (33,11)-(33,17) = "rescue"
- │ └── rescue_expression:
- │ @ CallNode (location: (33,18)-(33,21))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :baz
- │ ├── message_loc: (33,18)-(33,21) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ LocalVariableWriteNode (location: (35,0)-(35,18))
- ├── name: :z
- ├── depth: 0
- ├── name_loc: (35,0)-(35,1) = "z"
- ├── value:
- │ @ RescueModifierNode (location: (35,4)-(35,18))
- │ ├── expression:
- │ │ @ CallNode (location: (35,4)-(35,7))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :x
- │ │ ├── message_loc: (35,4)-(35,5) = "x"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (35,6)-(35,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (35,6)-(35,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :y
- │ │ │ ├── message_loc: (35,6)-(35,7) = "y"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (35,8)-(35,14) = "rescue"
- │ └── rescue_expression:
- │ @ CallNode (location: (35,15)-(35,18))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (35,15)-(35,16) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (35,17)-(35,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (35,17)-(35,18))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (35,17)-(35,18) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── operator_loc: (35,2)-(35,3) = "="
diff --git a/test/prism/snapshots/return.txt b/test/prism/snapshots/return.txt
deleted file mode 100644
index 0dd26281c1..0000000000
--- a/test/prism/snapshots/return.txt
+++ /dev/null
@@ -1,165 +0,0 @@
-@ ProgramNode (location: (1,0)-(23,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(23,9))
- └── body: (length: 10)
- ├── @ ReturnNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── keyword_loc: (1,0)-(1,6) = "return"
- │ └── arguments: ∅
- ├── @ ReturnNode (location: (3,0)-(3,20))
- │ ├── flags: ∅
- │ ├── keyword_loc: (3,0)-(3,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (3,7)-(3,20))
- │ ├── flags: ∅
- │ └── arguments: (length: 3)
- │ ├── @ ParenthesesNode (location: (3,7)-(3,10))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (3,8)-(3,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (3,8)-(3,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── opening_loc: (3,7)-(3,8) = "("
- │ │ └── closing_loc: (3,9)-(3,10) = ")"
- │ ├── @ ParenthesesNode (location: (3,12)-(3,15))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (3,13)-(3,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (3,13)-(3,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: (3,12)-(3,13) = "("
- │ │ └── closing_loc: (3,14)-(3,15) = ")"
- │ └── @ ParenthesesNode (location: (3,17)-(3,20))
- │ ├── body:
- │ │ @ StatementsNode (location: (3,18)-(3,19))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (3,18)-(3,19))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── opening_loc: (3,17)-(3,18) = "("
- │ └── closing_loc: (3,19)-(3,20) = ")"
- ├── @ ReturnNode (location: (5,0)-(5,9))
- │ ├── flags: ∅
- │ ├── keyword_loc: (5,0)-(5,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (5,7)-(5,9))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ SplatNode (location: (5,7)-(5,9))
- │ ├── operator_loc: (5,7)-(5,8) = "*"
- │ └── expression:
- │ @ IntegerNode (location: (5,8)-(5,9))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ReturnNode (location: (7,0)-(7,8))
- │ ├── flags: ∅
- │ ├── keyword_loc: (7,0)-(7,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (7,7)-(7,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (7,7)-(7,8))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ReturnNode (location: (9,0)-(10,1))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,0)-(9,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (9,7)-(10,1))
- │ ├── flags: ∅
- │ └── arguments: (length: 3)
- │ ├── @ IntegerNode (location: (9,7)-(9,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── @ IntegerNode (location: (9,10)-(9,11))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── @ IntegerNode (location: (10,0)-(10,1))
- │ ├── flags: decimal
- │ └── value: 3
- ├── @ ReturnNode (location: (12,0)-(12,14))
- │ ├── flags: ∅
- │ ├── keyword_loc: (12,0)-(12,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (12,7)-(12,14))
- │ ├── flags: ∅
- │ └── arguments: (length: 3)
- │ ├── @ IntegerNode (location: (12,7)-(12,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── @ IntegerNode (location: (12,10)-(12,11))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── @ IntegerNode (location: (12,13)-(12,14))
- │ ├── flags: decimal
- │ └── value: 3
- ├── @ ReturnNode (location: (14,0)-(14,16))
- │ ├── flags: ∅
- │ ├── keyword_loc: (14,0)-(14,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (14,7)-(14,16))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ArrayNode (location: (14,7)-(14,16))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ IntegerNode (location: (14,8)-(14,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ IntegerNode (location: (14,11)-(14,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── @ IntegerNode (location: (14,14)-(14,15))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── opening_loc: (14,7)-(14,8) = "["
- │ └── closing_loc: (14,15)-(14,16) = "]"
- ├── @ ReturnNode (location: (16,0)-(19,1))
- │ ├── flags: ∅
- │ ├── keyword_loc: (16,0)-(16,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (16,6)-(19,1))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ParenthesesNode (location: (16,6)-(19,1))
- │ ├── body:
- │ │ @ StatementsNode (location: (17,2)-(18,3))
- │ │ └── body: (length: 2)
- │ │ ├── @ IntegerNode (location: (17,2)-(17,3))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (18,2)-(18,3))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (16,6)-(16,7) = "("
- │ └── closing_loc: (19,0)-(19,1) = ")"
- ├── @ ReturnNode (location: (21,0)-(21,8))
- │ ├── flags: ∅
- │ ├── keyword_loc: (21,0)-(21,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (21,6)-(21,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ParenthesesNode (location: (21,6)-(21,8))
- │ ├── body: ∅
- │ ├── opening_loc: (21,6)-(21,7) = "("
- │ └── closing_loc: (21,7)-(21,8) = ")"
- └── @ ReturnNode (location: (23,0)-(23,9))
- ├── flags: ∅
- ├── keyword_loc: (23,0)-(23,6) = "return"
- └── arguments:
- @ ArgumentsNode (location: (23,6)-(23,9))
- ├── flags: ∅
- └── arguments: (length: 1)
- └── @ ParenthesesNode (location: (23,6)-(23,9))
- ├── body:
- │ @ StatementsNode (location: (23,7)-(23,8))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (23,7)-(23,8))
- │ ├── flags: decimal
- │ └── value: 1
- ├── opening_loc: (23,6)-(23,7) = "("
- └── closing_loc: (23,8)-(23,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/BEGIN.txt b/test/prism/snapshots/seattlerb/BEGIN.txt
deleted file mode 100644
index 246f39cbba..0000000000
--- a/test/prism/snapshots/seattlerb/BEGIN.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ PreExecutionNode (location: (1,0)-(1,12))
- ├── statements:
- │ @ StatementsNode (location: (1,8)-(1,10))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,8)-(1,10))
- │ ├── flags: decimal
- │ └── value: 42
- ├── keyword_loc: (1,0)-(1,5) = "BEGIN"
- ├── opening_loc: (1,6)-(1,7) = "{"
- └── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
deleted file mode 100644
index fabc92e477..0000000000
--- a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
+++ /dev/null
@@ -1,361 +0,0 @@
-@ ProgramNode (location: (1,0)-(92,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(92,1))
- └── body: (length: 16)
- ├── @ ArrayNode (location: (1,0)-(4,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (1,0)-(1,3) = "%I["
- │ └── closing_loc: (4,0)-(4,1) = "]"
- ├── @ ArrayNode (location: (6,0)-(9,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (7,0)-(7,5))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (7,0)-(7,5) = "line2"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "line2"
- │ │ └── @ SymbolNode (location: (8,0)-(8,5))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (8,0)-(8,5) = "line3"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "line3"
- │ ├── opening_loc: (6,0)-(6,3) = "%I["
- │ └── closing_loc: (9,0)-(9,1) = "]"
- ├── @ ArrayNode (location: (11,0)-(14,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (11,0)-(11,3) = "%W["
- │ └── closing_loc: (14,0)-(14,1) = "]"
- ├── @ ArrayNode (location: (16,0)-(19,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (17,0)-(17,5))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (17,0)-(17,5) = "line2"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "line2"
- │ │ └── @ StringNode (location: (18,0)-(18,5))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (18,0)-(18,5) = "line3"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "line3"
- │ ├── opening_loc: (16,0)-(16,3) = "%W["
- │ └── closing_loc: (19,0)-(19,1) = "]"
- ├── @ ArrayNode (location: (21,0)-(24,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (21,0)-(21,3) = "%i["
- │ └── closing_loc: (24,0)-(24,1) = "]"
- ├── @ ArrayNode (location: (26,0)-(29,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (27,0)-(27,5))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (27,0)-(27,5) = "line2"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "line2"
- │ │ └── @ SymbolNode (location: (28,0)-(28,5))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (28,0)-(28,5) = "line3"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "line3"
- │ ├── opening_loc: (26,0)-(26,3) = "%i["
- │ └── closing_loc: (29,0)-(29,1) = "]"
- ├── @ RegularExpressionNode (location: (31,0)-(34,1))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (31,0)-(31,3) = "%r["
- │ ├── content_loc: (31,3)-(34,0) = "\n\n\n"
- │ ├── closing_loc: (34,0)-(34,1) = "]"
- │ └── unescaped: "\n\n\n"
- ├── @ ArrayNode (location: (36,0)-(39,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (36,0)-(36,3) = "%w["
- │ └── closing_loc: (39,0)-(39,1) = "]"
- ├── @ ArrayNode (location: (41,0)-(44,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (42,0)-(42,5))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (42,0)-(42,5) = "line2"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "line2"
- │ │ └── @ StringNode (location: (43,0)-(43,5))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (43,0)-(43,5) = "line3"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "line3"
- │ ├── opening_loc: (41,0)-(41,3) = "%w["
- │ └── closing_loc: (44,0)-(44,1) = "]"
- ├── @ ArrayNode (location: (46,0)-(49,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (47,0)-(47,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (47,0)-(47,1) = ":"
- │ │ │ ├── value_loc: (47,1)-(47,6) = "line2"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "line2"
- │ │ └── @ SymbolNode (location: (48,0)-(48,6))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (48,0)-(48,1) = ":"
- │ │ ├── value_loc: (48,1)-(48,6) = "line3"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "line3"
- │ ├── opening_loc: (46,0)-(46,1) = "["
- │ └── closing_loc: (49,0)-(49,1) = "]"
- ├── @ ClassNode (location: (51,0)-(56,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (51,0)-(51,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (51,6)-(51,7))
- │ │ └── name: :X
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (52,2)-(55,5))
- │ │ └── body: (length: 1)
- │ │ └── @ DefNode (location: (52,2)-(55,5))
- │ │ ├── name: :y
- │ │ ├── name_loc: (52,11)-(52,12) = "y"
- │ │ ├── receiver:
- │ │ │ @ SelfNode (location: (52,6)-(52,10))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (52,13)-(53,9))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (52,13)-(52,14))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (53,8)-(53,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (54,4)-(54,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (54,4)-(54,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ LocalVariableReadNode (location: (54,4)-(54,5))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+
- │ │ │ ├── message_loc: (54,6)-(54,7) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (54,8)-(54,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (54,8)-(54,9))
- │ │ │ │ ├── name: :b
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: [:a, :b]
- │ │ ├── def_keyword_loc: (52,2)-(52,5) = "def"
- │ │ ├── operator_loc: (52,10)-(52,11) = "."
- │ │ ├── lparen_loc: (52,12)-(52,13) = "("
- │ │ ├── rparen_loc: (53,9)-(53,10) = ")"
- │ │ ├── equal_loc: ∅
- │ │ └── end_keyword_loc: (55,2)-(55,5) = "end"
- │ ├── end_keyword_loc: (56,0)-(56,3) = "end"
- │ └── name: :X
- ├── @ ClassNode (location: (59,0)-(63,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (59,0)-(59,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (59,6)-(59,7))
- │ │ └── name: :X
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (60,2)-(62,5))
- │ │ └── body: (length: 1)
- │ │ └── @ ClassNode (location: (60,2)-(62,5))
- │ │ ├── locals: []
- │ │ ├── class_keyword_loc: (60,2)-(60,7) = "class"
- │ │ ├── constant_path:
- │ │ │ @ ConstantReadNode (location: (60,8)-(60,9))
- │ │ │ └── name: :Y
- │ │ ├── inheritance_operator_loc: ∅
- │ │ ├── superclass: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (61,4)-(61,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ ConstantWriteNode (location: (61,4)-(61,10))
- │ │ │ ├── name: :Z
- │ │ │ ├── name_loc: (61,4)-(61,5) = "Z"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (61,8)-(61,10))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── operator_loc: (61,6)-(61,7) = "="
- │ │ ├── end_keyword_loc: (62,2)-(62,5) = "end"
- │ │ └── name: :Y
- │ ├── end_keyword_loc: (63,0)-(63,3) = "end"
- │ └── name: :X
- ├── @ ClassNode (location: (66,0)-(71,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (66,0)-(66,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (66,6)-(66,7))
- │ │ └── name: :X
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (67,2)-(70,5))
- │ │ └── body: (length: 1)
- │ │ └── @ DefNode (location: (67,2)-(70,5))
- │ │ ├── name: :y
- │ │ ├── name_loc: (67,6)-(67,7) = "y"
- │ │ ├── receiver: ∅
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (67,8)-(68,9))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (67,8)-(67,9))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (68,8)-(68,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (69,4)-(69,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (69,4)-(69,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ LocalVariableReadNode (location: (69,4)-(69,5))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+
- │ │ │ ├── message_loc: (69,6)-(69,7) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (69,8)-(69,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (69,8)-(69,9))
- │ │ │ │ ├── name: :b
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: [:a, :b]
- │ │ ├── def_keyword_loc: (67,2)-(67,5) = "def"
- │ │ ├── operator_loc: ∅
- │ │ ├── lparen_loc: (67,7)-(67,8) = "("
- │ │ ├── rparen_loc: (68,9)-(68,10) = ")"
- │ │ ├── equal_loc: ∅
- │ │ └── end_keyword_loc: (70,2)-(70,5) = "end"
- │ ├── end_keyword_loc: (71,0)-(71,3) = "end"
- │ └── name: :X
- ├── @ ModuleNode (location: (74,0)-(79,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (74,0)-(74,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (74,7)-(74,8))
- │ │ └── name: :X
- │ ├── body:
- │ │ @ StatementsNode (location: (75,2)-(78,3))
- │ │ └── body: (length: 1)
- │ │ └── @ ConstantWriteNode (location: (75,2)-(78,3))
- │ │ ├── name: :X
- │ │ ├── name_loc: (75,2)-(75,3) = "X"
- │ │ ├── value:
- │ │ │ @ ArrayNode (location: (75,6)-(78,3))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ SymbolNode (location: (76,4)-(76,10))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (76,4)-(76,5) = ":"
- │ │ │ │ │ ├── value_loc: (76,5)-(76,10) = "line3"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "line3"
- │ │ │ │ └── @ SymbolNode (location: (77,4)-(77,10))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (77,4)-(77,5) = ":"
- │ │ │ │ ├── value_loc: (77,5)-(77,10) = "line4"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "line4"
- │ │ │ ├── opening_loc: (75,6)-(75,7) = "["
- │ │ │ └── closing_loc: (78,2)-(78,3) = "]"
- │ │ └── operator_loc: (75,4)-(75,5) = "="
- │ ├── end_keyword_loc: (79,0)-(79,3) = "end"
- │ └── name: :X
- ├── @ ModuleNode (location: (82,0)-(86,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (82,0)-(82,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (82,7)-(82,8))
- │ │ └── name: :X
- │ ├── body:
- │ │ @ StatementsNode (location: (83,2)-(85,5))
- │ │ └── body: (length: 1)
- │ │ └── @ ModuleNode (location: (83,2)-(85,5))
- │ │ ├── locals: []
- │ │ ├── module_keyword_loc: (83,2)-(83,8) = "module"
- │ │ ├── constant_path:
- │ │ │ @ ConstantReadNode (location: (83,9)-(83,10))
- │ │ │ └── name: :Y
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (84,4)-(84,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ ConstantWriteNode (location: (84,4)-(84,10))
- │ │ │ ├── name: :Z
- │ │ │ ├── name_loc: (84,4)-(84,5) = "Z"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (84,8)-(84,10))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── operator_loc: (84,6)-(84,7) = "="
- │ │ ├── end_keyword_loc: (85,2)-(85,5) = "end"
- │ │ └── name: :Y
- │ ├── end_keyword_loc: (86,0)-(86,3) = "end"
- │ └── name: :X
- └── @ CallNode (location: (89,0)-(92,1))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (89,0)-(89,1) = "x"
- ├── opening_loc: (89,1)-(89,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (90,0)-(91,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ SymbolNode (location: (90,0)-(90,6))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (90,0)-(90,1) = ":"
- │ │ ├── value_loc: (90,1)-(90,6) = "line2"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "line2"
- │ └── @ SymbolNode (location: (91,0)-(91,6))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (91,0)-(91,1) = ":"
- │ ├── value_loc: (91,1)-(91,6) = "line3"
- │ ├── closing_loc: ∅
- │ └── unescaped: "line3"
- ├── closing_loc: (92,0)-(92,1) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/__ENCODING__.txt b/test/prism/snapshots/seattlerb/__ENCODING__.txt
deleted file mode 100644
index 1b223bd8fe..0000000000
--- a/test/prism/snapshots/seattlerb/__ENCODING__.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ SourceEncodingNode (location: (1,0)-(1,12))
diff --git a/test/prism/snapshots/seattlerb/alias_gvar_backref.txt b/test/prism/snapshots/seattlerb/alias_gvar_backref.txt
deleted file mode 100644
index a2586423d7..0000000000
--- a/test/prism/snapshots/seattlerb/alias_gvar_backref.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ AliasGlobalVariableNode (location: (1,0)-(1,15))
- ├── new_name:
- │ @ GlobalVariableReadNode (location: (1,6)-(1,12))
- │ └── name: :$MATCH
- ├── old_name:
- │ @ BackReferenceReadNode (location: (1,13)-(1,15))
- │ └── name: :$&
- └── keyword_loc: (1,0)-(1,5) = "alias"
diff --git a/test/prism/snapshots/seattlerb/alias_resword.txt b/test/prism/snapshots/seattlerb/alias_resword.txt
deleted file mode 100644
index 99ed696c68..0000000000
--- a/test/prism/snapshots/seattlerb/alias_resword.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ AliasMethodNode (location: (1,0)-(1,12))
- ├── new_name:
- │ @ SymbolNode (location: (1,6)-(1,8))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (1,6)-(1,8) = "in"
- │ ├── closing_loc: ∅
- │ └── unescaped: "in"
- ├── old_name:
- │ @ SymbolNode (location: (1,9)-(1,12))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (1,9)-(1,12) = "out"
- │ ├── closing_loc: ∅
- │ └── unescaped: "out"
- └── keyword_loc: (1,0)-(1,5) = "alias"
diff --git a/test/prism/snapshots/seattlerb/and_multi.txt b/test/prism/snapshots/seattlerb/and_multi.txt
deleted file mode 100644
index b60b131fd2..0000000000
--- a/test/prism/snapshots/seattlerb/and_multi.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,4))
- └── body: (length: 1)
- └── @ AndNode (location: (1,0)-(3,4))
- ├── left:
- │ @ AndNode (location: (1,0)-(2,9))
- │ ├── left:
- │ │ @ TrueNode (location: (1,0)-(1,4))
- │ ├── right:
- │ │ @ CallNode (location: (2,0)-(2,9))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ FalseNode (location: (2,4)-(2,9))
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :!
- │ │ ├── message_loc: (2,0)-(2,3) = "not"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (1,5)-(1,8) = "and"
- ├── right:
- │ @ TrueNode (location: (3,0)-(3,4))
- └── operator_loc: (2,10)-(2,13) = "and"
diff --git a/test/prism/snapshots/seattlerb/aref_args_assocs.txt b/test/prism/snapshots/seattlerb/aref_args_assocs.txt
deleted file mode 100644
index b729186dc5..0000000000
--- a/test/prism/snapshots/seattlerb/aref_args_assocs.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,8))
- ├── flags: ∅
- ├── elements: (length: 1)
- │ └── @ KeywordHashNode (location: (1,1)-(1,7))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,1)-(1,7))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,1)-(1,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── value:
- │ │ @ IntegerNode (location: (1,6)-(1,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (1,3)-(1,5) = "=>"
- ├── opening_loc: (1,0)-(1,1) = "["
- └── closing_loc: (1,7)-(1,8) = "]"
diff --git a/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt b/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt
deleted file mode 100644
index 0e9454d780..0000000000
--- a/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,11))
- ├── flags: ∅
- ├── elements: (length: 2)
- │ ├── @ IntegerNode (location: (1,1)-(1,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ KeywordHashNode (location: (1,4)-(1,10))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,4)-(1,10))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,4)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── value:
- │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: (1,6)-(1,8) = "=>"
- ├── opening_loc: (1,0)-(1,1) = "["
- └── closing_loc: (1,10)-(1,11) = "]"
diff --git a/test/prism/snapshots/seattlerb/args_kw_block.txt b/test/prism/snapshots/seattlerb/args_kw_block.txt
deleted file mode 100644
index 1ad933c74e..0000000000
--- a/test/prism/snapshots/seattlerb/args_kw_block.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,20))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,14))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
- │ │ ├── flags: ∅
- │ │ ├── name: :a
- │ │ ├── name_loc: (1,6)-(1,8) = "a:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_rest: ∅
- │ └── block:
- │ @ BlockParameterNode (location: (1,12)-(1,14))
- │ ├── flags: ∅
- │ ├── name: :b
- │ ├── name_loc: (1,13)-(1,14) = "b"
- │ └── operator_loc: (1,12)-(1,13) = "&"
- ├── body: ∅
- ├── locals: [:a, :b]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,14)-(1,15) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,17)-(1,20) = "end"
diff --git a/test/prism/snapshots/seattlerb/array_line_breaks.txt b/test/prism/snapshots/seattlerb/array_line_breaks.txt
deleted file mode 100644
index 880fedf933..0000000000
--- a/test/prism/snapshots/seattlerb/array_line_breaks.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,1))
- └── body: (length: 2)
- ├── @ ArrayNode (location: (1,0)-(3,4))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (2,0)-(2,3))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (2,0)-(2,1) = "'"
- │ │ │ ├── content_loc: (2,1)-(2,2) = "a"
- │ │ │ ├── closing_loc: (2,2)-(2,3) = "'"
- │ │ │ └── unescaped: "a"
- │ │ └── @ StringNode (location: (3,0)-(3,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (3,0)-(3,1) = "'"
- │ │ ├── content_loc: (3,1)-(3,2) = "b"
- │ │ ├── closing_loc: (3,2)-(3,3) = "'"
- │ │ └── unescaped: "b"
- │ ├── opening_loc: (1,0)-(1,1) = "["
- │ └── closing_loc: (3,3)-(3,4) = "]"
- └── @ IntegerNode (location: (4,0)-(4,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt b/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt
deleted file mode 100644
index d46a181fc7..0000000000
--- a/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,4))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ArrayNode (location: (1,0)-(1,4))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 0)
- │ │ ├── opening_loc: (1,0)-(1,3) = "%w["
- │ │ └── closing_loc: (1,3)-(1,4) = "]"
- │ ├── call_operator_loc: (1,4)-(1,5) = "."
- │ ├── name: :b
- │ ├── message_loc: (1,5)-(1,6) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (3,0)-(3,4))
- ├── flags: ∅
- ├── receiver:
- │ @ ArrayNode (location: (3,0)-(3,2))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (3,0)-(3,1) = "["
- │ └── closing_loc: (3,1)-(3,2) = "]"
- ├── call_operator_loc: (3,2)-(3,3) = "."
- ├── name: :b
- ├── message_loc: (3,3)-(3,4) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/assoc__bare.txt b/test/prism/snapshots/seattlerb/assoc__bare.txt
deleted file mode 100644
index 28e4f713c5..0000000000
--- a/test/prism/snapshots/seattlerb/assoc__bare.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ HashNode (location: (1,0)-(1,6))
- ├── opening_loc: (1,0)-(1,1) = "{"
- ├── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,4))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,2)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,2)-(1,3) = "y"
- │ │ ├── closing_loc: (1,3)-(1,4) = ":"
- │ │ └── unescaped: "y"
- │ ├── value:
- │ │ @ ImplicitNode (location: (1,2)-(1,4))
- │ │ └── value:
- │ │ @ CallNode (location: (1,2)-(1,4))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :y
- │ │ ├── message_loc: (1,2)-(1,3) = "y"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: ∅
- └── closing_loc: (1,5)-(1,6) = "}"
diff --git a/test/prism/snapshots/seattlerb/assoc_label.txt b/test/prism/snapshots/seattlerb/assoc_label.txt
deleted file mode 100644
index 70490c0da4..0000000000
--- a/test/prism/snapshots/seattlerb/assoc_label.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,5))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,2)-(1,5))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,5))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,2)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,2)-(1,3) = "b"
- │ │ ├── closing_loc: (1,3)-(1,4) = ":"
- │ │ └── unescaped: "b"
- │ ├── value:
- │ │ @ IntegerNode (location: (1,4)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: ∅
- ├── closing_loc: (1,5)-(1,6) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt b/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt
deleted file mode 100644
index 589433eda8..0000000000
--- a/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,8))
- ├── flags: attribute_write
- ├── receiver:
- │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ └── name: :A
- ├── call_operator_loc: (1,1)-(1,3) = "::"
- ├── name: :b=
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,7)-(1,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,7)-(1,8))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt b/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt
deleted file mode 100644
index 9b04ae9656..0000000000
--- a/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: attribute_write
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :[]=
- ├── message_loc: (1,1)-(1,9) = "[[1, 2]]"
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,13))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ ArrayNode (location: (1,2)-(1,8))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (1,3)-(1,4))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: (1,2)-(1,3) = "["
- │ │ └── closing_loc: (1,7)-(1,8) = "]"
- │ └── @ IntegerNode (location: (1,12)-(1,13))
- │ ├── flags: decimal
- │ └── value: 3
- ├── closing_loc: (1,8)-(1,9) = "]"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt b/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt
deleted file mode 100644
index 39544e98da..0000000000
--- a/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,42))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,42))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,42))
- ├── flags: attribute_write
- ├── receiver:
- │ @ ArrayNode (location: (1,0)-(1,12))
- │ ├── flags: ∅
- │ ├── elements: (length: 4)
- │ │ ├── @ IntegerNode (location: (1,1)-(1,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ IntegerNode (location: (1,4)-(1,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── @ IntegerNode (location: (1,7)-(1,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ │ ├── flags: decimal
- │ │ └── value: 4
- │ ├── opening_loc: (1,0)-(1,1) = "["
- │ └── closing_loc: (1,11)-(1,12) = "]"
- ├── call_operator_loc: ∅
- ├── name: :[]=
- ├── message_loc: (1,12)-(1,24) = "[from .. to]"
- ├── opening_loc: (1,12)-(1,13) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,13)-(1,42))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ RangeNode (location: (1,13)-(1,23))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ CallNode (location: (1,13)-(1,17))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :from
- │ │ │ ├── message_loc: (1,13)-(1,17) = "from"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (1,21)-(1,23))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :to
- │ │ │ ├── message_loc: (1,21)-(1,23) = "to"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (1,18)-(1,20) = ".."
- │ └── @ ArrayNode (location: (1,27)-(1,42))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (1,28)-(1,31))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,28)-(1,29) = "\""
- │ │ │ ├── content_loc: (1,29)-(1,30) = "a"
- │ │ │ ├── closing_loc: (1,30)-(1,31) = "\""
- │ │ │ └── unescaped: "a"
- │ │ ├── @ StringNode (location: (1,33)-(1,36))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,33)-(1,34) = "\""
- │ │ │ ├── content_loc: (1,34)-(1,35) = "b"
- │ │ │ ├── closing_loc: (1,35)-(1,36) = "\""
- │ │ │ └── unescaped: "b"
- │ │ └── @ StringNode (location: (1,38)-(1,41))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,38)-(1,39) = "\""
- │ │ ├── content_loc: (1,39)-(1,40) = "c"
- │ │ ├── closing_loc: (1,40)-(1,41) = "\""
- │ │ └── unescaped: "c"
- │ ├── opening_loc: (1,27)-(1,28) = "["
- │ └── closing_loc: (1,41)-(1,42) = "]"
- ├── closing_loc: (1,23)-(1,24) = "]"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt b/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt
deleted file mode 100644
index d4c4fe1070..0000000000
--- a/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: attribute_write
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :B=
- ├── message_loc: (1,2)-(1,3) = "B"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,6)-(1,7))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt b/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt
deleted file mode 100644
index 67c8be034e..0000000000
--- a/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,8))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (1,0)-(1,1) = "x"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ InterpolatedXStringNode (location: (1,2)-(1,8))
- │ ├── opening_loc: (1,2)-(1,3) = "`"
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
- │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,5)-(1,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :y
- │ │ │ ├── message_loc: (1,5)-(1,6) = "y"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (1,6)-(1,7) = "}"
- │ └── closing_loc: (1,7)-(1,8) = "`"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bang_eq.txt b/test/prism/snapshots/seattlerb/bang_eq.txt
deleted file mode 100644
index ec3dd888b2..0000000000
--- a/test/prism/snapshots/seattlerb/bang_eq.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :!=
- ├── message_loc: (1,2)-(1,4) = "!="
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bdot2.txt b/test/prism/snapshots/seattlerb/bdot2.txt
deleted file mode 100644
index d4fb86fbe6..0000000000
--- a/test/prism/snapshots/seattlerb/bdot2.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 3)
- ├── @ RangeNode (location: (1,0)-(1,4))
- │ ├── flags: ∅
- │ ├── left: ∅
- │ ├── right:
- │ │ @ IntegerNode (location: (1,2)-(1,4))
- │ │ ├── flags: decimal
- │ │ └── value: 10
- │ └── operator_loc: (1,0)-(1,2) = ".."
- ├── @ RangeNode (location: (2,2)-(2,5))
- │ ├── flags: ∅
- │ ├── left: ∅
- │ ├── right:
- │ │ @ CallNode (location: (2,4)-(2,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (2,4)-(2,5) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (2,2)-(2,4) = ".."
- └── @ CallNode (location: (3,2)-(3,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (3,2)-(3,3) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bdot3.txt b/test/prism/snapshots/seattlerb/bdot3.txt
deleted file mode 100644
index 0c960f0458..0000000000
--- a/test/prism/snapshots/seattlerb/bdot3.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 3)
- ├── @ RangeNode (location: (1,0)-(1,5))
- │ ├── flags: exclude_end
- │ ├── left: ∅
- │ ├── right:
- │ │ @ IntegerNode (location: (1,3)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 10
- │ └── operator_loc: (1,0)-(1,3) = "..."
- ├── @ RangeNode (location: (2,2)-(2,6))
- │ ├── flags: exclude_end
- │ ├── left: ∅
- │ ├── right:
- │ │ @ CallNode (location: (2,5)-(2,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (2,5)-(2,6) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (2,2)-(2,5) = "..."
- └── @ CallNode (location: (3,2)-(3,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (3,2)-(3,3) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt b/test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt
deleted file mode 100644
index e1698d0bae..0000000000
--- a/test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ BeginNode (location: (1,0)-(3,3))
- ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- ├── statements: ∅
- ├── rescue_clause: ∅
- ├── else_clause: ∅
- ├── ensure_clause:
- │ @ EnsureNode (location: (2,0)-(3,3))
- │ ├── ensure_keyword_loc: (2,0)-(2,6) = "ensure"
- │ ├── statements: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt b/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt
deleted file mode 100644
index 6603e5c894..0000000000
--- a/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(9,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(9,3))
- └── body: (length: 1)
- └── @ BeginNode (location: (1,0)-(9,3))
- ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- ├── statements:
- │ @ StatementsNode (location: (2,2)-(2,3))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (2,2)-(2,3))
- │ ├── flags: decimal
- │ └── value: 1
- ├── rescue_clause:
- │ @ RescueNode (location: (3,0)-(4,3))
- │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ ├── exceptions: (length: 0)
- │ ├── operator_loc: ∅
- │ ├── reference: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (4,2)-(4,3))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (4,2)-(4,3))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── consequent: ∅
- ├── else_clause:
- │ @ ElseNode (location: (5,0)-(7,6))
- │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
- │ ├── statements:
- │ │ @ StatementsNode (location: (6,2)-(6,3))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (6,2)-(6,3))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
- ├── ensure_clause:
- │ @ EnsureNode (location: (7,0)-(9,3))
- │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
- │ ├── statements:
- │ │ @ StatementsNode (location: (8,2)-(8,3))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (8,2)-(8,3))
- │ │ ├── flags: decimal
- │ │ └── value: 4
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- └── end_keyword_loc: (9,0)-(9,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt b/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt
deleted file mode 100644
index 02e1f097ac..0000000000
--- a/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ ProgramNode (location: (1,0)-(9,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(9,3))
- └── body: (length: 1)
- └── @ BeginNode (location: (1,0)-(9,3))
- ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- ├── statements: ∅
- ├── rescue_clause:
- │ @ RescueNode (location: (3,0)-(3,6))
- │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ ├── exceptions: (length: 0)
- │ ├── operator_loc: ∅
- │ ├── reference: ∅
- │ ├── statements: ∅
- │ └── consequent: ∅
- ├── else_clause:
- │ @ ElseNode (location: (5,0)-(7,6))
- │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
- │ ├── statements: ∅
- │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
- ├── ensure_clause:
- │ @ EnsureNode (location: (7,0)-(9,3))
- │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
- │ ├── statements: ∅
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- └── end_keyword_loc: (9,0)-(9,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt b/test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt
deleted file mode 100644
index b36fe5c1fe..0000000000
--- a/test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ BeginNode (location: (1,0)-(4,3))
- ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- ├── statements: ∅
- ├── rescue_clause:
- │ @ RescueNode (location: (2,0)-(2,6))
- │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
- │ ├── exceptions: (length: 0)
- │ ├── operator_loc: ∅
- │ ├── reference: ∅
- │ ├── statements: ∅
- │ └── consequent: ∅
- ├── else_clause: ∅
- ├── ensure_clause:
- │ @ EnsureNode (location: (3,0)-(4,3))
- │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
- │ ├── statements: ∅
- │ └── end_keyword_loc: (4,0)-(4,3) = "end"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_arg__bare.txt b/test/prism/snapshots/seattlerb/block_arg__bare.txt
deleted file mode 100644
index 165c2980be..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg__bare.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,13))
- ├── name: :x
- ├── name_loc: (1,4)-(1,5) = "x"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,7))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block:
- │ @ BlockParameterNode (location: (1,6)-(1,7))
- │ ├── flags: ∅
- │ ├── name: ∅
- │ ├── name_loc: ∅
- │ └── operator_loc: (1,6)-(1,7) = "&"
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,7)-(1,8) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
deleted file mode 100644
index 392de8559b..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,11))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,11))
- ├── locals: [:b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,9))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,8))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,7)-(1,8) = "b"
- │ │ │ └── operator_loc: (1,5)-(1,7) = "**"
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,8)-(1,9) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
deleted file mode 100644
index ee9644d59d..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,21))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,21))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,21))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,21))
- ├── locals: [:b, :c, :d, :e]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,19))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,18))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
- │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,10)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,16)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── name: :e
- │ │ ├── name_loc: (1,17)-(1,18) = "e"
- │ │ └── operator_loc: (1,16)-(1,17) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,18)-(1,19) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,20)-(1,21) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
deleted file mode 100644
index 799bd21057..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,20))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,20))
- ├── locals: [:b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,18))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,17))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
- │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,15)-(1,17))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── name_loc: (1,16)-(1,17) = "d"
- │ │ │ └── operator_loc: (1,15)-(1,16) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,17)-(1,18) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,19)-(1,20) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
deleted file mode 100644
index b5df136a62..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,25))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,25))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,25))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,25))
- ├── locals: [:b, :c, :d, :e, :f]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,23))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,22))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
- │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,10)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── name_loc: (1,14)-(1,15) = "d"
- │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :e
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,20)-(1,22))
- │ │ ├── flags: ∅
- │ │ ├── name: :f
- │ │ ├── name_loc: (1,21)-(1,22) = "f"
- │ │ └── operator_loc: (1,20)-(1,21) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,22)-(1,23) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,24)-(1,25) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_arg_optional.txt b/test/prism/snapshots/seattlerb/block_arg_optional.txt
deleted file mode 100644
index 8a850e9a21..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_optional.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,13))
- ├── locals: [:b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,10))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,10)-(1,11) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_arg_scope.txt b/test/prism/snapshots/seattlerb/block_arg_scope.txt
deleted file mode 100644
index b99cc5e45c..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_scope.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,12))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,12))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,10))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,6))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 1)
- │ │ └── @ BlockLocalVariableNode (location: (1,8)-(1,9))
- │ │ ├── flags: ∅
- │ │ └── name: :c
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,9)-(1,10) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_arg_scope2.txt b/test/prism/snapshots/seattlerb/block_arg_scope2.txt
deleted file mode 100644
index 98b3a7da3a..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_scope2.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,14))
- ├── locals: [:b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,3)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,4)-(1,5))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,4)-(1,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 2)
- │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ └── @ BlockLocalVariableNode (location: (1,10)-(1,11))
- │ │ ├── flags: ∅
- │ │ └── name: :d
- │ ├── opening_loc: (1,3)-(1,4) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt
deleted file mode 100644
index fd5813c983..0000000000
--- a/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,16))
- ├── locals: [:b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,14))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,13))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,8)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,9)-(1,10) = "c"
- │ │ │ └── operator_loc: (1,8)-(1,9) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,13)-(1,14) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,15)-(1,16) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_args_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_kwargs.txt
deleted file mode 100644
index 0975ce3367..0000000000
--- a/test/prism/snapshots/seattlerb/block_args_kwargs.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,23))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,23))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,23))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,23))
- ├── locals: [:kwargs]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,14))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,13))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :kwargs
- │ │ │ ├── name_loc: (1,7)-(1,13) = "kwargs"
- │ │ │ └── operator_loc: (1,5)-(1,7) = "**"
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,13)-(1,14) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,15)-(1,21))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (1,15)-(1,21))
- │ ├── name: :kwargs
- │ └── depth: 0
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,22)-(1,23) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt
deleted file mode 100644
index d47349defb..0000000000
--- a/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,13))
- ├── locals: []
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,10))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ NoKeywordsParameterNode (location: (1,5)-(1,10))
- │ │ │ ├── operator_loc: (1,5)-(1,7) = "**"
- │ │ │ └── keyword_loc: (1,7)-(1,10) = "nil"
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,10)-(1,11) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt1.txt b/test/prism/snapshots/seattlerb/block_args_opt1.txt
deleted file mode 100644
index 1f21c0a477..0000000000
--- a/test/prism/snapshots/seattlerb/block_args_opt1.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,24))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,24))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,24))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,24))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,16)-(1,22))
- │ └── body: (length: 1)
- │ └── @ ArrayNode (location: (1,16)-(1,22))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableReadNode (location: (1,20)-(1,21))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── opening_loc: (1,16)-(1,17) = "["
- │ └── closing_loc: (1,21)-(1,22) = "]"
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,23)-(1,24) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt2.txt b/test/prism/snapshots/seattlerb/block_args_opt2.txt
deleted file mode 100644
index a8d736dde7..0000000000
--- a/test/prism/snapshots/seattlerb/block_args_opt2.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,18))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,18))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,16))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,6)-(1,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 2)
- │ │ │ ├── @ OptionalParameterNode (location: (1,6)-(1,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
- │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ OptionalParameterNode (location: (1,11)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,11)-(1,12) = "c"
- │ │ │ ├── operator_loc: (1,12)-(1,13) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,15)-(1,16) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,17)-(1,18) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt2_2.txt b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
deleted file mode 100644
index 0403851ed7..0000000000
--- a/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,35))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,35))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,35))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,35))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,23))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,22))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 2)
- │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,16)-(1,17) = "c"
- │ │ │ ├── operator_loc: (1,18)-(1,19) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,20)-(1,22))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 24
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,22)-(1,23) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,24)-(1,33))
- │ └── body: (length: 1)
- │ └── @ ArrayNode (location: (1,24)-(1,33))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ LocalVariableReadNode (location: (1,25)-(1,26))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── @ LocalVariableReadNode (location: (1,28)-(1,29))
- │ │ │ ├── name: :b
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableReadNode (location: (1,31)-(1,32))
- │ │ ├── name: :c
- │ │ └── depth: 0
- │ ├── opening_loc: (1,24)-(1,25) = "["
- │ └── closing_loc: (1,32)-(1,33) = "]"
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,34)-(1,35) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt3.txt b/test/prism/snapshots/seattlerb/block_args_opt3.txt
deleted file mode 100644
index ff4495019c..0000000000
--- a/test/prism/snapshots/seattlerb/block_args_opt3.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,42))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,42))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,42))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,42))
- ├── locals: [:a, :b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,27))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,26))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 2)
- │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,16)-(1,17) = "c"
- │ │ │ ├── operator_loc: (1,18)-(1,19) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,20)-(1,22))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 24
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,24)-(1,26))
- │ │ ├── flags: ∅
- │ │ ├── name: :d
- │ │ ├── name_loc: (1,25)-(1,26) = "d"
- │ │ └── operator_loc: (1,24)-(1,25) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,26)-(1,27) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,28)-(1,40))
- │ └── body: (length: 1)
- │ └── @ ArrayNode (location: (1,28)-(1,40))
- │ ├── flags: ∅
- │ ├── elements: (length: 4)
- │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── @ LocalVariableReadNode (location: (1,32)-(1,33))
- │ │ │ ├── name: :b
- │ │ │ └── depth: 0
- │ │ ├── @ LocalVariableReadNode (location: (1,35)-(1,36))
- │ │ │ ├── name: :c
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableReadNode (location: (1,38)-(1,39))
- │ │ ├── name: :d
- │ │ └── depth: 0
- │ ├── opening_loc: (1,28)-(1,29) = "["
- │ └── closing_loc: (1,39)-(1,40) = "]"
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,41)-(1,42) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt b/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt
deleted file mode 100644
index 2e634dc937..0000000000
--- a/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,11))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(3,4))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(3,4))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ DefNode (location: (1,2)-(3,4))
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,6)-(1,7) = "b"
- │ │ ├── receiver: ∅
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (1,8)-(1,9))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (2,1)-(2,2))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,1)-(2,2))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (2,1)-(2,2) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: [:c]
- │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
- │ │ ├── operator_loc: ∅
- │ │ ├── lparen_loc: (1,7)-(1,8) = "("
- │ │ ├── rparen_loc: (1,9)-(1,10) = ")"
- │ │ ├── equal_loc: ∅
- │ │ └── end_keyword_loc: (3,1)-(3,4) = "end"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (4,1)-(4,11))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (4,1)-(4,2))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :e
- │ ├── message_loc: (4,1)-(4,2) = "e"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (4,2)-(4,3) = "."
- ├── name: :f
- ├── message_loc: (4,3)-(4,4) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (4,5)-(4,11))
- ├── locals: []
- ├── parameters: ∅
- ├── body: ∅
- ├── opening_loc: (4,5)-(4,7) = "do"
- └── closing_loc: (4,8)-(4,11) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt b/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt
deleted file mode 100644
index e46104b868..0000000000
--- a/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,31))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,31))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,31))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,1)-(1,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (1,2)-(1,3) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,7))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (1,4)-(1,5) = "c"
- │ │ ├── opening_loc: (1,5)-(1,6) = "("
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: (1,6)-(1,7) = ")"
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,8)-(1,16))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,11)-(1,12))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,11)-(1,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (1,11)-(1,12) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (1,8)-(1,10) = "do"
- │ └── closing_loc: (1,13)-(1,16) = "end"
- ├── call_operator_loc: (1,16)-(1,17) = "."
- ├── name: :e
- ├── message_loc: (1,17)-(1,18) = "e"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,19)-(1,31))
- ├── locals: [:f]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,22)-(1,25))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,23)-(1,24))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,23)-(1,24))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :f
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,22)-(1,23) = "|"
- │ └── closing_loc: (1,24)-(1,25) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,26)-(1,27))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,26)-(1,27))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :g
- │ ├── message_loc: (1,26)-(1,27) = "g"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,19)-(1,21) = "do"
- └── closing_loc: (1,28)-(1,31) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt b/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
deleted file mode 100644
index 05d076f8d6..0000000000
--- a/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
+++ /dev/null
@@ -1,113 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,33))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,33))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,33))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,1)-(1,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (1,2)-(1,3) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,7))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (1,4)-(1,5) = "c"
- │ │ ├── opening_loc: (1,5)-(1,6) = "("
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: (1,6)-(1,7) = ")"
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,8)-(1,16))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,11)-(1,12))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,11)-(1,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (1,11)-(1,12) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (1,8)-(1,10) = "do"
- │ └── closing_loc: (1,13)-(1,16) = "end"
- ├── call_operator_loc: (1,16)-(1,17) = "."
- ├── name: :e
- ├── message_loc: (1,17)-(1,18) = "e"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,19)-(1,20))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,19)-(1,20))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (1,19)-(1,20) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,21)-(1,33))
- ├── locals: [:g]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,24)-(1,27))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,25)-(1,26))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,25)-(1,26))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :g
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,24)-(1,25) = "|"
- │ └── closing_loc: (1,26)-(1,27) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,28)-(1,29))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,28)-(1,29))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :h
- │ ├── message_loc: (1,28)-(1,29) = "h"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,21)-(1,23) = "do"
- └── closing_loc: (1,30)-(1,33) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_call_operation_colon.txt b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
deleted file mode 100644
index 9fd13b0dfc..0000000000
--- a/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,15))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,12))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,1)-(1,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (1,2)-(1,3) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (1,4)-(1,5) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,6)-(1,12))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,6)-(1,8) = "do"
- │ └── closing_loc: (1,9)-(1,12) = "end"
- ├── call_operator_loc: (1,12)-(1,14) = "::"
- ├── name: :d
- ├── message_loc: (1,14)-(1,15) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/block_call_operation_dot.txt b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
deleted file mode 100644
index 43c19d3318..0000000000
--- a/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,12))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,1)-(1,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (1,2)-(1,3) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (1,4)-(1,5) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,6)-(1,12))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,6)-(1,8) = "do"
- │ └── closing_loc: (1,9)-(1,12) = "end"
- ├── call_operator_loc: (1,12)-(1,13) = "."
- ├── name: :d
- ├── message_loc: (1,13)-(1,14) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt b/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt
deleted file mode 100644
index 10c1780d37..0000000000
--- a/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,10))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ParenthesesNode (location: (1,2)-(1,5))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (1,3)-(1,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,3)-(1,4) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "("
- │ │ └── closing_loc: (1,4)-(1,5) = ")"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (2,0)-(2,10))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (2,0)-(2,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (2,0)-(2,1) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (2,1)-(2,2) = "."
- ├── name: :d
- ├── message_loc: (2,2)-(2,3) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (2,4)-(2,10))
- ├── locals: []
- ├── parameters: ∅
- ├── body: ∅
- ├── opening_loc: (2,4)-(2,6) = "do"
- └── closing_loc: (2,7)-(2,10) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_command_operation_colon.txt b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
deleted file mode 100644
index 30fd6dafa0..0000000000
--- a/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,4))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (1,2)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,2)-(1,3) = ":"
- │ │ ├── value_loc: (1,3)-(1,4) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,5)-(1,11))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,5)-(1,7) = "do"
- │ └── closing_loc: (1,8)-(1,11) = "end"
- ├── call_operator_loc: (1,11)-(1,13) = "::"
- ├── name: :c
- ├── message_loc: (1,13)-(1,14) = "c"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,15)-(1,17))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ SymbolNode (location: (1,15)-(1,17))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,15)-(1,16) = ":"
- │ ├── value_loc: (1,16)-(1,17) = "d"
- │ ├── closing_loc: ∅
- │ └── unescaped: "d"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/block_command_operation_dot.txt b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
deleted file mode 100644
index e4f69d3604..0000000000
--- a/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,4))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (1,2)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,2)-(1,3) = ":"
- │ │ ├── value_loc: (1,3)-(1,4) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,5)-(1,11))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,5)-(1,7) = "do"
- │ └── closing_loc: (1,8)-(1,11) = "end"
- ├── call_operator_loc: (1,11)-(1,12) = "."
- ├── name: :c
- ├── message_loc: (1,12)-(1,13) = "c"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,14)-(1,16))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ SymbolNode (location: (1,14)-(1,16))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,14)-(1,15) = ":"
- │ ├── value_loc: (1,15)-(1,16) = "d"
- │ ├── closing_loc: ∅
- │ └── unescaped: "d"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
deleted file mode 100644
index e309ec1f98..0000000000
--- a/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,14))
- ├── locals: [:a]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
- │ │ │ ├── lefts: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,6)-(1,7))
- │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,10)-(1,11) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
deleted file mode 100644
index 8d28fa7e02..0000000000
--- a/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,14))
- ├── locals: [:b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,9)-(1,10))
- │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,10)-(1,11) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
deleted file mode 100644
index 4f4a82acf5..0000000000
--- a/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,18))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,18))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,16))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,15))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,15))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
- │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,14)-(1,15) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,15)-(1,16) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,17)-(1,18) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_splat.txt
deleted file mode 100644
index 09d3440126..0000000000
--- a/test/prism/snapshots/seattlerb/block_decomp_splat.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,12))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,12))
- ├── locals: [:a]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,10))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,9))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,9))
- │ │ │ ├── lefts: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,6)-(1,8))
- │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (1,7)-(1,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,8)-(1,9) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,9)-(1,10) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_kw.txt b/test/prism/snapshots/seattlerb/block_kw.txt
deleted file mode 100644
index f022637dae..0000000000
--- a/test/prism/snapshots/seattlerb/block_kw.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,15))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :blah
- ├── message_loc: (1,0)-(1,4) = "blah"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,5)-(1,15))
- ├── locals: [:k]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,7)-(1,13))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,8)-(1,12))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :k
- │ │ │ ├── name_loc: (1,8)-(1,10) = "k:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,10)-(1,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,7)-(1,8) = "|"
- │ └── closing_loc: (1,12)-(1,13) = "|"
- ├── body: ∅
- ├── opening_loc: (1,5)-(1,6) = "{"
- └── closing_loc: (1,14)-(1,15) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_kw__required.txt b/test/prism/snapshots/seattlerb/block_kw__required.txt
deleted file mode 100644
index 8a49c8bec7..0000000000
--- a/test/prism/snapshots/seattlerb/block_kw__required.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :blah
- ├── message_loc: (1,0)-(1,4) = "blah"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,5)-(1,16))
- ├── locals: [:k]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,8)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,9)-(1,11))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ RequiredKeywordParameterNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :k
- │ │ │ └── name_loc: (1,9)-(1,11) = "k:"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,8)-(1,9) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,5)-(1,7) = "do"
- └── closing_loc: (1,13)-(1,16) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt
deleted file mode 100644
index e77bf90a27..0000000000
--- a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,20))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :bl
- ├── message_loc: (1,0)-(1,2) = "bl"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,3)-(1,20))
- ├── locals: [:kw]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,5)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,6)-(1,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :kw
- │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:"
- │ │ │ └── value:
- │ │ │ @ SymbolNode (location: (1,10)-(1,14))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
- │ │ │ ├── value_loc: (1,11)-(1,14) = "val"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "val"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,5)-(1,6) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,16)-(1,18))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (1,16)-(1,18))
- │ ├── name: :kw
- │ └── depth: 0
- ├── opening_loc: (1,3)-(1,4) = "{"
- └── closing_loc: (1,19)-(1,20) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
deleted file mode 100644
index a527c8c993..0000000000
--- a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,33))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,33))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,33))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :bl
- ├── message_loc: (1,0)-(1,2) = "bl"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,3)-(1,33))
- ├── locals: [:kw, :kw2]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,5)-(1,28))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,6)-(1,26))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ OptionalKeywordParameterNode (location: (1,6)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :kw
- │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:"
- │ │ │ │ └── value:
- │ │ │ │ @ SymbolNode (location: (1,10)-(1,14))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
- │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "val"
- │ │ │ └── @ OptionalKeywordParameterNode (location: (1,16)-(1,26))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :kw2
- │ │ │ ├── name_loc: (1,16)-(1,20) = "kw2:"
- │ │ │ └── value:
- │ │ │ @ SymbolNode (location: (1,21)-(1,26))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,21)-(1,22) = ":"
- │ │ │ ├── value_loc: (1,22)-(1,26) = "val2"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "val2"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,5)-(1,6) = "|"
- │ └── closing_loc: (1,27)-(1,28) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,29)-(1,31))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (1,29)-(1,31))
- │ ├── name: :kw
- │ └── depth: 0
- ├── opening_loc: (1,3)-(1,4) = "{"
- └── closing_loc: (1,32)-(1,33) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_opt_arg.txt b/test/prism/snapshots/seattlerb/block_opt_arg.txt
deleted file mode 100644
index 64dc928f14..0000000000
--- a/test/prism/snapshots/seattlerb/block_opt_arg.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,14))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,11))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
- │ │ │ ├── operator_loc: (1,6)-(1,7) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,7)-(1,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_opt_splat.txt b/test/prism/snapshots/seattlerb/block_opt_splat.txt
deleted file mode 100644
index c18df9c27d..0000000000
--- a/test/prism/snapshots/seattlerb/block_opt_splat.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,13)-(1,14) = "c"
- │ │ │ └── operator_loc: (1,12)-(1,13) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt
deleted file mode 100644
index 3806809d2b..0000000000
--- a/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,22))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,22))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,22))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,22))
- ├── locals: [:b, :c, :d, :e]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,20))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,19))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
- │ │ │ ├── operator_loc: (1,6)-(1,7) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,7)-(1,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,10)-(1,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,11)-(1,12) = "c"
- │ │ │ └── operator_loc: (1,10)-(1,11) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,17)-(1,19))
- │ │ ├── flags: ∅
- │ │ ├── name: :e
- │ │ ├── name_loc: (1,18)-(1,19) = "e"
- │ │ └── operator_loc: (1,17)-(1,18) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,19)-(1,20) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,21)-(1,22) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_optarg.txt b/test/prism/snapshots/seattlerb/block_optarg.txt
deleted file mode 100644
index 5da99aec79..0000000000
--- a/test/prism/snapshots/seattlerb/block_optarg.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,14))
- ├── locals: [:b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,11))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ SymbolNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,9)-(1,10) = ":"
- │ │ │ ├── value_loc: (1,10)-(1,11) = "c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "c"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_paren_splat.txt b/test/prism/snapshots/seattlerb/block_paren_splat.txt
deleted file mode 100644
index ebd937904c..0000000000
--- a/test/prism/snapshots/seattlerb/block_paren_splat.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,15))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,15))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,13))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,12))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,12))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
- │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,11)-(1,12) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,12)-(1,13) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,14)-(1,15) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_reg_optarg.txt b/test/prism/snapshots/seattlerb/block_reg_optarg.txt
deleted file mode 100644
index 53c43603a7..0000000000
--- a/test/prism/snapshots/seattlerb/block_reg_optarg.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
- │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ └── value:
- │ │ │ @ SymbolNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,12)-(1,13) = ":"
- │ │ │ ├── value_loc: (1,13)-(1,14) = "d"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "d"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_return.txt b/test/prism/snapshots/seattlerb/block_return.txt
deleted file mode 100644
index c863b28a22..0000000000
--- a/test/prism/snapshots/seattlerb/block_return.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,27))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,27))
- └── body: (length: 1)
- └── @ ReturnNode (location: (1,0)-(1,27))
- ├── flags: ∅
- ├── keyword_loc: (1,0)-(1,6) = "return"
- └── arguments:
- @ ArgumentsNode (location: (1,7)-(1,27))
- ├── flags: ∅
- └── arguments: (length: 1)
- └── @ CallNode (location: (1,7)-(1,27))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (1,7)-(1,10) = "foo"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,11)-(1,14))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,11)-(1,14))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :arg
- │ ├── message_loc: (1,11)-(1,14) = "arg"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,15)-(1,27))
- ├── locals: [:bar]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,18)-(1,23))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,19)-(1,22))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,19)-(1,22))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,18)-(1,19) = "|"
- │ └── closing_loc: (1,22)-(1,23) = "|"
- ├── body: ∅
- ├── opening_loc: (1,15)-(1,17) = "do"
- └── closing_loc: (1,24)-(1,27) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_scope.txt b/test/prism/snapshots/seattlerb/block_scope.txt
deleted file mode 100644
index a21a28b993..0000000000
--- a/test/prism/snapshots/seattlerb/block_scope.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,10))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,10))
- ├── locals: [:b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,8))
- │ ├── parameters: ∅
- │ ├── locals: (length: 1)
- │ │ └── @ BlockLocalVariableNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :b
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,7)-(1,8) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,9)-(1,10) = "}"
diff --git a/test/prism/snapshots/seattlerb/block_splat_reg.txt b/test/prism/snapshots/seattlerb/block_splat_reg.txt
deleted file mode 100644
index 617ff88622..0000000000
--- a/test/prism/snapshots/seattlerb/block_splat_reg.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,13))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,10))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,5)-(1,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
- │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,10)-(1,11) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug169.txt b/test/prism/snapshots/seattlerb/bug169.txt
deleted file mode 100644
index e4fb47a6de..0000000000
--- a/test/prism/snapshots/seattlerb/bug169.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :m
- ├── message_loc: (1,0)-(1,1) = "m"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,4))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ParenthesesNode (location: (1,2)-(1,4))
- │ ├── body: ∅
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ └── closing_loc: (1,3)-(1,4) = ")"
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,5)-(1,7))
- ├── locals: []
- ├── parameters: ∅
- ├── body: ∅
- ├── opening_loc: (1,5)-(1,6) = "{"
- └── closing_loc: (1,6)-(1,7) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug179.txt b/test/prism/snapshots/seattlerb/bug179.txt
deleted file mode 100644
index d7695bc7a7..0000000000
--- a/test/prism/snapshots/seattlerb/bug179.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,9))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :p
- ├── message_loc: (1,0)-(1,1) = "p"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,9))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ RangeNode (location: (1,2)-(1,9))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ ParenthesesNode (location: (1,2)-(1,4))
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "("
- │ │ └── closing_loc: (1,3)-(1,4) = ")"
- │ ├── right:
- │ │ @ NilNode (location: (1,6)-(1,9))
- │ └── operator_loc: (1,4)-(1,6) = ".."
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug190.txt b/test/prism/snapshots/seattlerb/bug190.txt
deleted file mode 100644
index b261a166cf..0000000000
--- a/test/prism/snapshots/seattlerb/bug190.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ RegularExpressionNode (location: (1,0)-(1,6))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (1,0)-(1,3) = "%r'"
- ├── content_loc: (1,3)-(1,5) = "\\'"
- ├── closing_loc: (1,5)-(1,6) = "'"
- └── unescaped: "'"
diff --git a/test/prism/snapshots/seattlerb/bug191.txt b/test/prism/snapshots/seattlerb/bug191.txt
deleted file mode 100644
index 69835ab1d0..0000000000
--- a/test/prism/snapshots/seattlerb/bug191.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,9))
- └── body: (length: 2)
- ├── @ IfNode (location: (1,0)-(1,9))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (1,2)-(1,3) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,4)-(1,6))
- │ │ └── body: (length: 1)
- │ │ └── @ StringNode (location: (1,4)-(1,6))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,4)-(1,5) = "\""
- │ │ ├── content_loc: (1,5)-(1,5) = ""
- │ │ ├── closing_loc: (1,5)-(1,6) = "\""
- │ │ └── unescaped: ""
- │ ├── consequent:
- │ │ @ ElseNode (location: (1,6)-(1,9))
- │ │ ├── else_keyword_loc: (1,6)-(1,7) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,8)-(1,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,8)-(1,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,8)-(1,9) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- └── @ IfNode (location: (3,0)-(3,9))
- ├── if_keyword_loc: ∅
- ├── predicate:
- │ @ CallNode (location: (3,0)-(3,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (3,0)-(3,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: (3,2)-(3,3) = "?"
- ├── statements:
- │ @ StatementsNode (location: (3,4)-(3,6))
- │ └── body: (length: 1)
- │ └── @ StringNode (location: (3,4)-(3,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (3,4)-(3,5) = "'"
- │ ├── content_loc: (3,5)-(3,5) = ""
- │ ├── closing_loc: (3,5)-(3,6) = "'"
- │ └── unescaped: ""
- ├── consequent:
- │ @ ElseNode (location: (3,6)-(3,9))
- │ ├── else_keyword_loc: (3,6)-(3,7) = ":"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,8)-(3,9))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (3,8)-(3,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (3,8)-(3,9) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── end_keyword_loc: ∅
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/bug202.txt b/test/prism/snapshots/seattlerb/bug202.txt
deleted file mode 100644
index 377b53727e..0000000000
--- a/test/prism/snapshots/seattlerb/bug202.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,10))
-├── locals: [:测试]
-└── statements:
- @ StatementsNode (location: (1,0)-(2,10))
- └── body: (length: 2)
- ├── @ GlobalVariableWriteNode (location: (1,0)-(1,11))
- │ ├── name: :$测试
- │ ├── name_loc: (1,0)-(1,7) = "$测试"
- │ ├── value:
- │ │ @ IntegerNode (location: (1,10)-(1,11))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (1,8)-(1,9) = "="
- └── @ LocalVariableWriteNode (location: (2,0)-(2,10))
- ├── name: :测试
- ├── depth: 0
- ├── name_loc: (2,0)-(2,6) = "测试"
- ├── value:
- │ @ IntegerNode (location: (2,9)-(2,10))
- │ ├── flags: decimal
- │ └── value: 1
- └── operator_loc: (2,7)-(2,8) = "="
diff --git a/test/prism/snapshots/seattlerb/bug236.txt b/test/prism/snapshots/seattlerb/bug236.txt
deleted file mode 100644
index 203a39a793..0000000000
--- a/test/prism/snapshots/seattlerb/bug236.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,6))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :x
- │ ├── message_loc: (1,0)-(1,1) = "x"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,1)-(1,7))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (1,2)-(1,6))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (1,3)-(1,5))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ ImplicitRestNode (location: (1,4)-(1,5))
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (1,2)-(1,3) = "|"
- │ │ └── closing_loc: (1,5)-(1,6) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (1,1)-(1,2) = "{"
- │ └── closing_loc: (1,6)-(1,7) = "}"
- └── @ CallNode (location: (3,0)-(3,6))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (3,0)-(3,1) = "x"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (3,1)-(3,6))
- ├── locals: [:a]
- ├── parameters:
- │ @ BlockParametersNode (location: (3,2)-(3,5))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (3,3)-(3,4))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (3,3)-(3,4))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (3,2)-(3,3) = "|"
- │ └── closing_loc: (3,4)-(3,5) = "|"
- ├── body: ∅
- ├── opening_loc: (3,1)-(3,2) = "{"
- └── closing_loc: (3,5)-(3,6) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug290.txt b/test/prism/snapshots/seattlerb/bug290.txt
deleted file mode 100644
index 4f1e673c4b..0000000000
--- a/test/prism/snapshots/seattlerb/bug290.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ BeginNode (location: (1,0)-(3,3))
- ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- ├── statements:
- │ @ StatementsNode (location: (2,2)-(2,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (2,2)-(2,5) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── rescue_clause: ∅
- ├── else_clause: ∅
- ├── ensure_clause: ∅
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_187.txt b/test/prism/snapshots/seattlerb/bug_187.txt
deleted file mode 100644
index ae72675e5c..0000000000
--- a/test/prism/snapshots/seattlerb/bug_187.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :private
- ├── message_loc: (1,0)-(1,7) = "private"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,8)-(3,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ DefNode (location: (1,8)-(3,3))
- │ ├── name: :f
- │ ├── name_loc: (1,12)-(1,13) = "f"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (2,0)-(2,10))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,0)-(2,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (2,0)-(2,1) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (2,1)-(2,2) = "."
- │ │ ├── name: :b
- │ │ ├── message_loc: (2,2)-(2,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (2,4)-(2,10))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (2,4)-(2,6) = "do"
- │ │ └── closing_loc: (2,7)-(2,10) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,8)-(1,11) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_215.txt b/test/prism/snapshots/seattlerb/bug_215.txt
deleted file mode 100644
index de7716335e..0000000000
--- a/test/prism/snapshots/seattlerb/bug_215.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ UndefNode (location: (1,0)-(1,13))
- ├── names: (length: 1)
- │ └── @ SymbolNode (location: (1,6)-(1,13))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,6)-(1,9) = "%s("
- │ ├── value_loc: (1,9)-(1,12) = "foo"
- │ ├── closing_loc: (1,12)-(1,13) = ")"
- │ └── unescaped: "foo"
- └── keyword_loc: (1,0)-(1,5) = "undef"
diff --git a/test/prism/snapshots/seattlerb/bug_249.txt b/test/prism/snapshots/seattlerb/bug_249.txt
deleted file mode 100644
index ad61501a07..0000000000
--- a/test/prism/snapshots/seattlerb/bug_249.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,28))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,28))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(4,28))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :mount
- ├── message_loc: (1,0)-(1,5) = "mount"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,6)-(4,28))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 2)
- │ ├── @ CallNode (location: (1,6)-(4,9))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ ParenthesesNode (location: (1,6)-(4,5))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (1,7)-(4,4))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (1,7)-(4,4))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ ConstantReadNode (location: (1,7)-(1,12))
- │ │ │ │ │ └── name: :Class
- │ │ │ │ ├── call_operator_loc: (1,12)-(1,13) = "."
- │ │ │ │ ├── name: :new
- │ │ │ │ ├── message_loc: (1,13)-(1,16) = "new"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block:
- │ │ │ │ @ BlockNode (location: (1,17)-(4,4))
- │ │ │ │ ├── locals: []
- │ │ │ │ ├── parameters: ∅
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (2,0)-(3,3))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ DefNode (location: (2,0)-(3,3))
- │ │ │ │ │ ├── name: :initialize
- │ │ │ │ │ ├── name_loc: (2,4)-(2,14) = "initialize"
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── def_keyword_loc: (2,0)-(2,3) = "def"
- │ │ │ │ │ ├── operator_loc: ∅
- │ │ │ │ │ ├── lparen_loc: ∅
- │ │ │ │ │ ├── rparen_loc: ∅
- │ │ │ │ │ ├── equal_loc: ∅
- │ │ │ │ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- │ │ │ │ ├── opening_loc: (1,17)-(1,19) = "do"
- │ │ │ │ └── closing_loc: (4,1)-(4,4) = "end"
- │ │ │ ├── opening_loc: (1,6)-(1,7) = "("
- │ │ │ └── closing_loc: (4,4)-(4,5) = ")"
- │ │ ├── call_operator_loc: (4,5)-(4,6) = "."
- │ │ ├── name: :new
- │ │ ├── message_loc: (4,6)-(4,9) = "new"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── @ KeywordHashNode (location: (4,11)-(4,28))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (4,11)-(4,28))
- │ ├── key:
- │ │ @ SymbolNode (location: (4,11)-(4,14))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (4,11)-(4,12) = ":"
- │ │ ├── value_loc: (4,12)-(4,14) = "at"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "at"
- │ ├── value:
- │ │ @ StringNode (location: (4,18)-(4,28))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (4,18)-(4,19) = "'"
- │ │ ├── content_loc: (4,19)-(4,27) = "endpoint"
- │ │ ├── closing_loc: (4,27)-(4,28) = "'"
- │ │ └── unescaped: "endpoint"
- │ └── operator_loc: (4,15)-(4,17) = "=>"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_and.txt b/test/prism/snapshots/seattlerb/bug_and.txt
deleted file mode 100644
index 3daf505e5f..0000000000
--- a/test/prism/snapshots/seattlerb/bug_and.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,11))
- └── body: (length: 2)
- ├── @ AndNode (location: (1,0)-(2,4))
- │ ├── left:
- │ │ @ TrueNode (location: (1,0)-(1,4))
- │ ├── right:
- │ │ @ TrueNode (location: (2,0)-(2,4))
- │ └── operator_loc: (1,5)-(1,8) = "and"
- └── @ AndNode (location: (4,0)-(4,11))
- ├── left:
- │ @ TrueNode (location: (4,0)-(4,4))
- ├── right:
- │ @ ArrayNode (location: (4,9)-(4,11))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (4,9)-(4,10) = "["
- │ └── closing_loc: (4,10)-(4,11) = "]"
- └── operator_loc: (4,5)-(4,8) = "and"
diff --git a/test/prism/snapshots/seattlerb/bug_args__19.txt b/test/prism/snapshots/seattlerb/bug_args__19.txt
deleted file mode 100644
index f451bd0172..0000000000
--- a/test/prism/snapshots/seattlerb/bug_args__19.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,16))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,10)-(1,11) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body:
- │ @ StatementsNode (location: (1,13)-(1,14))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,13)-(1,14))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :d
- │ ├── message_loc: (1,13)-(1,14) = "d"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,15)-(1,16) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn.txt b/test/prism/snapshots/seattlerb/bug_args_masgn.txt
deleted file mode 100644
index 297979c182..0000000000
--- a/test/prism/snapshots/seattlerb/bug_args_masgn.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,11))
- │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :a
- │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :b
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")"
- │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn2.txt b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
deleted file mode 100644
index 6bec9187b3..0000000000
--- a/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,22))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,22))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,22))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,22))
- ├── locals: [:a, :b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,20))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,19))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,16))
- │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12))
- │ │ │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8))
- │ │ │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ │ │ └── name: :a
- │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
- │ │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ │ └── name: :b
- │ │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "("
- │ │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")"
- │ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :c
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ │ └── rparen_loc: (1,15)-(1,16) = ")"
- │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,19)-(1,20) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,21)-(1,22) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt b/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt
deleted file mode 100644
index 42a060d02a..0000000000
--- a/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,19))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,19))
- ├── locals: [:k, :v, :i]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,17))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,16))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,16))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12))
- │ │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8))
- │ │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ │ └── name: :k
- │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :v
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "("
- │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")"
- │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :i
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,15)-(1,16) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,16)-(1,17) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,18)-(1,19) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
deleted file mode 100644
index 53d6f9220b..0000000000
--- a/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-@ ProgramNode (location: (1,6)-(11,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,6)-(11,9))
- └── body: (length: 3)
- ├── @ DefNode (location: (1,6)-(3,9))
- │ ├── name: :f
- │ ├── name_loc: (1,10)-(1,11) = "f"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (2,8)-(2,17))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,8)-(2,17))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :g
- │ │ ├── message_loc: (2,8)-(2,9) = "g"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (2,10)-(2,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ ParenthesesNode (location: (2,10)-(2,14))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (2,12)-(2,13))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (2,12)-(2,13))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── opening_loc: (2,10)-(2,11) = "("
- │ │ │ │ └── closing_loc: (2,13)-(2,14) = ")"
- │ │ │ └── @ IntegerNode (location: (2,16)-(2,17))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,6)-(1,9) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (3,6)-(3,9) = "end"
- ├── @ DefNode (location: (6,6)-(8,9))
- │ ├── name: :f
- │ ├── name_loc: (6,10)-(6,11) = "f"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (7,8)-(7,16))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (7,8)-(7,16))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :g
- │ │ ├── message_loc: (7,8)-(7,9) = "g"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (7,10)-(7,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ ParenthesesNode (location: (7,10)-(7,13))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (7,11)-(7,12))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (7,11)-(7,12))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── opening_loc: (7,10)-(7,11) = "("
- │ │ │ │ └── closing_loc: (7,12)-(7,13) = ")"
- │ │ │ └── @ IntegerNode (location: (7,15)-(7,16))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (6,6)-(6,9) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (6,11)-(6,12) = "("
- │ ├── rparen_loc: (6,12)-(6,13) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (8,6)-(8,9) = "end"
- └── @ CallNode (location: (11,0)-(11,9))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :g
- ├── message_loc: (11,0)-(11,1) = "g"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (11,2)-(11,9))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ ParenthesesNode (location: (11,2)-(11,6))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (11,4)-(11,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── opening_loc: (11,2)-(11,3) = "("
- │ │ └── closing_loc: (11,5)-(11,6) = ")"
- │ └── @ IntegerNode (location: (11,8)-(11,9))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt b/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt
deleted file mode 100644
index 0cc1ca05e1..0000000000
--- a/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,26))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,26))
- └── body: (length: 1)
- └── @ CaseNode (location: (1,0)-(1,26))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "x"
- │ ├── closing_loc: ∅
- │ └── unescaped: "x"
- ├── conditions: (length: 1)
- │ └── @ WhenNode (location: (1,9)-(1,22))
- │ ├── keyword_loc: (1,9)-(1,13) = "when"
- │ ├── conditions: (length: 1)
- │ │ └── @ RegularExpressionNode (location: (1,14)-(1,17))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,14)-(1,15) = "/"
- │ │ ├── content_loc: (1,15)-(1,16) = "x"
- │ │ ├── closing_loc: (1,16)-(1,17) = "/"
- │ │ └── unescaped: "x"
- │ ├── then_keyword_loc: (1,18)-(1,22) = "then"
- │ └── statements: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (1,23)-(1,26) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_comma.txt b/test/prism/snapshots/seattlerb/bug_comma.txt
deleted file mode 100644
index af886999b5..0000000000
--- a/test/prism/snapshots/seattlerb/bug_comma.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,24))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,24))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(1,24))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ CallNode (location: (1,3)-(1,15))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :test
- │ ├── message_loc: (1,3)-(1,7) = "test"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,8)-(1,15))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (1,8)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,8)-(1,9) = "?"
- │ │ │ ├── content_loc: (1,9)-(1,10) = "d"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "d"
- │ │ └── @ CallNode (location: (1,12)-(1,15))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :dir
- │ │ ├── message_loc: (1,12)-(1,15) = "dir"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: (1,16)-(1,20) = "then"
- ├── statements: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (1,21)-(1,24) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_cond_pct.txt b/test/prism/snapshots/seattlerb/bug_cond_pct.txt
deleted file mode 100644
index cbf3bc3ef0..0000000000
--- a/test/prism/snapshots/seattlerb/bug_cond_pct.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,28))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,28))
- └── body: (length: 1)
- └── @ CaseNode (location: (1,0)-(1,28))
- ├── predicate: ∅
- ├── conditions: (length: 1)
- │ └── @ WhenNode (location: (1,6)-(1,23))
- │ ├── keyword_loc: (1,6)-(1,10) = "when"
- │ ├── conditions: (length: 1)
- │ │ └── @ RegularExpressionNode (location: (1,11)-(1,23))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,11)-(1,14) = "%r%"
- │ │ ├── content_loc: (1,14)-(1,22) = "blahblah"
- │ │ ├── closing_loc: (1,22)-(1,23) = "%"
- │ │ └── unescaped: "blahblah"
- │ ├── then_keyword_loc: ∅
- │ └── statements: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (1,25)-(1,28) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_hash_args.txt b/test/prism/snapshots/seattlerb/bug_hash_args.txt
deleted file mode 100644
index e138db4d49..0000000000
--- a/test/prism/snapshots/seattlerb/bug_hash_args.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,19))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (1,0)-(1,3) = "foo"
- ├── opening_loc: (1,3)-(1,4) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,18))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 2)
- │ ├── @ SymbolNode (location: (1,4)-(1,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,4)-(1,5) = ":"
- │ │ ├── value_loc: (1,5)-(1,8) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ └── @ KeywordHashNode (location: (1,10)-(1,18))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,10)-(1,18))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,10)-(1,14))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,10)-(1,13) = "baz"
- │ │ ├── closing_loc: (1,13)-(1,14) = ":"
- │ │ └── unescaped: "baz"
- │ ├── value:
- │ │ @ NilNode (location: (1,15)-(1,18))
- │ └── operator_loc: ∅
- ├── closing_loc: (1,18)-(1,19) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
deleted file mode 100644
index fe2d7f73c9..0000000000
--- a/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,20))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (1,0)-(1,3) = "foo"
- ├── opening_loc: (1,3)-(1,4) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,18))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 2)
- │ ├── @ SymbolNode (location: (1,4)-(1,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,4)-(1,5) = ":"
- │ │ ├── value_loc: (1,5)-(1,8) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ └── @ KeywordHashNode (location: (1,10)-(1,18))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,10)-(1,18))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,10)-(1,14))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,10)-(1,13) = "baz"
- │ │ ├── closing_loc: (1,13)-(1,14) = ":"
- │ │ └── unescaped: "baz"
- │ ├── value:
- │ │ @ NilNode (location: (1,15)-(1,18))
- │ └── operator_loc: ∅
- ├── closing_loc: (1,19)-(1,20) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt b/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt
deleted file mode 100644
index 433fb02411..0000000000
--- a/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ HashNode (location: (1,0)-(1,13))
- ├── opening_loc: (1,0)-(1,1) = "{"
- ├── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,11))
- │ ├── key:
- │ │ @ InterpolatedSymbolNode (location: (1,2)-(1,8))
- │ │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ │ ├── parts: (length: 1)
- │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,6))
- │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (1,5)-(1,6) = "}"
- │ │ └── closing_loc: (1,6)-(1,8) = "\":"
- │ ├── value:
- │ │ @ ArrayNode (location: (1,9)-(1,11))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 0)
- │ │ ├── opening_loc: (1,9)-(1,10) = "["
- │ │ └── closing_loc: (1,10)-(1,11) = "]"
- │ └── operator_loc: ∅
- └── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug_masgn_right.txt b/test/prism/snapshots/seattlerb/bug_masgn_right.txt
deleted file mode 100644
index b4c75c4607..0000000000
--- a/test/prism/snapshots/seattlerb/bug_masgn_right.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :b
- │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,13)-(1,14) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug_not_parens.txt b/test/prism/snapshots/seattlerb/bug_not_parens.txt
deleted file mode 100644
index 9e4a416d4a..0000000000
--- a/test/prism/snapshots/seattlerb/bug_not_parens.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,4)-(1,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,4)-(1,5) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :!
- ├── message_loc: (1,0)-(1,3) = "not"
- ├── opening_loc: (1,3)-(1,4) = "("
- ├── arguments: ∅
- ├── closing_loc: (1,5)-(1,6) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt b/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt
deleted file mode 100644
index 33016f32f8..0000000000
--- a/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ LocalVariableOrWriteNode (location: (1,0)-(1,18))
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── operator_loc: (1,2)-(1,5) = "||="
- ├── value:
- │ @ RescueModifierNode (location: (1,6)-(1,18))
- │ ├── expression:
- │ │ @ CallNode (location: (1,6)-(1,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,6)-(1,7) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,8)-(1,14) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (1,15)-(1,18))
- ├── name: :a
- └── depth: 0
diff --git a/test/prism/snapshots/seattlerb/call_and.txt b/test/prism/snapshots/seattlerb/call_and.txt
deleted file mode 100644
index d3e88b3f9e..0000000000
--- a/test/prism/snapshots/seattlerb/call_and.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :&
- ├── message_loc: (1,2)-(1,3) = "&"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_arg_assoc.txt b/test/prism/snapshots/seattlerb/call_arg_assoc.txt
deleted file mode 100644
index f489bc7f19..0000000000
--- a/test/prism/snapshots/seattlerb/call_arg_assoc.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,10))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,9))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 2)
- │ ├── @ IntegerNode (location: (1,2)-(1,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ KeywordHashNode (location: (1,5)-(1,9))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,5)-(1,9))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── value:
- │ │ @ IntegerNode (location: (1,8)-(1,9))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: (1,6)-(1,8) = "=>"
- ├── closing_loc: (1,9)-(1,10) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt b/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt
deleted file mode 100644
index 5b191396de..0000000000
--- a/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,15))
- │ ├── flags: contains_keywords, contains_keyword_splat
- │ └── arguments: (length: 2)
- │ ├── @ IntegerNode (location: (1,2)-(1,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ KeywordHashNode (location: (1,5)-(1,15))
- │ ├── flags: ∅
- │ └── elements: (length: 2)
- │ ├── @ AssocNode (location: (1,5)-(1,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (1,5)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (1,5)-(1,7) = "kw"
- │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
- │ │ │ └── unescaped: "kw"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: ∅
- │ └── @ AssocSplatNode (location: (1,12)-(1,15))
- │ ├── value:
- │ │ @ IntegerNode (location: (1,14)-(1,15))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: (1,12)-(1,14) = "**"
- ├── closing_loc: (1,15)-(1,16) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt b/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt
deleted file mode 100644
index f95b80cf7d..0000000000
--- a/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,9))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,8))
- │ ├── flags: contains_keywords, contains_keyword_splat
- │ └── arguments: (length: 2)
- │ ├── @ CallNode (location: (1,2)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,2)-(1,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── @ KeywordHashNode (location: (1,5)-(1,8))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocSplatNode (location: (1,5)-(1,8))
- │ ├── value:
- │ │ @ IntegerNode (location: (1,7)-(1,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (1,5)-(1,7) = "**"
- ├── closing_loc: (1,8)-(1,9) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
deleted file mode 100644
index 8946206a3f..0000000000
--- a/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,8))
- └── body: (length: 3)
- ├── @ CallNode (location: (1,0)-(1,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :x
- │ ├── message_loc: (1,0)-(1,1) = "x"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,11))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (1,2)-(1,11))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (1,2)-(1,11))
- │ │ ├── key:
- │ │ │ @ InterpolatedSymbolNode (location: (1,2)-(1,9))
- │ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ │ │ ├── parts: (length: 1)
- │ │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
- │ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (1,5)-(1,6))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :k
- │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "k"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
- │ │ │ └── closing_loc: (1,7)-(1,9) = "\":"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :x
- │ ├── message_loc: (3,0)-(3,1) = "x"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,2)-(3,8))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (3,2)-(3,8))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (3,2)-(3,8))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (3,2)-(3,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (3,2)-(3,3) = "\""
- │ │ │ ├── value_loc: (3,3)-(3,4) = "k"
- │ │ │ ├── closing_loc: (3,4)-(3,6) = "\":"
- │ │ │ └── unescaped: "k"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (3,6)-(3,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (5,0)-(5,8))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (5,0)-(5,1) = "x"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (5,2)-(5,8))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (5,2)-(5,8))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (5,2)-(5,8))
- │ ├── key:
- │ │ @ SymbolNode (location: (5,2)-(5,6))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,2)-(5,3) = "'"
- │ │ ├── value_loc: (5,3)-(5,4) = "k"
- │ │ ├── closing_loc: (5,4)-(5,6) = "':"
- │ │ └── unescaped: "k"
- │ ├── value:
- │ │ @ IntegerNode (location: (5,6)-(5,8))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ └── operator_loc: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt
deleted file mode 100644
index 0ba5891cf6..0000000000
--- a/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,11))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,9))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 2)
- │ ├── @ IntegerNode (location: (1,2)-(1,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ KeywordHashNode (location: (1,5)-(1,9))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,5)-(1,9))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── value:
- │ │ @ IntegerNode (location: (1,8)-(1,9))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: (1,6)-(1,8) = "=>"
- ├── closing_loc: (1,10)-(1,11) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_args_command.txt b/test/prism/snapshots/seattlerb/call_args_command.txt
deleted file mode 100644
index f4a55ff58c..0000000000
--- a/test/prism/snapshots/seattlerb/call_args_command.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,9))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :b
- ├── message_loc: (1,2)-(1,3) = "b"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,9))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,4)-(1,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,4)-(1,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (1,4)-(1,5) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,5)-(1,6) = "."
- │ ├── name: :d
- │ ├── message_loc: (1,6)-(1,7) = "d"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,8)-(1,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,8)-(1,9))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_array_arg.txt b/test/prism/snapshots/seattlerb/call_array_arg.txt
deleted file mode 100644
index 95d2f4859d..0000000000
--- a/test/prism/snapshots/seattlerb/call_array_arg.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :==
- ├── message_loc: (1,2)-(1,4) = "=="
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,13))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ArrayNode (location: (1,5)-(1,13))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
- │ │ │ ├── value_loc: (1,7)-(1,8) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── @ SymbolNode (location: (1,10)-(1,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,10)-(1,11) = ":"
- │ │ ├── value_loc: (1,11)-(1,12) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── opening_loc: (1,5)-(1,6) = "["
- │ └── closing_loc: (1,12)-(1,13) = "]"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_array_block_call.txt b/test/prism/snapshots/seattlerb/call_array_block_call.txt
deleted file mode 100644
index e02740e7f5..0000000000
--- a/test/prism/snapshots/seattlerb/call_array_block_call.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,19))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,19))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ArrayNode (location: (1,2)-(1,19))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ NilNode (location: (1,4)-(1,7))
- │ │ └── @ CallNode (location: (1,9)-(1,17))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,9)-(1,10) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (1,11)-(1,17))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (1,11)-(1,13) = "do"
- │ │ └── closing_loc: (1,14)-(1,17) = "end"
- │ ├── opening_loc: (1,2)-(1,3) = "["
- │ └── closing_loc: (1,18)-(1,19) = "]"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
deleted file mode 100644
index c6aa722812..0000000000
--- a/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(2,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,11))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ArrayNode (location: (1,2)-(1,11))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ LambdaNode (location: (1,3)-(1,10))
- │ │ ├── locals: []
- │ │ ├── operator_loc: (1,3)-(1,5) = "->"
- │ │ ├── opening_loc: (1,8)-(1,9) = "{"
- │ │ ├── closing_loc: (1,9)-(1,10) = "}"
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (1,5)-(1,7))
- │ │ │ ├── parameters: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
- │ │ │ └── closing_loc: (1,6)-(1,7) = ")"
- │ │ └── body: ∅
- │ ├── opening_loc: (1,2)-(1,3) = "["
- │ └── closing_loc: (1,10)-(1,11) = "]"
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,12)-(2,3))
- ├── locals: []
- ├── parameters: ∅
- ├── body: ∅
- ├── opening_loc: (1,12)-(1,14) = "do"
- └── closing_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt
deleted file mode 100644
index 091e21c00a..0000000000
--- a/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,15))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ArrayNode (location: (1,2)-(1,15))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (1,3)-(1,5))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,3)-(1,4) = ":"
- │ │ │ ├── value_loc: (1,4)-(1,5) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── @ KeywordHashNode (location: (1,7)-(1,14))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (1,7)-(1,14))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (1,7)-(1,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,7)-(1,8) = ":"
- │ │ │ ├── value_loc: (1,8)-(1,9) = "c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "c"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (1,10)-(1,12) = "=>"
- │ ├── opening_loc: (1,2)-(1,3) = "["
- │ └── closing_loc: (1,14)-(1,15) = "]"
- ├── closing_loc: (1,15)-(1,16) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_assoc.txt b/test/prism/snapshots/seattlerb/call_assoc.txt
deleted file mode 100644
index 60784e6095..0000000000
--- a/test/prism/snapshots/seattlerb/call_assoc.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,6))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,2)-(1,6))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,6))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,2)-(1,3))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── value:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: (1,3)-(1,5) = "=>"
- ├── closing_loc: (1,6)-(1,7) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_assoc_new.txt b/test/prism/snapshots/seattlerb/call_assoc_new.txt
deleted file mode 100644
index dc25fb2493..0000000000
--- a/test/prism/snapshots/seattlerb/call_assoc_new.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,5))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,2)-(1,5))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,5))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,2)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,2)-(1,3) = "a"
- │ │ ├── closing_loc: (1,3)-(1,4) = ":"
- │ │ └── unescaped: "a"
- │ ├── value:
- │ │ @ IntegerNode (location: (1,4)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: ∅
- ├── closing_loc: (1,5)-(1,6) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
deleted file mode 100644
index b3d652e879..0000000000
--- a/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,4))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(5,4))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(5,3))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,2)-(5,3))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(5,3))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,2)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,2)-(1,3) = "b"
- │ │ ├── closing_loc: (1,3)-(1,4) = ":"
- │ │ └── unescaped: "b"
- │ ├── value:
- │ │ @ IfNode (location: (1,5)-(5,3))
- │ │ ├── if_keyword_loc: (1,5)-(1,7) = "if"
- │ │ ├── predicate:
- │ │ │ @ SymbolNode (location: (1,8)-(1,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,8)-(1,9) = ":"
- │ │ │ ├── value_loc: (1,9)-(1,10) = "c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "c"
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,0)-(2,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── consequent:
- │ │ │ @ ElseNode (location: (3,0)-(5,3))
- │ │ │ ├── else_keyword_loc: (3,0)-(3,4) = "else"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (4,0)-(4,1))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (4,0)-(4,1))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ └── operator_loc: ∅
- ├── closing_loc: (5,3)-(5,4) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt
deleted file mode 100644
index b2012f0f75..0000000000
--- a/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,8))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,6))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,2)-(1,6))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,6))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,2)-(1,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── value:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (1,3)-(1,5) = "=>"
- ├── closing_loc: (1,7)-(1,8) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_bang_command_call.txt b/test/prism/snapshots/seattlerb/call_bang_command_call.txt
deleted file mode 100644
index 5e4e10d953..0000000000
--- a/test/prism/snapshots/seattlerb/call_bang_command_call.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,2)-(1,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,2)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,2)-(1,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,3)-(1,4) = "."
- │ ├── name: :b
- │ ├── message_loc: (1,4)-(1,5) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :!
- ├── message_loc: (1,0)-(1,1) = "!"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_bang_squiggle.txt b/test/prism/snapshots/seattlerb/call_bang_squiggle.txt
deleted file mode 100644
index bf11bc0136..0000000000
--- a/test/prism/snapshots/seattlerb/call_bang_squiggle.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :!~
- ├── message_loc: (1,2)-(1,4) = "!~"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
deleted file mode 100644
index 1aa994c8e6..0000000000
--- a/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(3,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ BeginNode (location: (1,2)-(3,3))
- │ ├── begin_keyword_loc: (1,2)-(1,7) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,0)-(2,10))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,0)-(2,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (2,0)-(2,1) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (2,1)-(2,2) = "."
- │ │ ├── name: :c
- │ │ ├── message_loc: (2,2)-(2,3) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (2,4)-(2,10))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (2,4)-(2,6) = "do"
- │ │ └── closing_loc: (2,7)-(2,10) = "end"
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_block_arg_named.txt b/test/prism/snapshots/seattlerb/call_block_arg_named.txt
deleted file mode 100644
index f87c29cf2e..0000000000
--- a/test/prism/snapshots/seattlerb/call_block_arg_named.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (1,0)-(1,1) = "x"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments: ∅
- ├── closing_loc: (1,6)-(1,7) = ")"
- └── block:
- @ BlockArgumentNode (location: (1,2)-(1,6))
- ├── expression:
- │ @ CallNode (location: (1,3)-(1,6))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :blk
- │ ├── message_loc: (1,3)-(1,6) = "blk"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── operator_loc: (1,2)-(1,3) = "&"
diff --git a/test/prism/snapshots/seattlerb/call_carat.txt b/test/prism/snapshots/seattlerb/call_carat.txt
deleted file mode 100644
index 856e9a7847..0000000000
--- a/test/prism/snapshots/seattlerb/call_carat.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :^
- ├── message_loc: (1,2)-(1,3) = "^"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_colon2.txt b/test/prism/snapshots/seattlerb/call_colon2.txt
deleted file mode 100644
index 98bfc63126..0000000000
--- a/test/prism/snapshots/seattlerb/call_colon2.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── receiver:
- │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ └── name: :A
- ├── call_operator_loc: (1,1)-(1,3) = "::"
- ├── name: :b
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_colon_parens.txt b/test/prism/snapshots/seattlerb/call_colon_parens.txt
deleted file mode 100644
index 6d10171a2b..0000000000
--- a/test/prism/snapshots/seattlerb/call_colon_parens.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: (1,1)-(1,3) = "::"
- ├── name: :call
- ├── message_loc: ∅
- ├── opening_loc: (1,3)-(1,4) = "("
- ├── arguments: ∅
- ├── closing_loc: (1,4)-(1,5) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_div.txt b/test/prism/snapshots/seattlerb/call_div.txt
deleted file mode 100644
index ba62fb87bd..0000000000
--- a/test/prism/snapshots/seattlerb/call_div.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :/
- ├── message_loc: (1,2)-(1,3) = "/"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_dot_parens.txt b/test/prism/snapshots/seattlerb/call_dot_parens.txt
deleted file mode 100644
index c9b7084699..0000000000
--- a/test/prism/snapshots/seattlerb/call_dot_parens.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :call
- ├── message_loc: ∅
- ├── opening_loc: (1,2)-(1,3) = "("
- ├── arguments: ∅
- ├── closing_loc: (1,3)-(1,4) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_env.txt b/test/prism/snapshots/seattlerb/call_env.txt
deleted file mode 100644
index fd1f95388e..0000000000
--- a/test/prism/snapshots/seattlerb/call_env.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :happy
- ├── message_loc: (1,2)-(1,7) = "happy"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_eq3.txt b/test/prism/snapshots/seattlerb/call_eq3.txt
deleted file mode 100644
index e636e15725..0000000000
--- a/test/prism/snapshots/seattlerb/call_eq3.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :===
- ├── message_loc: (1,2)-(1,5) = "==="
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,6)-(1,7))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_gt.txt b/test/prism/snapshots/seattlerb/call_gt.txt
deleted file mode 100644
index a6f19e5adf..0000000000
--- a/test/prism/snapshots/seattlerb/call_gt.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :>
- ├── message_loc: (1,2)-(1,3) = ">"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_kwsplat.txt b/test/prism/snapshots/seattlerb/call_kwsplat.txt
deleted file mode 100644
index e0620dc5f0..0000000000
--- a/test/prism/snapshots/seattlerb/call_kwsplat.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,5))
- │ ├── flags: contains_keywords, contains_keyword_splat
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,2)-(1,5))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocSplatNode (location: (1,2)-(1,5))
- │ ├── value:
- │ │ @ IntegerNode (location: (1,4)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (1,2)-(1,4) = "**"
- ├── closing_loc: (1,5)-(1,6) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_leading_dots.txt b/test/prism/snapshots/seattlerb/call_leading_dots.txt
deleted file mode 100644
index e8435d7e7a..0000000000
--- a/test/prism/snapshots/seattlerb/call_leading_dots.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,2))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,2))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(2,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (2,0)-(2,1) = "."
- │ ├── name: :b
- │ ├── message_loc: (2,1)-(2,2) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (3,0)-(3,1) = "."
- ├── name: :c
- ├── message_loc: (3,1)-(3,2) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt b/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt
deleted file mode 100644
index e5dfb72372..0000000000
--- a/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,2))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(4,2))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(2,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (2,0)-(2,1) = "."
- │ ├── name: :b
- │ ├── message_loc: (2,1)-(2,2) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (4,0)-(4,1) = "."
- ├── name: :d
- ├── message_loc: (4,1)-(4,2) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_lt.txt b/test/prism/snapshots/seattlerb/call_lt.txt
deleted file mode 100644
index 14f50585d9..0000000000
--- a/test/prism/snapshots/seattlerb/call_lt.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :<
- ├── message_loc: (1,2)-(1,3) = "<"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_lte.txt b/test/prism/snapshots/seattlerb/call_lte.txt
deleted file mode 100644
index 665a99d60a..0000000000
--- a/test/prism/snapshots/seattlerb/call_lte.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :<=
- ├── message_loc: (1,2)-(1,4) = "<="
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_not.txt b/test/prism/snapshots/seattlerb/call_not.txt
deleted file mode 100644
index 86c6892303..0000000000
--- a/test/prism/snapshots/seattlerb/call_not.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,4)-(1,6))
- │ ├── flags: decimal
- │ └── value: 42
- ├── call_operator_loc: ∅
- ├── name: :!
- ├── message_loc: (1,0)-(1,3) = "not"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_pipe.txt b/test/prism/snapshots/seattlerb/call_pipe.txt
deleted file mode 100644
index 855e986ef6..0000000000
--- a/test/prism/snapshots/seattlerb/call_pipe.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :|
- ├── message_loc: (1,2)-(1,3) = "|"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_rshift.txt b/test/prism/snapshots/seattlerb/call_rshift.txt
deleted file mode 100644
index 26e593db18..0000000000
--- a/test/prism/snapshots/seattlerb/call_rshift.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :>>
- ├── message_loc: (1,2)-(1,4) = ">>"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_self_brackets.txt b/test/prism/snapshots/seattlerb/call_self_brackets.txt
deleted file mode 100644
index 16ca69b5c2..0000000000
--- a/test/prism/snapshots/seattlerb/call_self_brackets.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ignore_visibility
- ├── receiver:
- │ @ SelfNode (location: (1,0)-(1,4))
- ├── call_operator_loc: ∅
- ├── name: :[]
- ├── message_loc: (1,4)-(1,7) = "[1]"
- ├── opening_loc: (1,4)-(1,5) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: (1,6)-(1,7) = "]"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_spaceship.txt b/test/prism/snapshots/seattlerb/call_spaceship.txt
deleted file mode 100644
index 8d43c3f971..0000000000
--- a/test/prism/snapshots/seattlerb/call_spaceship.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :<=>
- ├── message_loc: (1,2)-(1,5) = "<=>"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,6)-(1,7))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt b/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt
deleted file mode 100644
index 242db9e9cb..0000000000
--- a/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,22))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,22))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,22))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,13))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LambdaNode (location: (1,2)-(1,13))
- │ ├── locals: []
- │ ├── operator_loc: (1,2)-(1,4) = "->"
- │ ├── opening_loc: (1,5)-(1,7) = "do"
- │ ├── closing_loc: (1,10)-(1,13) = "end"
- │ ├── parameters: ∅
- │ └── body:
- │ @ StatementsNode (location: (1,8)-(1,9))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,8)-(1,9))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,14)-(1,22))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,17)-(1,18))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,17)-(1,18))
- │ ├── flags: decimal
- │ └── value: 2
- ├── opening_loc: (1,14)-(1,16) = "do"
- └── closing_loc: (1,19)-(1,22) = "end"
diff --git a/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
deleted file mode 100644
index 7c3ab8dad8..0000000000
--- a/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,19))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,10))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LambdaNode (location: (1,2)-(1,10))
- │ ├── locals: []
- │ ├── operator_loc: (1,2)-(1,4) = "->"
- │ ├── opening_loc: (1,5)-(1,6) = "{"
- │ ├── closing_loc: (1,9)-(1,10) = "}"
- │ ├── parameters: ∅
- │ └── body:
- │ @ StatementsNode (location: (1,7)-(1,8))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,7)-(1,8))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,11)-(1,19))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,14)-(1,15))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,14)-(1,15))
- │ ├── flags: decimal
- │ └── value: 2
- ├── opening_loc: (1,11)-(1,13) = "do"
- └── closing_loc: (1,16)-(1,19) = "end"
diff --git a/test/prism/snapshots/seattlerb/call_star.txt b/test/prism/snapshots/seattlerb/call_star.txt
deleted file mode 100644
index 49aee1672c..0000000000
--- a/test/prism/snapshots/seattlerb/call_star.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :*
- ├── message_loc: (1,2)-(1,3) = "*"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_star2.txt b/test/prism/snapshots/seattlerb/call_star2.txt
deleted file mode 100644
index cc2532cc7c..0000000000
--- a/test/prism/snapshots/seattlerb/call_star2.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :**
- ├── message_loc: (1,2)-(1,4) = "**"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_trailing_comma.txt
deleted file mode 100644
index fe28a3ad3e..0000000000
--- a/test/prism/snapshots/seattlerb/call_trailing_comma.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,2)-(1,3))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: (1,4)-(1,5) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_trailing_dots.txt b/test/prism/snapshots/seattlerb/call_trailing_dots.txt
deleted file mode 100644
index b0e23eb27b..0000000000
--- a/test/prism/snapshots/seattlerb/call_trailing_dots.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,1))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,1))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(2,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,1)-(1,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (2,0)-(2,1) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (2,1)-(2,2) = "."
- ├── name: :c
- ├── message_loc: (3,0)-(3,1) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/call_unary_bang.txt b/test/prism/snapshots/seattlerb/call_unary_bang.txt
deleted file mode 100644
index 782cc83b10..0000000000
--- a/test/prism/snapshots/seattlerb/call_unary_bang.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,2))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,2))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,1)-(1,2))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :!
- ├── message_loc: (1,0)-(1,1) = "!"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/case_in.txt b/test/prism/snapshots/seattlerb/case_in.txt
deleted file mode 100644
index 950d66647e..0000000000
--- a/test/prism/snapshots/seattlerb/case_in.txt
+++ /dev/null
@@ -1,976 +0,0 @@
-@ ProgramNode (location: (1,0)-(111,3))
-├── locals: [:b, :_, :lhs, :x, :rhs, :c, :e]
-└── statements:
- @ StatementsNode (location: (1,0)-(111,3))
- └── body: (length: 28)
- ├── @ CaseMatchNode (location: (1,0)-(3,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (1,5)-(1,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ │ ├── value_loc: (1,6)-(1,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (2,0)-(2,8))
- │ │ ├── pattern:
- │ │ │ @ HashPatternNode (location: (2,4)-(2,8))
- │ │ │ ├── constant: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ AssocNode (location: (2,4)-(2,8))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,8))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\""
- │ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
- │ │ │ │ │ ├── closing_loc: (2,6)-(2,8) = "\":"
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ ImplicitNode (location: (2,5)-(2,6))
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ LocalVariableTargetNode (location: (2,5)-(2,6))
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── operator_loc: ∅
- │ │ │ ├── rest: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ └── closing_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (2,0)-(2,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ CaseMatchNode (location: (5,0)-(7,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (5,5)-(5,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,5)-(5,6) = ":"
- │ │ ├── value_loc: (5,6)-(5,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (6,0)-(6,10))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (6,3)-(6,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ SymbolNode (location: (6,6)-(6,7))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (6,6)-(6,7) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ └── @ SymbolNode (location: (6,8)-(6,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (6,8)-(6,9) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── opening_loc: (6,3)-(6,6) = "%I["
- │ │ │ └── closing_loc: (6,9)-(6,10) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (6,0)-(6,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (5,0)-(5,4) = "case"
- │ └── end_keyword_loc: (7,0)-(7,3) = "end"
- ├── @ CaseMatchNode (location: (9,0)-(11,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (9,5)-(9,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (9,5)-(9,6) = ":"
- │ │ ├── value_loc: (9,6)-(9,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (10,0)-(10,10))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (10,3)-(10,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (10,6)-(10,7))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (10,6)-(10,7) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ └── @ StringNode (location: (10,8)-(10,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (10,8)-(10,9) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── opening_loc: (10,3)-(10,6) = "%W["
- │ │ │ └── closing_loc: (10,9)-(10,10) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (10,0)-(10,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (9,0)-(9,4) = "case"
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ CaseMatchNode (location: (13,0)-(15,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (13,5)-(13,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (13,5)-(13,6) = ":"
- │ │ ├── value_loc: (13,6)-(13,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (14,0)-(14,10))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (14,3)-(14,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ SymbolNode (location: (14,6)-(14,7))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (14,6)-(14,7) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ └── @ SymbolNode (location: (14,8)-(14,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (14,8)-(14,9) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── opening_loc: (14,3)-(14,6) = "%i["
- │ │ │ └── closing_loc: (14,9)-(14,10) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (14,0)-(14,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (13,0)-(13,4) = "case"
- │ └── end_keyword_loc: (15,0)-(15,3) = "end"
- ├── @ CaseMatchNode (location: (17,0)-(19,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (17,5)-(17,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (17,5)-(17,6) = ":"
- │ │ ├── value_loc: (17,6)-(17,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (18,0)-(18,10))
- │ │ ├── pattern:
- │ │ │ @ ArrayNode (location: (18,3)-(18,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── elements: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (18,6)-(18,7))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (18,6)-(18,7) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ └── @ StringNode (location: (18,8)-(18,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (18,8)-(18,9) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── opening_loc: (18,3)-(18,6) = "%w["
- │ │ │ └── closing_loc: (18,9)-(18,10) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (18,0)-(18,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (17,0)-(17,4) = "case"
- │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- ├── @ CaseMatchNode (location: (21,0)-(23,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (21,5)-(21,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (21,5)-(21,6) = ":"
- │ │ ├── value_loc: (21,6)-(21,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (22,0)-(22,10))
- │ │ ├── pattern:
- │ │ │ @ ParenthesesNode (location: (22,3)-(22,10))
- │ │ │ ├── body:
- │ │ │ │ @ RangeNode (location: (22,4)-(22,9))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left: ∅
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (22,7)-(22,9))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 10
- │ │ │ │ └── operator_loc: (22,4)-(22,7) = "..."
- │ │ │ ├── opening_loc: (22,3)-(22,4) = "("
- │ │ │ └── closing_loc: (22,9)-(22,10) = ")"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (22,0)-(22,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (21,0)-(21,4) = "case"
- │ └── end_keyword_loc: (23,0)-(23,3) = "end"
- ├── @ CaseMatchNode (location: (25,0)-(27,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (25,5)-(25,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (25,5)-(25,6) = ":"
- │ │ ├── value_loc: (25,6)-(25,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (26,0)-(26,9))
- │ │ ├── pattern:
- │ │ │ @ ParenthesesNode (location: (26,3)-(26,9))
- │ │ │ ├── body:
- │ │ │ │ @ RangeNode (location: (26,4)-(26,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── left: ∅
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (26,6)-(26,8))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 10
- │ │ │ │ └── operator_loc: (26,4)-(26,6) = ".."
- │ │ │ ├── opening_loc: (26,3)-(26,4) = "("
- │ │ │ └── closing_loc: (26,8)-(26,9) = ")"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (26,0)-(26,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (25,0)-(25,4) = "case"
- │ └── end_keyword_loc: (27,0)-(27,3) = "end"
- ├── @ CaseMatchNode (location: (29,0)-(31,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (29,5)-(29,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (29,5)-(29,6) = ":"
- │ │ ├── value_loc: (29,6)-(29,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (30,0)-(30,9))
- │ │ ├── pattern:
- │ │ │ @ ParenthesesNode (location: (30,3)-(30,9))
- │ │ │ ├── body:
- │ │ │ │ @ RangeNode (location: (30,4)-(30,8))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left:
- │ │ │ │ │ @ IntegerNode (location: (30,4)-(30,5))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── right: ∅
- │ │ │ │ └── operator_loc: (30,5)-(30,8) = "..."
- │ │ │ ├── opening_loc: (30,3)-(30,4) = "("
- │ │ │ └── closing_loc: (30,8)-(30,9) = ")"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (30,0)-(30,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (29,0)-(29,4) = "case"
- │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- ├── @ CaseMatchNode (location: (33,0)-(35,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (33,5)-(33,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (33,5)-(33,6) = ":"
- │ │ ├── value_loc: (33,6)-(33,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (34,0)-(34,10))
- │ │ ├── pattern:
- │ │ │ @ ParenthesesNode (location: (34,3)-(34,10))
- │ │ │ ├── body:
- │ │ │ │ @ RangeNode (location: (34,4)-(34,9))
- │ │ │ │ ├── flags: exclude_end
- │ │ │ │ ├── left:
- │ │ │ │ │ @ IntegerNode (location: (34,4)-(34,5))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (34,8)-(34,9))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 3
- │ │ │ │ └── operator_loc: (34,5)-(34,8) = "..."
- │ │ │ ├── opening_loc: (34,3)-(34,4) = "("
- │ │ │ └── closing_loc: (34,9)-(34,10) = ")"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (34,0)-(34,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (33,0)-(33,4) = "case"
- │ └── end_keyword_loc: (35,0)-(35,3) = "end"
- ├── @ CaseMatchNode (location: (37,0)-(39,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (37,5)-(37,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (37,5)-(37,6) = ":"
- │ │ ├── value_loc: (37,6)-(37,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (38,0)-(38,7))
- │ │ ├── pattern:
- │ │ │ @ ParenthesesNode (location: (38,3)-(38,7))
- │ │ │ ├── body:
- │ │ │ │ @ IntegerNode (location: (38,4)-(38,6))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ ├── opening_loc: (38,3)-(38,4) = "("
- │ │ │ └── closing_loc: (38,6)-(38,7) = ")"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (38,0)-(38,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (37,0)-(37,4) = "case"
- │ └── end_keyword_loc: (39,0)-(39,3) = "end"
- ├── @ CaseMatchNode (location: (41,0)-(43,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (41,5)-(41,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (41,5)-(41,6) = ":"
- │ │ ├── value_loc: (41,6)-(41,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (42,0)-(42,8))
- │ │ ├── pattern:
- │ │ │ @ HashPatternNode (location: (42,3)-(42,8))
- │ │ │ ├── constant: ∅
- │ │ │ ├── elements: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ NoKeywordsParameterNode (location: (42,3)-(42,8))
- │ │ │ │ ├── operator_loc: (42,3)-(42,5) = "**"
- │ │ │ │ └── keyword_loc: (42,5)-(42,8) = "nil"
- │ │ │ ├── opening_loc: ∅
- │ │ │ └── closing_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (42,0)-(42,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (41,0)-(41,4) = "case"
- │ └── end_keyword_loc: (43,0)-(43,3) = "end"
- ├── @ CaseMatchNode (location: (45,0)-(47,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (45,5)-(45,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (45,5)-(45,6) = ":"
- │ │ ├── value_loc: (45,6)-(45,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (46,0)-(46,11))
- │ │ ├── pattern:
- │ │ │ @ RegularExpressionNode (location: (46,3)-(46,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (46,3)-(46,4) = "/"
- │ │ │ ├── content_loc: (46,4)-(46,10) = "regexp"
- │ │ │ ├── closing_loc: (46,10)-(46,11) = "/"
- │ │ │ └── unescaped: "regexp"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (46,0)-(46,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (45,0)-(45,4) = "case"
- │ └── end_keyword_loc: (47,0)-(47,3) = "end"
- ├── @ CaseMatchNode (location: (49,0)-(51,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (49,5)-(49,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (49,5)-(49,6) = ":"
- │ │ ├── value_loc: (49,6)-(49,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (50,0)-(50,13))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (50,3)-(50,13))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (50,3)-(50,5))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (50,3)-(50,4) = ":"
- │ │ │ │ ├── value_loc: (50,4)-(50,5) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (50,7)-(50,9))
- │ │ │ │ ├── operator_loc: (50,7)-(50,8) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ LocalVariableTargetNode (location: (50,8)-(50,9))
- │ │ │ │ ├── name: :_
- │ │ │ │ └── depth: 0
- │ │ │ ├── posts: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (50,11)-(50,13))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (50,11)-(50,12) = ":"
- │ │ │ │ ├── value_loc: (50,12)-(50,13) = "c"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ └── closing_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (50,0)-(50,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (49,0)-(49,4) = "case"
- │ └── end_keyword_loc: (51,0)-(51,3) = "end"
- ├── @ CaseMatchNode (location: (53,0)-(55,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (53,5)-(53,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (53,5)-(53,6) = ":"
- │ │ ├── value_loc: (53,6)-(53,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (54,0)-(54,11))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (54,3)-(54,11))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ SymbolNode (location: (54,3)-(54,5))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (54,3)-(54,4) = ":"
- │ │ │ │ │ ├── value_loc: (54,4)-(54,5) = "b"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ └── @ ArrayPatternNode (location: (54,7)-(54,11))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ SymbolNode (location: (54,8)-(54,10))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (54,8)-(54,9) = ":"
- │ │ │ │ │ ├── value_loc: (54,9)-(54,10) = "c"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "c"
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── opening_loc: (54,7)-(54,8) = "["
- │ │ │ │ └── closing_loc: (54,10)-(54,11) = "]"
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: ∅
- │ │ │ └── closing_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (54,0)-(54,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (53,0)-(53,4) = "case"
- │ └── end_keyword_loc: (55,0)-(55,3) = "end"
- ├── @ CaseMatchNode (location: (57,0)-(59,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (57,5)-(57,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (57,5)-(57,6) = ":"
- │ │ ├── value_loc: (57,6)-(57,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (58,0)-(58,11))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (58,3)-(58,11))
- │ │ │ ├── constant:
- │ │ │ │ @ ConstantReadNode (location: (58,3)-(58,9))
- │ │ │ │ └── name: :Symbol
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (58,9)-(58,10) = "("
- │ │ │ └── closing_loc: (58,10)-(58,11) = ")"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (58,0)-(58,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (57,0)-(57,4) = "case"
- │ └── end_keyword_loc: (59,0)-(59,3) = "end"
- ├── @ CaseMatchNode (location: (61,0)-(63,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (61,5)-(61,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (61,5)-(61,6) = ":"
- │ │ ├── value_loc: (61,6)-(61,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (62,0)-(62,24))
- │ │ ├── pattern:
- │ │ │ @ FindPatternNode (location: (62,3)-(62,24))
- │ │ │ ├── constant:
- │ │ │ │ @ ConstantReadNode (location: (62,3)-(62,9))
- │ │ │ │ └── name: :Symbol
- │ │ │ ├── left:
- │ │ │ │ @ SplatNode (location: (62,10)-(62,14))
- │ │ │ │ ├── operator_loc: (62,10)-(62,11) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ LocalVariableTargetNode (location: (62,11)-(62,14))
- │ │ │ │ ├── name: :lhs
- │ │ │ │ └── depth: 0
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ LocalVariableTargetNode (location: (62,16)-(62,17))
- │ │ │ │ ├── name: :x
- │ │ │ │ └── depth: 0
- │ │ │ ├── right:
- │ │ │ │ @ SplatNode (location: (62,19)-(62,23))
- │ │ │ │ ├── operator_loc: (62,19)-(62,20) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ LocalVariableTargetNode (location: (62,20)-(62,23))
- │ │ │ │ ├── name: :rhs
- │ │ │ │ └── depth: 0
- │ │ │ ├── opening_loc: (62,9)-(62,10) = "("
- │ │ │ └── closing_loc: (62,23)-(62,24) = ")"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (62,0)-(62,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (61,0)-(61,4) = "case"
- │ └── end_keyword_loc: (63,0)-(63,3) = "end"
- ├── @ CaseMatchNode (location: (65,0)-(67,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (65,5)-(65,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (65,5)-(65,6) = ":"
- │ │ ├── value_loc: (65,6)-(65,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (66,0)-(66,24))
- │ │ ├── pattern:
- │ │ │ @ FindPatternNode (location: (66,3)-(66,24))
- │ │ │ ├── constant:
- │ │ │ │ @ ConstantReadNode (location: (66,3)-(66,9))
- │ │ │ │ └── name: :Symbol
- │ │ │ ├── left:
- │ │ │ │ @ SplatNode (location: (66,10)-(66,14))
- │ │ │ │ ├── operator_loc: (66,10)-(66,11) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ LocalVariableTargetNode (location: (66,11)-(66,14))
- │ │ │ │ ├── name: :lhs
- │ │ │ │ └── depth: 0
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ LocalVariableTargetNode (location: (66,16)-(66,17))
- │ │ │ │ ├── name: :x
- │ │ │ │ └── depth: 0
- │ │ │ ├── right:
- │ │ │ │ @ SplatNode (location: (66,19)-(66,23))
- │ │ │ │ ├── operator_loc: (66,19)-(66,20) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ LocalVariableTargetNode (location: (66,20)-(66,23))
- │ │ │ │ ├── name: :rhs
- │ │ │ │ └── depth: 0
- │ │ │ ├── opening_loc: (66,9)-(66,10) = "["
- │ │ │ └── closing_loc: (66,23)-(66,24) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (66,0)-(66,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (65,0)-(65,4) = "case"
- │ └── end_keyword_loc: (67,0)-(67,3) = "end"
- ├── @ CaseMatchNode (location: (69,0)-(71,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (69,5)-(69,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (69,5)-(69,6) = ":"
- │ │ ├── value_loc: (69,6)-(69,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (70,0)-(70,22))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (70,3)-(70,22))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ LambdaNode (location: (70,4)-(70,18))
- │ │ │ │ │ ├── locals: [:b]
- │ │ │ │ │ ├── operator_loc: (70,4)-(70,6) = "->"
- │ │ │ │ │ ├── opening_loc: (70,10)-(70,11) = "{"
- │ │ │ │ │ ├── closing_loc: (70,17)-(70,18) = "}"
- │ │ │ │ │ ├── parameters:
- │ │ │ │ │ │ @ BlockParametersNode (location: (70,6)-(70,9))
- │ │ │ │ │ │ ├── parameters:
- │ │ │ │ │ │ │ @ ParametersNode (location: (70,7)-(70,8))
- │ │ │ │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (70,7)-(70,8))
- │ │ │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ │ │ └── name: :b
- │ │ │ │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ │ ├── locals: (length: 0)
- │ │ │ │ │ │ ├── opening_loc: (70,6)-(70,7) = "("
- │ │ │ │ │ │ └── closing_loc: (70,8)-(70,9) = ")"
- │ │ │ │ │ └── body:
- │ │ │ │ │ @ StatementsNode (location: (70,12)-(70,16))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ TrueNode (location: (70,12)-(70,16))
- │ │ │ │ └── @ LocalVariableTargetNode (location: (70,20)-(70,21))
- │ │ │ │ ├── name: :c
- │ │ │ │ └── depth: 0
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (70,3)-(70,4) = "["
- │ │ │ └── closing_loc: (70,21)-(70,22) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (70,0)-(70,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (69,0)-(69,4) = "case"
- │ └── end_keyword_loc: (71,0)-(71,3) = "end"
- ├── @ CaseMatchNode (location: (73,0)-(75,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (73,5)-(73,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (73,5)-(73,6) = ":"
- │ │ ├── value_loc: (73,6)-(73,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (74,0)-(74,28))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (74,3)-(74,28))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 4)
- │ │ │ │ ├── @ SymbolNode (location: (74,4)-(74,6))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (74,4)-(74,5) = ":"
- │ │ │ │ │ ├── value_loc: (74,5)-(74,6) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ ├── @ LocalVariableTargetNode (location: (74,8)-(74,9))
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ └── depth: 0
- │ │ │ │ ├── @ LocalVariableTargetNode (location: (74,11)-(74,12))
- │ │ │ │ │ ├── name: :c
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── @ ArrayPatternNode (location: (74,14)-(74,27))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ SymbolNode (location: (74,15)-(74,17))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (74,15)-(74,16) = ":"
- │ │ │ │ │ ├── value_loc: (74,16)-(74,17) = "d"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "d"
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ SplatNode (location: (74,19)-(74,21))
- │ │ │ │ │ ├── operator_loc: (74,19)-(74,20) = "*"
- │ │ │ │ │ └── expression:
- │ │ │ │ │ @ LocalVariableTargetNode (location: (74,20)-(74,21))
- │ │ │ │ │ ├── name: :e
- │ │ │ │ │ └── depth: 0
- │ │ │ │ ├── posts: (length: 1)
- │ │ │ │ │ └── @ NilNode (location: (74,23)-(74,26))
- │ │ │ │ ├── opening_loc: (74,14)-(74,15) = "["
- │ │ │ │ └── closing_loc: (74,26)-(74,27) = "]"
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (74,3)-(74,4) = "["
- │ │ │ └── closing_loc: (74,27)-(74,28) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (74,0)-(74,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (73,0)-(73,4) = "case"
- │ └── end_keyword_loc: (75,0)-(75,3) = "end"
- ├── @ CaseMatchNode (location: (77,0)-(79,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (77,5)-(77,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (77,5)-(77,6) = ":"
- │ │ ├── value_loc: (77,6)-(77,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (78,0)-(78,12))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (78,3)-(78,12))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ ConstantReadNode (location: (78,4)-(78,5))
- │ │ │ │ └── name: :A
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (78,7)-(78,8))
- │ │ │ │ ├── operator_loc: (78,7)-(78,8) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── posts: (length: 1)
- │ │ │ │ └── @ ConstantReadNode (location: (78,10)-(78,11))
- │ │ │ │ └── name: :B
- │ │ │ ├── opening_loc: (78,3)-(78,4) = "["
- │ │ │ └── closing_loc: (78,11)-(78,12) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (78,0)-(78,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (77,0)-(77,4) = "case"
- │ └── end_keyword_loc: (79,0)-(79,3) = "end"
- ├── @ CaseMatchNode (location: (81,0)-(83,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (81,5)-(81,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (81,5)-(81,6) = ":"
- │ │ ├── value_loc: (81,6)-(81,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (82,0)-(82,22))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (82,3)-(82,22))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ ArrayPatternNode (location: (82,4)-(82,11))
- │ │ │ │ │ ├── constant: ∅
- │ │ │ │ │ ├── requireds: (length: 2)
- │ │ │ │ │ │ ├── @ SymbolNode (location: (82,5)-(82,7))
- │ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ │ ├── opening_loc: (82,5)-(82,6) = ":"
- │ │ │ │ │ │ │ ├── value_loc: (82,6)-(82,7) = "b"
- │ │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ │ │ └── @ LocalVariableTargetNode (location: (82,9)-(82,10))
- │ │ │ │ │ │ ├── name: :c
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ ├── opening_loc: (82,4)-(82,5) = "["
- │ │ │ │ │ └── closing_loc: (82,10)-(82,11) = "]"
- │ │ │ │ └── @ ArrayPatternNode (location: (82,13)-(82,21))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 2)
- │ │ │ │ │ ├── @ SymbolNode (location: (82,14)-(82,16))
- │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ ├── opening_loc: (82,14)-(82,15) = ":"
- │ │ │ │ │ │ ├── value_loc: (82,15)-(82,16) = "d"
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── unescaped: "d"
- │ │ │ │ │ └── @ PinnedVariableNode (location: (82,18)-(82,20))
- │ │ │ │ │ ├── variable:
- │ │ │ │ │ │ @ LocalVariableReadNode (location: (82,19)-(82,20))
- │ │ │ │ │ │ ├── name: :e
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ └── operator_loc: (82,18)-(82,19) = "^"
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── opening_loc: (82,13)-(82,14) = "["
- │ │ │ │ └── closing_loc: (82,20)-(82,21) = "]"
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (82,3)-(82,4) = "["
- │ │ │ └── closing_loc: (82,21)-(82,22) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (82,0)-(82,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (81,0)-(81,4) = "case"
- │ └── end_keyword_loc: (83,0)-(83,3) = "end"
- ├── @ CaseMatchNode (location: (85,0)-(87,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (85,5)-(85,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (85,5)-(85,6) = ":"
- │ │ ├── value_loc: (85,6)-(85,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (86,0)-(86,5))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (86,3)-(86,5))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (86,3)-(86,4) = "["
- │ │ │ └── closing_loc: (86,4)-(86,5) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (86,0)-(86,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (85,0)-(85,4) = "case"
- │ └── end_keyword_loc: (87,0)-(87,3) = "end"
- ├── @ CaseMatchNode (location: (89,0)-(91,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (89,5)-(89,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (89,5)-(89,6) = ":"
- │ │ ├── value_loc: (89,6)-(89,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (90,0)-(90,9))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (90,3)-(90,9))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ PinnedExpressionNode (location: (90,4)-(90,8))
- │ │ │ │ ├── expression:
- │ │ │ │ │ @ CallNode (location: (90,6)-(90,7))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :a
- │ │ │ │ │ ├── message_loc: (90,6)-(90,7) = "a"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── operator_loc: (90,4)-(90,5) = "^"
- │ │ │ │ ├── lparen_loc: (90,5)-(90,6) = "("
- │ │ │ │ └── rparen_loc: (90,7)-(90,8) = ")"
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (90,3)-(90,4) = "["
- │ │ │ └── closing_loc: (90,8)-(90,9) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (90,0)-(90,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (89,0)-(89,4) = "case"
- │ └── end_keyword_loc: (91,0)-(91,3) = "end"
- ├── @ CaseMatchNode (location: (93,0)-(95,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (93,5)-(93,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (93,5)-(93,6) = ":"
- │ │ ├── value_loc: (93,6)-(93,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (94,0)-(94,19))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (94,3)-(94,19))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 3)
- │ │ │ │ ├── @ PinnedVariableNode (location: (94,4)-(94,7))
- │ │ │ │ │ ├── variable:
- │ │ │ │ │ │ @ InstanceVariableReadNode (location: (94,5)-(94,7))
- │ │ │ │ │ │ └── name: :@a
- │ │ │ │ │ └── operator_loc: (94,4)-(94,5) = "^"
- │ │ │ │ ├── @ PinnedVariableNode (location: (94,9)-(94,12))
- │ │ │ │ │ ├── variable:
- │ │ │ │ │ │ @ GlobalVariableReadNode (location: (94,10)-(94,12))
- │ │ │ │ │ │ └── name: :$b
- │ │ │ │ │ └── operator_loc: (94,9)-(94,10) = "^"
- │ │ │ │ └── @ PinnedVariableNode (location: (94,14)-(94,18))
- │ │ │ │ ├── variable:
- │ │ │ │ │ @ ClassVariableReadNode (location: (94,15)-(94,18))
- │ │ │ │ │ └── name: :@@c
- │ │ │ │ └── operator_loc: (94,14)-(94,15) = "^"
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: (94,3)-(94,4) = "["
- │ │ │ └── closing_loc: (94,18)-(94,19) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (94,0)-(94,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (93,0)-(93,4) = "case"
- │ └── end_keyword_loc: (95,0)-(95,3) = "end"
- ├── @ CaseMatchNode (location: (97,0)-(99,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (97,5)-(97,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (97,5)-(97,6) = ":"
- │ │ ├── value_loc: (97,6)-(97,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (98,0)-(98,12))
- │ │ ├── pattern:
- │ │ │ @ XStringNode (location: (98,3)-(98,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (98,3)-(98,4) = "`"
- │ │ │ ├── content_loc: (98,4)-(98,11) = "echo hi"
- │ │ │ ├── closing_loc: (98,11)-(98,12) = "`"
- │ │ │ └── unescaped: "echo hi"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (98,0)-(98,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (97,0)-(97,4) = "case"
- │ └── end_keyword_loc: (99,0)-(99,3) = "end"
- ├── @ CaseMatchNode (location: (101,0)-(103,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (101,5)-(101,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (101,5)-(101,6) = ":"
- │ │ ├── value_loc: (101,6)-(101,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (102,0)-(102,16))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (102,3)-(102,16))
- │ │ │ ├── constant: ∅
- │ │ │ ├── requireds: (length: 3)
- │ │ │ │ ├── @ NilNode (location: (102,3)-(102,6))
- │ │ │ │ ├── @ NilNode (location: (102,8)-(102,11))
- │ │ │ │ └── @ NilNode (location: (102,13)-(102,16))
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── opening_loc: ∅
- │ │ │ └── closing_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (102,0)-(102,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (101,0)-(101,4) = "case"
- │ └── end_keyword_loc: (103,0)-(103,3) = "end"
- ├── @ CaseMatchNode (location: (105,0)-(107,3))
- │ ├── predicate:
- │ │ @ SymbolNode (location: (105,5)-(105,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (105,5)-(105,6) = ":"
- │ │ ├── value_loc: (105,6)-(105,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (106,0)-(106,11))
- │ │ ├── pattern:
- │ │ │ @ HashPatternNode (location: (106,3)-(106,11))
- │ │ │ ├── constant: ∅
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ AssocNode (location: (106,5)-(106,9))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (106,5)-(106,9))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: (106,5)-(106,6) = "\""
- │ │ │ │ │ ├── value_loc: (106,6)-(106,7) = "b"
- │ │ │ │ │ ├── closing_loc: (106,7)-(106,9) = "\":"
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ ImplicitNode (location: (106,6)-(106,7))
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ LocalVariableTargetNode (location: (106,6)-(106,7))
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── operator_loc: ∅
- │ │ │ ├── rest: ∅
- │ │ │ ├── opening_loc: (106,3)-(106,4) = "{"
- │ │ │ └── closing_loc: (106,10)-(106,11) = "}"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (106,0)-(106,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (105,0)-(105,4) = "case"
- │ └── end_keyword_loc: (107,0)-(107,3) = "end"
- └── @ CaseMatchNode (location: (109,0)-(111,3))
- ├── predicate:
- │ @ SymbolNode (location: (109,5)-(109,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (109,5)-(109,6) = ":"
- │ ├── value_loc: (109,6)-(109,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (110,0)-(110,5))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (110,3)-(110,5))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: (110,3)-(110,4) = "{"
- │ │ └── closing_loc: (110,4)-(110,5) = "}"
- │ ├── statements: ∅
- │ ├── in_loc: (110,0)-(110,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (109,0)-(109,4) = "case"
- └── end_keyword_loc: (111,0)-(111,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_31.txt b/test/prism/snapshots/seattlerb/case_in_31.txt
deleted file mode 100644
index fdf5ce2a29..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_31.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: [:c]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,11))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ SymbolNode (location: (2,4)-(2,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (2,4)-(2,5) = ":"
- │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (2,8)-(2,10))
- │ │ │ ├── operator_loc: (2,8)-(2,9) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (2,9)-(2,10))
- │ │ │ ├── name: :c
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,3)-(2,4) = "["
- │ │ └── closing_loc: (2,10)-(2,11) = "]"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_37.txt b/test/prism/snapshots/seattlerb/case_in_37.txt
deleted file mode 100644
index 1a1d887b4f..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_37.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,19))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,5)-(2,17))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
- │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── value:
- │ │ │ │ @ ArrayPatternNode (location: (2,8)-(2,17))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ ConstantReadNode (location: (2,9)-(2,13))
- │ │ │ │ │ └── name: :Hash
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ SplatNode (location: (2,15)-(2,16))
- │ │ │ │ │ ├── operator_loc: (2,15)-(2,16) = "*"
- │ │ │ │ │ └── expression: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── opening_loc: (2,8)-(2,9) = "["
- │ │ │ │ └── closing_loc: (2,16)-(2,17) = "]"
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: (2,3)-(2,4) = "{"
- │ │ └── closing_loc: (2,18)-(2,19) = "}"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_42.txt b/test/prism/snapshots/seattlerb/case_in_42.txt
deleted file mode 100644
index f985d6bc8d..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_42.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: [:_]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,18))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,9))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ SymbolNode (location: (2,3)-(2,5))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (2,3)-(2,4) = ":"
- │ │ │ ├── value_loc: (2,4)-(2,5) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (2,7)-(2,9))
- │ │ │ ├── operator_loc: (2,7)-(2,8) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (2,8)-(2,9))
- │ │ │ ├── name: :_
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,15)-(2,18))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (2,15)-(2,18))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,10)-(2,14) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_42_2.txt b/test/prism/snapshots/seattlerb/case_in_42_2.txt
deleted file mode 100644
index c399ba1bfa..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_42_2.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: [:list]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,20))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,11))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ └── name: :A
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (2,5)-(2,10))
- │ │ │ ├── operator_loc: (2,5)-(2,6) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,10))
- │ │ │ ├── name: :list
- │ │ │ └── depth: 0
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,4)-(2,5) = "("
- │ │ └── closing_loc: (2,10)-(2,11) = ")"
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,17)-(2,20))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (2,17)-(2,20))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,12)-(2,16) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_47.txt b/test/prism/snapshots/seattlerb/case_in_47.txt
deleted file mode 100644
index 99baebce05..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_47.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,14))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (2,4)-(2,5))
- │ │ │ ├── operator_loc: (2,4)-(2,5) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── posts: (length: 2)
- │ │ │ ├── @ SymbolNode (location: (2,7)-(2,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (2,7)-(2,8) = ":"
- │ │ │ │ ├── value_loc: (2,8)-(2,9) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ └── @ SymbolNode (location: (2,11)-(2,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (2,11)-(2,12) = ":"
- │ │ │ ├── value_loc: (2,12)-(2,13) = "c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "c"
- │ │ ├── opening_loc: (2,3)-(2,4) = "["
- │ │ └── closing_loc: (2,13)-(2,14) = "]"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_67.txt b/test/prism/snapshots/seattlerb/case_in_67.txt
deleted file mode 100644
index 4bab417d57..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_67.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,15))
- │ ├── pattern:
- │ │ @ RangeNode (location: (2,3)-(2,6))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (2,3)-(2,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (2,4)-(2,6) = ".."
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,12)-(2,15))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (2,12)-(2,15))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,7)-(2,11) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_86.txt b/test/prism/snapshots/seattlerb/case_in_86.txt
deleted file mode 100644
index 082aa74eca..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_86.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ ArrayNode (location: (1,5)-(1,13))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
- │ │ │ ├── value_loc: (1,7)-(1,8) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (1,10)-(1,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,10)-(1,11) = ":"
- │ │ ├── value_loc: (1,11)-(1,12) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── opening_loc: (1,5)-(1,6) = "["
- │ └── closing_loc: (1,12)-(1,13) = "]"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,25))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,16))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ ConstantPathNode (location: (2,3)-(2,13))
- │ │ │ ├── parent: ∅
- │ │ │ ├── name: :NilClass
- │ │ │ ├── delimiter_loc: (2,3)-(2,5) = "::"
- │ │ │ └── name_loc: (2,5)-(2,13) = "NilClass"
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (2,15)-(2,16))
- │ │ │ ├── operator_loc: (2,15)-(2,16) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,22)-(2,25))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (2,22)-(2,25))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,17)-(2,21) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_86_2.txt b/test/prism/snapshots/seattlerb/case_in_86_2.txt
deleted file mode 100644
index 346264f907..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_86_2.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ ArrayNode (location: (1,5)-(1,13))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
- │ │ │ ├── value_loc: (1,7)-(1,8) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (1,10)-(1,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,10)-(1,11) = ":"
- │ │ ├── value_loc: (1,11)-(1,12) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── opening_loc: (1,5)-(1,6) = "["
- │ └── closing_loc: (1,12)-(1,13) = "]"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,25))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,16))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (2,3)-(2,4))
- │ │ │ ├── operator_loc: (2,3)-(2,4) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ ConstantPathNode (location: (2,6)-(2,16))
- │ │ │ ├── parent: ∅
- │ │ │ ├── name: :NilClass
- │ │ │ ├── delimiter_loc: (2,6)-(2,8) = "::"
- │ │ │ └── name_loc: (2,8)-(2,16) = "NilClass"
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,22)-(2,25))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (2,22)-(2,25))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,17)-(2,21) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_array_pat_const.txt b/test/prism/snapshots/seattlerb/case_in_array_pat_const.txt
deleted file mode 100644
index f361e8d458..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_array_pat_const.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: [:c]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,7))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ └── name: :B
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (2,5)-(2,6))
- │ │ │ ├── name: :c
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,4)-(2,5) = "["
- │ │ └── closing_loc: (2,6)-(2,7) = "]"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt b/test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt
deleted file mode 100644
index d6fb80ef90..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: [:d]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,10))
- │ │ ├── constant:
- │ │ │ @ ConstantPathNode (location: (2,3)-(2,7))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ │ └── name: :B
- │ │ │ ├── name: :C
- │ │ │ ├── delimiter_loc: (2,4)-(2,6) = "::"
- │ │ │ └── name_loc: (2,6)-(2,7) = "C"
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (2,8)-(2,9))
- │ │ │ ├── name: :d
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,7)-(2,8) = "["
- │ │ └── closing_loc: (2,9)-(2,10) = "]"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "e"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "e"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt b/test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt
deleted file mode 100644
index 8d185b250a..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: [:d]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,12))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ └── name: :B
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ CapturePatternNode (location: (2,5)-(2,11))
- │ │ │ ├── value:
- │ │ │ │ @ ConstantReadNode (location: (2,5)-(2,6))
- │ │ │ │ └── name: :C
- │ │ │ ├── target:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,11))
- │ │ │ │ ├── name: :d
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (2,7)-(2,9) = "=>"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,4)-(2,5) = "("
- │ │ └── closing_loc: (2,11)-(2,12) = ")"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_const.txt b/test/prism/snapshots/seattlerb/case_in_const.txt
deleted file mode 100644
index c4b838aa1d..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_const.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ ConstantReadNode (location: (1,5)-(1,10))
- │ └── name: :Array
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ ConstantReadNode (location: (2,3)-(2,8))
- │ │ └── name: :Class
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_else.txt b/test/prism/snapshots/seattlerb/case_in_else.txt
deleted file mode 100644
index 5eae7fc1ea..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_else.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(6,3))
- ├── predicate:
- │ @ ConstantReadNode (location: (1,5)-(1,10))
- │ └── name: :Array
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ ConstantReadNode (location: (2,3)-(2,8))
- │ │ └── name: :Class
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent:
- │ @ ElseNode (location: (4,0)-(6,3))
- │ ├── else_keyword_loc: (4,0)-(4,4) = "else"
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,2)-(5,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (5,2)-(5,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,2)-(5,3) = ":"
- │ │ ├── value_loc: (5,3)-(5,4) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_find.txt b/test/prism/snapshots/seattlerb/case_in_find.txt
deleted file mode 100644
index f84c4c30d0..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_find.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,2)-(2,15))
- │ ├── pattern:
- │ │ @ FindPatternNode (location: (2,5)-(2,15))
- │ │ ├── constant: ∅
- │ │ ├── left:
- │ │ │ @ SplatNode (location: (2,5)-(2,7))
- │ │ │ ├── operator_loc: (2,5)-(2,6) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,7))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ SymbolNode (location: (2,9)-(2,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (2,9)-(2,10) = ":"
- │ │ │ ├── value_loc: (2,10)-(2,11) = "+"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "+"
- │ │ ├── right:
- │ │ │ @ SplatNode (location: (2,13)-(2,15))
- │ │ │ ├── operator_loc: (2,13)-(2,14) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (2,14)-(2,15))
- │ │ │ ├── name: :b
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── statements: ∅
- │ ├── in_loc: (2,2)-(2,4) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_find_array.txt b/test/prism/snapshots/seattlerb/case_in_find_array.txt
deleted file mode 100644
index a757f80346..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_find_array.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: [:c]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,16))
- │ ├── pattern:
- │ │ @ FindPatternNode (location: (2,3)-(2,16))
- │ │ ├── constant: ∅
- │ │ ├── left:
- │ │ │ @ SplatNode (location: (2,4)-(2,5))
- │ │ │ ├── operator_loc: (2,4)-(2,5) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ SymbolNode (location: (2,7)-(2,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (2,7)-(2,8) = ":"
- │ │ │ │ ├── value_loc: (2,8)-(2,9) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ └── @ LocalVariableTargetNode (location: (2,11)-(2,12))
- │ │ │ ├── name: :c
- │ │ │ └── depth: 0
- │ │ ├── right:
- │ │ │ @ SplatNode (location: (2,14)-(2,15))
- │ │ │ ├── operator_loc: (2,14)-(2,15) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── opening_loc: (2,3)-(2,4) = "["
- │ │ └── closing_loc: (2,15)-(2,16) = "]"
- │ ├── statements: ∅
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat.txt
deleted file mode 100644
index e813efa9ee..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_hash_pat.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,21))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ AssocNode (location: (2,5)-(2,11))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
- │ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ StringNode (location: (2,8)-(2,11))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: (2,8)-(2,9) = "'"
- │ │ │ │ │ ├── content_loc: (2,9)-(2,10) = "c"
- │ │ │ │ │ ├── closing_loc: (2,10)-(2,11) = "'"
- │ │ │ │ │ └── unescaped: "c"
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ AssocNode (location: (2,13)-(2,19))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,13)-(2,15))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,13)-(2,14) = "d"
- │ │ │ │ ├── closing_loc: (2,14)-(2,15) = ":"
- │ │ │ │ └── unescaped: "d"
- │ │ │ ├── value:
- │ │ │ │ @ StringNode (location: (2,16)-(2,19))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (2,16)-(2,17) = "\""
- │ │ │ │ ├── content_loc: (2,17)-(2,18) = "e"
- │ │ │ │ ├── closing_loc: (2,18)-(2,19) = "\""
- │ │ │ │ └── unescaped: "e"
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: (2,3)-(2,4) = "{"
- │ │ └── closing_loc: (2,20)-(2,21) = "}"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "f"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "f"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,22)-(2,26) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt
deleted file mode 100644
index 790d9d63ff..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: [:x, :f]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,34))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 3)
- │ │ │ ├── @ AssocNode (location: (2,5)-(2,20))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
- │ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CapturePatternNode (location: (2,8)-(2,20))
- │ │ │ │ │ ├── value:
- │ │ │ │ │ │ @ ConstantReadNode (location: (2,8)-(2,15))
- │ │ │ │ │ │ └── name: :Integer
- │ │ │ │ │ ├── target:
- │ │ │ │ │ │ @ LocalVariableTargetNode (location: (2,19)-(2,20))
- │ │ │ │ │ │ ├── name: :x
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ └── operator_loc: (2,16)-(2,18) = "=>"
- │ │ │ │ └── operator_loc: ∅
- │ │ │ ├── @ AssocNode (location: (2,22)-(2,28))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,22)-(2,24))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (2,22)-(2,23) = "d"
- │ │ │ │ │ ├── closing_loc: (2,23)-(2,24) = ":"
- │ │ │ │ │ └── unescaped: "d"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ StringNode (location: (2,25)-(2,28))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "\""
- │ │ │ │ │ ├── content_loc: (2,26)-(2,27) = "e"
- │ │ │ │ │ ├── closing_loc: (2,27)-(2,28) = "\""
- │ │ │ │ │ └── unescaped: "e"
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ AssocNode (location: (2,30)-(2,32))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,30)-(2,32))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,30)-(2,31) = "f"
- │ │ │ │ ├── closing_loc: (2,31)-(2,32) = ":"
- │ │ │ │ └── unescaped: "f"
- │ │ │ ├── value:
- │ │ │ │ @ ImplicitNode (location: (2,30)-(2,31))
- │ │ │ │ └── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,30)-(2,31))
- │ │ │ │ ├── name: :f
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: (2,3)-(2,4) = "{"
- │ │ └── closing_loc: (2,33)-(2,34) = "}"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "g"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "g"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,35)-(2,39) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt
deleted file mode 100644
index 4c8cfd0e54..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,11))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ └── name: :B
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,5)-(2,10))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,5)-(2,6) = "a"
- │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (2,8)-(2,10))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: (2,4)-(2,5) = "("
- │ │ └── closing_loc: (2,10)-(2,11) = ")"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt
deleted file mode 100644
index 8ff95a161f..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,10))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,3)-(2,10))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
- │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── value:
- │ │ │ │ @ TrueNode (location: (2,6)-(2,10))
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,11)-(2,15) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
deleted file mode 100644
index b93b889ec5..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: [:c, :rest]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,23))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,15))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,3)-(2,7))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
- │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,7))
- │ │ │ │ ├── name: :c
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest:
- │ │ │ @ AssocSplatNode (location: (2,9)-(2,15))
- │ │ │ ├── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,11)-(2,15))
- │ │ │ │ ├── name: :rest
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (2,9)-(2,11) = "**"
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,21)-(2,23))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (2,21)-(2,23))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (2,21)-(2,22) = ":"
- │ │ ├── value_loc: (2,22)-(2,23) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,16)-(2,20) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt
deleted file mode 100644
index 956e93faa0..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: [:rest]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(3,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(2,17))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,9))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 0)
- │ │ ├── rest:
- │ │ │ @ AssocSplatNode (location: (2,3)-(2,9))
- │ │ │ ├── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,5)-(2,9))
- │ │ │ │ ├── name: :rest
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (2,3)-(2,5) = "**"
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,15)-(2,17))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (2,15)-(2,17))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (2,15)-(2,16) = ":"
- │ │ ├── value_loc: (2,16)-(2,17) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: (2,10)-(2,14) = "then"
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt b/test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt
deleted file mode 100644
index a21d3e15dd..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(6,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 2)
- │ ├── @ InNode (location: (2,0)-(3,4))
- │ │ ├── pattern:
- │ │ │ @ IfNode (location: (2,3)-(2,12))
- │ │ │ ├── if_keyword_loc: (2,5)-(2,7) = "if"
- │ │ │ ├── predicate:
- │ │ │ │ @ TrueNode (location: (2,8)-(2,12))
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (2,3)-(2,4))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ │ └── name: :A
- │ │ │ ├── consequent: ∅
- │ │ │ └── end_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ │ ├── value_loc: (3,3)-(3,4) = "C"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "C"
- │ │ ├── in_loc: (2,0)-(2,2) = "in"
- │ │ └── then_loc: ∅
- │ └── @ InNode (location: (4,0)-(5,4))
- │ ├── pattern:
- │ │ @ UnlessNode (location: (4,3)-(4,17))
- │ │ ├── keyword_loc: (4,5)-(4,11) = "unless"
- │ │ ├── predicate:
- │ │ │ @ FalseNode (location: (4,12)-(4,17))
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (4,3)-(4,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (4,3)-(4,4))
- │ │ │ └── name: :D
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,2)-(5,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (5,2)-(5,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,2)-(5,3) = ":"
- │ │ ├── value_loc: (5,3)-(5,4) = "E"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "E"
- │ ├── in_loc: (4,0)-(4,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_multiple.txt b/test/prism/snapshots/seattlerb/case_in_multiple.txt
deleted file mode 100644
index eba0084f96..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_multiple.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(6,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 2)
- │ ├── @ InNode (location: (2,0)-(3,4))
- │ │ ├── pattern:
- │ │ │ @ ConstantPathNode (location: (2,3)-(2,7))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ │ └── name: :A
- │ │ │ ├── name: :B
- │ │ │ ├── delimiter_loc: (2,4)-(2,6) = "::"
- │ │ │ └── name_loc: (2,6)-(2,7) = "B"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ │ ├── value_loc: (3,3)-(3,4) = "C"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "C"
- │ │ ├── in_loc: (2,0)-(2,2) = "in"
- │ │ └── then_loc: ∅
- │ └── @ InNode (location: (4,0)-(5,4))
- │ ├── pattern:
- │ │ @ ConstantPathNode (location: (4,3)-(4,7))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (4,3)-(4,4))
- │ │ │ └── name: :D
- │ │ ├── name: :E
- │ │ ├── delimiter_loc: (4,4)-(4,6) = "::"
- │ │ └── name_loc: (4,6)-(4,7) = "E"
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,2)-(5,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (5,2)-(5,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,2)-(5,3) = ":"
- │ │ ├── value_loc: (5,3)-(5,4) = "F"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "F"
- │ ├── in_loc: (4,0)-(4,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_or.txt b/test/prism/snapshots/seattlerb/case_in_or.txt
deleted file mode 100644
index 7ac6617608..0000000000
--- a/test/prism/snapshots/seattlerb/case_in_or.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,4))
- │ ├── pattern:
- │ │ @ AlternationPatternNode (location: (2,3)-(2,8))
- │ │ ├── left:
- │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ └── name: :B
- │ │ ├── right:
- │ │ │ @ ConstantReadNode (location: (2,7)-(2,8))
- │ │ │ └── name: :C
- │ │ └── operator_loc: (2,5)-(2,6) = "|"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,4))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (3,2)-(3,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,2)-(3,3) = ":"
- │ │ ├── value_loc: (3,3)-(3,4) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/class_comments.txt b/test/prism/snapshots/seattlerb/class_comments.txt
deleted file mode 100644
index 5ac05b6be6..0000000000
--- a/test/prism/snapshots/seattlerb/class_comments.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (4,0)-(9,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (4,0)-(9,3))
- └── body: (length: 1)
- └── @ ClassNode (location: (4,0)-(9,3))
- ├── locals: []
- ├── class_keyword_loc: (4,0)-(4,5) = "class"
- ├── constant_path:
- │ @ ConstantReadNode (location: (4,6)-(4,7))
- │ └── name: :X
- ├── inheritance_operator_loc: ∅
- ├── superclass: ∅
- ├── body:
- │ @ StatementsNode (location: (6,2)-(8,5))
- │ └── body: (length: 1)
- │ └── @ DefNode (location: (6,2)-(8,5))
- │ ├── name: :blah
- │ ├── name_loc: (6,6)-(6,10) = "blah"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (6,2)-(6,5) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (8,2)-(8,5) = "end"
- ├── end_keyword_loc: (9,0)-(9,3) = "end"
- └── name: :X
diff --git a/test/prism/snapshots/seattlerb/cond_unary_minus.txt b/test/prism/snapshots/seattlerb/cond_unary_minus.txt
deleted file mode 100644
index b6e12dfb15..0000000000
--- a/test/prism/snapshots/seattlerb/cond_unary_minus.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(1,10))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ IntegerNode (location: (1,3)-(1,5))
- │ ├── flags: decimal
- │ └── value: -1
- ├── then_keyword_loc: ∅
- ├── statements: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (1,7)-(1,10) = "end"
diff --git a/test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt b/test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt
deleted file mode 100644
index e09eed7d2f..0000000000
--- a/test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ ConstantPathOrWriteNode (location: (1,0)-(1,12))
- ├── target:
- │ @ ConstantPathNode (location: (1,0)-(1,6))
- │ ├── parent:
- │ │ @ ConstantPathNode (location: (1,0)-(1,3))
- │ │ ├── parent: ∅
- │ │ ├── name: :X
- │ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
- │ │ └── name_loc: (1,2)-(1,3) = "X"
- │ ├── name: :Y
- │ ├── delimiter_loc: (1,3)-(1,5) = "::"
- │ └── name_loc: (1,5)-(1,6) = "Y"
- ├── operator_loc: (1,7)-(1,10) = "||="
- └── value:
- @ IntegerNode (location: (1,11)-(1,12))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt b/test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt
deleted file mode 100644
index 398af888a8..0000000000
--- a/test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ ConstantPathOrWriteNode (location: (1,0)-(1,9))
- ├── target:
- │ @ ConstantPathNode (location: (1,0)-(1,3))
- │ ├── parent: ∅
- │ ├── name: :X
- │ ├── delimiter_loc: (1,0)-(1,2) = "::"
- │ └── name_loc: (1,2)-(1,3) = "X"
- ├── operator_loc: (1,4)-(1,7) = "||="
- └── value:
- @ IntegerNode (location: (1,8)-(1,9))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/const_op_asgn_and1.txt b/test/prism/snapshots/seattlerb/const_op_asgn_and1.txt
deleted file mode 100644
index f9792aebb3..0000000000
--- a/test/prism/snapshots/seattlerb/const_op_asgn_and1.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ ConstantPathOperatorWriteNode (location: (1,0)-(1,8))
- ├── target:
- │ @ ConstantPathNode (location: (1,0)-(1,3))
- │ ├── parent: ∅
- │ ├── name: :X
- │ ├── delimiter_loc: (1,0)-(1,2) = "::"
- │ └── name_loc: (1,2)-(1,3) = "X"
- ├── binary_operator_loc: (1,4)-(1,6) = "&="
- ├── value:
- │ @ IntegerNode (location: (1,7)-(1,8))
- │ ├── flags: decimal
- │ └── value: 1
- └── binary_operator: :&
diff --git a/test/prism/snapshots/seattlerb/const_op_asgn_and2.txt b/test/prism/snapshots/seattlerb/const_op_asgn_and2.txt
deleted file mode 100644
index 146455d327..0000000000
--- a/test/prism/snapshots/seattlerb/const_op_asgn_and2.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ ConstantPathAndWriteNode (location: (1,0)-(1,9))
- ├── target:
- │ @ ConstantPathNode (location: (1,0)-(1,3))
- │ ├── parent: ∅
- │ ├── name: :X
- │ ├── delimiter_loc: (1,0)-(1,2) = "::"
- │ └── name_loc: (1,2)-(1,3) = "X"
- ├── operator_loc: (1,4)-(1,7) = "&&="
- └── value:
- @ IntegerNode (location: (1,8)-(1,9))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/const_op_asgn_or.txt b/test/prism/snapshots/seattlerb/const_op_asgn_or.txt
deleted file mode 100644
index 5e9dd39604..0000000000
--- a/test/prism/snapshots/seattlerb/const_op_asgn_or.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ ConstantPathOrWriteNode (location: (1,0)-(1,10))
- ├── target:
- │ @ ConstantPathNode (location: (1,0)-(1,4))
- │ ├── parent:
- │ │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ │ └── name: :X
- │ ├── name: :Y
- │ ├── delimiter_loc: (1,1)-(1,3) = "::"
- │ └── name_loc: (1,3)-(1,4) = "Y"
- ├── operator_loc: (1,5)-(1,8) = "||="
- └── value:
- @ IntegerNode (location: (1,9)-(1,10))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/dasgn_icky2.txt b/test/prism/snapshots/seattlerb/dasgn_icky2.txt
deleted file mode 100644
index e118362f87..0000000000
--- a/test/prism/snapshots/seattlerb/dasgn_icky2.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-@ ProgramNode (location: (1,0)-(8,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(8,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(8,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(8,3))
- ├── locals: [:v]
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (2,2)-(7,5))
- │ └── body: (length: 2)
- │ ├── @ LocalVariableWriteNode (location: (2,2)-(2,9))
- │ │ ├── name: :v
- │ │ ├── depth: 0
- │ │ ├── name_loc: (2,2)-(2,3) = "v"
- │ │ ├── value:
- │ │ │ @ NilNode (location: (2,6)-(2,9))
- │ │ └── operator_loc: (2,4)-(2,5) = "="
- │ └── @ BeginNode (location: (3,2)-(7,5))
- │ ├── begin_keyword_loc: (3,2)-(3,7) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (4,4)-(4,9))
- │ │ └── body: (length: 1)
- │ │ └── @ YieldNode (location: (4,4)-(4,9))
- │ │ ├── keyword_loc: (4,4)-(4,9) = "yield"
- │ │ ├── lparen_loc: ∅
- │ │ ├── arguments: ∅
- │ │ └── rparen_loc: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (5,2)-(6,9))
- │ │ ├── keyword_loc: (5,2)-(5,8) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (5,9)-(5,18))
- │ │ │ └── name: :Exception
- │ │ ├── operator_loc: (5,19)-(5,21) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (5,22)-(5,23))
- │ │ │ ├── name: :v
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (6,4)-(6,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ BreakNode (location: (6,4)-(6,9))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (6,4)-(6,9) = "break"
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (7,2)-(7,5) = "end"
- ├── opening_loc: (1,2)-(1,4) = "do"
- └── closing_loc: (8,0)-(8,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defined_eh_parens.txt b/test/prism/snapshots/seattlerb/defined_eh_parens.txt
deleted file mode 100644
index 49b577fcd1..0000000000
--- a/test/prism/snapshots/seattlerb/defined_eh_parens.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ DefinedNode (location: (1,0)-(1,12))
- ├── lparen_loc: (1,8)-(1,9) = "("
- ├── value:
- │ @ IntegerNode (location: (1,9)-(1,11))
- │ ├── flags: decimal
- │ └── value: 42
- ├── rparen_loc: (1,11)-(1,12) = ")"
- └── keyword_loc: (1,0)-(1,8) = "defined?"
diff --git a/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
deleted file mode 100644
index 3f2bdf44a4..0000000000
--- a/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,29))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,29))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,29))
- ├── name: :call
- ├── name_loc: (1,4)-(1,8) = "call"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,9)-(1,24))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,9)-(1,15))
- │ │ ├── flags: ∅
- │ │ └── name: :interp
- │ ├── optionals: (length: 0)
- │ ├── rest:
- │ │ @ RestParameterNode (location: (1,17)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── name: ∅
- │ │ ├── name_loc: ∅
- │ │ └── operator_loc: (1,17)-(1,18) = "*"
- │ ├── posts: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,20)-(1,24))
- │ │ ├── flags: ∅
- │ │ └── name: :args
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:interp, :args]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,8)-(1,9) = "("
- ├── rparen_loc: (1,24)-(1,25) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,26)-(1,29) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
deleted file mode 100644
index 4121770c5c..0000000000
--- a/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,29))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,29))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,29))
- ├── name: :a
- ├── name_loc: (1,4)-(1,5) = "a"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,12))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :x
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ ForwardingParameterNode (location: (1,9)-(1,12))
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (1,15)-(1,24))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,15)-(1,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (1,15)-(1,16) = "b"
- │ ├── opening_loc: (1,16)-(1,17) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,17)-(1,23))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18))
- │ │ │ ├── name: :x
- │ │ │ └── depth: 0
- │ │ └── @ ForwardingArgumentsNode (location: (1,20)-(1,23))
- │ ├── closing_loc: (1,23)-(1,24) = ")"
- │ └── block: ∅
- ├── locals: [:x]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,12)-(1,13) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,26)-(1,29) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_args_forward_args.txt b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
deleted file mode 100644
index 178b6ccde7..0000000000
--- a/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,41))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,41))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,41))
- ├── name: :a
- ├── name_loc: (1,4)-(1,5) = "a"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,18))
- │ ├── requireds: (length: 3)
- │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :x
- │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :y
- │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
- │ │ ├── flags: ∅
- │ │ └── name: :z
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ ForwardingParameterNode (location: (1,15)-(1,18))
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (1,21)-(1,36))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,21)-(1,36))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (1,21)-(1,22) = "b"
- │ ├── opening_loc: (1,22)-(1,23) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,23)-(1,35))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ SymbolNode (location: (1,23)-(1,27))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,23)-(1,24) = ":"
- │ │ │ ├── value_loc: (1,24)-(1,27) = "get"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "get"
- │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30))
- │ │ │ ├── name: :z
- │ │ │ └── depth: 0
- │ │ └── @ ForwardingArgumentsNode (location: (1,32)-(1,35))
- │ ├── closing_loc: (1,35)-(1,36) = ")"
- │ └── block: ∅
- ├── locals: [:x, :y, :z]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,18)-(1,19) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,38)-(1,41) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_comments.txt b/test/prism/snapshots/seattlerb/defn_comments.txt
deleted file mode 100644
index 585aa65c9a..0000000000
--- a/test/prism/snapshots/seattlerb/defn_comments.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (4,0)-(5,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (4,0)-(5,3))
- └── body: (length: 1)
- └── @ DefNode (location: (4,0)-(5,3))
- ├── name: :blah
- ├── name_loc: (4,4)-(4,8) = "blah"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (4,0)-(4,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (5,0)-(5,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_endless_command.txt b/test/prism/snapshots/seattlerb/defn_endless_command.txt
deleted file mode 100644
index c3ea59282a..0000000000
--- a/test/prism/snapshots/seattlerb/defn_endless_command.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,33))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,33))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,33))
- ├── name: :some_method
- ├── name_loc: (1,4)-(1,15) = "some_method"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,18)-(1,33))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,18)-(1,33))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :other_method
- │ ├── message_loc: (1,18)-(1,30) = "other_method"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,31)-(1,33))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,31)-(1,33))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: (1,16)-(1,17) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
deleted file mode 100644
index dfd1d01ba8..0000000000
--- a/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,43))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,43))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,43))
- ├── name: :some_method
- ├── name_loc: (1,4)-(1,15) = "some_method"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,18)-(1,43))
- │ └── body: (length: 1)
- │ └── @ RescueModifierNode (location: (1,18)-(1,43))
- │ ├── expression:
- │ │ @ CallNode (location: (1,18)-(1,33))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :other_method
- │ │ ├── message_loc: (1,18)-(1,30) = "other_method"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,31)-(1,33))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (1,31)-(1,33))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,34)-(1,40) = "rescue"
- │ └── rescue_expression:
- │ @ IntegerNode (location: (1,41)-(1,43))
- │ ├── flags: decimal
- │ └── value: 24
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: (1,16)-(1,17) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_forward_args.txt b/test/prism/snapshots/seattlerb/defn_forward_args.txt
deleted file mode 100644
index 71a984c811..0000000000
--- a/test/prism/snapshots/seattlerb/defn_forward_args.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,23))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,23))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,23))
- ├── name: :a
- ├── name_loc: (1,4)-(1,5) = "a"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,9))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ ForwardingParameterNode (location: (1,6)-(1,9))
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (1,12)-(1,18))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,12)-(1,18))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (1,12)-(1,13) = "b"
- │ ├── opening_loc: (1,13)-(1,14) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,14)-(1,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ForwardingArgumentsNode (location: (1,14)-(1,17))
- │ ├── closing_loc: (1,17)-(1,18) = ")"
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,9)-(1,10) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,20)-(1,23) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
deleted file mode 100644
index 4a4d69e4d0..0000000000
--- a/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(3,3))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,9))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ ForwardingParameterNode (location: (1,6)-(1,9))
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (2,2)-(2,8))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (2,2)-(2,3) = "m"
- │ ├── opening_loc: (2,3)-(2,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,4)-(2,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ForwardingArgumentsNode (location: (2,4)-(2,7))
- │ ├── closing_loc: (2,7)-(2,8) = ")"
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_env.txt b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
deleted file mode 100644
index 2aadedd964..0000000000
--- a/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,45))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,45))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,45))
- ├── name: :test
- ├── name_loc: (1,4)-(1,8) = "test"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,9)-(1,18))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ KeywordRestParameterNode (location: (1,9)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── name: :testing
- │ │ ├── name_loc: (1,11)-(1,18) = "testing"
- │ │ └── operator_loc: (1,9)-(1,11) = "**"
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (1,20)-(1,41))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,20)-(1,41))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :test_splat
- │ ├── message_loc: (1,20)-(1,30) = "test_splat"
- │ ├── opening_loc: (1,30)-(1,31) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,31)-(1,40))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (1,31)-(1,40))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (1,31)-(1,40))
- │ │ ├── value:
- │ │ │ @ LocalVariableReadNode (location: (1,33)-(1,40))
- │ │ │ ├── name: :testing
- │ │ │ └── depth: 0
- │ │ └── operator_loc: (1,31)-(1,33) = "**"
- │ ├── closing_loc: (1,40)-(1,41) = ")"
- │ └── block: ∅
- ├── locals: [:testing]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,8)-(1,9) = "("
- ├── rparen_loc: (1,18)-(1,19) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,42)-(1,45) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
deleted file mode 100644
index 8a5022ff37..0000000000
--- a/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,24))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,24))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,24))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,19))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :a
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 2)
- │ │ ├── @ OptionalKeywordParameterNode (location: (1,9)-(1,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,9)-(1,11) = "b:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ OptionalKeywordParameterNode (location: (1,15)-(1,19))
- │ │ ├── flags: ∅
- │ │ ├── name: :c
- │ │ ├── name_loc: (1,15)-(1,17) = "c:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,18)-(1,19))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a, :b, :c]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,19)-(1,20) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,21)-(1,24) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
deleted file mode 100644
index 4c980bc27f..0000000000
--- a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,20))
- ├── name: :a
- ├── name_loc: (1,4)-(1,5) = "a"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,15))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,6)-(1,8) = "b:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_rest:
- │ │ @ KeywordRestParameterNode (location: (1,12)-(1,15))
- │ │ ├── flags: ∅
- │ │ ├── name: :c
- │ │ ├── name_loc: (1,14)-(1,15) = "c"
- │ │ └── operator_loc: (1,12)-(1,14) = "**"
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:b, :c]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,15)-(1,16) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,17)-(1,20) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
deleted file mode 100644
index 40afacc2a7..0000000000
--- a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,19))
- ├── name: :a
- ├── name_loc: (1,4)-(1,5) = "a"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,14))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,6)-(1,8) = "b:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_rest:
- │ │ @ KeywordRestParameterNode (location: (1,12)-(1,14))
- │ │ ├── flags: ∅
- │ │ ├── name: ∅
- │ │ ├── name_loc: ∅
- │ │ └── operator_loc: (1,12)-(1,14) = "**"
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:b]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,14)-(1,15) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,16)-(1,19) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
deleted file mode 100644
index 0eae56924c..0000000000
--- a/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,26))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,26))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,26))
- ├── name: :fun
- ├── name_loc: (1,4)-(1,7) = "fun"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,8)-(1,16))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,16))
- │ │ ├── flags: ∅
- │ │ ├── name: :kw
- │ │ ├── name_loc: (1,8)-(1,11) = "kw:"
- │ │ └── value:
- │ │ @ SymbolNode (location: (1,12)-(1,16))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,12)-(1,13) = ":"
- │ │ ├── value_loc: (1,13)-(1,16) = "val"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "val"
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (1,19)-(1,21))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (1,19)-(1,21))
- │ ├── name: :kw
- │ └── depth: 0
- ├── locals: [:kw]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,7)-(1,8) = "("
- ├── rparen_loc: (1,16)-(1,17) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,23)-(1,26) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt
deleted file mode 100644
index bc5747ad02..0000000000
--- a/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(2,3))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,10))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
- │ │ ├── flags: ∅
- │ │ ├── name: :a
- │ │ ├── name_loc: (1,6)-(1,8) = "a:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_val.txt b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
deleted file mode 100644
index 82527f7875..0000000000
--- a/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,17))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,12))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :a
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,9)-(1,12))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,9)-(1,11) = "b:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,11)-(1,12))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a, :b]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,12)-(1,13) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_no_kwargs.txt b/test/prism/snapshots/seattlerb/defn_no_kwargs.txt
deleted file mode 100644
index 0ef0634a53..0000000000
--- a/test/prism/snapshots/seattlerb/defn_no_kwargs.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,17))
- ├── name: :x
- ├── name_loc: (1,4)-(1,5) = "x"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,11))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ NoKeywordsParameterNode (location: (1,6)-(1,11))
- │ │ ├── operator_loc: (1,6)-(1,8) = "**"
- │ │ └── keyword_loc: (1,8)-(1,11) = "nil"
- │ └── block: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,11)-(1,12) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner.txt b/test/prism/snapshots/seattlerb/defn_oneliner.txt
deleted file mode 100644
index e700499809..0000000000
--- a/test/prism/snapshots/seattlerb/defn_oneliner.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,27))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,27))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,27))
- ├── name: :exec
- ├── name_loc: (1,4)-(1,8) = "exec"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,9)-(1,12))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,9)-(1,12))
- │ │ ├── flags: ∅
- │ │ └── name: :cmd
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (1,16)-(1,27))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,16)-(1,27))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :system
- │ ├── message_loc: (1,16)-(1,22) = "system"
- │ ├── opening_loc: (1,22)-(1,23) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,23)-(1,26))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (1,23)-(1,26))
- │ │ ├── name: :cmd
- │ │ └── depth: 0
- │ ├── closing_loc: (1,26)-(1,27) = ")"
- │ └── block: ∅
- ├── locals: [:cmd]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,8)-(1,9) = "("
- ├── rparen_loc: (1,12)-(1,13) = ")"
- ├── equal_loc: (1,14)-(1,15) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt b/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
deleted file mode 100644
index 2708351ede..0000000000
--- a/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ ClassNode (location: (1,0)-(3,3))
- ├── locals: []
- ├── class_keyword_loc: (1,0)-(1,5) = "class"
- ├── constant_path:
- │ @ ConstantReadNode (location: (1,6)-(1,7))
- │ └── name: :X
- ├── inheritance_operator_loc: ∅
- ├── superclass: ∅
- ├── body:
- │ @ StatementsNode (location: (2,2)-(2,16))
- │ └── body: (length: 1)
- │ └── @ DefNode (location: (2,2)-(2,16))
- │ ├── name: :==
- │ ├── name_loc: (2,6)-(2,8) = "=="
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (2,9)-(2,10))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (2,9)-(2,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :o
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (2,14)-(2,16))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (2,14)-(2,16))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── locals: [:o]
- │ ├── def_keyword_loc: (2,2)-(2,5) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (2,8)-(2,9) = "("
- │ ├── rparen_loc: (2,10)-(2,11) = ")"
- │ ├── equal_loc: (2,12)-(2,13) = "="
- │ └── end_keyword_loc: ∅
- ├── end_keyword_loc: (3,0)-(3,3) = "end"
- └── name: :X
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt
deleted file mode 100644
index 54555b1a23..0000000000
--- a/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,17))
- ├── name: :exec
- ├── name_loc: (1,4)-(1,8) = "exec"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,11)-(1,17))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,11)-(1,17))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :system
- │ ├── message_loc: (1,11)-(1,17) = "system"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: (1,9)-(1,10) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt
deleted file mode 100644
index e0fc4636f1..0000000000
--- a/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,19))
- ├── name: :exec
- ├── name_loc: (1,4)-(1,8) = "exec"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,13)-(1,19))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,13)-(1,19))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :system
- │ ├── message_loc: (1,13)-(1,19) = "system"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,8)-(1,9) = "("
- ├── rparen_loc: (1,9)-(1,10) = ")"
- ├── equal_loc: (1,11)-(1,12) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
deleted file mode 100644
index b5b5dbe6ac..0000000000
--- a/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
+++ /dev/null
@@ -1,158 +0,0 @@
-@ ProgramNode (location: (1,0)-(13,38))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(13,38))
- └── body: (length: 3)
- ├── @ DefNode (location: (1,0)-(5,3))
- │ ├── name: :exec
- │ ├── name_loc: (1,4)-(1,8) = "exec"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,9)-(1,12))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :cmd
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (1,0)-(5,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,2)-(2,13))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,2)-(2,13))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :system
- │ │ │ ├── message_loc: (2,2)-(2,8) = "system"
- │ │ │ ├── opening_loc: (2,8)-(2,9) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12))
- │ │ │ │ ├── name: :cmd
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: (2,12)-(2,13) = ")"
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (3,0)-(4,5))
- │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (4,2)-(4,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ NilNode (location: (4,2)-(4,5))
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ ├── locals: [:cmd]
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ ├── rparen_loc: (1,12)-(1,13) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ DefNode (location: (8,0)-(10,3))
- │ ├── name: :exec
- │ ├── name_loc: (8,4)-(8,8) = "exec"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (8,9)-(8,12))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (8,9)-(8,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :cmd
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (9,2)-(9,24))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (9,2)-(9,24))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (9,2)-(9,13))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :system
- │ │ │ ├── message_loc: (9,2)-(9,8) = "system"
- │ │ │ ├── opening_loc: (9,8)-(9,9) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12))
- │ │ │ │ ├── name: :cmd
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: (9,12)-(9,13) = ")"
- │ │ │ └── block: ∅
- │ │ ├── keyword_loc: (9,14)-(9,20) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ NilNode (location: (9,21)-(9,24))
- │ ├── locals: [:cmd]
- │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (8,8)-(8,9) = "("
- │ ├── rparen_loc: (8,12)-(8,13) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (10,0)-(10,3) = "end"
- └── @ DefNode (location: (13,0)-(13,38))
- ├── name: :exec
- ├── name_loc: (13,4)-(13,8) = "exec"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (13,9)-(13,12))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (13,9)-(13,12))
- │ │ ├── flags: ∅
- │ │ └── name: :cmd
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (13,16)-(13,38))
- │ └── body: (length: 1)
- │ └── @ RescueModifierNode (location: (13,16)-(13,38))
- │ ├── expression:
- │ │ @ CallNode (location: (13,16)-(13,27))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :system
- │ │ ├── message_loc: (13,16)-(13,22) = "system"
- │ │ ├── opening_loc: (13,22)-(13,23) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (13,23)-(13,26))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (13,23)-(13,26))
- │ │ │ ├── name: :cmd
- │ │ │ └── depth: 0
- │ │ ├── closing_loc: (13,26)-(13,27) = ")"
- │ │ └── block: ∅
- │ ├── keyword_loc: (13,28)-(13,34) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (13,35)-(13,38))
- ├── locals: [:cmd]
- ├── def_keyword_loc: (13,0)-(13,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (13,8)-(13,9) = "("
- ├── rparen_loc: (13,12)-(13,13) = ")"
- ├── equal_loc: (13,14)-(13,15) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt b/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt
deleted file mode 100644
index 569bc23078..0000000000
--- a/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(2,3))
- ├── name: :m
- ├── name_loc: (1,4)-(1,5) = "m"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,17))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 1)
- │ │ └── @ OptionalParameterNode (location: (1,6)-(1,17))
- │ │ ├── flags: ∅
- │ │ ├── name: :arg
- │ │ ├── name_loc: (1,6)-(1,9) = "arg"
- │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ └── value:
- │ │ @ FalseNode (location: (1,12)-(1,17))
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:arg]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_opt_reg.txt b/test/prism/snapshots/seattlerb/defn_opt_reg.txt
deleted file mode 100644
index f86168513a..0000000000
--- a/test/prism/snapshots/seattlerb/defn_opt_reg.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,19))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,14))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 1)
- │ │ └── @ OptionalParameterNode (location: (1,6)-(1,11))
- │ │ ├── flags: ∅
- │ │ ├── name: :a
- │ │ ├── name_loc: (1,6)-(1,7) = "a"
- │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ └── value:
- │ │ @ NilNode (location: (1,8)-(1,11))
- │ ├── rest: ∅
- │ ├── posts: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ ├── flags: ∅
- │ │ └── name: :b
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a, :b]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,14)-(1,15) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,16)-(1,19) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt b/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
deleted file mode 100644
index 3019e9b73e..0000000000
--- a/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,24))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,24))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,24))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,7)-(1,19))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 1)
- │ │ └── @ OptionalParameterNode (location: (1,7)-(1,12))
- │ │ ├── flags: ∅
- │ │ ├── name: :a
- │ │ ├── name_loc: (1,7)-(1,8) = "a"
- │ │ ├── operator_loc: (1,9)-(1,10) = "="
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,11)-(1,12))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── rest:
- │ │ @ RestParameterNode (location: (1,14)-(1,16))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,15)-(1,16) = "b"
- │ │ └── operator_loc: (1,14)-(1,15) = "*"
- │ ├── posts: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19))
- │ │ ├── flags: ∅
- │ │ └── name: :c
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a, :b, :c]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,6)-(1,7) = "("
- ├── rparen_loc: (1,19)-(1,20) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,21)-(1,24) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_powarg.txt b/test/prism/snapshots/seattlerb/defn_powarg.txt
deleted file mode 100644
index bce131ad18..0000000000
--- a/test/prism/snapshots/seattlerb/defn_powarg.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,17))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,12))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ KeywordRestParameterNode (location: (1,6)-(1,12))
- │ │ ├── flags: ∅
- │ │ ├── name: :opts
- │ │ ├── name_loc: (1,8)-(1,12) = "opts"
- │ │ └── operator_loc: (1,6)-(1,8) = "**"
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:opts]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,12)-(1,13) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt b/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
deleted file mode 100644
index d079e1b5f3..0000000000
--- a/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,23))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,23))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,23))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,18))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :a
- │ ├── optionals: (length: 1)
- │ │ └── @ OptionalParameterNode (location: (1,9)-(1,15))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,9)-(1,10) = "b"
- │ │ ├── operator_loc: (1,11)-(1,12) = "="
- │ │ └── value:
- │ │ @ SymbolNode (location: (1,13)-(1,15))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,13)-(1,14) = ":"
- │ │ ├── value_loc: (1,14)-(1,15) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── rest: ∅
- │ ├── posts: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
- │ │ ├── flags: ∅
- │ │ └── name: :d
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a, :b, :d]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,18)-(1,19) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,20)-(1,23) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_splat_arg.txt b/test/prism/snapshots/seattlerb/defn_splat_arg.txt
deleted file mode 100644
index 109fac495a..0000000000
--- a/test/prism/snapshots/seattlerb/defn_splat_arg.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,15))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,10))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest:
- │ │ @ RestParameterNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ ├── name: ∅
- │ │ ├── name_loc: ∅
- │ │ └── operator_loc: (1,6)-(1,7) = "*"
- │ ├── posts: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ ├── flags: ∅
- │ │ └── name: :a
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,10)-(1,11) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,12)-(1,15) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_unary_not.txt b/test/prism/snapshots/seattlerb/defn_unary_not.txt
deleted file mode 100644
index 231a3c0da9..0000000000
--- a/test/prism/snapshots/seattlerb/defn_unary_not.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,17))
- ├── name: :!
- ├── name_loc: (1,4)-(1,6) = "!@"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,8)-(1,12))
- │ └── body: (length: 1)
- │ └── @ TrueNode (location: (1,8)-(1,12))
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defns_reserved.txt b/test/prism/snapshots/seattlerb/defns_reserved.txt
deleted file mode 100644
index 96860b49ce..0000000000
--- a/test/prism/snapshots/seattlerb/defns_reserved.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,20))
- ├── name: :return
- ├── name_loc: (1,9)-(1,15) = "return"
- ├── receiver:
- │ @ SelfNode (location: (1,4)-(1,8))
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: (1,8)-(1,9) = "."
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,17)-(1,20) = "end"
diff --git a/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt b/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt
deleted file mode 100644
index 24bb14f8e1..0000000000
--- a/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,30))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,30))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,30))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :p
- ├── message_loc: (1,0)-(1,1) = "p"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,30))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ DefNode (location: (1,2)-(1,30))
- │ ├── name: :b
- │ ├── name_loc: (1,11)-(1,12) = "b"
- │ ├── receiver:
- │ │ @ SelfNode (location: (1,6)-(1,10))
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,14)-(1,25))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,14)-(1,25))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,14)-(1,15))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── message_loc: (1,14)-(1,15) = "x"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (1,15)-(1,16) = "."
- │ │ ├── name: :y
- │ │ ├── message_loc: (1,16)-(1,17) = "y"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (1,18)-(1,25))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (1,18)-(1,20) = "do"
- │ │ └── closing_loc: (1,22)-(1,25) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
- │ ├── operator_loc: (1,10)-(1,11) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (1,27)-(1,30) = "end"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_comments.txt b/test/prism/snapshots/seattlerb/defs_comments.txt
deleted file mode 100644
index a2976e7ee2..0000000000
--- a/test/prism/snapshots/seattlerb/defs_comments.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-@ ProgramNode (location: (4,0)-(5,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (4,0)-(5,3))
- └── body: (length: 1)
- └── @ DefNode (location: (4,0)-(5,3))
- ├── name: :blah
- ├── name_loc: (4,9)-(4,13) = "blah"
- ├── receiver:
- │ @ SelfNode (location: (4,4)-(4,8))
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (4,0)-(4,3) = "def"
- ├── operator_loc: (4,8)-(4,9) = "."
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (5,0)-(5,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defs_endless_command.txt b/test/prism/snapshots/seattlerb/defs_endless_command.txt
deleted file mode 100644
index f3c4e79417..0000000000
--- a/test/prism/snapshots/seattlerb/defs_endless_command.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,35))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,35))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,35))
- ├── name: :some_method
- ├── name_loc: (1,6)-(1,17) = "some_method"
- ├── receiver:
- │ @ CallNode (location: (1,4)-(1,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :x
- │ ├── message_loc: (1,4)-(1,5) = "x"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,20)-(1,35))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,20)-(1,35))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :other_method
- │ ├── message_loc: (1,20)-(1,32) = "other_method"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,33)-(1,35))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,33)-(1,35))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: (1,5)-(1,6) = "."
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: (1,18)-(1,19) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
deleted file mode 100644
index b0cd34a9c8..0000000000
--- a/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,45))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,45))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,45))
- ├── name: :some_method
- ├── name_loc: (1,6)-(1,17) = "some_method"
- ├── receiver:
- │ @ CallNode (location: (1,4)-(1,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :x
- │ ├── message_loc: (1,4)-(1,5) = "x"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,20)-(1,45))
- │ └── body: (length: 1)
- │ └── @ RescueModifierNode (location: (1,20)-(1,45))
- │ ├── expression:
- │ │ @ CallNode (location: (1,20)-(1,35))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :other_method
- │ │ ├── message_loc: (1,20)-(1,32) = "other_method"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,33)-(1,35))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (1,33)-(1,35))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,36)-(1,42) = "rescue"
- │ └── rescue_expression:
- │ @ IntegerNode (location: (1,43)-(1,45))
- │ ├── flags: decimal
- │ └── value: 24
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: (1,5)-(1,6) = "."
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: (1,18)-(1,19) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_kwarg.txt b/test/prism/snapshots/seattlerb/defs_kwarg.txt
deleted file mode 100644
index 53235c9bb8..0000000000
--- a/test/prism/snapshots/seattlerb/defs_kwarg.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(2,3))
- ├── name: :a
- ├── name_loc: (1,9)-(1,10) = "a"
- ├── receiver:
- │ @ SelfNode (location: (1,4)-(1,8))
- ├── parameters:
- │ @ ParametersNode (location: (1,11)-(1,15))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,11)-(1,15))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,11)-(1,13) = "b:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,14)-(1,15))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:b]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: (1,8)-(1,9) = "."
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner.txt b/test/prism/snapshots/seattlerb/defs_oneliner.txt
deleted file mode 100644
index d32975354d..0000000000
--- a/test/prism/snapshots/seattlerb/defs_oneliner.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,32))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,32))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,32))
- ├── name: :exec
- ├── name_loc: (1,9)-(1,13) = "exec"
- ├── receiver:
- │ @ SelfNode (location: (1,4)-(1,8))
- ├── parameters:
- │ @ ParametersNode (location: (1,14)-(1,17))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,14)-(1,17))
- │ │ ├── flags: ∅
- │ │ └── name: :cmd
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (1,21)-(1,32))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,21)-(1,32))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :system
- │ ├── message_loc: (1,21)-(1,27) = "system"
- │ ├── opening_loc: (1,27)-(1,28) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,28)-(1,31))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (1,28)-(1,31))
- │ │ ├── name: :cmd
- │ │ └── depth: 0
- │ ├── closing_loc: (1,31)-(1,32) = ")"
- │ └── block: ∅
- ├── locals: [:cmd]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: (1,8)-(1,9) = "."
- ├── lparen_loc: (1,13)-(1,14) = "("
- ├── rparen_loc: (1,17)-(1,18) = ")"
- ├── equal_loc: (1,19)-(1,20) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt b/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
deleted file mode 100644
index fcc5c63cf0..0000000000
--- a/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ ClassNode (location: (1,0)-(3,3))
- ├── locals: []
- ├── class_keyword_loc: (1,0)-(1,5) = "class"
- ├── constant_path:
- │ @ ConstantReadNode (location: (1,6)-(1,7))
- │ └── name: :X
- ├── inheritance_operator_loc: ∅
- ├── superclass: ∅
- ├── body:
- │ @ StatementsNode (location: (2,2)-(2,21))
- │ └── body: (length: 1)
- │ └── @ DefNode (location: (2,2)-(2,21))
- │ ├── name: :==
- │ ├── name_loc: (2,11)-(2,13) = "=="
- │ ├── receiver:
- │ │ @ SelfNode (location: (2,6)-(2,10))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (2,14)-(2,15))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (2,14)-(2,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :o
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (2,19)-(2,21))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (2,19)-(2,21))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── locals: [:o]
- │ ├── def_keyword_loc: (2,2)-(2,5) = "def"
- │ ├── operator_loc: (2,10)-(2,11) = "."
- │ ├── lparen_loc: (2,13)-(2,14) = "("
- │ ├── rparen_loc: (2,15)-(2,16) = ")"
- │ ├── equal_loc: (2,17)-(2,18) = "="
- │ └── end_keyword_loc: ∅
- ├── end_keyword_loc: (3,0)-(3,3) = "end"
- └── name: :X
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
deleted file mode 100644
index f776210768..0000000000
--- a/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
+++ /dev/null
@@ -1,161 +0,0 @@
-@ ProgramNode (location: (1,0)-(13,43))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(13,43))
- └── body: (length: 3)
- ├── @ DefNode (location: (1,0)-(5,3))
- │ ├── name: :exec
- │ ├── name_loc: (1,9)-(1,13) = "exec"
- │ ├── receiver:
- │ │ @ SelfNode (location: (1,4)-(1,8))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,14)-(1,17))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :cmd
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (1,0)-(5,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,2)-(2,13))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,2)-(2,13))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :system
- │ │ │ ├── message_loc: (2,2)-(2,8) = "system"
- │ │ │ ├── opening_loc: (2,8)-(2,9) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12))
- │ │ │ │ ├── name: :cmd
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: (2,12)-(2,13) = ")"
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (3,0)-(4,5))
- │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (4,2)-(4,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ NilNode (location: (4,2)-(4,5))
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ ├── locals: [:cmd]
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: (1,8)-(1,9) = "."
- │ ├── lparen_loc: (1,13)-(1,14) = "("
- │ ├── rparen_loc: (1,17)-(1,18) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ DefNode (location: (8,0)-(10,3))
- │ ├── name: :exec
- │ ├── name_loc: (8,9)-(8,13) = "exec"
- │ ├── receiver:
- │ │ @ SelfNode (location: (8,4)-(8,8))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (8,14)-(8,17))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (8,14)-(8,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :cmd
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (9,2)-(9,24))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (9,2)-(9,24))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (9,2)-(9,13))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :system
- │ │ │ ├── message_loc: (9,2)-(9,8) = "system"
- │ │ │ ├── opening_loc: (9,8)-(9,9) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12))
- │ │ │ │ ├── name: :cmd
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: (9,12)-(9,13) = ")"
- │ │ │ └── block: ∅
- │ │ ├── keyword_loc: (9,14)-(9,20) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ NilNode (location: (9,21)-(9,24))
- │ ├── locals: [:cmd]
- │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
- │ ├── operator_loc: (8,8)-(8,9) = "."
- │ ├── lparen_loc: (8,13)-(8,14) = "("
- │ ├── rparen_loc: (8,17)-(8,18) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (10,0)-(10,3) = "end"
- └── @ DefNode (location: (13,0)-(13,43))
- ├── name: :exec
- ├── name_loc: (13,9)-(13,13) = "exec"
- ├── receiver:
- │ @ SelfNode (location: (13,4)-(13,8))
- ├── parameters:
- │ @ ParametersNode (location: (13,14)-(13,17))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (13,14)-(13,17))
- │ │ ├── flags: ∅
- │ │ └── name: :cmd
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (13,21)-(13,43))
- │ └── body: (length: 1)
- │ └── @ RescueModifierNode (location: (13,21)-(13,43))
- │ ├── expression:
- │ │ @ CallNode (location: (13,21)-(13,32))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :system
- │ │ ├── message_loc: (13,21)-(13,27) = "system"
- │ │ ├── opening_loc: (13,27)-(13,28) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (13,28)-(13,31))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (13,28)-(13,31))
- │ │ │ ├── name: :cmd
- │ │ │ └── depth: 0
- │ │ ├── closing_loc: (13,31)-(13,32) = ")"
- │ │ └── block: ∅
- │ ├── keyword_loc: (13,33)-(13,39) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (13,40)-(13,43))
- ├── locals: [:cmd]
- ├── def_keyword_loc: (13,0)-(13,3) = "def"
- ├── operator_loc: (13,8)-(13,9) = "."
- ├── lparen_loc: (13,13)-(13,14) = "("
- ├── rparen_loc: (13,17)-(13,18) = ")"
- ├── equal_loc: (13,19)-(13,20) = "="
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult0_.txt b/test/prism/snapshots/seattlerb/difficult0_.txt
deleted file mode 100644
index 8ba30ccf85..0000000000
--- a/test/prism/snapshots/seattlerb/difficult0_.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(4,8))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :p
- ├── message_loc: (1,0)-(1,1) = "p"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(4,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,2)-(4,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,2)-(4,4))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ StringNode (location: (1,2)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<-END"
- │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n"
- │ │ │ ├── closing_loc: (3,0)-(4,0) = " END\n"
- │ │ │ └── unescaped: " a\n"
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :+
- │ │ ├── message_loc: (1,8)-(1,9) = "+"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,9)-(4,4))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ InterpolatedStringNode (location: (1,9)-(4,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,9)-(1,10) = "'"
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (1,10)-(2,0))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (1,10)-(2,0) = "b\n"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "b\n"
- │ │ │ │ └── @ StringNode (location: (4,0)-(4,3))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (4,0)-(4,3) = " c"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " c"
- │ │ │ └── closing_loc: (4,3)-(4,4) = "'"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (4,4)-(4,5) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (4,5)-(4,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (4,5)-(4,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (4,5)-(4,6) = "'"
- │ │ ├── content_loc: (4,6)-(4,7) = "d"
- │ │ ├── closing_loc: (4,7)-(4,8) = "'"
- │ │ └── unescaped: "d"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt b/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt
deleted file mode 100644
index da2306312c..0000000000
--- a/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt
+++ /dev/null
@@ -1,267 +0,0 @@
-@ ProgramNode (location: (1,0)-(12,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(12,3))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(12,3))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ TrueNode (location: (1,3)-(1,7))
- ├── then_keyword_loc: ∅
- ├── statements:
- │ @ StatementsNode (location: (2,2)-(11,11))
- │ └── body: (length: 10)
- │ ├── @ CallNode (location: (2,2)-(2,5))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :p
- │ │ ├── message_loc: (2,2)-(2,3) = "p"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (2,4)-(2,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (3,2)-(3,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (3,2)-(3,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (3,2)-(3,3) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (3,3)-(3,4) = "."
- │ │ ├── name: :b
- │ │ ├── message_loc: (3,4)-(3,5) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (3,6)-(3,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (4,2)-(4,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (4,2)-(4,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (4,2)-(4,3) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (4,3)-(4,4) = "."
- │ │ ├── name: :d
- │ │ ├── message_loc: (4,4)-(4,5) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (4,6)-(4,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (4,6)-(4,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 3
- │ │ │ └── @ IntegerNode (location: (4,9)-(4,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 4
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (5,2)-(5,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (5,2)-(5,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :e
- │ │ │ ├── message_loc: (5,2)-(5,3) = "e"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (5,3)-(5,4) = "."
- │ │ ├── name: :f
- │ │ ├── message_loc: (5,4)-(5,5) = "f"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 5
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (6,2)-(6,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (6,2)-(6,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :g
- │ │ │ ├── message_loc: (6,2)-(6,3) = "g"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (6,3)-(6,4) = "."
- │ │ ├── name: :h
- │ │ ├── message_loc: (6,4)-(6,5) = "h"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (6,6)-(6,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (6,6)-(6,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 6
- │ │ │ └── @ IntegerNode (location: (6,9)-(6,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 7
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (7,2)-(7,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :p
- │ │ ├── message_loc: (7,2)-(7,3) = "p"
- │ │ ├── opening_loc: (7,3)-(7,4) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (7,4)-(7,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (7,4)-(7,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: (7,5)-(7,6) = ")"
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (8,2)-(8,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (8,2)-(8,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (8,2)-(8,3) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (8,3)-(8,4) = "."
- │ │ ├── name: :b
- │ │ ├── message_loc: (8,4)-(8,5) = "b"
- │ │ ├── opening_loc: (8,5)-(8,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (8,6)-(8,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (8,6)-(8,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── closing_loc: (8,7)-(8,8) = ")"
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (9,2)-(9,11))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (9,2)-(9,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (9,2)-(9,3) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (9,3)-(9,4) = "."
- │ │ ├── name: :d
- │ │ ├── message_loc: (9,4)-(9,5) = "d"
- │ │ ├── opening_loc: (9,5)-(9,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (9,6)-(9,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (9,6)-(9,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 3
- │ │ │ └── @ IntegerNode (location: (9,9)-(9,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 4
- │ │ ├── closing_loc: (9,10)-(9,11) = ")"
- │ │ └── block: ∅
- │ ├── @ CallNode (location: (10,2)-(10,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (10,2)-(10,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :e
- │ │ │ ├── message_loc: (10,2)-(10,3) = "e"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (10,3)-(10,4) = "."
- │ │ ├── name: :f
- │ │ ├── message_loc: (10,4)-(10,5) = "f"
- │ │ ├── opening_loc: (10,5)-(10,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (10,6)-(10,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (10,6)-(10,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 5
- │ │ ├── closing_loc: (10,7)-(10,8) = ")"
- │ │ └── block: ∅
- │ └── @ CallNode (location: (11,2)-(11,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (11,2)-(11,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :g
- │ │ ├── message_loc: (11,2)-(11,3) = "g"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (11,3)-(11,4) = "."
- │ ├── name: :h
- │ ├── message_loc: (11,4)-(11,5) = "h"
- │ ├── opening_loc: (11,5)-(11,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,6)-(11,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (11,6)-(11,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 6
- │ │ └── @ IntegerNode (location: (11,9)-(11,10))
- │ │ ├── flags: decimal
- │ │ └── value: 7
- │ ├── closing_loc: (11,10)-(11,11) = ")"
- │ └── block: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (12,0)-(12,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt b/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt
deleted file mode 100644
index f586634c59..0000000000
--- a/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,1))
-├── locals: [:b, :c]
-└── statements:
- @ StatementsNode (location: (1,0)-(7,1))
- └── body: (length: 2)
- ├── @ IfNode (location: (1,0)-(6,3))
- │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (1,3)-(1,7))
- │ ├── then_keyword_loc: (1,8)-(1,12) = "then"
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(5,6))
- │ │ └── body: (length: 4)
- │ │ ├── @ CallNode (location: (2,2)-(2,8))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :p
- │ │ │ ├── message_loc: (2,2)-(2,3) = "p"
- │ │ │ ├── opening_loc: (2,3)-(2,4) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (2,4)-(2,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ StringNode (location: (2,4)-(2,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\""
- │ │ │ │ ├── content_loc: (2,5)-(2,6) = "a"
- │ │ │ │ ├── closing_loc: (2,6)-(2,7) = "\""
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── closing_loc: (2,7)-(2,8) = ")"
- │ │ │ └── block: ∅
- │ │ ├── @ LocalVariableWriteNode (location: (3,2)-(3,7))
- │ │ │ ├── name: :b
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (3,2)-(3,3) = "b"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (3,6)-(3,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: (3,4)-(3,5) = "="
- │ │ ├── @ CallNode (location: (4,2)-(4,5))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :p
- │ │ │ ├── message_loc: (4,2)-(4,3) = "p"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (4,4)-(4,5))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (4,4)-(4,5))
- │ │ │ │ ├── name: :b
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ LocalVariableWriteNode (location: (5,2)-(5,6))
- │ │ ├── name: :c
- │ │ ├── depth: 0
- │ │ ├── name_loc: (5,2)-(5,3) = "c"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (5,5)-(5,6))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (5,4)-(5,5) = "="
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- └── @ CallNode (location: (7,0)-(7,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (7,0)-(7,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult2_.txt b/test/prism/snapshots/seattlerb/difficult2_.txt
deleted file mode 100644
index b53d4cad3f..0000000000
--- a/test/prism/snapshots/seattlerb/difficult2_.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,6))
- └── body: (length: 2)
- ├── @ IfNode (location: (1,0)-(1,13))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ IntegerNode (location: (1,0)-(1,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── then_keyword_loc: (1,2)-(1,3) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,4)-(1,9))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,9))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ ├── opening_loc: (1,5)-(1,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,6)-(1,7) = "'"
- │ │ │ ├── content_loc: (1,7)-(1,7) = ""
- │ │ │ ├── closing_loc: (1,7)-(1,8) = "'"
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: (1,8)-(1,9) = ")"
- │ │ └── block: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (1,10)-(1,13))
- │ │ ├── else_keyword_loc: (1,10)-(1,11) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,12)-(1,13))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (1,12)-(1,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- └── @ CallNode (location: (2,0)-(2,6))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (2,0)-(2,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (2,2)-(2,6))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (2,2)-(2,6))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (2,2)-(2,6))
- │ ├── key:
- │ │ @ SymbolNode (location: (2,2)-(2,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (2,2)-(2,3) = "d"
- │ │ ├── closing_loc: (2,3)-(2,4) = ":"
- │ │ └── unescaped: "d"
- │ ├── value:
- │ │ @ IntegerNode (location: (2,5)-(2,6))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult3_.txt b/test/prism/snapshots/seattlerb/difficult3_.txt
deleted file mode 100644
index f074c49a9f..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3_.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,18))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,18))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,16))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,15))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,12)-(1,14))
- │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,14)-(1,15) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,15)-(1,16) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,17)-(1,18) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3_2.txt b/test/prism/snapshots/seattlerb/difficult3_2.txt
deleted file mode 100644
index af1a649171..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3_2.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,13))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,10))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,5)-(1,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,6)-(1,7) = "a"
- │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,10)-(1,11) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3_3.txt b/test/prism/snapshots/seattlerb/difficult3_3.txt
deleted file mode 100644
index e49bbcd55a..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3_3.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,5)-(1,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,6)-(1,7) = "a"
- │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,12)-(1,14))
- │ │ ├── flags: ∅
- │ │ ├── name: :c
- │ │ ├── name_loc: (1,13)-(1,14) = "c"
- │ │ └── operator_loc: (1,12)-(1,13) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3_4.txt b/test/prism/snapshots/seattlerb/difficult3_4.txt
deleted file mode 100644
index 73afffb4cb..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3_4.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,17))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ IfNode (location: (1,2)-(1,17))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (1,2)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,2)-(1,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (1,4)-(1,5) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,6)-(1,10))
- │ │ └── body: (length: 1)
- │ │ └── @ TrueNode (location: (1,6)-(1,10))
- │ ├── consequent:
- │ │ @ ElseNode (location: (1,10)-(1,17))
- │ │ ├── else_keyword_loc: (1,10)-(1,11) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,12)-(1,17))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ FalseNode (location: (1,12)-(1,17))
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- └── operator_loc: (1,1)-(1,2) = "="
diff --git a/test/prism/snapshots/seattlerb/difficult3_5.txt b/test/prism/snapshots/seattlerb/difficult3_5.txt
deleted file mode 100644
index 793c3f1e11..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3_5.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,19))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,19))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,19))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,19))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LambdaNode (location: (1,2)-(1,19))
- │ ├── locals: []
- │ ├── operator_loc: (1,2)-(1,4) = "->"
- │ ├── opening_loc: (1,7)-(1,8) = "{"
- │ ├── closing_loc: (1,18)-(1,19) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (1,4)-(1,6))
- │ │ ├── parameters: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (1,4)-(1,5) = "("
- │ │ └── closing_loc: (1,5)-(1,6) = ")"
- │ └── body:
- │ @ StatementsNode (location: (1,9)-(1,17))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,9)-(1,17))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :g
- │ ├── message_loc: (1,9)-(1,10) = "g"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,11)-(1,17))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,11)-(1,13) = "do"
- │ └── closing_loc: (1,14)-(1,17) = "end"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult3__10.txt b/test/prism/snapshots/seattlerb/difficult3__10.txt
deleted file mode 100644
index 0131e44d44..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3__10.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,18))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,18))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,16))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,15))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15))
- │ │ │ ├── lefts: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
- │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,14)-(1,15) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,15)-(1,16) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,17)-(1,18) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__11.txt b/test/prism/snapshots/seattlerb/difficult3__11.txt
deleted file mode 100644
index a658b091c2..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3__11.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,14))
- ├── locals: [:a]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,11))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,11))
- │ │ │ ├── lefts: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,9)-(1,10))
- │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,10)-(1,11) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__12.txt b/test/prism/snapshots/seattlerb/difficult3__12.txt
deleted file mode 100644
index 5aa252fe6a..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3__12.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14))
- │ │ │ ├── lefts: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,9)-(1,10))
- │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,13)-(1,14) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__6.txt b/test/prism/snapshots/seattlerb/difficult3__6.txt
deleted file mode 100644
index a42a625be7..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3__6.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,21))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,21))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,21))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,21))
- ├── locals: [:a, :b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,19))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,18))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,18))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,12)-(1,14))
- │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :d
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,17)-(1,18) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,18)-(1,19) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,20)-(1,21) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__7.txt b/test/prism/snapshots/seattlerb/difficult3__7.txt
deleted file mode 100644
index b08025804c..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3__7.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,12)-(1,13))
- │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,13)-(1,14) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__8.txt b/test/prism/snapshots/seattlerb/difficult3__8.txt
deleted file mode 100644
index b2b118faef..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3__8.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,20))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,20))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,18))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,17))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,17))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,12)-(1,13))
- │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
- │ │ │ │ └── expression: ∅
- │ │ │ ├── rights: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,16)-(1,17) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,17)-(1,18) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,19)-(1,20) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult3__9.txt b/test/prism/snapshots/seattlerb/difficult3__9.txt
deleted file mode 100644
index 85c10a4432..0000000000
--- a/test/prism/snapshots/seattlerb/difficult3__9.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,15))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,15))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,13))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,12))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,12))
- │ │ │ ├── lefts: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (1,9)-(1,11))
- │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ └── rparen_loc: (1,11)-(1,12) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,12)-(1,13) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,14)-(1,15) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt b/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt
deleted file mode 100644
index 8307c806e6..0000000000
--- a/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,2))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(2,2))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (2,0)-(2,1) = "."
- ├── name: :b
- ├── message_loc: (2,1)-(2,2) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt b/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt
deleted file mode 100644
index ee4370c0f0..0000000000
--- a/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 2)
- ├── @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- └── @ RangeNode (location: (2,0)-(2,3))
- ├── flags: ∅
- ├── left: ∅
- ├── right:
- │ @ IntegerNode (location: (2,2)-(2,3))
- │ ├── flags: decimal
- │ └── value: 3
- └── operator_loc: (2,0)-(2,2) = ".."
diff --git a/test/prism/snapshots/seattlerb/difficult6_.txt b/test/prism/snapshots/seattlerb/difficult6_.txt
deleted file mode 100644
index bf80034fe9..0000000000
--- a/test/prism/snapshots/seattlerb/difficult6_.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,25))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,25))
- └── body: (length: 1)
- └── @ LambdaNode (location: (1,0)-(1,25))
- ├── locals: [:a, :b]
- ├── operator_loc: (1,0)-(1,2) = "->"
- ├── opening_loc: (1,13)-(1,14) = "{"
- ├── closing_loc: (1,24)-(1,25) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (1,2)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,3)-(1,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ NilNode (location: (1,8)-(1,11))
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ └── closing_loc: (1,11)-(1,12) = ")"
- └── body:
- @ StatementsNode (location: (1,15)-(1,23))
- └── body: (length: 1)
- └── @ CallNode (location: (1,15)-(1,23))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :p
- ├── message_loc: (1,15)-(1,16) = "p"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,17)-(1,23))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ArrayNode (location: (1,17)-(1,23))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ LocalVariableReadNode (location: (1,18)-(1,19))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableReadNode (location: (1,21)-(1,22))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── opening_loc: (1,17)-(1,18) = "["
- │ └── closing_loc: (1,22)-(1,23) = "]"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult6__7.txt b/test/prism/snapshots/seattlerb/difficult6__7.txt
deleted file mode 100644
index 7fe70c7033..0000000000
--- a/test/prism/snapshots/seattlerb/difficult6__7.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,11))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :b
- ├── message_loc: (1,2)-(1,3) = "b"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,7))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ParenthesesNode (location: (1,4)-(1,7))
- │ ├── body:
- │ │ @ StatementsNode (location: (1,5)-(1,6))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── opening_loc: (1,4)-(1,5) = "("
- │ └── closing_loc: (1,6)-(1,7) = ")"
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,8)-(1,11))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,9)-(1,10))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,9)-(1,10))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (1,9)-(1,10) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,8)-(1,9) = "{"
- └── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult6__8.txt b/test/prism/snapshots/seattlerb/difficult6__8.txt
deleted file mode 100644
index 7f915e283c..0000000000
--- a/test/prism/snapshots/seattlerb/difficult6__8.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,12))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "::"
- ├── name: :b
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ParenthesesNode (location: (1,5)-(1,8))
- │ ├── body:
- │ │ @ StatementsNode (location: (1,6)-(1,7))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── opening_loc: (1,5)-(1,6) = "("
- │ └── closing_loc: (1,7)-(1,8) = ")"
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,9)-(1,12))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (1,10)-(1,11))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,10)-(1,11))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (1,10)-(1,11) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,9)-(1,10) = "{"
- └── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult7_.txt b/test/prism/snapshots/seattlerb/difficult7_.txt
deleted file mode 100644
index 40c778cf6c..0000000000
--- a/test/prism/snapshots/seattlerb/difficult7_.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-@ ProgramNode (location: (1,6)-(4,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,6)-(4,7))
- └── body: (length: 1)
- └── @ HashNode (location: (1,6)-(4,7))
- ├── opening_loc: (1,6)-(1,7) = "{"
- ├── elements: (length: 2)
- │ ├── @ AssocNode (location: (2,8)-(2,33))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (2,8)-(2,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (2,8)-(2,9) = "a"
- │ │ │ ├── closing_loc: (2,9)-(2,10) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (2,11)-(2,33))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :lambda
- │ │ │ ├── message_loc: (2,11)-(2,17) = "lambda"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (2,18)-(2,33))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (2,20)-(2,31))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IfNode (location: (2,20)-(2,31))
- │ │ │ │ ├── if_keyword_loc: ∅
- │ │ │ │ ├── predicate:
- │ │ │ │ │ @ CallNode (location: (2,20)-(2,21))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── then_keyword_loc: (2,22)-(2,23) = "?"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (2,24)-(2,27))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (2,24)-(2,27))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :c
- │ │ │ │ │ ├── message_loc: (2,24)-(2,25) = "c"
- │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "("
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: (2,26)-(2,27) = ")"
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── consequent:
- │ │ │ │ │ @ ElseNode (location: (2,28)-(2,31))
- │ │ │ │ │ ├── else_keyword_loc: (2,28)-(2,29) = ":"
- │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ @ StatementsNode (location: (2,30)-(2,31))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ CallNode (location: (2,30)-(2,31))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :d
- │ │ │ │ │ │ ├── message_loc: (2,30)-(2,31) = "d"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ └── end_keyword_loc: ∅
- │ │ │ │ └── end_keyword_loc: ∅
- │ │ │ ├── opening_loc: (2,18)-(2,19) = "{"
- │ │ │ └── closing_loc: (2,32)-(2,33) = "}"
- │ │ └── operator_loc: ∅
- │ └── @ AssocNode (location: (3,8)-(3,14))
- │ ├── key:
- │ │ @ SymbolNode (location: (3,8)-(3,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (3,8)-(3,9) = "e"
- │ │ ├── closing_loc: (3,9)-(3,10) = ":"
- │ │ └── unescaped: "e"
- │ ├── value:
- │ │ @ NilNode (location: (3,11)-(3,14))
- │ └── operator_loc: ∅
- └── closing_loc: (4,6)-(4,7) = "}"
diff --git a/test/prism/snapshots/seattlerb/do_bug.txt b/test/prism/snapshots/seattlerb/do_bug.txt
deleted file mode 100644
index 5877b18d68..0000000000
--- a/test/prism/snapshots/seattlerb/do_bug.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,2)-(1,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (2,0)-(4,3))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (2,0)-(2,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (2,0)-(2,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (2,1)-(2,2) = "."
- ├── name: :b
- ├── message_loc: (2,2)-(2,3) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (2,4)-(4,3))
- ├── locals: [:c]
- ├── parameters:
- │ @ BlockParametersNode (location: (2,7)-(2,10))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (2,8)-(2,9))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (2,8)-(2,9))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (2,7)-(2,8) = "|"
- │ └── closing_loc: (2,9)-(2,10) = "|"
- ├── body: ∅
- ├── opening_loc: (2,4)-(2,6) = "do"
- └── closing_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/do_lambda.txt b/test/prism/snapshots/seattlerb/do_lambda.txt
deleted file mode 100644
index 4713fb3e4b..0000000000
--- a/test/prism/snapshots/seattlerb/do_lambda.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ LambdaNode (location: (1,0)-(1,11))
- ├── locals: []
- ├── operator_loc: (1,0)-(1,2) = "->"
- ├── opening_loc: (1,5)-(1,7) = "do"
- ├── closing_loc: (1,8)-(1,11) = "end"
- ├── parameters:
- │ @ BlockParametersNode (location: (1,2)-(1,4))
- │ ├── parameters: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ └── closing_loc: (1,3)-(1,4) = ")"
- └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/dot2_nil__26.txt b/test/prism/snapshots/seattlerb/dot2_nil__26.txt
deleted file mode 100644
index 104515ac3a..0000000000
--- a/test/prism/snapshots/seattlerb/dot2_nil__26.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,3))
- └── body: (length: 1)
- └── @ RangeNode (location: (1,0)-(1,3))
- ├── flags: ∅
- ├── left:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── right: ∅
- └── operator_loc: (1,1)-(1,3) = ".."
diff --git a/test/prism/snapshots/seattlerb/dot3_nil__26.txt b/test/prism/snapshots/seattlerb/dot3_nil__26.txt
deleted file mode 100644
index ec7f57cd96..0000000000
--- a/test/prism/snapshots/seattlerb/dot3_nil__26.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ RangeNode (location: (1,0)-(1,4))
- ├── flags: exclude_end
- ├── left:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── right: ∅
- └── operator_loc: (1,1)-(1,4) = "..."
diff --git a/test/prism/snapshots/seattlerb/dstr_evstr.txt b/test/prism/snapshots/seattlerb/dstr_evstr.txt
deleted file mode 100644
index add8ad6f5c..0000000000
--- a/test/prism/snapshots/seattlerb/dstr_evstr.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,12))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 2)
- │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,7))
- │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,3)-(1,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ StringNode (location: (1,3)-(1,6))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (1,3)-(1,4) = "'"
- │ │ │ ├── content_loc: (1,4)-(1,5) = "a"
- │ │ │ ├── closing_loc: (1,5)-(1,6) = "'"
- │ │ │ └── unescaped: "a"
- │ │ └── closing_loc: (1,6)-(1,7) = "}"
- │ └── @ EmbeddedStatementsNode (location: (1,7)-(1,11))
- │ ├── opening_loc: (1,7)-(1,9) = "\#{"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,9)-(1,10))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,9)-(1,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,9)-(1,10) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── closing_loc: (1,10)-(1,11) = "}"
- └── closing_loc: (1,11)-(1,12) = "\""
diff --git a/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt b/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt
deleted file mode 100644
index 53f97e4b36..0000000000
--- a/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ InterpolatedSymbolNode (location: (1,0)-(1,11))
- ├── opening_loc: (1,0)-(1,2) = ":\""
- ├── parts: (length: 1)
- │ └── @ EmbeddedStatementsNode (location: (1,2)-(1,10))
- │ ├── opening_loc: (1,2)-(1,4) = "\#{"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,4)-(1,9))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :field
- │ │ ├── message_loc: (1,4)-(1,9) = "field"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── closing_loc: (1,9)-(1,10) = "}"
- └── closing_loc: (1,10)-(1,11) = "\""
diff --git a/test/prism/snapshots/seattlerb/dstr_lex_state.txt b/test/prism/snapshots/seattlerb/dstr_lex_state.txt
deleted file mode 100644
index c4c0ef0437..0000000000
--- a/test/prism/snapshots/seattlerb/dstr_lex_state.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,8))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 1)
- │ └── @ EmbeddedStatementsNode (location: (1,1)-(1,7))
- │ ├── opening_loc: (1,1)-(1,3) = "\#{"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,3)-(1,6))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,3)-(1,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :p
- │ │ ├── message_loc: (1,3)-(1,4) = "p"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,4)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ SymbolNode (location: (1,4)-(1,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
- │ │ │ ├── value_loc: (1,5)-(1,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── closing_loc: (1,6)-(1,7) = "}"
- └── closing_loc: (1,7)-(1,8) = "\""
diff --git a/test/prism/snapshots/seattlerb/dstr_str.txt b/test/prism/snapshots/seattlerb/dstr_str.txt
deleted file mode 100644
index 6fe0781880..0000000000
--- a/test/prism/snapshots/seattlerb/dstr_str.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,10))
- ├── flags: mutable
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 2)
- │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,7))
- │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,3)-(1,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ StringNode (location: (1,3)-(1,6))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (1,3)-(1,4) = "'"
- │ │ │ ├── content_loc: (1,4)-(1,5) = "a"
- │ │ │ ├── closing_loc: (1,5)-(1,6) = "'"
- │ │ │ └── unescaped: "a"
- │ │ └── closing_loc: (1,6)-(1,7) = "}"
- │ └── @ StringNode (location: (1,7)-(1,9))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (1,7)-(1,9) = " b"
- │ ├── closing_loc: ∅
- │ └── unescaped: " b"
- └── closing_loc: (1,9)-(1,10) = "\""
diff --git a/test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt b/test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt
deleted file mode 100644
index 7b1b68131e..0000000000
--- a/test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ SymbolNode (location: (1,0)-(1,17))
- ├── flags: forced_utf8_encoding
- ├── opening_loc: (1,0)-(1,2) = ":\""
- ├── value_loc: (1,2)-(1,16) = "Variet\\303\\240"
- ├── closing_loc: (1,16)-(1,17) = "\""
- └── unescaped: "Varietà"
diff --git a/test/prism/snapshots/seattlerb/dsym_to_sym.txt b/test/prism/snapshots/seattlerb/dsym_to_sym.txt
deleted file mode 100644
index eb7e435c63..0000000000
--- a/test/prism/snapshots/seattlerb/dsym_to_sym.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,13))
- └── body: (length: 2)
- ├── @ AliasMethodNode (location: (1,0)-(1,17))
- │ ├── new_name:
- │ │ @ SymbolNode (location: (1,6)-(1,11))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,6)-(1,8) = ":\""
- │ │ ├── value_loc: (1,8)-(1,10) = "<<"
- │ │ ├── closing_loc: (1,10)-(1,11) = "\""
- │ │ └── unescaped: "<<"
- │ ├── old_name:
- │ │ @ SymbolNode (location: (1,12)-(1,17))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,12)-(1,14) = ":\""
- │ │ ├── value_loc: (1,14)-(1,16) = ">>"
- │ │ ├── closing_loc: (1,16)-(1,17) = "\""
- │ │ └── unescaped: ">>"
- │ └── keyword_loc: (1,0)-(1,5) = "alias"
- └── @ AliasMethodNode (location: (3,0)-(3,13))
- ├── new_name:
- │ @ SymbolNode (location: (3,6)-(3,9))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (3,6)-(3,7) = ":"
- │ ├── value_loc: (3,7)-(3,9) = "<<"
- │ ├── closing_loc: ∅
- │ └── unescaped: "<<"
- ├── old_name:
- │ @ SymbolNode (location: (3,10)-(3,13))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (3,10)-(3,11) = ":"
- │ ├── value_loc: (3,11)-(3,13) = ">>"
- │ ├── closing_loc: ∅
- │ └── unescaped: ">>"
- └── keyword_loc: (3,0)-(3,5) = "alias"
diff --git a/test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt b/test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt
deleted file mode 100644
index a5fc3951d6..0000000000
--- a/test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,1))
- └── body: (length: 2)
- ├── @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- └── @ IntegerNode (location: (6,0)-(6,1))
- ├── flags: decimal
- └── value: 2
diff --git a/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt b/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt
deleted file mode 100644
index 2103bde8cb..0000000000
--- a/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,8))
- ├── flags: attribute_write
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :h
- │ ├── message_loc: (1,0)-(1,1) = "h"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :[]=
- ├── message_loc: (1,1)-(1,4) = "[k]"
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(3,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ CallNode (location: (1,2)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :k
- │ │ ├── message_loc: (1,2)-(1,3) = "k"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── @ BeginNode (location: (1,5)-(3,8))
- │ ├── begin_keyword_loc: (1,5)-(1,10) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,7)-(2,9))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (2,7)-(2,9))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (3,5)-(3,8) = "end"
- ├── closing_loc: (1,3)-(1,4) = "]"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/evstr_evstr.txt b/test/prism/snapshots/seattlerb/evstr_evstr.txt
deleted file mode 100644
index 9c801299f8..0000000000
--- a/test/prism/snapshots/seattlerb/evstr_evstr.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,10))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 2)
- │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,5))
- │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,3)-(1,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (1,4)-(1,5) = "}"
- │ └── @ EmbeddedStatementsNode (location: (1,5)-(1,9))
- │ ├── opening_loc: (1,5)-(1,7) = "\#{"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,7)-(1,8))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,7)-(1,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,7)-(1,8) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── closing_loc: (1,8)-(1,9) = "}"
- └── closing_loc: (1,9)-(1,10) = "\""
diff --git a/test/prism/snapshots/seattlerb/evstr_str.txt b/test/prism/snapshots/seattlerb/evstr_str.txt
deleted file mode 100644
index 54319e613c..0000000000
--- a/test/prism/snapshots/seattlerb/evstr_str.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,8))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 2)
- │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,5))
- │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,3)-(1,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (1,4)-(1,5) = "}"
- │ └── @ StringNode (location: (1,5)-(1,7))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (1,5)-(1,7) = " b"
- │ ├── closing_loc: ∅
- │ └── unescaped: " b"
- └── closing_loc: (1,7)-(1,8) = "\""
diff --git a/test/prism/snapshots/seattlerb/expr_not_bang.txt b/test/prism/snapshots/seattlerb/expr_not_bang.txt
deleted file mode 100644
index 0a289ab7be..0000000000
--- a/test/prism/snapshots/seattlerb/expr_not_bang.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,2)-(1,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,2)-(1,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :!
- ├── message_loc: (1,0)-(1,1) = "!"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/f_kw.txt b/test/prism/snapshots/seattlerb/f_kw.txt
deleted file mode 100644
index 4226137925..0000000000
--- a/test/prism/snapshots/seattlerb/f_kw.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,15))
- ├── name: :x
- ├── name_loc: (1,4)-(1,5) = "x"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,10))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10))
- │ │ ├── flags: ∅
- │ │ ├── name: :k
- │ │ ├── name_loc: (1,6)-(1,8) = "k:"
- │ │ └── value:
- │ │ @ IntegerNode (location: (1,8)-(1,10))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:k]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,12)-(1,15) = "end"
diff --git a/test/prism/snapshots/seattlerb/f_kw__required.txt b/test/prism/snapshots/seattlerb/f_kw__required.txt
deleted file mode 100644
index f72f43e034..0000000000
--- a/test/prism/snapshots/seattlerb/f_kw__required.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,13))
- ├── name: :x
- ├── name_loc: (1,4)-(1,5) = "x"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,8))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 1)
- │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,8))
- │ │ ├── flags: ∅
- │ │ ├── name: :k
- │ │ └── name_loc: (1,6)-(1,8) = "k:"
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:k]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/seattlerb/flip2_env_lvar.txt b/test/prism/snapshots/seattlerb/flip2_env_lvar.txt
deleted file mode 100644
index 5a71ab6cda..0000000000
--- a/test/prism/snapshots/seattlerb/flip2_env_lvar.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(1,16))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ FlipFlopNode (location: (1,3)-(1,7))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ CallNode (location: (1,3)-(1,4))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,3)-(1,4) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (1,6)-(1,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,6)-(1,7) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (1,4)-(1,6) = ".."
- ├── then_keyword_loc: (1,8)-(1,12) = "then"
- ├── statements: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (1,13)-(1,16) = "end"
diff --git a/test/prism/snapshots/seattlerb/float_with_if_modifier.txt b/test/prism/snapshots/seattlerb/float_with_if_modifier.txt
deleted file mode 100644
index 9c1da70f24..0000000000
--- a/test/prism/snapshots/seattlerb/float_with_if_modifier.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(1,10))
- ├── if_keyword_loc: (1,3)-(1,5) = "if"
- ├── predicate:
- │ @ TrueNode (location: (1,6)-(1,10))
- ├── then_keyword_loc: ∅
- ├── statements:
- │ @ StatementsNode (location: (1,0)-(1,3))
- │ └── body: (length: 1)
- │ └── @ FloatNode (location: (1,0)-(1,3))
- │ └── value: 1.0
- ├── consequent: ∅
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt b/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt
deleted file mode 100644
index 353e4c6964..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:str]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
- ├── name: :str
- ├── depth: 0
- ├── name_loc: (1,0)-(1,3) = "str"
- ├── value:
- │ @ StringNode (location: (1,6)-(1,12))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,6)-(1,12) = "<<-XXX"
- │ ├── content_loc: (2,0)-(4,0) = "before\\\r\nafter\r\n"
- │ ├── closing_loc: (4,0)-(5,0) = "XXX\r\n"
- │ └── unescaped: "beforeafter\n"
- └── operator_loc: (1,4)-(1,5) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt b/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt
deleted file mode 100644
index fc4c1784fe..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,7))
- └── body: (length: 2)
- ├── @ StringNode (location: (1,0)-(3,1))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ ├── content_loc: (1,1)-(3,0) = " why would someone do this? \\\n blah\n"
- │ ├── closing_loc: (3,0)-(3,1) = "\""
- │ └── unescaped: " why would someone do this? blah\n"
- └── @ StringNode (location: (5,0)-(5,7))
- ├── flags: ∅
- ├── opening_loc: (5,0)-(5,7) = "<<-DESC"
- ├── content_loc: (6,0)-(8,0) = " why would someone do this? \\\n blah\n"
- ├── closing_loc: (8,0)-(9,0) = "DESC\n"
- └── unescaped: " why would someone do this? blah\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt b/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt
deleted file mode 100644
index 2b1d776404..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: [:s]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,9))
- ├── name: :s
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "s"
- ├── value:
- │ @ StringNode (location: (1,4)-(1,9))
- │ ├── flags: forced_utf8_encoding
- │ ├── opening_loc: (1,4)-(1,9) = "<<eos"
- │ ├── content_loc: (2,0)-(3,0) = "a\\xE9b\n"
- │ ├── closing_loc: (3,0)-(4,0) = "eos\n"
- │ └── unescaped: "a\xE9b\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt b/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt
deleted file mode 100644
index 7a01f8d6d1..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: [:s]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
- ├── name: :s
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "s"
- ├── value:
- │ @ StringNode (location: (1,4)-(1,10))
- │ ├── flags: forced_utf8_encoding
- │ ├── opening_loc: (1,4)-(1,10) = "<<-EOS"
- │ ├── content_loc: (2,0)-(4,0) = "a\\247b\ncöd\n"
- │ ├── closing_loc: (4,0)-(5,0) = "EOS\n"
- │ └── unescaped: "a\xA7b\ncöd\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt
deleted file mode 100644
index 888ebc809a..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,1))
- └── body: (length: 2)
- ├── @ ArrayNode (location: (1,0)-(2,3))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ StringNode (location: (1,1)-(2,1))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,1)-(1,2) = "\""
- │ │ ├── content_loc: (1,2)-(2,0) = " some text\n"
- │ │ ├── closing_loc: (2,0)-(2,1) = "\""
- │ │ └── unescaped: " some text\n"
- │ ├── opening_loc: (1,0)-(1,1) = "["
- │ └── closing_loc: (2,2)-(2,3) = "]"
- └── @ ArrayNode (location: (4,0)-(7,1))
- ├── flags: ∅
- ├── elements: (length: 1)
- │ └── @ StringNode (location: (4,1)-(4,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (4,1)-(4,8) = "<<-FILE"
- │ ├── content_loc: (5,0)-(6,0) = " some text\n"
- │ ├── closing_loc: (6,0)-(7,0) = "FILE\n"
- │ └── unescaped: " some text\n"
- ├── opening_loc: (4,0)-(4,1) = "["
- └── closing_loc: (7,0)-(7,1) = "]"
diff --git a/test/prism/snapshots/seattlerb/heredoc_lineno.txt b/test/prism/snapshots/seattlerb/heredoc_lineno.txt
deleted file mode 100644
index a51ce71afe..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_lineno.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,6))
-├── locals: [:c, :d]
-└── statements:
- @ StatementsNode (location: (1,0)-(7,6))
- └── body: (length: 2)
- ├── @ LocalVariableWriteNode (location: (1,0)-(1,11))
- │ ├── name: :c
- │ ├── depth: 0
- │ ├── name_loc: (1,0)-(1,1) = "c"
- │ ├── value:
- │ │ @ StringNode (location: (1,4)-(1,11))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,4)-(1,11) = "<<'CCC'"
- │ │ ├── content_loc: (2,0)-(5,0) = "line2\nline3\nline4\n"
- │ │ ├── closing_loc: (5,0)-(6,0) = "CCC\n"
- │ │ └── unescaped: "line2\nline3\nline4\n"
- │ └── operator_loc: (1,2)-(1,3) = "="
- └── @ LocalVariableWriteNode (location: (7,0)-(7,6))
- ├── name: :d
- ├── depth: 0
- ├── name_loc: (7,0)-(7,1) = "d"
- ├── value:
- │ @ IntegerNode (location: (7,4)-(7,6))
- │ ├── flags: decimal
- │ └── value: 42
- └── operator_loc: (7,2)-(7,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_nested.txt b/test/prism/snapshots/seattlerb/heredoc_nested.txt
deleted file mode 100644
index a2322b9632..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_nested.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,2))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(7,2))
- ├── flags: ∅
- ├── elements: (length: 2)
- │ ├── @ InterpolatedStringNode (location: (1,1)-(1,4))
- │ │ ├── flags: mutable
- │ │ ├── opening_loc: (1,1)-(1,4) = "<<A"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ EmbeddedStatementsNode (location: (2,0)-(2,6))
- │ │ │ │ ├── opening_loc: (2,0)-(2,2) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (2,2)-(2,5))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ StringNode (location: (2,2)-(2,5))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: (2,2)-(2,5) = "<<B"
- │ │ │ │ │ ├── content_loc: (3,0)-(4,0) = "b\n"
- │ │ │ │ │ ├── closing_loc: (4,0)-(5,0) = "B\n"
- │ │ │ │ │ └── unescaped: "b\n"
- │ │ │ │ └── closing_loc: (2,5)-(2,6) = "}"
- │ │ │ ├── @ StringNode (location: (2,6)-(3,0))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (2,6)-(3,0) = "\n"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "\n"
- │ │ │ └── @ StringNode (location: (5,0)-(6,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (5,0)-(6,0) = "a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── closing_loc: (6,0)-(7,0) = "A\n"
- │ └── @ IntegerNode (location: (7,0)-(7,1))
- │ ├── flags: decimal
- │ └── value: 0
- ├── opening_loc: (1,0)-(1,1) = "["
- └── closing_loc: (7,1)-(7,2) = "]"
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly.txt
deleted file mode 100644
index 9bab044ace..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ InterpolatedStringNode (location: (1,4)-(1,12))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "x\n"
- │ │ ├── @ StringNode (location: (3,0)-(4,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,0)-(4,0) = " y\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "y\n"
- │ │ └── @ StringNode (location: (4,0)-(5,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "z\n"
- │ └── closing_loc: (5,0)-(6,0) = " EOF\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt
deleted file mode 100644
index e12014afa5..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,20))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ CallNode (location: (1,4)-(1,20))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,4)-(1,7) = "foo"
- │ ├── opening_loc: (1,7)-(1,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,8)-(1,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,8)-(1,19))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ InterpolatedStringNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,8)-(1,14) = "<<~EOF"
- │ │ │ ├── parts: (length: 3)
- │ │ │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (2,0)-(3,0) = "\n"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "\n"
- │ │ │ │ ├── @ EmbeddedStatementsNode (location: (3,4)-(3,10))
- │ │ │ │ │ ├── opening_loc: (3,4)-(3,6) = "\#{"
- │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ @ StatementsNode (location: (3,6)-(3,9))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,9))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :bar
- │ │ │ │ │ │ ├── message_loc: (3,6)-(3,9) = "bar"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}"
- │ │ │ │ └── @ StringNode (location: (3,10)-(4,0))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (3,10)-(4,0) = "baz\n"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "baz\n"
- │ │ │ └── closing_loc: (4,0)-(5,0) = " EOF\n"
- │ │ ├── call_operator_loc: (1,14)-(1,15) = "."
- │ │ ├── name: :chop
- │ │ ├── message_loc: (1,15)-(1,19) = "chop"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (1,19)-(1,20) = ")"
- │ └── block: ∅
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt
deleted file mode 100644
index 8596647e72..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ InterpolatedStringNode (location: (1,4)-(1,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "x\n"
- │ │ ├── @ StringNode (location: (3,0)-(4,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,0)-(4,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (4,0)-(5,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "z\n"
- │ └── closing_loc: (5,0)-(6,0) = "EOF\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt
deleted file mode 100644
index c998f19984..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,4) = "<<~A"
- ├── content_loc: (2,0)-(2,0) = ""
- ├── closing_loc: (2,0)-(3,0) = "A\n"
- └── unescaped: ""
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt
deleted file mode 100644
index d34f89ff9c..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ InterpolatedStringNode (location: (1,4)-(1,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
- │ ├── parts: (length: 5)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = " w\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " w\n"
- │ │ ├── @ StringNode (location: (3,0)-(3,3))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,0)-(3,3) = " x"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "x"
- │ │ ├── @ EmbeddedStatementsNode (location: (3,3)-(3,8))
- │ │ │ ├── opening_loc: (3,3)-(3,5) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (3,5)-(3,7))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (3,5)-(3,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── closing_loc: (3,7)-(3,8) = "}"
- │ │ ├── @ StringNode (location: (3,8)-(4,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,8)-(4,0) = " y\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " y\n"
- │ │ └── @ StringNode (location: (4,0)-(5,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " z\n"
- │ └── closing_loc: (5,0)-(6,0) = " EOF\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt
deleted file mode 100644
index 7c17bc4820..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,4) = "<<~A"
- ├── content_loc: (2,0)-(3,0) = "a\n"
- ├── closing_loc: (3,0)-(4,0) = "A\n"
- └── unescaped: "a\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt
deleted file mode 100644
index 311d7bc1b7..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ InterpolatedStringNode (location: (1,4)-(1,12))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "blah blah\n"
- │ │ └── @ StringNode (location: (3,0)-(4,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (3,0)-(4,0) = "\t blah blah\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " blah blah\n"
- │ └── closing_loc: (4,0)-(5,0) = " EOF\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt
deleted file mode 100644
index 3150f807a2..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ InterpolatedStringNode (location: (1,4)-(1,12))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "blah blah\n"
- │ │ └── @ StringNode (location: (3,0)-(4,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (3,0)-(4,0) = " \tblah blah\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\tblah blah\n"
- │ └── closing_loc: (4,0)-(5,0) = " EOF\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt
deleted file mode 100644
index 85c3d2df6d..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ InterpolatedStringNode (location: (1,4)-(1,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "x\n"
- │ │ ├── @ StringNode (location: (3,0)-(4,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,0)-(4,0) = " \n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (4,0)-(5,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (4,0)-(5,0) = " z\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "z\n"
- │ └── closing_loc: (5,0)-(6,0) = "EOF\n"
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt b/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt
deleted file mode 100644
index bc05047b40..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(4,6))
- ├── flags: ∅
- ├── receiver:
- │ @ StringNode (location: (1,0)-(1,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,5) = "<<END"
- │ ├── content_loc: (2,0)-(3,0) = "blah\n"
- │ ├── closing_loc: (3,0)-(4,0) = "END\n"
- │ └── unescaped: "blah\n"
- ├── call_operator_loc: (4,0)-(4,1) = "."
- ├── name: :strip
- ├── message_loc: (4,1)-(4,6) = "strip"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/heredoc_unicode.txt b/test/prism/snapshots/seattlerb/heredoc_unicode.txt
deleted file mode 100644
index 2c72854324..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_unicode.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,9))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,9) = "<<OOTPÜT"
- ├── content_loc: (2,0)-(3,0) = ".\n"
- ├── closing_loc: (3,0)-(4,0) = "OOTPÜT\n"
- └── unescaped: ".\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt
deleted file mode 100644
index 43bb8d5ea8..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── content_loc: (2,0)-(4,0) = "foo\\rbar\nbaz\\r\n"
- ├── closing_loc: (4,0)-(5,0) = "EOS\n"
- └── unescaped: "foo\rbar\nbaz\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt
deleted file mode 100644
index 2ef6763389..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── content_loc: (2,0)-(4,0) = "foo\\rbar\r\nbaz\\r\r\n"
- ├── closing_loc: (4,0)-(5,0) = "EOS\r\n"
- └── unescaped: "foo\rbar\nbaz\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
deleted file mode 100644
index fbee030100..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,7))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,7) = "<<'eot'"
- ├── content_loc: (2,0)-(3,0) = "body\r\n"
- ├── closing_loc: (3,0)-(4,0) = "eot\n"
- └── unescaped: "body\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt
deleted file mode 100644
index b59203bc4e..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── content_loc: (2,0)-(4,0) = "foo\rbar\r\nbaz\n"
- ├── closing_loc: (4,0)-(5,0) = "EOS\n"
- └── unescaped: "foo\rbar\nbaz\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt
deleted file mode 100644
index 36bc4c6560..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── content_loc: (2,0)-(4,0) = "foo\rbar\r\r\nbaz\r\n"
- ├── closing_loc: (4,0)-(5,0) = "EOS\r\n"
- └── unescaped: "foo\rbar\r\nbaz\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt
deleted file mode 100644
index c4be1244dc..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (2,0)-(2,5))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (2,0)-(2,5) = "foo\\r"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo\r"
- │ ├── @ EmbeddedVariableNode (location: (2,5)-(2,10))
- │ │ ├── operator_loc: (2,5)-(2,6) = "#"
- │ │ └── variable:
- │ │ @ InstanceVariableReadNode (location: (2,6)-(2,10))
- │ │ └── name: :@bar
- │ └── @ StringNode (location: (2,10)-(3,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (2,10)-(3,0) = "\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\n"
- └── closing_loc: (3,0)-(4,0) = "EOS\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt
deleted file mode 100644
index c2290cec13..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (2,0)-(2,5))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (2,0)-(2,5) = "foo\\r"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo\r"
- │ ├── @ EmbeddedVariableNode (location: (2,5)-(2,10))
- │ │ ├── operator_loc: (2,5)-(2,6) = "#"
- │ │ └── variable:
- │ │ @ InstanceVariableReadNode (location: (2,6)-(2,10))
- │ │ └── name: :@bar
- │ └── @ StringNode (location: (2,10)-(3,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (2,10)-(3,0) = "\r\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\n"
- └── closing_loc: (3,0)-(4,0) = "EOS\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt b/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt
deleted file mode 100644
index 6e1648f659..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,10))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,10) = "<<-HEREDOC"
- ├── content_loc: (2,0)-(3,0) = "\#${\n"
- ├── closing_loc: (3,0)-(4,0) = "HEREDOC\n"
- └── unescaped: "\#${\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt
deleted file mode 100644
index 6a535c6472..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── content_loc: (2,0)-(5,0) = "\r\n\r\r\n\\r\n"
- ├── closing_loc: (5,0)-(6,0) = "EOS\n"
- └── unescaped: "\n\r\n\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt
deleted file mode 100644
index 6539846ff1..0000000000
--- a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,5) = "<<EOS"
- ├── content_loc: (2,0)-(5,0) = "\r\r\n\r\r\r\n\\r\r\n"
- ├── closing_loc: (5,0)-(6,0) = "EOS\r\n"
- └── unescaped: "\r\n\r\r\n\r\n"
diff --git a/test/prism/snapshots/seattlerb/if_elsif.txt b/test/prism/snapshots/seattlerb/if_elsif.txt
deleted file mode 100644
index 034850158c..0000000000
--- a/test/prism/snapshots/seattlerb/if_elsif.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(1,18))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ IntegerNode (location: (1,3)-(1,4))
- │ ├── flags: decimal
- │ └── value: 1
- ├── then_keyword_loc: ∅
- ├── statements: ∅
- ├── consequent:
- │ @ IfNode (location: (1,6)-(1,18))
- │ ├── if_keyword_loc: (1,6)-(1,11) = "elsif"
- │ ├── predicate:
- │ │ @ IntegerNode (location: (1,12)-(1,13))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (1,15)-(1,18) = "end"
- └── end_keyword_loc: (1,15)-(1,18) = "end"
diff --git a/test/prism/snapshots/seattlerb/if_symbol.txt b/test/prism/snapshots/seattlerb/if_symbol.txt
deleted file mode 100644
index 85ec52b4c8..0000000000
--- a/test/prism/snapshots/seattlerb/if_symbol.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(1,12))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ CallNode (location: (1,3)-(1,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (1,3)-(1,4) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,5)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (1,5)-(1,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ │ ├── value_loc: (1,6)-(1,7) = "x"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "x"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: ∅
- ├── statements: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (1,9)-(1,12) = "end"
diff --git a/test/prism/snapshots/seattlerb/in_expr_no_case.txt b/test/prism/snapshots/seattlerb/in_expr_no_case.txt
deleted file mode 100644
index 0a026c08db..0000000000
--- a/test/prism/snapshots/seattlerb/in_expr_no_case.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ MatchPredicateNode (location: (1,0)-(1,16))
- ├── value:
- │ @ StringNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "'"
- │ ├── content_loc: (1,1)-(1,5) = "woot"
- │ ├── closing_loc: (1,5)-(1,6) = "'"
- │ └── unescaped: "woot"
- ├── pattern:
- │ @ ConstantReadNode (location: (1,10)-(1,16))
- │ └── name: :String
- └── operator_loc: (1,7)-(1,9) = "in"
diff --git a/test/prism/snapshots/seattlerb/index_0.txt b/test/prism/snapshots/seattlerb/index_0.txt
deleted file mode 100644
index 9771e9c2bd..0000000000
--- a/test/prism/snapshots/seattlerb/index_0.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: attribute_write
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :[]=
- ├── message_loc: (1,1)-(1,3) = "[]"
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,6)-(1,7))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,6)-(1,7))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (1,6)-(1,7) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: (1,2)-(1,3) = "]"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/index_0_opasgn.txt b/test/prism/snapshots/seattlerb/index_0_opasgn.txt
deleted file mode 100644
index 322eae9907..0000000000
--- a/test/prism/snapshots/seattlerb/index_0_opasgn.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ IndexOperatorWriteNode (location: (1,0)-(1,8))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments: ∅
- ├── closing_loc: (1,2)-(1,3) = "]"
- ├── block: ∅
- ├── binary_operator: :+
- ├── binary_operator_loc: (1,4)-(1,6) = "+="
- └── value:
- @ CallNode (location: (1,7)-(1,8))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (1,7)-(1,8) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/integer_with_if_modifier.txt b/test/prism/snapshots/seattlerb/integer_with_if_modifier.txt
deleted file mode 100644
index 2108c1f0a0..0000000000
--- a/test/prism/snapshots/seattlerb/integer_with_if_modifier.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(1,12))
- ├── if_keyword_loc: (1,5)-(1,7) = "if"
- ├── predicate:
- │ @ TrueNode (location: (1,8)-(1,12))
- ├── then_keyword_loc: ∅
- ├── statements:
- │ @ StatementsNode (location: (1,0)-(1,5))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,0)-(1,5))
- │ ├── flags: decimal
- │ └── value: 1234
- ├── consequent: ∅
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt b/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt
deleted file mode 100644
index ab231cf539..0000000000
--- a/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,1))
- └── body: (length: 2)
- ├── @ ArrayNode (location: (1,0)-(4,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (2,0)-(2,1) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (3,0)-(3,1))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (3,0)-(3,1) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── opening_loc: (1,0)-(1,3) = "%I("
- │ └── closing_loc: (4,0)-(4,1) = ")"
- └── @ IntegerNode (location: (5,0)-(5,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt b/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt
deleted file mode 100644
index 933e5de627..0000000000
--- a/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,1))
- └── body: (length: 2)
- ├── @ ArrayNode (location: (1,0)-(4,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(2,1) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ StringNode (location: (3,0)-(3,1))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (3,0)-(3,1) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── opening_loc: (1,0)-(1,3) = "%W("
- │ └── closing_loc: (4,0)-(4,1) = ")"
- └── @ IntegerNode (location: (5,0)-(5,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/iter_args_1.txt b/test/prism/snapshots/seattlerb/iter_args_1.txt
deleted file mode 100644
index f76bbfc559..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_1.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,11))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,11))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,9))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,8))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ RequiredParameterNode (location: (1,7)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,8)-(1,9) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_10_1.txt b/test/prism/snapshots/seattlerb/iter_args_10_1.txt
deleted file mode 100644
index b8aaae800a..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_10_1.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,21))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,21))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,21))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,21))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,19))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,18))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
- │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,18)-(1,19) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,20)-(1,21) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_10_2.txt b/test/prism/snapshots/seattlerb/iter_args_10_2.txt
deleted file mode 100644
index 833f6429dc..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_10_2.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,25))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,25))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,25))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,25))
- ├── locals: [:a, :b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,23))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,22))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
- │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,20)-(1,22))
- │ │ ├── flags: ∅
- │ │ ├── name: :d
- │ │ ├── name_loc: (1,21)-(1,22) = "d"
- │ │ └── operator_loc: (1,20)-(1,21) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,22)-(1,23) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,24)-(1,25) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_11_1.txt b/test/prism/snapshots/seattlerb/iter_args_11_1.txt
deleted file mode 100644
index e4d2f79474..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_11_1.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,24))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,24))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,24))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,24))
- ├── locals: [:a, :b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,22))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,21))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
- │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,21)-(1,22) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,23)-(1,24) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_11_2.txt b/test/prism/snapshots/seattlerb/iter_args_11_2.txt
deleted file mode 100644
index 07a0e5ed9d..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_11_2.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,28))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,28))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,28))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,28))
- ├── locals: [:a, :b, :c, :d, :e]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,26))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,25))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,12)-(1,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
- │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,23)-(1,25))
- │ │ ├── flags: ∅
- │ │ ├── name: :e
- │ │ ├── name_loc: (1,24)-(1,25) = "e"
- │ │ └── operator_loc: (1,23)-(1,24) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,25)-(1,26) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,27)-(1,28) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_2__19.txt b/test/prism/snapshots/seattlerb/iter_args_2__19.txt
deleted file mode 100644
index a905286f47..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_2__19.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,14))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,12))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (1,5)-(1,6) = "("
- │ │ │ └── rparen_loc: (1,10)-(1,11) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,11)-(1,12) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_3.txt b/test/prism/snapshots/seattlerb/iter_args_3.txt
deleted file mode 100644
index 66782f0793..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_3.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,20))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,20))
- ├── locals: [:a, :b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,18))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,17))
- │ │ ├── requireds: (length: 3)
- │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── @ MultiTargetNode (location: (1,8)-(1,14))
- │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :b
- │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :c
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ │ │ │ └── rparen_loc: (1,13)-(1,14) = ")"
- │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :d
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,17)-(1,18) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,19)-(1,20) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_4.txt b/test/prism/snapshots/seattlerb/iter_args_4.txt
deleted file mode 100644
index c4f2b47a03..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_4.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,16))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,14))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,13))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,8)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,9)-(1,10) = "b"
- │ │ │ └── operator_loc: (1,8)-(1,9) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,13)-(1,14) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,15)-(1,16) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_5.txt b/test/prism/snapshots/seattlerb/iter_args_5.txt
deleted file mode 100644
index 44940629b4..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_5.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,13))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,10))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,8)-(1,10))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ ├── name_loc: (1,9)-(1,10) = "b"
- │ │ └── operator_loc: (1,8)-(1,9) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,10)-(1,11) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_6.txt b/test/prism/snapshots/seattlerb/iter_args_6.txt
deleted file mode 100644
index df3a405dff..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_6.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,18))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,18))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,16))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,15))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
- │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,10)-(1,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,15)-(1,16) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,17)-(1,18) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_7_1.txt b/test/prism/snapshots/seattlerb/iter_args_7_1.txt
deleted file mode 100644
index 3f65fb8dc0..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_7_1.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,18))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,18))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,16))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,15))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
- │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,15)-(1,16) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,17)-(1,18) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_7_2.txt b/test/prism/snapshots/seattlerb/iter_args_7_2.txt
deleted file mode 100644
index 112a5a1b6b..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_7_2.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,22))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,22))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,22))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,22))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,20))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,19))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
- │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,17)-(1,19))
- │ │ ├── flags: ∅
- │ │ ├── name: :c
- │ │ ├── name_loc: (1,18)-(1,19) = "c"
- │ │ └── operator_loc: (1,17)-(1,18) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,19)-(1,20) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,21)-(1,22) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_8_1.txt b/test/prism/snapshots/seattlerb/iter_args_8_1.txt
deleted file mode 100644
index 5591fcfc69..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_8_1.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,21))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,21))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,21))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,21))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,19))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
- │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,18)-(1,19) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,20)-(1,21) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_8_2.txt b/test/prism/snapshots/seattlerb/iter_args_8_2.txt
deleted file mode 100644
index 8cb061d5a7..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_8_2.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,25))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,25))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,25))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,25))
- ├── locals: [:a, :b, :c, :d]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,23))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,22))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
- │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :c
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,20)-(1,22))
- │ │ ├── flags: ∅
- │ │ ├── name: :d
- │ │ ├── name_loc: (1,21)-(1,22) = "d"
- │ │ └── operator_loc: (1,20)-(1,21) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,22)-(1,23) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,24)-(1,25) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_9_1.txt b/test/prism/snapshots/seattlerb/iter_args_9_1.txt
deleted file mode 100644
index 70b2a6cb19..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_9_1.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:a, :b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_args_9_2.txt b/test/prism/snapshots/seattlerb/iter_args_9_2.txt
deleted file mode 100644
index cad8b47e7f..0000000000
--- a/test/prism/snapshots/seattlerb/iter_args_9_2.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,21))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,21))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,21))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,21))
- ├── locals: [:a, :b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,19))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,16)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── name: :c
- │ │ ├── name_loc: (1,17)-(1,18) = "c"
- │ │ └── operator_loc: (1,16)-(1,17) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,18)-(1,19) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,20)-(1,21) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_kwarg.txt b/test/prism/snapshots/seattlerb/iter_kwarg.txt
deleted file mode 100644
index 13b9027661..0000000000
--- a/test/prism/snapshots/seattlerb/iter_kwarg.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,12))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,12))
- ├── locals: [:b]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,10))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,5)-(1,7) = "b:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,8)-(1,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,9)-(1,10) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
deleted file mode 100644
index 321e15cb2b..0000000000
--- a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(1,17))
- ├── locals: [:b, :c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,4)-(1,15))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,5)-(1,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── name_loc: (1,5)-(1,7) = "b:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,8)-(1,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (1,11)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,13)-(1,14) = "c"
- │ │ │ └── operator_loc: (1,11)-(1,13) = "**"
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,4)-(1,5) = "|"
- │ └── closing_loc: (1,14)-(1,15) = "|"
- ├── body: ∅
- ├── opening_loc: (1,2)-(1,3) = "{"
- └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/seattlerb/label_vs_string.txt b/test/prism/snapshots/seattlerb/label_vs_string.txt
deleted file mode 100644
index c8d7af8f48..0000000000
--- a/test/prism/snapshots/seattlerb/label_vs_string.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,1))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(2,1))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,4))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :_buf
- │ ├── message_loc: (1,0)-(1,4) = "_buf"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :<<
- ├── message_loc: (1,5)-(1,7) = "<<"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,8)-(2,1))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ StringNode (location: (1,8)-(2,1))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,8)-(1,9) = "'"
- │ ├── content_loc: (1,9)-(2,0) = ":\n"
- │ ├── closing_loc: (2,0)-(2,1) = "'"
- │ └── unescaped: ":\n"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
deleted file mode 100644
index afc0d3d56f..0000000000
--- a/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,9))
- └── body: (length: 4)
- ├── @ CallNode (location: (1,0)-(1,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (1,0)-(1,1) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LambdaNode (location: (1,2)-(1,11))
- │ │ ├── locals: []
- │ │ ├── operator_loc: (1,2)-(1,4) = "->"
- │ │ ├── opening_loc: (1,5)-(1,7) = "do"
- │ │ ├── closing_loc: (1,8)-(1,11) = "end"
- │ │ ├── parameters: ∅
- │ │ └── body: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (3,0)-(3,1) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,2)-(3,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LambdaNode (location: (3,2)-(3,7))
- │ │ ├── locals: []
- │ │ ├── operator_loc: (3,2)-(3,4) = "->"
- │ │ ├── opening_loc: (3,5)-(3,6) = "{"
- │ │ ├── closing_loc: (3,6)-(3,7) = "}"
- │ │ ├── parameters: ∅
- │ │ └── body: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,13))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (5,0)-(5,1) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,2)-(5,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LambdaNode (location: (5,2)-(5,13))
- │ │ ├── locals: []
- │ │ ├── operator_loc: (5,2)-(5,4) = "->"
- │ │ ├── opening_loc: (5,7)-(5,9) = "do"
- │ │ ├── closing_loc: (5,10)-(5,13) = "end"
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (5,4)-(5,6))
- │ │ │ ├── parameters: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (5,4)-(5,5) = "("
- │ │ │ └── closing_loc: (5,5)-(5,6) = ")"
- │ │ └── body: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (7,0)-(7,9))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (7,0)-(7,1) = "f"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (7,2)-(7,9))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LambdaNode (location: (7,2)-(7,9))
- │ ├── locals: []
- │ ├── operator_loc: (7,2)-(7,4) = "->"
- │ ├── opening_loc: (7,7)-(7,8) = "{"
- │ ├── closing_loc: (7,8)-(7,9) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (7,4)-(7,6))
- │ │ ├── parameters: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (7,4)-(7,5) = "("
- │ │ └── closing_loc: (7,5)-(7,6) = ")"
- │ └── body: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt
deleted file mode 100644
index 7bbef7055a..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,14))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ RescueModifierNode (location: (1,4)-(1,14))
- │ ├── expression:
- │ │ @ IntegerNode (location: (1,4)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── keyword_loc: (1,6)-(1,12) = "rescue"
- │ └── rescue_expression:
- │ @ IntegerNode (location: (1,13)-(1,14))
- │ ├── flags: decimal
- │ └── value: 2
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt
deleted file mode 100644
index 521fceaf1b..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,17))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ RescueModifierNode (location: (1,4)-(1,17))
- │ ├── expression:
- │ │ @ CallNode (location: (1,4)-(1,8))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ ├── opening_loc: (1,5)-(1,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: (1,7)-(1,8) = ")"
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,9)-(1,15) = "rescue"
- │ └── rescue_expression:
- │ @ IntegerNode (location: (1,16)-(1,17))
- │ ├── flags: decimal
- │ └── value: 2
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt
deleted file mode 100644
index d730fb51cb..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,16))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ RescueModifierNode (location: (1,4)-(1,16))
- │ ├── expression:
- │ │ @ CallNode (location: (1,4)-(1,7))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,8)-(1,14) = "rescue"
- │ └── rescue_expression:
- │ @ IntegerNode (location: (1,15)-(1,16))
- │ ├── flags: decimal
- │ └── value: 2
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_command.txt b/test/prism/snapshots/seattlerb/lasgn_command.txt
deleted file mode 100644
index d6ed787b26..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_command.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,9))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ CallNode (location: (1,4)-(1,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,4)-(1,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,5)-(1,6) = "."
- │ ├── name: :c
- │ ├── message_loc: (1,6)-(1,7) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,8)-(1,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,8)-(1,9))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_env.txt b/test/prism/snapshots/seattlerb/lasgn_env.txt
deleted file mode 100644
index a0ada99a9b..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_env.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,6))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ IntegerNode (location: (1,4)-(1,6))
- │ ├── flags: decimal
- │ └── value: 42
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_ivar_env.txt b/test/prism/snapshots/seattlerb/lasgn_ivar_env.txt
deleted file mode 100644
index 5675730477..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_ivar_env.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ InstanceVariableWriteNode (location: (1,0)-(1,7))
- ├── name: :@a
- ├── name_loc: (1,0)-(1,2) = "@a"
- ├── value:
- │ @ IntegerNode (location: (1,5)-(1,7))
- │ ├── flags: decimal
- │ └── value: 42
- └── operator_loc: (1,3)-(1,4) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt b/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt
deleted file mode 100644
index bb4b64e88c..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,11))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ LocalVariableWriteNode (location: (1,4)-(1,11))
- │ ├── name: :b
- │ ├── depth: 0
- │ ├── name_loc: (1,4)-(1,5) = "b"
- │ ├── value:
- │ │ @ CallNode (location: (1,8)-(1,11))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (1,8)-(1,9) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (1,6)-(1,7) = "="
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt b/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt
deleted file mode 100644
index c113fef13f..0000000000
--- a/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
- ├── name: :a
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── value:
- │ @ ArrayNode (location: (1,4)-(1,12))
- │ ├── flags: contains_splat
- │ ├── elements: (length: 3)
- │ │ ├── @ CallNode (location: (1,4)-(1,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── @ SplatNode (location: (1,7)-(1,9))
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (1,8)-(1,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (1,8)-(1,9) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (1,11)-(1,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (1,11)-(1,12) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/magic_encoding_comment.txt b/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
deleted file mode 100644
index 9c4ca884d2..0000000000
--- a/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ ProgramNode (location: (2,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (2,0)-(3,3))
- └── body: (length: 1)
- └── @ ClassNode (location: (2,0)-(3,3))
- ├── locals: []
- ├── class_keyword_loc: (2,0)-(2,5) = "class"
- ├── constant_path:
- │ @ ConstantReadNode (location: (2,6)-(2,34))
- │ └── name: :ExampleUTF8ClassNameVarietà
- ├── inheritance_operator_loc: ∅
- ├── superclass: ∅
- ├── body:
- │ @ StatementsNode (location: (2,36)-(2,68))
- │ └── body: (length: 1)
- │ └── @ DefNode (location: (2,36)-(2,68))
- │ ├── name: :è
- │ ├── name_loc: (2,45)-(2,47) = "è"
- │ ├── receiver:
- │ │ @ SelfNode (location: (2,40)-(2,44))
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (2,49)-(2,63))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (2,49)-(2,63))
- │ │ ├── name: :così
- │ │ ├── depth: 0
- │ │ ├── name_loc: (2,49)-(2,54) = "così"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (2,57)-(2,63))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (2,57)-(2,58) = ":"
- │ │ │ ├── value_loc: (2,58)-(2,63) = "però"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "però"
- │ │ └── operator_loc: (2,55)-(2,56) = "="
- │ ├── locals: [:così]
- │ ├── def_keyword_loc: (2,36)-(2,39) = "def"
- │ ├── operator_loc: (2,44)-(2,45) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (2,65)-(2,68) = "end"
- ├── end_keyword_loc: (3,0)-(3,3) = "end"
- └── name: :ExampleUTF8ClassNameVarietà
diff --git a/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt
deleted file mode 100644
index 9ebcab3095..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,8))
- ├── lefts: (length: 0)
- ├── rest:
- │ @ SplatNode (location: (1,0)-(1,1))
- │ ├── operator_loc: (1,0)-(1,1) = "*"
- │ └── expression: ∅
- ├── rights: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (1,3)-(1,4))
- │ ├── name: :a
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,5)-(1,6) = "="
- └── value:
- @ CallNode (location: (1,7)-(1,8))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (1,7)-(1,8) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt b/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt
deleted file mode 100644
index 83613c42d1..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,11))
- ├── lefts: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ CallTargetNode (location: (1,3)-(1,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,3)-(1,4))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,3)-(1,4) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,4)-(1,6) = "::"
- │ ├── name: :c=
- │ └── message_loc: (1,6)-(1,7) = "c"
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,8)-(1,9) = "="
- └── value:
- @ CallNode (location: (1,10)-(1,11))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :d
- ├── message_loc: (1,10)-(1,11) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_arg_ident.txt b/test/prism/snapshots/seattlerb/masgn_arg_ident.txt
deleted file mode 100644
index f4c99648f0..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_arg_ident.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,10))
- ├── lefts: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ CallTargetNode (location: (1,3)-(1,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,3)-(1,4))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,3)-(1,4) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,4)-(1,5) = "."
- │ ├── name: :C=
- │ └── message_loc: (1,5)-(1,6) = "C"
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,7)-(1,8) = "="
- └── value:
- @ CallNode (location: (1,9)-(1,10))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :d
- ├── message_loc: (1,9)-(1,10) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt
deleted file mode 100644
index 48e58de076..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a, :b, :c]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,12))
- ├── lefts: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ ├── name: :a
- │ └── depth: 0
- ├── rest:
- │ @ SplatNode (location: (1,3)-(1,5))
- │ ├── operator_loc: (1,3)-(1,4) = "*"
- │ └── expression:
- │ @ LocalVariableTargetNode (location: (1,4)-(1,5))
- │ ├── name: :b
- │ └── depth: 0
- ├── rights: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
- │ ├── name: :c
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,9)-(1,10) = "="
- └── value:
- @ CallNode (location: (1,11)-(1,12))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :d
- ├── message_loc: (1,11)-(1,12) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_colon2.txt b/test/prism/snapshots/seattlerb/masgn_colon2.txt
deleted file mode 100644
index a0dfe72ffc..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_colon2.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,14))
- ├── lefts: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ ConstantPathTargetNode (location: (1,3)-(1,7))
- │ ├── parent:
- │ │ @ CallNode (location: (1,3)-(1,4))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,3)-(1,4) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── name: :C
- │ ├── delimiter_loc: (1,4)-(1,6) = "::"
- │ └── name_loc: (1,6)-(1,7) = "C"
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,8)-(1,9) = "="
- └── value:
- @ ArrayNode (location: (1,10)-(1,14))
- ├── flags: ∅
- ├── elements: (length: 2)
- │ ├── @ IntegerNode (location: (1,10)-(1,11))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ IntegerNode (location: (1,13)-(1,14))
- │ ├── flags: decimal
- │ └── value: 2
- ├── opening_loc: ∅
- └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_colon3.txt b/test/prism/snapshots/seattlerb/masgn_colon3.txt
deleted file mode 100644
index f28ed7ecee..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_colon3.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,15))
- ├── lefts: (length: 2)
- │ ├── @ ConstantPathTargetNode (location: (1,0)-(1,3))
- │ │ ├── parent: ∅
- │ │ ├── name: :A
- │ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
- │ │ └── name_loc: (1,2)-(1,3) = "A"
- │ └── @ ConstantPathTargetNode (location: (1,5)-(1,8))
- │ ├── parent: ∅
- │ ├── name: :B
- │ ├── delimiter_loc: (1,5)-(1,7) = "::"
- │ └── name_loc: (1,7)-(1,8) = "B"
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,9)-(1,10) = "="
- └── value:
- @ ArrayNode (location: (1,11)-(1,15))
- ├── flags: ∅
- ├── elements: (length: 2)
- │ ├── @ IntegerNode (location: (1,11)-(1,12))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ IntegerNode (location: (1,14)-(1,15))
- │ ├── flags: decimal
- │ └── value: 2
- ├── opening_loc: ∅
- └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_command_call.txt b/test/prism/snapshots/seattlerb/masgn_command_call.txt
deleted file mode 100644
index 687ea38243..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_command_call.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,10))
- ├── lefts: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ ├── name: :a
- │ └── depth: 0
- ├── rest:
- │ @ ImplicitRestNode (location: (1,1)-(1,2))
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,3)-(1,4) = "="
- └── value:
- @ CallNode (location: (1,5)-(1,10))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,5)-(1,6))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (1,5)-(1,6) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,6)-(1,7) = "."
- ├── name: :c
- ├── message_loc: (1,7)-(1,8) = "c"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,9)-(1,10))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,9)-(1,10))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_double_paren.txt b/test/prism/snapshots/seattlerb/masgn_double_paren.txt
deleted file mode 100644
index 590df8fa07..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_double_paren.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,9))
- ├── lefts: (length: 1)
- │ └── @ MultiTargetNode (location: (1,1)-(1,6))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (1,2)-(1,3))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (1,1)-(1,2) = "("
- │ └── rparen_loc: (1,5)-(1,6) = ")"
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: (1,0)-(1,1) = "("
- ├── rparen_loc: (1,6)-(1,7) = ")"
- ├── operator_loc: (1,7)-(1,8) = "="
- └── value:
- @ CallNode (location: (1,8)-(1,9))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (1,8)-(1,9) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt b/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt
deleted file mode 100644
index 771dd7c040..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,12))
- ├── lefts: (length: 0)
- ├── rest:
- │ @ SplatNode (location: (1,0)-(1,2))
- │ ├── operator_loc: (1,0)-(1,1) = "*"
- │ └── expression:
- │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
- │ ├── name: :a
- │ └── depth: 0
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,3)-(1,4) = "="
- └── value:
- @ ArrayNode (location: (1,5)-(1,12))
- ├── flags: ∅
- ├── elements: (length: 3)
- │ ├── @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── @ IntegerNode (location: (1,8)-(1,9))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── @ IntegerNode (location: (1,11)-(1,12))
- │ ├── flags: decimal
- │ └── value: 3
- ├── opening_loc: ∅
- └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_paren.txt b/test/prism/snapshots/seattlerb/masgn_paren.txt
deleted file mode 100644
index 5d79774d5e..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_paren.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,12))
- ├── lefts: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (1,1)-(1,2))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
- │ ├── name: :b
- │ └── depth: 0
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: (1,0)-(1,1) = "("
- ├── rparen_loc: (1,5)-(1,6) = ")"
- ├── operator_loc: (1,7)-(1,8) = "="
- └── value:
- @ CallNode (location: (1,9)-(1,12))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,9)-(1,10))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (1,9)-(1,10) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,10)-(1,11) = "."
- ├── name: :d
- ├── message_loc: (1,11)-(1,12) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_splat_arg.txt
deleted file mode 100644
index b8113b126f..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_splat_arg.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,9))
- ├── lefts: (length: 0)
- ├── rest:
- │ @ SplatNode (location: (1,0)-(1,2))
- │ ├── operator_loc: (1,0)-(1,1) = "*"
- │ └── expression:
- │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
- │ ├── name: :a
- │ └── depth: 0
- ├── rights: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
- │ ├── name: :b
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,6)-(1,7) = "="
- └── value:
- @ CallNode (location: (1,8)-(1,9))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (1,8)-(1,9) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt b/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt
deleted file mode 100644
index a832aef1e0..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: [:a, :b, :c]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,12))
- ├── lefts: (length: 0)
- ├── rest:
- │ @ SplatNode (location: (1,0)-(1,2))
- │ ├── operator_loc: (1,0)-(1,1) = "*"
- │ └── expression:
- │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
- │ ├── name: :a
- │ └── depth: 0
- ├── rights: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
- │ ├── name: :c
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,9)-(1,10) = "="
- └── value:
- @ CallNode (location: (1,11)-(1,12))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :d
- ├── message_loc: (1,11)-(1,12) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_star.txt b/test/prism/snapshots/seattlerb/masgn_star.txt
deleted file mode 100644
index 3e01eef8a7..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_star.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,5))
- ├── lefts: (length: 0)
- ├── rest:
- │ @ SplatNode (location: (1,0)-(1,1))
- │ ├── operator_loc: (1,0)-(1,1) = "*"
- │ └── expression: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,2)-(1,3) = "="
- └── value:
- @ IntegerNode (location: (1,4)-(1,5))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/masgn_var_star_var.txt b/test/prism/snapshots/seattlerb/masgn_var_star_var.txt
deleted file mode 100644
index 37851efd6f..0000000000
--- a/test/prism/snapshots/seattlerb/masgn_var_star_var.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,11))
- ├── lefts: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ ├── name: :a
- │ └── depth: 0
- ├── rest:
- │ @ SplatNode (location: (1,3)-(1,4))
- │ ├── operator_loc: (1,3)-(1,4) = "*"
- │ └── expression: ∅
- ├── rights: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ ├── name: :b
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,8)-(1,9) = "="
- └── value:
- @ CallNode (location: (1,10)-(1,11))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (1,10)-(1,11) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt b/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt
deleted file mode 100644
index edef23044a..0000000000
--- a/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,15))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,15))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ParenthesesNode (location: (1,2)-(1,15))
- │ ├── body:
- │ │ @ StatementsNode (location: (1,3)-(1,14))
- │ │ └── body: (length: 1)
- │ │ └── @ ConstantPathOperatorWriteNode (location: (1,3)-(1,14))
- │ │ ├── target:
- │ │ │ @ ConstantPathNode (location: (1,3)-(1,7))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (1,3)-(1,4))
- │ │ │ │ └── name: :B
- │ │ │ ├── name: :C
- │ │ │ ├── delimiter_loc: (1,4)-(1,6) = "::"
- │ │ │ └── name_loc: (1,6)-(1,7) = "C"
- │ │ ├── binary_operator_loc: (1,8)-(1,10) = "*="
- │ │ ├── value:
- │ │ │ @ CallNode (location: (1,11)-(1,14))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (1,11)-(1,12) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (1,13)-(1,14))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :e
- │ │ │ │ ├── message_loc: (1,13)-(1,14) = "e"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── binary_operator: :*
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ └── closing_loc: (1,14)-(1,15) = ")"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt
deleted file mode 100644
index 1bb8bd0bc1..0000000000
--- a/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,10))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :f
- ├── message_loc: (1,2)-(1,3) = "f"
- ├── opening_loc: (1,3)-(1,4) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,8))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,4)-(1,8))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,4)-(1,8))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,4)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── value:
- │ │ @ IntegerNode (location: (1,7)-(1,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (1,5)-(1,7) = "=>"
- ├── closing_loc: (1,9)-(1,10) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt b/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt
deleted file mode 100644
index edf79062cf..0000000000
--- a/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,7))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :f
- ├── message_loc: (1,2)-(1,3) = "f"
- ├── opening_loc: (1,3)-(1,4) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,4)-(1,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,4)-(1,5))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: (1,6)-(1,7) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt
deleted file mode 100644
index 600f7f717b..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: [:a, :b, :c]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,14))
- ├── lefts: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ ├── name: :c
- │ └── depth: 0
- ├── rest:
- │ @ SplatNode (location: (1,9)-(1,10))
- │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ └── expression: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,11)-(1,12) = "="
- └── value:
- @ CallNode (location: (1,13)-(1,14))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,13)-(1,14) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_back_splat.txt b/test/prism/snapshots/seattlerb/mlhs_back_splat.txt
deleted file mode 100644
index f5d3fe5ae9..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_back_splat.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: [:a, :b, :c, :s]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,15))
- ├── lefts: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ ├── name: :c
- │ └── depth: 0
- ├── rest:
- │ @ SplatNode (location: (1,9)-(1,11))
- │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ └── expression:
- │ @ LocalVariableTargetNode (location: (1,10)-(1,11))
- │ ├── name: :s
- │ └── depth: 0
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,12)-(1,13) = "="
- └── value:
- @ CallNode (location: (1,14)-(1,15))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,14)-(1,15) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt
deleted file mode 100644
index d4797031a5..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: [:x, :y, :z]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,14))
- ├── lefts: (length: 0)
- ├── rest:
- │ @ SplatNode (location: (1,0)-(1,1))
- │ ├── operator_loc: (1,0)-(1,1) = "*"
- │ └── expression: ∅
- ├── rights: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ │ ├── name: :y
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,9)-(1,10))
- │ ├── name: :z
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,11)-(1,12) = "="
- └── value:
- @ CallNode (location: (1,13)-(1,14))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,13)-(1,14) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_front_splat.txt b/test/prism/snapshots/seattlerb/mlhs_front_splat.txt
deleted file mode 100644
index 47a7b8da7c..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_front_splat.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: [:s, :x, :y, :z]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,15))
- ├── lefts: (length: 0)
- ├── rest:
- │ @ SplatNode (location: (1,0)-(1,2))
- │ ├── operator_loc: (1,0)-(1,1) = "*"
- │ └── expression:
- │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
- │ ├── name: :s
- │ └── depth: 0
- ├── rights: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,7)-(1,8))
- │ │ ├── name: :y
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,10)-(1,11))
- │ ├── name: :z
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,12)-(1,13) = "="
- └── value:
- @ CallNode (location: (1,14)-(1,15))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,14)-(1,15) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_keyword.txt b/test/prism/snapshots/seattlerb/mlhs_keyword.txt
deleted file mode 100644
index 6142640b2c..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_keyword.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,16))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :!=
- ├── message_loc: (1,2)-(1,4) = "!="
- ├── opening_loc: (1,4)-(1,5) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,15))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ TrueNode (location: (1,5)-(1,9))
- │ └── @ TrueNode (location: (1,11)-(1,15))
- ├── closing_loc: (1,15)-(1,16) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt
deleted file mode 100644
index b6306e1674..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,23))
-├── locals: [:a, :b, :c, :x, :y, :z]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,23))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,23))
- ├── lefts: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ ├── name: :c
- │ └── depth: 0
- ├── rest:
- │ @ SplatNode (location: (1,9)-(1,10))
- │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ └── expression: ∅
- ├── rights: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,12)-(1,13))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,15)-(1,16))
- │ │ ├── name: :y
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,18)-(1,19))
- │ ├── name: :z
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,20)-(1,21) = "="
- └── value:
- @ CallNode (location: (1,22)-(1,23))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,22)-(1,23) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt b/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt
deleted file mode 100644
index 1dae24d911..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,24))
-├── locals: [:a, :b, :c, :s, :x, :y, :z]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,24))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,24))
- ├── lefts: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ ├── name: :c
- │ └── depth: 0
- ├── rest:
- │ @ SplatNode (location: (1,9)-(1,11))
- │ ├── operator_loc: (1,9)-(1,10) = "*"
- │ └── expression:
- │ @ LocalVariableTargetNode (location: (1,10)-(1,11))
- │ ├── name: :s
- │ └── depth: 0
- ├── rights: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (1,13)-(1,14))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── @ LocalVariableTargetNode (location: (1,16)-(1,17))
- │ │ ├── name: :y
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,19)-(1,20))
- │ ├── name: :z
- │ └── depth: 0
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,21)-(1,22) = "="
- └── value:
- @ CallNode (location: (1,23)-(1,24))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,23)-(1,24) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/mlhs_rescue.txt b/test/prism/snapshots/seattlerb/mlhs_rescue.txt
deleted file mode 100644
index bd983cd3f9..0000000000
--- a/test/prism/snapshots/seattlerb/mlhs_rescue.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ MultiWriteNode (location: (1,0)-(1,18))
- ├── lefts: (length: 2)
- │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ └── @ LocalVariableTargetNode (location: (1,3)-(1,4))
- │ ├── name: :b
- │ └── depth: 0
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (1,5)-(1,6) = "="
- └── value:
- @ RescueModifierNode (location: (1,7)-(1,18))
- ├── expression:
- │ @ CallNode (location: (1,7)-(1,8))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (1,7)-(1,8) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── keyword_loc: (1,9)-(1,15) = "rescue"
- └── rescue_expression:
- @ IntegerNode (location: (1,16)-(1,18))
- ├── flags: decimal
- └── value: 42
diff --git a/test/prism/snapshots/seattlerb/module_comments.txt b/test/prism/snapshots/seattlerb/module_comments.txt
deleted file mode 100644
index 2785187a29..0000000000
--- a/test/prism/snapshots/seattlerb/module_comments.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (5,0)-(10,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (5,0)-(10,3))
- └── body: (length: 1)
- └── @ ModuleNode (location: (5,0)-(10,3))
- ├── locals: []
- ├── module_keyword_loc: (5,0)-(5,6) = "module"
- ├── constant_path:
- │ @ ConstantReadNode (location: (5,7)-(5,8))
- │ └── name: :X
- ├── body:
- │ @ StatementsNode (location: (7,2)-(9,5))
- │ └── body: (length: 1)
- │ └── @ DefNode (location: (7,2)-(9,5))
- │ ├── name: :blah
- │ ├── name_loc: (7,6)-(7,10) = "blah"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (7,2)-(7,5) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (9,2)-(9,5) = "end"
- ├── end_keyword_loc: (10,0)-(10,3) = "end"
- └── name: :X
diff --git a/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
deleted file mode 100644
index ff28a1798b..0000000000
--- a/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-@ ProgramNode (location: (1,0)-(8,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(8,12))
- └── body: (length: 3)
- ├── @ CallNode (location: (1,0)-(3,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (1,0)-(1,1) = "f"
- │ ├── opening_loc: (1,1)-(1,2) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(3,1))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (1,2)-(3,1))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (1,2)-(3,1))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (1,2)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (1,2)-(1,7) = "state"
- │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
- │ │ │ └── unescaped: "state"
- │ │ ├── value:
- │ │ │ @ HashNode (location: (2,1)-(3,1))
- │ │ │ ├── opening_loc: (2,1)-(2,2) = "{"
- │ │ │ ├── elements: (length: 0)
- │ │ │ └── closing_loc: (3,0)-(3,1) = "}"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (3,1)-(3,2) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(6,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (5,0)-(5,1) = "f"
- │ ├── opening_loc: (5,1)-(5,2) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,2)-(6,1))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (5,2)-(6,1))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (5,2)-(6,1))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (5,2)-(5,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (5,2)-(5,7) = "state"
- │ │ │ ├── closing_loc: (5,7)-(5,8) = ":"
- │ │ │ └── unescaped: "state"
- │ │ ├── value:
- │ │ │ @ HashNode (location: (5,9)-(6,1))
- │ │ │ ├── opening_loc: (5,9)-(5,10) = "{"
- │ │ │ ├── elements: (length: 0)
- │ │ │ └── closing_loc: (6,0)-(6,1) = "}"
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (6,1)-(6,2) = ")"
- │ └── block: ∅
- └── @ CallNode (location: (8,0)-(8,12))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (8,0)-(8,1) = "f"
- ├── opening_loc: (8,1)-(8,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (8,2)-(8,11))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (8,2)-(8,11))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (8,2)-(8,11))
- │ ├── key:
- │ │ @ SymbolNode (location: (8,2)-(8,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (8,2)-(8,7) = "state"
- │ │ ├── closing_loc: (8,7)-(8,8) = ":"
- │ │ └── unescaped: "state"
- │ ├── value:
- │ │ @ HashNode (location: (8,9)-(8,11))
- │ │ ├── opening_loc: (8,9)-(8,10) = "{"
- │ │ ├── elements: (length: 0)
- │ │ └── closing_loc: (8,10)-(8,11) = "}"
- │ └── operator_loc: ∅
- ├── closing_loc: (8,11)-(8,12) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt b/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt
deleted file mode 100644
index cbf4ec4a08..0000000000
--- a/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,1))
- └── body: (length: 2)
- ├── @ ArrayNode (location: (1,0)-(4,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ SymbolNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (2,0)-(2,1) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (3,0)-(3,1))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (3,0)-(3,1) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── opening_loc: (1,0)-(1,3) = "%i("
- │ └── closing_loc: (4,0)-(4,1) = ")"
- └── @ IntegerNode (location: (5,0)-(5,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt b/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt
deleted file mode 100644
index e82f250098..0000000000
--- a/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,1))
- └── body: (length: 2)
- ├── @ ArrayNode (location: (1,0)-(4,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(2,1) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ StringNode (location: (3,0)-(3,1))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (3,0)-(3,1) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── opening_loc: (1,0)-(1,3) = "%w("
- │ └── closing_loc: (4,0)-(4,1) = ")"
- └── @ IntegerNode (location: (5,0)-(5,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/op_asgn_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_command_call.txt
deleted file mode 100644
index 54aa06214f..0000000000
--- a/test/prism/snapshots/seattlerb/op_asgn_command_call.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ LocalVariableOrWriteNode (location: (1,0)-(1,11))
- ├── name_loc: (1,0)-(1,1) = "a"
- ├── operator_loc: (1,2)-(1,5) = "||="
- ├── value:
- │ @ CallNode (location: (1,6)-(1,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,6)-(1,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,6)-(1,7) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,7)-(1,8) = "."
- │ ├── name: :c
- │ ├── message_loc: (1,8)-(1,9) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── name: :a
- └── depth: 0
diff --git a/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt
deleted file mode 100644
index 324c042b00..0000000000
--- a/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallOrWriteNode (location: (1,0)-(1,11))
- ├── flags: ∅
- ├── receiver:
- │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ └── name: :A
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── message_loc: (1,2)-(1,3) = "B"
- ├── read_name: :B
- ├── write_name: :B=
- ├── operator_loc: (1,4)-(1,7) = "||="
- └── value:
- @ CallNode (location: (1,8)-(1,11))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (1,8)-(1,9) = "c"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt
deleted file mode 100644
index ddee4cde49..0000000000
--- a/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ IndexOrWriteNode (location: (1,0)-(1,16))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,4))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ SymbolNode (location: (1,2)-(1,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,2)-(1,3) = ":"
- │ ├── value_loc: (1,3)-(1,4) = "b"
- │ ├── closing_loc: ∅
- │ └── unescaped: "b"
- ├── closing_loc: (1,4)-(1,5) = "]"
- ├── block: ∅
- ├── operator_loc: (1,6)-(1,9) = "||="
- └── value:
- @ CallNode (location: (1,10)-(1,16))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (1,10)-(1,11) = "c"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,12)-(1,16))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ IntegerNode (location: (1,12)-(1,13))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ IntegerNode (location: (1,15)-(1,16))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt
deleted file mode 100644
index 523ccde455..0000000000
--- a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ ConstantPathOperatorWriteNode (location: (1,0)-(1,11))
- ├── target:
- │ @ ConstantPathNode (location: (1,0)-(1,4))
- │ ├── parent:
- │ │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ │ └── name: :A
- │ ├── name: :B
- │ ├── delimiter_loc: (1,1)-(1,3) = "::"
- │ └── name_loc: (1,3)-(1,4) = "B"
- ├── binary_operator_loc: (1,5)-(1,7) = "*="
- ├── value:
- │ @ CallNode (location: (1,8)-(1,11))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (1,8)-(1,9) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (1,10)-(1,11))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (1,10)-(1,11) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── binary_operator: :*
diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt
deleted file mode 100644
index b9d00edc30..0000000000
--- a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ CallOperatorWriteNode (location: (1,0)-(1,9))
- ├── flags: ∅
- ├── receiver:
- │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ └── name: :A
- ├── call_operator_loc: (1,1)-(1,3) = "::"
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── read_name: :b
- ├── write_name: :b=
- ├── binary_operator: :+
- ├── binary_operator_loc: (1,5)-(1,7) = "+="
- └── value:
- @ IntegerNode (location: (1,8)-(1,9))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt
deleted file mode 100644
index c12ea3983c..0000000000
--- a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallOperatorWriteNode (location: (1,0)-(1,11))
- ├── flags: ∅
- ├── receiver:
- │ @ ConstantReadNode (location: (1,0)-(1,1))
- │ └── name: :A
- ├── call_operator_loc: (1,1)-(1,3) = "::"
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── read_name: :b
- ├── write_name: :b=
- ├── binary_operator: :*
- ├── binary_operator_loc: (1,5)-(1,7) = "*="
- └── value:
- @ CallNode (location: (1,8)-(1,11))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (1,8)-(1,9) = "c"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,10)-(1,11))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :d
- │ ├── message_loc: (1,10)-(1,11) = "d"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt
deleted file mode 100644
index b3b5709193..0000000000
--- a/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallOrWriteNode (location: (1,0)-(1,11))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── message_loc: (1,2)-(1,3) = "b"
- ├── read_name: :b
- ├── write_name: :b=
- ├── operator_loc: (1,4)-(1,7) = "||="
- └── value:
- @ CallNode (location: (1,8)-(1,11))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (1,8)-(1,9) = "c"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_def_special_name.txt b/test/prism/snapshots/seattlerb/parse_def_special_name.txt
deleted file mode 100644
index dfbfe8a391..0000000000
--- a/test/prism/snapshots/seattlerb/parse_def_special_name.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(1,13))
- ├── name: :next
- ├── name_loc: (1,4)-(1,8) = "next"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt
deleted file mode 100644
index 763bd24efd..0000000000
--- a/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(2,3))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ CallNode (location: (1,3)-(1,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,7)-(1,15))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,7)-(1,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var
- │ │ │ ├── message_loc: (1,7)-(1,10) = "var"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
- │ │ ├── name: :nil?
- │ │ ├── message_loc: (1,11)-(1,15) = "nil?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,3)-(1,6) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: (1,16)-(1,20) = "then"
- ├── statements:
- │ @ StatementsNode (location: (1,21)-(1,26))
- │ └── body: (length: 1)
- │ └── @ StringNode (location: (1,21)-(1,26))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,21)-(1,22) = "'"
- │ ├── content_loc: (1,22)-(1,25) = "foo"
- │ ├── closing_loc: (1,25)-(1,26) = "'"
- │ └── unescaped: "foo"
- ├── consequent:
- │ @ ElseNode (location: (1,27)-(2,3))
- │ ├── else_keyword_loc: (1,27)-(1,31) = "else"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,32)-(1,37))
- │ │ └── body: (length: 1)
- │ │ └── @ StringNode (location: (1,32)-(1,37))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,32)-(1,33) = "'"
- │ │ ├── content_loc: (1,33)-(1,36) = "bar"
- │ │ ├── closing_loc: (1,36)-(1,37) = "'"
- │ │ └── unescaped: "bar"
- │ └── end_keyword_loc: (2,0)-(2,3) = "end"
- └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt
deleted file mode 100644
index 763bd24efd..0000000000
--- a/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ IfNode (location: (1,0)-(2,3))
- ├── if_keyword_loc: (1,0)-(1,2) = "if"
- ├── predicate:
- │ @ CallNode (location: (1,3)-(1,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,7)-(1,15))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,7)-(1,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var
- │ │ │ ├── message_loc: (1,7)-(1,10) = "var"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
- │ │ ├── name: :nil?
- │ │ ├── message_loc: (1,11)-(1,15) = "nil?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,3)-(1,6) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: (1,16)-(1,20) = "then"
- ├── statements:
- │ @ StatementsNode (location: (1,21)-(1,26))
- │ └── body: (length: 1)
- │ └── @ StringNode (location: (1,21)-(1,26))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,21)-(1,22) = "'"
- │ ├── content_loc: (1,22)-(1,25) = "foo"
- │ ├── closing_loc: (1,25)-(1,26) = "'"
- │ └── unescaped: "foo"
- ├── consequent:
- │ @ ElseNode (location: (1,27)-(2,3))
- │ ├── else_keyword_loc: (1,27)-(1,31) = "else"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,32)-(1,37))
- │ │ └── body: (length: 1)
- │ │ └── @ StringNode (location: (1,32)-(1,37))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,32)-(1,33) = "'"
- │ │ ├── content_loc: (1,33)-(1,36) = "bar"
- │ │ ├── closing_loc: (1,36)-(1,37) = "'"
- │ │ └── unescaped: "bar"
- │ └── end_keyword_loc: (2,0)-(2,3) = "end"
- └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_block.txt b/test/prism/snapshots/seattlerb/parse_line_block.txt
deleted file mode 100644
index 623c08d50e..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_block.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 2)
- ├── @ LocalVariableWriteNode (location: (1,0)-(1,6))
- │ ├── name: :a
- │ ├── depth: 0
- │ ├── name_loc: (1,0)-(1,1) = "a"
- │ ├── value:
- │ │ @ IntegerNode (location: (1,4)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ └── operator_loc: (1,2)-(1,3) = "="
- └── @ CallNode (location: (2,0)-(2,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :p
- ├── message_loc: (2,0)-(2,1) = "p"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (2,2)-(2,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LocalVariableReadNode (location: (2,2)-(2,3))
- │ ├── name: :a
- │ └── depth: 0
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt
deleted file mode 100644
index 8495527cf4..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,1))
- └── body: (length: 3)
- ├── @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (2,0)-(2,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (2,0)-(2,1) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (3,0)-(3,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (3,0)-(3,1) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt
deleted file mode 100644
index f531a73a58..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (4,0)-(7,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (4,0)-(7,1))
- └── body: (length: 3)
- ├── @ CallNode (location: (4,0)-(4,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (4,0)-(4,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (5,0)-(5,1) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (7,0)-(7,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (7,0)-(7,1) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt
deleted file mode 100644
index d4e962b355..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,1))
- └── body: (length: 3)
- ├── @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (2,0)-(2,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (2,0)-(2,1) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (4,0)-(4,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (4,0)-(4,1) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt b/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt
deleted file mode 100644
index a08f5419f1..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,4))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,4))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4))
- │ └── name: :@b
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt b/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt
deleted file mode 100644
index dd58d92d3a..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,1))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(2,1))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,4))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4))
- │ └── name: :@b
- ├── closing_loc: (2,0)-(2,1) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
deleted file mode 100644
index 8a0fcd63af..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,2)-(3,3))
- ├── locals: [:x, :y]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,5)-(1,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,6)-(1,10))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :x
- │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :y
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,5)-(1,6) = "|"
- │ └── closing_loc: (1,10)-(1,11) = "|"
- ├── body:
- │ @ StatementsNode (location: (2,2)-(2,7))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (2,4)-(2,5) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,6)-(2,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
- │ │ ├── name: :y
- │ │ └── depth: 0
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,2)-(1,4) = "do"
- └── closing_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
deleted file mode 100644
index 84eef70b25..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,3))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(5,3))
- ├── name: :x
- ├── name_loc: (1,4)-(1,5) = "x"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,7))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :y
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (2,2)-(4,10))
- │ └── body: (length: 3)
- │ ├── @ CallNode (location: (2,2)-(2,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :p
- │ │ ├── message_loc: (2,2)-(2,3) = "p"
- │ │ ├── opening_loc: (2,3)-(2,4) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (2,4)-(2,5))
- │ │ │ ├── name: :y
- │ │ │ └── depth: 0
- │ │ ├── closing_loc: (2,5)-(2,6) = ")"
- │ │ └── block: ∅
- │ ├── @ LocalVariableOperatorWriteNode (location: (3,2)-(3,8))
- │ │ ├── name_loc: (3,2)-(3,3) = "y"
- │ │ ├── binary_operator_loc: (3,4)-(3,6) = "*="
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (3,7)-(3,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── name: :y
- │ │ ├── binary_operator: :*
- │ │ └── depth: 0
- │ └── @ ReturnNode (location: (4,2)-(4,10))
- │ ├── flags: redundant
- │ ├── keyword_loc: (4,2)-(4,8) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (4,9)-(4,10))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LocalVariableReadNode (location: (4,9)-(4,10))
- │ ├── name: :y
- │ └── depth: 0
- ├── locals: [:y]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── rparen_loc: (1,7)-(1,8) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (5,0)-(5,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt
deleted file mode 100644
index 74240322ac..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,3))
- └── body: (length: 2)
- ├── @ DefNode (location: (1,0)-(3,3))
- │ ├── name: :f
- │ ├── name_loc: (1,4)-(1,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- └── @ DefNode (location: (5,0)-(6,3))
- ├── name: :f
- ├── name_loc: (5,4)-(5,5) = "f"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body: ∅
- ├── locals: []
- ├── def_keyword_loc: (5,0)-(5,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt
deleted file mode 100644
index 8445743293..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(2,3))
- ├── name: :f
- ├── name_loc: (1,4)-(1,5) = "f"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,7))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :a
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot2.txt b/test/prism/snapshots/seattlerb/parse_line_dot2.txt
deleted file mode 100644
index 9ccf5bdc99..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_dot2.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,1))
- └── body: (length: 3)
- ├── @ RangeNode (location: (1,0)-(2,1))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (1,0)-(1,1))
- │ │ ├── flags: decimal
- │ │ └── value: 0
- │ ├── right:
- │ │ @ IntegerNode (location: (2,0)-(2,1))
- │ │ ├── flags: decimal
- │ │ └── value: 4
- │ └── operator_loc: (1,1)-(1,3) = ".."
- ├── @ RangeNode (location: (3,0)-(4,1))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ CallNode (location: (3,0)-(3,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (3,0)-(3,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (4,0)-(4,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (4,0)-(4,1) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (3,1)-(3,3) = ".."
- └── @ CallNode (location: (5,0)-(5,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (5,0)-(5,1) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt b/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt
deleted file mode 100644
index f85fdd6d4b..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 3)
- ├── @ RangeNode (location: (1,0)-(1,3))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (1,0)-(1,1))
- │ │ ├── flags: decimal
- │ │ └── value: 0
- │ ├── right: ∅
- │ └── operator_loc: (1,1)-(1,3) = ".."
- ├── @ RangeNode (location: (2,2)-(2,5))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ CallNode (location: (2,2)-(2,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (2,2)-(2,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right: ∅
- │ └── operator_loc: (2,3)-(2,5) = ".."
- └── @ CallNode (location: (3,2)-(3,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (3,2)-(3,3) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot3.txt b/test/prism/snapshots/seattlerb/parse_line_dot3.txt
deleted file mode 100644
index 6364c1f136..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_dot3.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,1))
- └── body: (length: 3)
- ├── @ RangeNode (location: (1,0)-(2,1))
- │ ├── flags: exclude_end
- │ ├── left:
- │ │ @ IntegerNode (location: (1,0)-(1,1))
- │ │ ├── flags: decimal
- │ │ └── value: 0
- │ ├── right:
- │ │ @ IntegerNode (location: (2,0)-(2,1))
- │ │ ├── flags: decimal
- │ │ └── value: 4
- │ └── operator_loc: (1,1)-(1,4) = "..."
- ├── @ RangeNode (location: (3,0)-(4,1))
- │ ├── flags: exclude_end
- │ ├── left:
- │ │ @ CallNode (location: (3,0)-(3,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (3,0)-(3,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right:
- │ │ @ CallNode (location: (4,0)-(4,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (4,0)-(4,1) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (3,1)-(3,4) = "..."
- └── @ CallNode (location: (5,0)-(5,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (5,0)-(5,1) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt b/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt
deleted file mode 100644
index 35759d12e3..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 3)
- ├── @ RangeNode (location: (1,0)-(1,4))
- │ ├── flags: exclude_end
- │ ├── left:
- │ │ @ IntegerNode (location: (1,0)-(1,1))
- │ │ ├── flags: decimal
- │ │ └── value: 0
- │ ├── right: ∅
- │ └── operator_loc: (1,1)-(1,4) = "..."
- ├── @ RangeNode (location: (2,2)-(2,6))
- │ ├── flags: exclude_end
- │ ├── left:
- │ │ @ CallNode (location: (2,2)-(2,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (2,2)-(2,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right: ∅
- │ └── operator_loc: (2,3)-(2,6) = "..."
- └── @ CallNode (location: (3,2)-(3,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :c
- ├── message_loc: (3,2)-(3,3) = "c"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt b/test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt
deleted file mode 100644
index aada5a9477..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,4))
- └── body: (length: 2)
- ├── @ InterpolatedStringNode (location: (1,0)-(2,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (1,1)-(1,4))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (1,1)-(1,4) = "a\\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ EmbeddedStatementsNode (location: (1,4)-(2,1))
- │ │ ├── opening_loc: (1,4)-(1,6) = "\#{"
- │ │ ├── statements: ∅
- │ │ └── closing_loc: (2,0)-(2,1) = "}"
- │ └── closing_loc: (2,1)-(2,2) = "\""
- └── @ TrueNode (location: (3,0)-(3,4))
diff --git a/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt b/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt
deleted file mode 100644
index 7ef56acb76..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,4))
- └── body: (length: 2)
- ├── @ InterpolatedStringNode (location: (1,0)-(3,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (1,1)-(2,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (1,1)-(2,0) = "a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ EmbeddedStatementsNode (location: (2,0)-(3,1))
- │ │ ├── opening_loc: (2,0)-(2,2) = "\#{"
- │ │ ├── statements: ∅
- │ │ └── closing_loc: (3,0)-(3,1) = "}"
- │ └── closing_loc: (3,1)-(3,2) = "\""
- └── @ TrueNode (location: (4,0)-(4,4))
diff --git a/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt b/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt
deleted file mode 100644
index 82f461e340..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,6))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(2,6))
- ├── flags: ∅
- ├── opening_loc: ∅
- ├── parts: (length: 2)
- │ ├── @ StringNode (location: (1,0)-(1,3))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ │ ├── content_loc: (1,1)-(1,2) = "a"
- │ │ ├── closing_loc: (1,2)-(1,3) = "\""
- │ │ └── unescaped: "a"
- │ └── @ InterpolatedStringNode (location: (2,0)-(2,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (2,0)-(2,1) = "\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (2,1)-(2,5))
- │ │ ├── opening_loc: (2,1)-(2,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,3)-(2,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,3)-(2,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (2,3)-(2,4) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (2,4)-(2,5) = "}"
- │ └── closing_loc: (2,5)-(2,6) = "\""
- └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_hash_lit.txt b/test/prism/snapshots/seattlerb/parse_line_hash_lit.txt
deleted file mode 100644
index 0f95a607aa..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_hash_lit.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,1))
- └── body: (length: 1)
- └── @ HashNode (location: (1,0)-(3,1))
- ├── opening_loc: (1,0)-(1,1) = "{"
- ├── elements: (length: 1)
- │ └── @ AssocNode (location: (2,0)-(2,8))
- │ ├── key:
- │ │ @ SymbolNode (location: (2,0)-(2,3))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (2,0)-(2,1) = ":"
- │ │ ├── value_loc: (2,1)-(2,3) = "s1"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "s1"
- │ ├── value:
- │ │ @ IntegerNode (location: (2,7)-(2,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (2,4)-(2,6) = "=>"
- └── closing_loc: (3,0)-(3,1) = "}"
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt
deleted file mode 100644
index ba00f01504..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_heredoc.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ ProgramNode (location: (1,6)-(4,17))
-├── locals: [:string]
-└── statements:
- @ StatementsNode (location: (1,6)-(4,17))
- └── body: (length: 2)
- ├── @ LocalVariableWriteNode (location: (1,6)-(1,31))
- │ ├── name: :string
- │ ├── depth: 0
- │ ├── name_loc: (1,6)-(1,12) = "string"
- │ ├── value:
- │ │ @ CallNode (location: (1,15)-(1,31))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ StringNode (location: (1,15)-(1,25))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,15)-(1,25) = "<<-HEREDOC"
- │ │ │ ├── content_loc: (2,0)-(3,0) = " very long string\n"
- │ │ │ ├── closing_loc: (3,0)-(4,0) = " HEREDOC\n"
- │ │ │ └── unescaped: " very long string\n"
- │ │ ├── call_operator_loc: (1,25)-(1,26) = "."
- │ │ ├── name: :strip
- │ │ ├── message_loc: (1,26)-(1,31) = "strip"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (1,13)-(1,14) = "="
- └── @ CallNode (location: (4,6)-(4,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :puts
- ├── message_loc: (4,6)-(4,10) = "puts"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (4,11)-(4,17))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LocalVariableReadNode (location: (4,11)-(4,17))
- │ ├── name: :string
- │ └── depth: 0
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt
deleted file mode 100644
index b251b2b344..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,4) = "<<-A"
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (2,0)-(3,0) = "a\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\n"
- │ ├── @ EmbeddedStatementsNode (location: (3,0)-(3,4))
- │ │ ├── opening_loc: (3,0)-(3,2) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,2)-(3,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,2)-(3,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (3,2)-(3,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (3,3)-(3,4) = "}"
- │ └── @ StringNode (location: (3,4)-(4,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (3,4)-(4,0) = "\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\n"
- └── closing_loc: (4,0)-(5,0) = "A\n"
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt
deleted file mode 100644
index ad0f0dfd99..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,3))
- └── body: (length: 2)
- ├── @ StringNode (location: (1,0)-(1,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,8) = "<<-EOFOO"
- │ ├── content_loc: (2,0)-(3,0) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\n"
- │ ├── closing_loc: (3,0)-(4,0) = "EOFOO\n"
- │ └── unescaped: "\n\n\n\n\n\n\n\n\n\n"
- └── @ ClassNode (location: (5,0)-(6,3))
- ├── locals: []
- ├── class_keyword_loc: (5,0)-(5,5) = "class"
- ├── constant_path:
- │ @ ConstantReadNode (location: (5,6)-(5,9))
- │ └── name: :Foo
- ├── inheritance_operator_loc: ∅
- ├── superclass: ∅
- ├── body: ∅
- ├── end_keyword_loc: (6,0)-(6,3) = "end"
- └── name: :Foo
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt
deleted file mode 100644
index fdac30fab7..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ ProgramNode (location: (1,6)-(4,17))
-├── locals: [:string]
-└── statements:
- @ StatementsNode (location: (1,6)-(4,17))
- └── body: (length: 2)
- ├── @ LocalVariableWriteNode (location: (1,6)-(1,22))
- │ ├── name: :string
- │ ├── depth: 0
- │ ├── name_loc: (1,6)-(1,12) = "string"
- │ ├── value:
- │ │ @ StringNode (location: (1,15)-(1,22))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,15)-(1,22) = "<<-\"^D\""
- │ │ ├── content_loc: (2,0)-(3,0) = " very long string\n"
- │ │ ├── closing_loc: (3,0)-(4,0) = " ^D\n"
- │ │ └── unescaped: " very long string\n"
- │ └── operator_loc: (1,13)-(1,14) = "="
- └── @ CallNode (location: (4,6)-(4,17))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :puts
- ├── message_loc: (4,6)-(4,10) = "puts"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (4,11)-(4,17))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LocalVariableReadNode (location: (4,11)-(4,17))
- │ ├── name: :string
- │ └── depth: 0
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt b/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt
deleted file mode 100644
index 8d9dbf24ab..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,2)-(1,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,2)-(1,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,4)-(3,3))
- ├── locals: [:x, :y]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,7)-(1,13))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,8)-(1,12))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,8)-(1,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :x
- │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :y
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,7)-(1,8) = "|"
- │ └── closing_loc: (1,12)-(1,13) = "|"
- ├── body:
- │ @ StatementsNode (location: (2,2)-(2,7))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (2,4)-(2,5) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,6)-(2,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
- │ │ ├── name: :y
- │ │ └── depth: 0
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,4)-(1,6) = "do"
- └── closing_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
deleted file mode 100644
index 663d870137..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(3,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :f
- ├── message_loc: (1,0)-(1,1) = "f"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (1,2)-(1,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,2)-(1,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: (1,3)-(1,4) = ")"
- └── block:
- @ BlockNode (location: (1,5)-(3,3))
- ├── locals: [:x, :y]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,8)-(1,14))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,9)-(1,13))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :x
- │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :y
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,8)-(1,9) = "|"
- │ └── closing_loc: (1,13)-(1,14) = "|"
- ├── body:
- │ @ StatementsNode (location: (2,2)-(2,7))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (2,4)-(2,5) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,6)-(2,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
- │ │ ├── name: :y
- │ │ └── depth: 0
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (1,5)-(1,7) = "do"
- └── closing_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_multiline_str.txt b/test/prism/snapshots/seattlerb/parse_line_multiline_str.txt
deleted file mode 100644
index 8d4578eaec..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_multiline_str.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,1))
- └── body: (length: 2)
- ├── @ StringNode (location: (1,0)-(2,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ ├── content_loc: (1,1)-(2,1) = "a\nb"
- │ ├── closing_loc: (2,1)-(2,2) = "\""
- │ └── unescaped: "a\nb"
- └── @ IntegerNode (location: (3,0)-(3,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt b/test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt
deleted file mode 100644
index 49d31f5b1b..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,1))
- └── body: (length: 2)
- ├── @ StringNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ ├── content_loc: (1,1)-(1,5) = "a\\nb"
- │ ├── closing_loc: (1,5)-(1,6) = "\""
- │ └── unescaped: "a\nb"
- └── @ IntegerNode (location: (2,0)-(2,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/parse_line_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_newlines.txt
deleted file mode 100644
index 3e1ceef586..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_newlines.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ TrueNode (location: (1,0)-(1,4))
diff --git a/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt b/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt
deleted file mode 100644
index d113f2af9d..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ ProgramNode (location: (1,6)-(3,9))
-├── locals: [:foo]
-└── statements:
- @ StatementsNode (location: (1,6)-(3,9))
- └── body: (length: 2)
- ├── @ LocalVariableOperatorWriteNode (location: (1,6)-(2,11))
- │ ├── name_loc: (1,6)-(1,9) = "foo"
- │ ├── binary_operator_loc: (1,10)-(1,12) = "+="
- │ ├── value:
- │ │ @ CallNode (location: (2,8)-(2,11))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (2,8)-(2,11) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── name: :foo
- │ ├── binary_operator: :+
- │ └── depth: 0
- └── @ CallNode (location: (3,6)-(3,9))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :baz
- ├── message_loc: (3,6)-(3,9) = "baz"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_postexe.txt b/test/prism/snapshots/seattlerb/parse_line_postexe.txt
deleted file mode 100644
index 68b5f02fe0..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_postexe.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,1))
- └── body: (length: 1)
- └── @ PostExecutionNode (location: (1,0)-(3,1))
- ├── statements:
- │ @ StatementsNode (location: (2,0)-(2,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,0)-(2,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (2,0)-(2,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── keyword_loc: (1,0)-(1,3) = "END"
- ├── opening_loc: (1,4)-(1,5) = "{"
- └── closing_loc: (3,0)-(3,1) = "}"
diff --git a/test/prism/snapshots/seattlerb/parse_line_preexe.txt b/test/prism/snapshots/seattlerb/parse_line_preexe.txt
deleted file mode 100644
index 65ea22cf7d..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_preexe.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,1))
- └── body: (length: 1)
- └── @ PreExecutionNode (location: (1,0)-(3,1))
- ├── statements:
- │ @ StatementsNode (location: (2,0)-(2,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,0)-(2,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (2,0)-(2,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── keyword_loc: (1,0)-(1,5) = "BEGIN"
- ├── opening_loc: (1,6)-(1,7) = "{"
- └── closing_loc: (3,0)-(3,1) = "}"
diff --git a/test/prism/snapshots/seattlerb/parse_line_rescue.txt b/test/prism/snapshots/seattlerb/parse_line_rescue.txt
deleted file mode 100644
index cb20d5403b..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_rescue.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,3))
- └── body: (length: 1)
- └── @ BeginNode (location: (1,0)-(7,3))
- ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- ├── statements:
- │ @ StatementsNode (location: (2,2)-(2,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (2,2)-(2,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── rescue_clause:
- │ @ RescueNode (location: (3,0)-(6,3))
- │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ ├── exceptions: (length: 0)
- │ ├── operator_loc: ∅
- │ ├── reference: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (4,2)-(4,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (4,2)-(4,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (4,2)-(4,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── consequent:
- │ @ RescueNode (location: (5,0)-(6,3))
- │ ├── keyword_loc: (5,0)-(5,6) = "rescue"
- │ ├── exceptions: (length: 0)
- │ ├── operator_loc: ∅
- │ ├── reference: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (6,2)-(6,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (6,2)-(6,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (6,2)-(6,3) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── consequent: ∅
- ├── else_clause: ∅
- ├── ensure_clause: ∅
- └── end_keyword_loc: (7,0)-(7,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_return.txt b/test/prism/snapshots/seattlerb/parse_line_return.txt
deleted file mode 100644
index 719a4da5da..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_return.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ ProgramNode (location: (1,6)-(5,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,6)-(5,9))
- └── body: (length: 1)
- └── @ DefNode (location: (1,6)-(5,9))
- ├── name: :blah
- ├── name_loc: (1,10)-(1,14) = "blah"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (2,8)-(4,11))
- │ └── body: (length: 1)
- │ └── @ IfNode (location: (2,8)-(4,11))
- │ ├── if_keyword_loc: (2,8)-(2,10) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (2,11)-(2,15))
- │ ├── then_keyword_loc: (2,16)-(2,20) = "then"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,10)-(3,19))
- │ │ └── body: (length: 1)
- │ │ └── @ ReturnNode (location: (3,10)-(3,19))
- │ │ ├── flags: redundant
- │ │ ├── keyword_loc: (3,10)-(3,16) = "return"
- │ │ └── arguments:
- │ │ @ ArgumentsNode (location: (3,17)-(3,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (3,17)-(3,19))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (4,8)-(4,11) = "end"
- ├── locals: []
- ├── def_keyword_loc: (1,6)-(1,9) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (5,6)-(5,9) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt b/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt
deleted file mode 100644
index 4a675d67c4..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,13))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: (1,1)-(1,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,12))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ StringNode (location: (1,2)-(1,6))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ │ ├── content_loc: (1,3)-(1,5) = "\\n"
- │ │ ├── closing_loc: (1,5)-(1,6) = "\""
- │ │ └── unescaped: "\n"
- │ └── @ TrueNode (location: (1,8)-(1,12))
- ├── closing_loc: (1,12)-(1,13) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_to_ary.txt b/test/prism/snapshots/seattlerb/parse_line_to_ary.txt
deleted file mode 100644
index 0485b0d2e3..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_to_ary.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,1))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,1))
- └── body: (length: 2)
- ├── @ MultiWriteNode (location: (1,0)-(2,5))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableTargetNode (location: (2,0)-(2,1))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (2,2)-(2,3) = "="
- │ └── value:
- │ @ CallNode (location: (2,4)-(2,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :c
- │ ├── message_loc: (2,4)-(2,5) = "c"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (3,0)-(3,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :d
- ├── message_loc: (3,0)-(3,1) = "d"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt
deleted file mode 100644
index 5cd7702847..0000000000
--- a/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,1))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (2,0)-(2,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (2,0)-(2,1) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt b/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt
deleted file mode 100644
index dc11e2ca3d..0000000000
--- a/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,8))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :[]
- ├── message_loc: (1,1)-(1,8) = "[2=>3,]"
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,6))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,2)-(1,6))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,6))
- │ ├── key:
- │ │ @ IntegerNode (location: (1,2)-(1,3))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── value:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── operator_loc: (1,3)-(1,5) = "=>"
- ├── closing_loc: (1,7)-(1,8) = "]"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt b/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt
deleted file mode 100644
index d1d3d9335f..0000000000
--- a/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── receiver:
- │ @ IntegerNode (location: (1,0)-(1,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── call_operator_loc: ∅
- ├── name: :[]
- ├── message_loc: (1,1)-(1,5) = "[2,]"
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,2)-(1,3))
- │ ├── flags: decimal
- │ └── value: 2
- ├── closing_loc: (1,4)-(1,5) = "]"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_019.txt b/test/prism/snapshots/seattlerb/parse_pattern_019.txt
deleted file mode 100644
index 9e2500fbde..0000000000
--- a/test/prism/snapshots/seattlerb/parse_pattern_019.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 0
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,6))
- │ ├── pattern:
- │ │ @ RangeNode (location: (2,3)-(2,8))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (2,3)-(2,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: -1
- │ │ ├── right:
- │ │ │ @ IntegerNode (location: (2,7)-(2,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (2,5)-(2,7) = ".."
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,6))
- │ │ └── body: (length: 1)
- │ │ └── @ TrueNode (location: (3,2)-(3,6))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_044.txt b/test/prism/snapshots/seattlerb/parse_pattern_044.txt
deleted file mode 100644
index 951a5100b6..0000000000
--- a/test/prism/snapshots/seattlerb/parse_pattern_044.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ CallNode (location: (1,5)-(1,8))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :obj
- │ ├── message_loc: (1,5)-(1,8) = "obj"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,6))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,11))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (2,3)-(2,9))
- │ │ │ └── name: :Object
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,9)-(2,10) = "["
- │ │ └── closing_loc: (2,10)-(2,11) = "]"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,6))
- │ │ └── body: (length: 1)
- │ │ └── @ TrueNode (location: (3,2)-(3,6))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_051.txt b/test/prism/snapshots/seattlerb/parse_pattern_051.txt
deleted file mode 100644
index 6c366e559f..0000000000
--- a/test/prism/snapshots/seattlerb/parse_pattern_051.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ ArrayNode (location: (1,5)-(1,14))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ IntegerNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 0
- │ │ ├── @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (1,12)-(1,13))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (1,5)-(1,6) = "["
- │ └── closing_loc: (1,13)-(1,14) = "]"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,6))
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,3)-(2,10))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (2,4)-(2,5))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 0
- │ │ │ └── @ IntegerNode (location: (2,7)-(2,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest:
- │ │ │ @ ImplicitRestNode (location: (2,8)-(2,9))
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,3)-(2,4) = "["
- │ │ └── closing_loc: (2,9)-(2,10) = "]"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,6))
- │ │ └── body: (length: 1)
- │ │ └── @ TrueNode (location: (3,2)-(3,6))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058.txt b/test/prism/snapshots/seattlerb/parse_pattern_058.txt
deleted file mode 100644
index 8a4f8f8a68..0000000000
--- a/test/prism/snapshots/seattlerb/parse_pattern_058.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: [:a, :rest]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ HashNode (location: (1,5)-(1,11))
- │ ├── opening_loc: (1,5)-(1,6) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (1,6)-(1,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (1,6)-(1,7) = "a"
- │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 0
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (1,10)-(1,11) = "}"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,11))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,15))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,4)-(2,6))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
- │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ ImplicitNode (location: (2,4)-(2,5))
- │ │ │ │ └── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,4)-(2,5))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest:
- │ │ │ @ AssocSplatNode (location: (2,8)-(2,14))
- │ │ │ ├── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,14))
- │ │ │ │ ├── name: :rest
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
- │ │ ├── opening_loc: (2,3)-(2,4) = "{"
- │ │ └── closing_loc: (2,14)-(2,15) = "}"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,11))
- │ │ └── body: (length: 1)
- │ │ └── @ ArrayNode (location: (3,2)-(3,11))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ LocalVariableReadNode (location: (3,3)-(3,4))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableReadNode (location: (3,6)-(3,10))
- │ │ │ ├── name: :rest
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (3,2)-(3,3) = "["
- │ │ └── closing_loc: (3,10)-(3,11) = "]"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
deleted file mode 100644
index 3507d0f2cf..0000000000
--- a/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ HashNode (location: (1,5)-(1,11))
- │ ├── opening_loc: (1,5)-(1,6) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (1,6)-(1,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (1,6)-(1,7) = "a"
- │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 0
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (1,10)-(1,11) = "}"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,5))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,11))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,4)-(2,6))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
- │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ ImplicitNode (location: (2,4)-(2,5))
- │ │ │ │ └── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,4)-(2,5))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest:
- │ │ │ @ AssocSplatNode (location: (2,8)-(2,10))
- │ │ │ ├── value: ∅
- │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
- │ │ ├── opening_loc: (2,3)-(2,4) = "{"
- │ │ └── closing_loc: (2,10)-(2,11) = "}"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,5))
- │ │ └── body: (length: 1)
- │ │ └── @ ArrayNode (location: (3,2)-(3,5))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (3,3)-(3,4))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (3,2)-(3,3) = "["
- │ │ └── closing_loc: (3,4)-(3,5) = "]"
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_069.txt b/test/prism/snapshots/seattlerb/parse_pattern_069.txt
deleted file mode 100644
index 09ac7653c6..0000000000
--- a/test/prism/snapshots/seattlerb/parse_pattern_069.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ SymbolNode (location: (1,5)-(1,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,5)-(1,6) = ":"
- │ ├── value_loc: (1,6)-(1,7) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,3))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,15))
- │ │ ├── constant:
- │ │ │ @ ConstantReadNode (location: (2,3)-(2,9))
- │ │ │ └── name: :Object
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,10)-(2,14))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,10)-(2,12))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,10)-(2,11) = "b"
- │ │ │ │ ├── closing_loc: (2,11)-(2,12) = ":"
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (2,13)-(2,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest: ∅
- │ │ ├── opening_loc: (2,9)-(2,10) = "["
- │ │ └── closing_loc: (2,14)-(2,15) = "]"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,3))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (3,2)-(3,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_076.txt b/test/prism/snapshots/seattlerb/parse_pattern_076.txt
deleted file mode 100644
index 60e71cd6fe..0000000000
--- a/test/prism/snapshots/seattlerb/parse_pattern_076.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CaseMatchNode (location: (1,0)-(4,3))
- ├── predicate:
- │ @ HashNode (location: (1,5)-(1,11))
- │ ├── opening_loc: (1,5)-(1,6) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (1,6)-(1,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (1,6)-(1,7) = "a"
- │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (1,10)-(1,11) = "}"
- ├── conditions: (length: 1)
- │ └── @ InNode (location: (2,0)-(3,6))
- │ ├── pattern:
- │ │ @ HashPatternNode (location: (2,3)-(2,16))
- │ │ ├── constant: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (2,4)-(2,8))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
- │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (2,7)-(2,8))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: ∅
- │ │ ├── rest:
- │ │ │ @ NoKeywordsParameterNode (location: (2,10)-(2,15))
- │ │ │ ├── operator_loc: (2,10)-(2,12) = "**"
- │ │ │ └── keyword_loc: (2,12)-(2,15) = "nil"
- │ │ ├── opening_loc: (2,3)-(2,4) = "{"
- │ │ └── closing_loc: (2,15)-(2,16) = "}"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,2)-(3,6))
- │ │ └── body: (length: 1)
- │ │ └── @ TrueNode (location: (3,2)-(3,6))
- │ ├── in_loc: (2,0)-(2,2) = "in"
- │ └── then_loc: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt
deleted file mode 100644
index 7d5ef19a05..0000000000
--- a/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ UntilNode (location: (1,0)-(3,3))
- ├── flags: ∅
- ├── keyword_loc: (1,0)-(1,5) = "until"
- ├── closing_loc: (3,0)-(3,3) = "end"
- ├── predicate:
- │ @ CallNode (location: (1,6)-(1,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,10)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,10)-(1,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var
- │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
- │ │ ├── name: :nil?
- │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,6)-(1,9) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── statements:
- @ StatementsNode (location: (2,2)-(2,7))
- └── body: (length: 1)
- └── @ StringNode (location: (2,2)-(2,7))
- ├── flags: ∅
- ├── opening_loc: (2,2)-(2,3) = "'"
- ├── content_loc: (2,3)-(2,6) = "foo"
- ├── closing_loc: (2,6)-(2,7) = "'"
- └── unescaped: "foo"
diff --git a/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt
deleted file mode 100644
index 7d5ef19a05..0000000000
--- a/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ UntilNode (location: (1,0)-(3,3))
- ├── flags: ∅
- ├── keyword_loc: (1,0)-(1,5) = "until"
- ├── closing_loc: (3,0)-(3,3) = "end"
- ├── predicate:
- │ @ CallNode (location: (1,6)-(1,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,10)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,10)-(1,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var
- │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
- │ │ ├── name: :nil?
- │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,6)-(1,9) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── statements:
- @ StatementsNode (location: (2,2)-(2,7))
- └── body: (length: 1)
- └── @ StringNode (location: (2,2)-(2,7))
- ├── flags: ∅
- ├── opening_loc: (2,2)-(2,3) = "'"
- ├── content_loc: (2,3)-(2,6) = "foo"
- ├── closing_loc: (2,6)-(2,7) = "'"
- └── unescaped: "foo"
diff --git a/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt
deleted file mode 100644
index 91eb88a70f..0000000000
--- a/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ WhileNode (location: (1,0)-(3,3))
- ├── flags: ∅
- ├── keyword_loc: (1,0)-(1,5) = "while"
- ├── closing_loc: (3,0)-(3,3) = "end"
- ├── predicate:
- │ @ CallNode (location: (1,6)-(1,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,10)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,10)-(1,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var
- │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
- │ │ ├── name: :nil?
- │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,6)-(1,9) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── statements:
- @ StatementsNode (location: (2,2)-(2,7))
- └── body: (length: 1)
- └── @ StringNode (location: (2,2)-(2,7))
- ├── flags: ∅
- ├── opening_loc: (2,2)-(2,3) = "'"
- ├── content_loc: (2,3)-(2,6) = "foo"
- ├── closing_loc: (2,6)-(2,7) = "'"
- └── unescaped: "foo"
diff --git a/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt
deleted file mode 100644
index 91eb88a70f..0000000000
--- a/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,3))
- └── body: (length: 1)
- └── @ WhileNode (location: (1,0)-(3,3))
- ├── flags: ∅
- ├── keyword_loc: (1,0)-(1,5) = "while"
- ├── closing_loc: (3,0)-(3,3) = "end"
- ├── predicate:
- │ @ CallNode (location: (1,6)-(1,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,10)-(1,18))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (1,10)-(1,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var
- │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
- │ │ ├── name: :nil?
- │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,6)-(1,9) = "not"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── statements:
- @ StatementsNode (location: (2,2)-(2,7))
- └── body: (length: 1)
- └── @ StringNode (location: (2,2)-(2,7))
- ├── flags: ∅
- ├── opening_loc: (2,2)-(2,3) = "'"
- ├── content_loc: (2,3)-(2,6) = "foo"
- ├── closing_loc: (2,6)-(2,7) = "'"
- └── unescaped: "foo"
diff --git a/test/prism/snapshots/seattlerb/pctW_lineno.txt b/test/prism/snapshots/seattlerb/pctW_lineno.txt
deleted file mode 100644
index 58efa9c59a..0000000000
--- a/test/prism/snapshots/seattlerb/pctW_lineno.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,11))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(5,11))
- ├── flags: ∅
- ├── elements: (length: 7)
- │ ├── @ StringNode (location: (1,3)-(1,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,3)-(1,7) = "a\\nb"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\nb"
- │ ├── @ StringNode (location: (2,0)-(2,1))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (2,0)-(2,1) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── @ StringNode (location: (2,2)-(2,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (2,2)-(2,3) = "d"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d"
- │ ├── @ StringNode (location: (3,0)-(4,1))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (3,0)-(4,1) = "e\\\nf"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "e\nf"
- │ ├── @ StringNode (location: (5,0)-(5,2))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (5,0)-(5,2) = "gy"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "gy"
- │ ├── @ StringNode (location: (5,3)-(5,6))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (5,3)-(5,6) = "h\\y"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "hy"
- │ └── @ StringNode (location: (5,7)-(5,10))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── content_loc: (5,7)-(5,10) = "i\\y"
- │ ├── closing_loc: ∅
- │ └── unescaped: "iy"
- ├── opening_loc: (1,0)-(1,3) = "%W("
- └── closing_loc: (5,10)-(5,11) = ")"
diff --git a/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt b/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt
deleted file mode 100644
index c8a990c672..0000000000
--- a/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,1))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(2,1))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,3) = "%Q{"
- ├── content_loc: (1,3)-(2,0) = " \\\n"
- ├── closing_loc: (2,0)-(2,1) = "}"
- └── unescaped: " "
diff --git a/test/prism/snapshots/seattlerb/pct_nl.txt b/test/prism/snapshots/seattlerb/pct_nl.txt
deleted file mode 100644
index 1009fcb51d..0000000000
--- a/test/prism/snapshots/seattlerb/pct_nl.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,0))
-├── locals: [:x]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,0))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(3,0))
- ├── name: :x
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "x"
- ├── value:
- │ @ StringNode (location: (1,4)-(3,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,4)-(2,0) = "%\n"
- │ ├── content_loc: (2,0)-(2,0) = ""
- │ ├── closing_loc: (2,0)-(3,0) = "\n"
- │ └── unescaped: ""
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt
deleted file mode 100644
index 1b8ec69b56..0000000000
--- a/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,11))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(4,11))
- ├── flags: ∅
- ├── elements: (length: 5)
- │ ├── @ StringNode (location: (1,4)-(1,5))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,4)-(1,5) = "1"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "1"
- │ ├── @ InterpolatedStringNode (location: (1,6)-(1,12))
- │ │ ├── flags: mutable
- │ │ ├── opening_loc: ∅
- │ │ ├── parts: (length: 1)
- │ │ │ └── @ EmbeddedStatementsNode (location: (1,6)-(1,12))
- │ │ │ ├── opening_loc: (1,6)-(1,8) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (1,8)-(1,11))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ StringNode (location: (1,8)-(1,11))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: (1,8)-(1,11) = "<<A"
- │ │ │ │ ├── content_loc: (2,0)-(3,0) = "2\n"
- │ │ │ │ ├── closing_loc: (3,0)-(4,0) = "A\n"
- │ │ │ │ └── unescaped: "2\n"
- │ │ │ └── closing_loc: (1,11)-(1,12) = "}"
- │ │ └── closing_loc: ∅
- │ ├── @ StringNode (location: (1,13)-(1,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,13)-(1,14) = "3"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "3"
- │ ├── @ StringNode (location: (4,6)-(4,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (4,6)-(4,7) = "4"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "4"
- │ └── @ StringNode (location: (4,8)-(4,9))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── content_loc: (4,8)-(4,9) = "5"
- │ ├── closing_loc: ∅
- │ └── unescaped: "5"
- ├── opening_loc: (1,0)-(1,3) = "%W("
- └── closing_loc: (4,10)-(4,11) = ")"
diff --git a/test/prism/snapshots/seattlerb/pipe_semicolon.txt b/test/prism/snapshots/seattlerb/pipe_semicolon.txt
deleted file mode 100644
index 71fb4fbed5..0000000000
--- a/test/prism/snapshots/seattlerb/pipe_semicolon.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,18))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,18))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,18))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :b
- ├── message_loc: (1,2)-(1,3) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,4)-(1,18))
- ├── locals: [:c]
- ├── parameters:
- │ @ BlockParametersNode (location: (1,7)-(1,14))
- │ ├── parameters: ∅
- │ ├── locals: (length: 1)
- │ │ └── @ BlockLocalVariableNode (location: (1,11)-(1,12))
- │ │ ├── flags: ∅
- │ │ └── name: :c
- │ ├── opening_loc: (1,7)-(1,8) = "|"
- │ └── closing_loc: (1,13)-(1,14) = "|"
- ├── body: ∅
- ├── opening_loc: (1,4)-(1,6) = "do"
- └── closing_loc: (1,15)-(1,18) = "end"
diff --git a/test/prism/snapshots/seattlerb/pipe_space.txt b/test/prism/snapshots/seattlerb/pipe_space.txt
deleted file mode 100644
index 302d225337..0000000000
--- a/test/prism/snapshots/seattlerb/pipe_space.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,2) = "."
- ├── name: :b
- ├── message_loc: (1,2)-(1,3) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,4)-(1,14))
- ├── locals: []
- ├── parameters:
- │ @ BlockParametersNode (location: (1,7)-(1,10))
- │ ├── parameters: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,7)-(1,8) = "|"
- │ └── closing_loc: (1,9)-(1,10) = "|"
- ├── body: ∅
- ├── opening_loc: (1,4)-(1,6) = "do"
- └── closing_loc: (1,11)-(1,14) = "end"
diff --git a/test/prism/snapshots/seattlerb/qWords_space.txt b/test/prism/snapshots/seattlerb/qWords_space.txt
deleted file mode 100644
index 95ae6d4075..0000000000
--- a/test/prism/snapshots/seattlerb/qWords_space.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── elements: (length: 0)
- ├── opening_loc: (1,0)-(1,3) = "%W("
- └── closing_loc: (1,4)-(1,5) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols.txt b/test/prism/snapshots/seattlerb/qsymbols.txt
deleted file mode 100644
index 8ba68638c5..0000000000
--- a/test/prism/snapshots/seattlerb/qsymbols.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,9))
- ├── flags: ∅
- ├── elements: (length: 3)
- │ ├── @ SymbolNode (location: (1,3)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,3)-(1,4) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── @ SymbolNode (location: (1,5)-(1,6))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,5)-(1,6) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ └── @ SymbolNode (location: (1,7)-(1,8))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (1,7)-(1,8) = "c"
- │ ├── closing_loc: ∅
- │ └── unescaped: "c"
- ├── opening_loc: (1,0)-(1,3) = "%I("
- └── closing_loc: (1,8)-(1,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols_empty.txt b/test/prism/snapshots/seattlerb/qsymbols_empty.txt
deleted file mode 100644
index 54aa3f77d7..0000000000
--- a/test/prism/snapshots/seattlerb/qsymbols_empty.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── elements: (length: 0)
- ├── opening_loc: (1,0)-(1,3) = "%I("
- └── closing_loc: (1,3)-(1,4) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt b/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt
deleted file mode 100644
index 624b922ce6..0000000000
--- a/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── elements: (length: 0)
- ├── opening_loc: (1,0)-(1,3) = "%I("
- └── closing_loc: (1,4)-(1,5) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols_interp.txt b/test/prism/snapshots/seattlerb/qsymbols_interp.txt
deleted file mode 100644
index 97bc6754ff..0000000000
--- a/test/prism/snapshots/seattlerb/qsymbols_interp.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,15))
- ├── flags: ∅
- ├── elements: (length: 3)
- │ ├── @ SymbolNode (location: (1,3)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,3)-(1,4) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── @ InterpolatedSymbolNode (location: (1,5)-(1,12))
- │ │ ├── opening_loc: ∅
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (1,5)-(1,6) = "b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ └── @ EmbeddedStatementsNode (location: (1,6)-(1,12))
- │ │ │ ├── opening_loc: (1,6)-(1,8) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (1,8)-(1,11))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (1,8)-(1,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :+
- │ │ │ │ ├── message_loc: (1,9)-(1,10) = "+"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments:
- │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (1,11)-(1,12) = "}"
- │ │ └── closing_loc: ∅
- │ └── @ SymbolNode (location: (1,13)-(1,14))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (1,13)-(1,14) = "c"
- │ ├── closing_loc: ∅
- │ └── unescaped: "c"
- ├── opening_loc: (1,0)-(1,3) = "%I("
- └── closing_loc: (1,14)-(1,15) = ")"
diff --git a/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt
deleted file mode 100644
index bbc19d50ef..0000000000
--- a/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,12))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :puts
- ├── message_loc: (1,0)-(1,4) = "puts"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,12))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (1,5)-(1,12))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,5)-(1,12))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,5)-(1,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,5)-(1,6) = "'"
- │ │ ├── value_loc: (1,6)-(1,7) = "a"
- │ │ ├── closing_loc: (1,7)-(1,9) = "':"
- │ │ └── unescaped: "a"
- │ ├── value:
- │ │ @ HashNode (location: (1,10)-(1,12))
- │ │ ├── opening_loc: (1,10)-(1,11) = "{"
- │ │ ├── elements: (length: 0)
- │ │ └── closing_loc: (1,11)-(1,12) = "}"
- │ └── operator_loc: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/quoted_symbol_keys.txt b/test/prism/snapshots/seattlerb/quoted_symbol_keys.txt
deleted file mode 100644
index 96e6af51a4..0000000000
--- a/test/prism/snapshots/seattlerb/quoted_symbol_keys.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ HashNode (location: (1,0)-(1,11))
- ├── opening_loc: (1,0)-(1,1) = "{"
- ├── elements: (length: 1)
- │ └── @ AssocNode (location: (1,2)-(1,9))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,2)-(1,6))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,2)-(1,3) = "'"
- │ │ ├── value_loc: (1,3)-(1,4) = "a"
- │ │ ├── closing_loc: (1,4)-(1,6) = "':"
- │ │ └── unescaped: "a"
- │ ├── value:
- │ │ @ SymbolNode (location: (1,7)-(1,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,7)-(1,8) = ":"
- │ │ ├── value_loc: (1,8)-(1,9) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ └── operator_loc: ∅
- └── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/seattlerb/qw_escape.txt b/test/prism/snapshots/seattlerb/qw_escape.txt
deleted file mode 100644
index d92c1da7a6..0000000000
--- a/test/prism/snapshots/seattlerb/qw_escape.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,7))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,3) = "%q("
- ├── content_loc: (1,3)-(1,6) = "\u0001\\'"
- ├── closing_loc: (1,6)-(1,7) = ")"
- └── unescaped: "\u0001\\'"
diff --git a/test/prism/snapshots/seattlerb/qw_escape_term.txt b/test/prism/snapshots/seattlerb/qw_escape_term.txt
deleted file mode 100644
index e935b7eb68..0000000000
--- a/test/prism/snapshots/seattlerb/qw_escape_term.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,26))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,26))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,26))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,3) = "%q|"
- ├── content_loc: (1,3)-(1,25) = "blah blah \\| blah blah"
- ├── closing_loc: (1,25)-(1,26) = "|"
- └── unescaped: "blah blah | blah blah"
diff --git a/test/prism/snapshots/seattlerb/qwords_empty.txt b/test/prism/snapshots/seattlerb/qwords_empty.txt
deleted file mode 100644
index f9915c97c9..0000000000
--- a/test/prism/snapshots/seattlerb/qwords_empty.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── elements: (length: 0)
- ├── opening_loc: (1,0)-(1,3) = "%w("
- └── closing_loc: (1,3)-(1,4) = ")"
diff --git a/test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt b/test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt
deleted file mode 100644
index 3ea5604b69..0000000000
--- a/test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,9))
- ├── flags: forced_utf8_encoding
- ├── opening_loc: (1,0)-(1,1) = "?"
- ├── content_loc: (1,1)-(1,9) = "\\u{00a0}"
- ├── closing_loc: ∅
- └── unescaped: " "
diff --git a/test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt b/test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt
deleted file mode 100644
index 1eba1396fd..0000000000
--- a/test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,7))
- ├── flags: forced_utf8_encoding
- ├── opening_loc: (1,0)-(1,1) = "?"
- ├── content_loc: (1,1)-(1,7) = "\\u00a0"
- ├── closing_loc: ∅
- └── unescaped: " "
diff --git a/test/prism/snapshots/seattlerb/regexp.txt b/test/prism/snapshots/seattlerb/regexp.txt
deleted file mode 100644
index 06cf99264e..0000000000
--- a/test/prism/snapshots/seattlerb/regexp.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ ProgramNode (location: (1,0)-(9,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(9,13))
- └── body: (length: 5)
- ├── @ RegularExpressionNode (location: (1,0)-(1,5))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,0)-(1,1) = "/"
- │ ├── content_loc: (1,1)-(1,4) = "wtf"
- │ ├── closing_loc: (1,4)-(1,5) = "/"
- │ └── unescaped: "wtf"
- ├── @ RegularExpressionNode (location: (3,0)-(3,6))
- │ ├── flags: multi_line, forced_us_ascii_encoding
- │ ├── opening_loc: (3,0)-(3,1) = "/"
- │ ├── content_loc: (3,1)-(3,4) = "wtf"
- │ ├── closing_loc: (3,4)-(3,6) = "/m"
- │ └── unescaped: "wtf"
- ├── @ RegularExpressionNode (location: (5,0)-(5,6))
- │ ├── flags: ascii_8bit, forced_us_ascii_encoding
- │ ├── opening_loc: (5,0)-(5,1) = "/"
- │ ├── content_loc: (5,1)-(5,4) = "wtf"
- │ ├── closing_loc: (5,4)-(5,6) = "/n"
- │ └── unescaped: "wtf"
- ├── @ RegularExpressionNode (location: (7,0)-(7,7))
- │ ├── flags: multi_line, ascii_8bit, forced_us_ascii_encoding
- │ ├── opening_loc: (7,0)-(7,1) = "/"
- │ ├── content_loc: (7,1)-(7,4) = "wtf"
- │ ├── closing_loc: (7,4)-(7,7) = "/nm"
- │ └── unescaped: "wtf"
- └── @ RegularExpressionNode (location: (9,0)-(9,13))
- ├── flags: multi_line, ascii_8bit, forced_us_ascii_encoding
- ├── opening_loc: (9,0)-(9,1) = "/"
- ├── content_loc: (9,1)-(9,4) = "wtf"
- ├── closing_loc: (9,4)-(9,13) = "/nmnmnmnm"
- └── unescaped: "wtf"
diff --git a/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt b/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt
deleted file mode 100644
index 4dbedc44ca..0000000000
--- a/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ RegularExpressionNode (location: (1,0)-(1,7))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (1,0)-(1,1) = "/"
- ├── content_loc: (1,1)-(1,6) = "\\cC\\d"
- ├── closing_loc: (1,6)-(1,7) = "/"
- └── unescaped: "\\x03\\d"
diff --git a/test/prism/snapshots/seattlerb/regexp_esc_u.txt b/test/prism/snapshots/seattlerb/regexp_esc_u.txt
deleted file mode 100644
index bca451eb3b..0000000000
--- a/test/prism/snapshots/seattlerb/regexp_esc_u.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,17))
- └── body: (length: 1)
- └── @ RegularExpressionNode (location: (1,0)-(1,17))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (1,0)-(1,1) = "/"
- ├── content_loc: (1,1)-(1,16) = "[\\u0021-\\u0027]"
- ├── closing_loc: (1,16)-(1,17) = "/"
- └── unescaped: "[\\u0021-\\u0027]"
diff --git a/test/prism/snapshots/seattlerb/regexp_escape_extended.txt b/test/prism/snapshots/seattlerb/regexp_escape_extended.txt
deleted file mode 100644
index 6568d2bd92..0000000000
--- a/test/prism/snapshots/seattlerb/regexp_escape_extended.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ RegularExpressionNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "/"
- ├── content_loc: (1,1)-(1,5) = "\\“"
- ├── closing_loc: (1,5)-(1,6) = "/"
- └── unescaped: "“"
diff --git a/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt b/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt
deleted file mode 100644
index 487161b4d0..0000000000
--- a/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,8))
- └── body: (length: 2)
- ├── @ RegularExpressionNode (location: (1,0)-(1,15))
- │ ├── flags: forced_utf8_encoding
- │ ├── opening_loc: (1,0)-(1,1) = "/"
- │ ├── content_loc: (1,1)-(1,14) = "\\u{c0de babe}"
- │ ├── closing_loc: (1,14)-(1,15) = "/"
- │ └── unescaped: "\\u{c0de babe}"
- └── @ RegularExpressionNode (location: (3,0)-(3,8))
- ├── flags: forced_utf8_encoding
- ├── opening_loc: (3,0)-(3,1) = "/"
- ├── content_loc: (3,1)-(3,7) = "\\u{df}"
- ├── closing_loc: (3,7)-(3,8) = "/"
- └── unescaped: "\\u{df}"
diff --git a/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt b/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt
deleted file mode 100644
index 54595ac5cb..0000000000
--- a/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ DefNode (location: (1,0)-(2,3))
- ├── name: :x
- ├── name_loc: (1,4)-(1,5) = "x"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (1,6)-(1,12))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 2)
- │ │ ├── @ RequiredKeywordParameterNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :a
- │ │ │ └── name_loc: (1,6)-(1,8) = "a:"
- │ │ └── @ RequiredKeywordParameterNode (location: (1,10)-(1,12))
- │ │ ├── flags: ∅
- │ │ ├── name: :b
- │ │ └── name_loc: (1,10)-(1,12) = "b:"
- │ ├── keyword_rest: ∅
- │ └── block: ∅
- ├── body: ∅
- ├── locals: [:a, :b]
- ├── def_keyword_loc: (1,0)-(1,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
deleted file mode 100644
index 21f8bb08a5..0000000000
--- a/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(5,8))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(5,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :proc
- │ ├── message_loc: (1,0)-(1,4) = "proc"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,5)-(5,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (1,5)-(5,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,2)-(2,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (2,2)-(2,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (2,2)-(2,3) = ":"
- │ │ │ ├── value_loc: (2,3)-(2,8) = "begin"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "begin"
- │ │ ├── rescue_clause: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (3,0)-(5,3))
- │ │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (4,2)-(4,9))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
- │ │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "ensure"
- │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ ├── opening_loc: (1,5)-(1,7) = "do"
- │ └── closing_loc: (5,0)-(5,3) = "end"
- ├── call_operator_loc: (5,3)-(5,4) = "."
- ├── name: :call
- ├── message_loc: (5,4)-(5,8) = "call"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
deleted file mode 100644
index aa4e85c171..0000000000
--- a/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-@ ProgramNode (location: (1,0)-(9,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(9,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(9,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :tap
- ├── message_loc: (1,0)-(1,3) = "tap"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,4)-(9,3))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ BeginNode (location: (1,4)-(9,3))
- │ ├── begin_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(2,8))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (2,2)-(2,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (2,2)-(2,3) = ":"
- │ │ ├── value_loc: (2,3)-(2,8) = "begin"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "begin"
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (3,0)-(4,9))
- │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (4,2)-(4,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
- │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "rescue"
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (5,0)-(7,6))
- │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (6,2)-(6,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (6,2)-(6,7))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (6,2)-(6,3) = ":"
- │ │ │ ├── value_loc: (6,3)-(6,7) = "else"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "else"
- │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (7,0)-(9,3))
- │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (8,2)-(8,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (8,2)-(8,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (8,2)-(8,3) = ":"
- │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "ensure"
- │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- ├── opening_loc: (1,4)-(1,6) = "do"
- └── closing_loc: (9,0)-(9,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
deleted file mode 100644
index 06f67fae69..0000000000
--- a/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ ProgramNode (location: (1,0)-(5,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(5,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(5,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :tap
- ├── message_loc: (1,0)-(1,3) = "tap"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,4)-(5,3))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ BeginNode (location: (1,4)-(5,3))
- │ ├── begin_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(2,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(2,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :raise
- │ │ ├── message_loc: (2,2)-(2,7) = "raise"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (3,0)-(5,3))
- │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (4,2)-(4,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
- │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "ensure"
- │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── opening_loc: (1,4)-(1,6) = "do"
- └── closing_loc: (5,0)-(5,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
deleted file mode 100644
index b4576c3bb2..0000000000
--- a/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-@ ProgramNode (location: (1,0)-(9,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(9,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(9,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :tap
- ├── message_loc: (1,0)-(1,3) = "tap"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,4)-(9,3))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ BeginNode (location: (1,4)-(9,3))
- │ ├── begin_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(2,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(2,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :raise
- │ │ ├── message_loc: (2,2)-(2,7) = "raise"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (3,0)-(4,9))
- │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (4,2)-(4,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
- │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "rescue"
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (5,0)-(7,6))
- │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (6,2)-(6,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (6,2)-(6,7))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (6,2)-(6,3) = ":"
- │ │ │ ├── value_loc: (6,3)-(6,7) = "else"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "else"
- │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (7,0)-(9,3))
- │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (8,2)-(8,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (8,2)-(8,9))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (8,2)-(8,3) = ":"
- │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "ensure"
- │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- ├── opening_loc: (1,4)-(1,6) = "do"
- └── closing_loc: (9,0)-(9,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/rescue_in_block.txt b/test/prism/snapshots/seattlerb/rescue_in_block.txt
deleted file mode 100644
index daac2b6776..0000000000
--- a/test/prism/snapshots/seattlerb/rescue_in_block.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(4,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :blah
- ├── message_loc: (1,0)-(1,4) = "blah"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (1,5)-(4,3))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ BeginNode (location: (1,5)-(4,3))
- │ ├── begin_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (2,0)-(3,7))
- │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,2)-(3,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,2)-(3,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :stuff
- │ │ │ ├── message_loc: (3,2)-(3,7) = "stuff"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (4,0)-(4,3) = "end"
- ├── opening_loc: (1,5)-(1,7) = "do"
- └── closing_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/rescue_parens.txt b/test/prism/snapshots/seattlerb/rescue_parens.txt
deleted file mode 100644
index d086095e7a..0000000000
--- a/test/prism/snapshots/seattlerb/rescue_parens.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,14))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :a
- ├── message_loc: (1,0)-(1,1) = "a"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,14))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ ParenthesesNode (location: (1,2)-(1,14))
- │ ├── body:
- │ │ @ StatementsNode (location: (1,3)-(1,13))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (1,3)-(1,13))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,3)-(1,4) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_loc: (1,5)-(1,11) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ CallNode (location: (1,12)-(1,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (1,12)-(1,13) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ └── closing_loc: (1,13)-(1,14) = ")"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/return_call_assocs.txt b/test/prism/snapshots/seattlerb/return_call_assocs.txt
deleted file mode 100644
index 8948f7879b..0000000000
--- a/test/prism/snapshots/seattlerb/return_call_assocs.txt
+++ /dev/null
@@ -1,218 +0,0 @@
-@ ProgramNode (location: (1,0)-(11,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(11,14))
- └── body: (length: 6)
- ├── @ ReturnNode (location: (1,0)-(1,17))
- │ ├── flags: ∅
- │ ├── keyword_loc: (1,0)-(1,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (1,7)-(1,17))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 2)
- │ ├── @ IntegerNode (location: (1,7)-(1,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ KeywordHashNode (location: (1,10)-(1,17))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (1,10)-(1,17))
- │ ├── key:
- │ │ @ SymbolNode (location: (1,10)-(1,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,10)-(1,11) = ":"
- │ │ ├── value_loc: (1,11)-(1,12) = "z"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "z"
- │ ├── value:
- │ │ @ IntegerNode (location: (1,16)-(1,17))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (1,13)-(1,15) = "=>"
- ├── @ ReturnNode (location: (3,0)-(3,26))
- │ ├── flags: ∅
- │ ├── keyword_loc: (3,0)-(3,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (3,7)-(3,26))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 2)
- │ ├── @ IntegerNode (location: (3,7)-(3,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── @ KeywordHashNode (location: (3,10)-(3,26))
- │ ├── flags: symbol_keys
- │ └── elements: (length: 2)
- │ ├── @ AssocNode (location: (3,10)-(3,17))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (3,10)-(3,12))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (3,10)-(3,11) = ":"
- │ │ │ ├── value_loc: (3,11)-(3,12) = "z"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "z"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (3,16)-(3,17))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (3,13)-(3,15) = "=>"
- │ └── @ AssocNode (location: (3,19)-(3,26))
- │ ├── key:
- │ │ @ SymbolNode (location: (3,19)-(3,21))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (3,19)-(3,20) = ":"
- │ │ ├── value_loc: (3,20)-(3,21) = "w"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "w"
- │ ├── value:
- │ │ @ IntegerNode (location: (3,25)-(3,26))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (3,22)-(3,24) = "=>"
- ├── @ ReturnNode (location: (5,0)-(5,14))
- │ ├── flags: ∅
- │ ├── keyword_loc: (5,0)-(5,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (5,7)-(5,14))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (5,7)-(5,14))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :y
- │ ├── message_loc: (5,7)-(5,8) = "y"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,9)-(5,14))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (5,9)-(5,14))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (5,9)-(5,14))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (5,9)-(5,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (5,9)-(5,10) = ":"
- │ │ │ ├── value_loc: (5,10)-(5,11) = "z"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "z"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (5,13)-(5,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (5,11)-(5,13) = "=>"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ReturnNode (location: (7,0)-(7,12))
- │ ├── flags: ∅
- │ ├── keyword_loc: (7,0)-(7,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (7,7)-(7,12))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (7,7)-(7,12))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :y
- │ ├── message_loc: (7,7)-(7,8) = "y"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,9)-(7,12))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (7,9)-(7,12))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (7,9)-(7,12))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (7,9)-(7,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (7,9)-(7,10) = "z"
- │ │ │ ├── closing_loc: (7,10)-(7,11) = ":"
- │ │ │ └── unescaped: "z"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (7,11)-(7,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ ReturnNode (location: (9,0)-(9,13))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,0)-(9,6) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (9,7)-(9,13))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (9,7)-(9,13))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :y
- │ ├── message_loc: (9,7)-(9,8) = "y"
- │ ├── opening_loc: (9,8)-(9,9) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (9,9)-(9,12))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (9,9)-(9,12))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (9,9)-(9,12))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (9,9)-(9,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (9,9)-(9,10) = "z"
- │ │ │ ├── closing_loc: (9,10)-(9,11) = ":"
- │ │ │ └── unescaped: "z"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (9,11)-(9,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (9,12)-(9,13) = ")"
- │ └── block: ∅
- └── @ ReturnNode (location: (11,0)-(11,14))
- ├── flags: ∅
- ├── keyword_loc: (11,0)-(11,6) = "return"
- └── arguments:
- @ ArgumentsNode (location: (11,7)-(11,14))
- ├── flags: ∅
- └── arguments: (length: 1)
- └── @ CallNode (location: (11,7)-(11,14))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :y
- ├── message_loc: (11,7)-(11,8) = "y"
- ├── opening_loc: (11,8)-(11,9) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (11,9)-(11,13))
- │ ├── flags: contains_keywords
- │ └── arguments: (length: 1)
- │ └── @ KeywordHashNode (location: (11,9)-(11,13))
- │ ├── flags: ∅
- │ └── elements: (length: 1)
- │ └── @ AssocNode (location: (11,9)-(11,13))
- │ ├── key:
- │ │ @ CallNode (location: (11,9)-(11,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :z
- │ │ ├── message_loc: (11,9)-(11,10) = "z"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── value:
- │ │ @ IntegerNode (location: (11,12)-(11,13))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (11,10)-(11,12) = "=>"
- ├── closing_loc: (11,13)-(11,14) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/rhs_asgn.txt b/test/prism/snapshots/seattlerb/rhs_asgn.txt
deleted file mode 100644
index 9ee187218b..0000000000
--- a/test/prism/snapshots/seattlerb/rhs_asgn.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: [:n]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ MatchRequiredNode (location: (1,0)-(1,7))
- ├── value:
- │ @ IntegerNode (location: (1,0)-(1,2))
- │ ├── flags: decimal
- │ └── value: 42
- ├── pattern:
- │ @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ ├── name: :n
- │ └── depth: 0
- └── operator_loc: (1,3)-(1,5) = "=>"
diff --git a/test/prism/snapshots/seattlerb/ruby21_numbers.txt b/test/prism/snapshots/seattlerb/ruby21_numbers.txt
deleted file mode 100644
index 34a3452d1b..0000000000
--- a/test/prism/snapshots/seattlerb/ruby21_numbers.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,13))
- ├── flags: ∅
- ├── elements: (length: 3)
- │ ├── @ ImaginaryNode (location: (1,1)-(1,3))
- │ │ └── numeric:
- │ │ @ IntegerNode (location: (1,1)-(1,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── @ RationalNode (location: (1,5)-(1,7))
- │ │ └── numeric:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── @ ImaginaryNode (location: (1,9)-(1,12))
- │ └── numeric:
- │ @ RationalNode (location: (1,9)-(1,11))
- │ └── numeric:
- │ @ IntegerNode (location: (1,9)-(1,10))
- │ ├── flags: decimal
- │ └── value: 3
- ├── opening_loc: (1,0)-(1,1) = "["
- └── closing_loc: (1,12)-(1,13) = "]"
diff --git a/test/prism/snapshots/seattlerb/safe_attrasgn.txt b/test/prism/snapshots/seattlerb/safe_attrasgn.txt
deleted file mode 100644
index 3cec95ae7c..0000000000
--- a/test/prism/snapshots/seattlerb/safe_attrasgn.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,8))
- ├── flags: safe_navigation, attribute_write
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── name: :b=
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,7)-(1,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,7)-(1,8))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt b/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt
deleted file mode 100644
index baea063186..0000000000
--- a/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,8))
- ├── flags: safe_navigation, attribute_write
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── name: :B=
- ├── message_loc: (1,3)-(1,4) = "B"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,7)-(1,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,7)-(1,8))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_call.txt b/test/prism/snapshots/seattlerb/safe_call.txt
deleted file mode 100644
index 7b402d9ef2..0000000000
--- a/test/prism/snapshots/seattlerb/safe_call.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,4))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── name: :b
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_call_after_newline.txt b/test/prism/snapshots/seattlerb/safe_call_after_newline.txt
deleted file mode 100644
index 0a69cbc9e5..0000000000
--- a/test/prism/snapshots/seattlerb/safe_call_after_newline.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(2,3))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (2,0)-(2,2) = "&."
- ├── name: :b
- ├── message_loc: (2,2)-(2,3) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt b/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt
deleted file mode 100644
index 1d6ba9e49e..0000000000
--- a/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,5))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── name: :call
- ├── message_loc: ∅
- ├── opening_loc: (1,3)-(1,4) = "("
- ├── arguments: ∅
- ├── closing_loc: (1,4)-(1,5) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_call_newline.txt b/test/prism/snapshots/seattlerb/safe_call_newline.txt
deleted file mode 100644
index 7b402d9ef2..0000000000
--- a/test/prism/snapshots/seattlerb/safe_call_newline.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,4))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── name: :b
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_call_operator.txt b/test/prism/snapshots/seattlerb/safe_call_operator.txt
deleted file mode 100644
index d1f9b1ea9e..0000000000
--- a/test/prism/snapshots/seattlerb/safe_call_operator.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,6))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── name: :>
- ├── message_loc: (1,3)-(1,4) = ">"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,5)-(1,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt b/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt
deleted file mode 100644
index 34790ebb33..0000000000
--- a/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: [:c]
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ LocalVariableWriteNode (location: (1,0)-(1,8))
- ├── name: :c
- ├── depth: 0
- ├── name_loc: (1,0)-(1,1) = "c"
- ├── value:
- │ @ CallNode (location: (1,4)-(1,8))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (1,4)-(1,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,4)-(1,5) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,5)-(1,7) = "&."
- │ ├── name: :b
- │ ├── message_loc: (1,7)-(1,8) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/safe_calls.txt b/test/prism/snapshots/seattlerb/safe_calls.txt
deleted file mode 100644
index 54e591d9c0..0000000000
--- a/test/prism/snapshots/seattlerb/safe_calls.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,10))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,4))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,1)-(1,3) = "&."
- │ ├── name: :b
- │ ├── message_loc: (1,3)-(1,4) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,4)-(1,6) = "&."
- ├── name: :c
- ├── message_loc: (1,6)-(1,7) = "c"
- ├── opening_loc: (1,7)-(1,8) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (1,8)-(1,9))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,8)-(1,9))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: (1,9)-(1,10) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_op_asgn.txt b/test/prism/snapshots/seattlerb/safe_op_asgn.txt
deleted file mode 100644
index ebcedd6b5e..0000000000
--- a/test/prism/snapshots/seattlerb/safe_op_asgn.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ CallOperatorWriteNode (location: (1,0)-(1,11))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── read_name: :b
- ├── write_name: :b=
- ├── binary_operator: :+
- ├── binary_operator_loc: (1,5)-(1,7) = "+="
- └── value:
- @ CallNode (location: (1,8)-(1,11))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (1,8)-(1,9) = "x"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ ├── flags: decimal
- │ └── value: 1
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/safe_op_asgn2.txt b/test/prism/snapshots/seattlerb/safe_op_asgn2.txt
deleted file mode 100644
index bdb0e06156..0000000000
--- a/test/prism/snapshots/seattlerb/safe_op_asgn2.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,1))
- └── body: (length: 1)
- └── @ CallOrWriteNode (location: (1,0)-(2,1))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (1,1)-(1,3) = "&."
- ├── message_loc: (1,3)-(1,4) = "b"
- ├── read_name: :b
- ├── write_name: :b=
- ├── operator_loc: (1,5)-(1,8) = "||="
- └── value:
- @ CallNode (location: (2,0)-(2,1))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (2,0)-(2,1) = "x"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt b/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt
deleted file mode 100644
index f9be33ffdd..0000000000
--- a/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,5))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(4,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :puts
- │ ├── message_loc: (1,0)-(1,4) = "puts"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,5)-(4,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,5)-(4,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,5)-(1,6) = "\""
- │ │ ├── content_loc: (1,6)-(4,7) = "hello\\\n my\\\n dear\\\n friend"
- │ │ ├── closing_loc: (4,7)-(4,8) = "\""
- │ │ └── unescaped: "hello my dear friend"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (6,0)-(6,5))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (6,0)-(6,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (6,0)-(6,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :+
- ├── message_loc: (6,2)-(6,3) = "+"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (6,4)-(6,5))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (6,4)-(6,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (6,4)-(6,5) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt b/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
deleted file mode 100644
index e665565d38..0000000000
--- a/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ LambdaNode (location: (1,0)-(1,5))
- ├── locals: [:a]
- ├── operator_loc: (1,0)-(1,2) = "->"
- ├── opening_loc: (1,3)-(1,4) = "{"
- ├── closing_loc: (1,4)-(1,5) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (1,2)-(1,3))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,2)-(1,3))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,2)-(1,3))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
deleted file mode 100644
index 0b0000ef33..0000000000
--- a/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,23))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,23))
- └── body: (length: 1)
- └── @ LambdaNode (location: (1,0)-(1,23))
- ├── locals: [:b, :c, :d, :e, :f]
- ├── operator_loc: (1,0)-(1,2) = "->"
- ├── opening_loc: (1,21)-(1,22) = "{"
- ├── closing_loc: (1,22)-(1,23) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (1,2)-(1,21))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,3)-(1,20))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── name_loc: (1,6)-(1,7) = "c"
- │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,8)-(1,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (1,11)-(1,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── name_loc: (1,12)-(1,13) = "d"
- │ │ │ └── operator_loc: (1,11)-(1,12) = "*"
- │ │ ├── posts: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :e
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,18)-(1,20))
- │ │ ├── flags: ∅
- │ │ ├── name: :f
- │ │ ├── name_loc: (1,19)-(1,20) = "f"
- │ │ └── operator_loc: (1,18)-(1,19) = "&"
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ └── closing_loc: (1,20)-(1,21) = ")"
- └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
deleted file mode 100644
index e51c7d97ed..0000000000
--- a/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(4,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (1,0)-(1,1) = "x"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(4,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LambdaNode (location: (1,2)-(4,3))
- │ ├── locals: []
- │ ├── operator_loc: (1,2)-(1,4) = "->"
- │ ├── opening_loc: (1,8)-(1,10) = "do"
- │ ├── closing_loc: (4,0)-(4,3) = "end"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (1,5)-(1,7))
- │ │ ├── parameters: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (1,5)-(1,6) = "("
- │ │ └── closing_loc: (1,6)-(1,7) = ")"
- │ └── body:
- │ @ StatementsNode (location: (2,0)-(3,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,0)-(3,3))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (2,0)-(2,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (2,0)-(2,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (2,1)-(2,2) = "."
- │ ├── name: :b
- │ ├── message_loc: (2,2)-(2,3) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (2,4)-(3,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (2,4)-(2,6) = "do"
- │ └── closing_loc: (3,0)-(3,3) = "end"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt b/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
deleted file mode 100644
index d7a268a5d5..0000000000
--- a/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(4,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (1,0)-(1,1) = "x"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(4,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ LambdaNode (location: (1,2)-(4,3))
- │ ├── locals: []
- │ ├── operator_loc: (1,2)-(1,4) = "->"
- │ ├── opening_loc: (1,8)-(1,10) = "do"
- │ ├── closing_loc: (4,0)-(4,3) = "end"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (1,5)-(1,7))
- │ │ ├── parameters: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (1,5)-(1,6) = "("
- │ │ └── closing_loc: (1,6)-(1,7) = ")"
- │ └── body:
- │ @ StatementsNode (location: (2,0)-(3,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,0)-(3,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (2,0)-(2,1) = "a"
- │ ├── opening_loc: (2,1)-(2,2) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,2)-(2,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (2,2)-(2,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: (2,3)-(2,4) = ")"
- │ └── block:
- │ @ BlockNode (location: (2,5)-(3,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (2,5)-(2,7) = "do"
- │ └── closing_loc: (3,0)-(3,3) = "end"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw.txt b/test/prism/snapshots/seattlerb/stabby_block_kw.txt
deleted file mode 100644
index 7addbb8b28..0000000000
--- a/test/prism/snapshots/seattlerb/stabby_block_kw.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ LambdaNode (location: (1,0)-(1,13))
- ├── locals: [:k]
- ├── operator_loc: (1,0)-(1,2) = "->"
- ├── opening_loc: (1,10)-(1,11) = "{"
- ├── closing_loc: (1,12)-(1,13) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (1,3)-(1,9))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,4)-(1,8))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (1,4)-(1,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :k
- │ │ │ ├── name_loc: (1,4)-(1,6) = "k:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (1,6)-(1,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,3)-(1,4) = "("
- │ └── closing_loc: (1,8)-(1,9) = ")"
- └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt b/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt
deleted file mode 100644
index b5040d91db..0000000000
--- a/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ LambdaNode (location: (1,0)-(1,11))
- ├── locals: [:k]
- ├── operator_loc: (1,0)-(1,2) = "->"
- ├── opening_loc: (1,8)-(1,9) = "{"
- ├── closing_loc: (1,10)-(1,11) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (1,3)-(1,7))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,4)-(1,6))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ RequiredKeywordParameterNode (location: (1,4)-(1,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :k
- │ │ │ └── name_loc: (1,4)-(1,6) = "k:"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (1,3)-(1,4) = "("
- │ └── closing_loc: (1,6)-(1,7) = ")"
- └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_proc_scope.txt b/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
deleted file mode 100644
index 898f823f24..0000000000
--- a/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,11))
- └── body: (length: 1)
- └── @ LambdaNode (location: (1,0)-(1,11))
- ├── locals: [:a, :b]
- ├── operator_loc: (1,0)-(1,2) = "->"
- ├── opening_loc: (1,9)-(1,10) = "{"
- ├── closing_loc: (1,10)-(1,11) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (1,2)-(1,8))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,3)-(1,4))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :a
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 1)
- │ │ └── @ BlockLocalVariableNode (location: (1,6)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── name: :b
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ └── closing_loc: (1,7)-(1,8) = ")"
- └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/str_backslashes.txt b/test/prism/snapshots/seattlerb/str_backslashes.txt
deleted file mode 100644
index ec41a89c38..0000000000
--- a/test/prism/snapshots/seattlerb/str_backslashes.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,204))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,204))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,204))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :x
- ├── message_loc: (1,0)-(1,1) = "x"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,204))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ StringNode (location: (1,2)-(1,204))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,2)-(1,3) = "'"
- │ ├── content_loc: (1,3)-(1,203) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n"
- │ ├── closing_loc: (1,203)-(1,204) = "'"
- │ └── unescaped: "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n"
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt
deleted file mode 100644
index 620b43f631..0000000000
--- a/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,2)-(1,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n"
- │ │ ├── closing_loc: (1,6)-(1,7) = "\""
- │ │ └── unescaped: "\\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (1,8)-(1,9))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (1,8)-(1,9) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt
deleted file mode 100644
index 2aee91b75c..0000000000
--- a/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,6))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,2)-(1,6))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ │ ├── content_loc: (1,3)-(1,5) = "\\n"
- │ │ ├── closing_loc: (1,5)-(1,6) = "\""
- │ │ └── unescaped: "\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (1,7)-(1,8))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (1,7)-(1,8) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_double_newline.txt b/test/prism/snapshots/seattlerb/str_double_newline.txt
deleted file mode 100644
index eb249cde8a..0000000000
--- a/test/prism/snapshots/seattlerb/str_double_newline.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(2,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(2,1))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,2)-(2,1))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ │ ├── content_loc: (1,3)-(2,0) = "\n"
- │ │ ├── closing_loc: (2,0)-(2,1) = "\""
- │ │ └── unescaped: "\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (2,2)-(2,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (2,2)-(2,3) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_evstr.txt b/test/prism/snapshots/seattlerb/str_evstr.txt
deleted file mode 100644
index 7010ad0a68..0000000000
--- a/test/prism/snapshots/seattlerb/str_evstr.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,8))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 2)
- │ ├── @ StringNode (location: (1,1)-(1,3))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,1)-(1,3) = "a "
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a "
- │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
- │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,5)-(1,6))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,5)-(1,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,5)-(1,6) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── closing_loc: (1,6)-(1,7) = "}"
- └── closing_loc: (1,7)-(1,8) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_evstr_escape.txt b/test/prism/snapshots/seattlerb/str_evstr_escape.txt
deleted file mode 100644
index 3867574c7c..0000000000
--- a/test/prism/snapshots/seattlerb/str_evstr_escape.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,16))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,16))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (1,1)-(1,3))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,1)-(1,3) = "a "
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a "
- │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
- │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,5)-(1,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,5)-(1,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,5)-(1,6) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (1,6)-(1,7) = "}"
- │ └── @ StringNode (location: (1,7)-(1,15))
- │ ├── flags: forced_utf8_encoding, frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (1,7)-(1,15) = "\\302\\275"
- │ ├── closing_loc: ∅
- │ └── unescaped: "½"
- └── closing_loc: (1,15)-(1,16) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_heredoc_interp.txt b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt
deleted file mode 100644
index bb7bbba259..0000000000
--- a/test/prism/snapshots/seattlerb/str_heredoc_interp.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,4) = "<<\"\""
- ├── parts: (length: 2)
- │ ├── @ EmbeddedStatementsNode (location: (2,0)-(2,4))
- │ │ ├── opening_loc: (2,0)-(2,2) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,2)-(2,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,2)-(2,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :x
- │ │ │ ├── message_loc: (2,2)-(2,3) = "x"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (2,3)-(2,4) = "}"
- │ └── @ StringNode (location: (2,4)-(4,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (2,4)-(4,0) = "\nblah2\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\nblah2\n"
- └── closing_loc: (4,0)-(5,0) = "\n"
diff --git a/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt b/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt
deleted file mode 100644
index 5a2f435e0e..0000000000
--- a/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt
+++ /dev/null
@@ -1,105 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,23))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,23))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,23))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 1)
- │ └── @ EmbeddedStatementsNode (location: (1,1)-(1,22))
- │ ├── opening_loc: (1,1)-(1,3) = "\#{"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,3)-(1,21))
- │ │ └── body: (length: 1)
- │ │ └── @ IfNode (location: (1,3)-(1,21))
- │ │ ├── if_keyword_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (1,3)-(1,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (1,3)-(1,4))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: (1,4)-(1,5) = "."
- │ │ │ ├── name: :b?
- │ │ │ ├── message_loc: (1,5)-(1,7) = "b?"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: (1,8)-(1,9) = "?"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,10)-(1,17))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,10)-(1,17))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (1,10)-(1,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ StringNode (location: (1,10)-(1,12))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: (1,10)-(1,11) = "\""
- │ │ │ │ │ ├── content_loc: (1,11)-(1,11) = ""
- │ │ │ │ │ ├── closing_loc: (1,11)-(1,12) = "\""
- │ │ │ │ │ └── unescaped: ""
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :+
- │ │ │ │ ├── message_loc: (1,12)-(1,13) = "+"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments:
- │ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :a
- │ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "a"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+
- │ │ │ ├── message_loc: (1,14)-(1,15) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (1,15)-(1,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ StringNode (location: (1,15)-(1,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (1,15)-(1,16) = "\""
- │ │ │ │ ├── content_loc: (1,16)-(1,16) = ""
- │ │ │ │ ├── closing_loc: (1,16)-(1,17) = "\""
- │ │ │ │ └── unescaped: ""
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── consequent:
- │ │ │ @ ElseNode (location: (1,17)-(1,21))
- │ │ │ ├── else_keyword_loc: (1,17)-(1,18) = ":"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (1,19)-(1,21))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ StringNode (location: (1,19)-(1,21))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (1,19)-(1,20) = "\""
- │ │ │ │ ├── content_loc: (1,20)-(1,20) = ""
- │ │ │ │ ├── closing_loc: (1,20)-(1,21) = "\""
- │ │ │ │ └── unescaped: ""
- │ │ │ └── end_keyword_loc: ∅
- │ │ └── end_keyword_loc: ∅
- │ └── closing_loc: (1,21)-(1,22) = "}"
- └── closing_loc: (1,22)-(1,23) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt b/test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt
deleted file mode 100644
index 0066f66e84..0000000000
--- a/test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,66))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,66))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(2,66))
- ├── flags: ∅
- ├── opening_loc: ∅
- ├── parts: (length: 2)
- │ ├── @ StringNode (location: (1,0)-(1,62))
- │ │ ├── flags: forced_utf8_encoding, frozen
- │ │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ │ ├── content_loc: (1,1)-(1,61) = "\\xE3\\xD3\\x8B\\xE3\\x83\\xBC\\x83\\xE3\\x83\\xE3\\x82\\xB3\\xA3\\x82\\x99"
- │ │ ├── closing_loc: (1,61)-(1,62) = "\""
- │ │ └── unescaped: "\xE3Ӌー\x83\xE3\x83コ\xA3\x82\x99"
- │ └── @ StringNode (location: (2,8)-(2,66))
- │ ├── flags: forced_utf8_encoding, frozen
- │ ├── opening_loc: (2,8)-(2,9) = "\""
- │ ├── content_loc: (2,9)-(2,65) = "\\xE3\\x83\\xB3\\xE3\\x83\\x8F\\xE3\\x82\\x9A\\xC3\\xBD;foo@bar.com"
- │ ├── closing_loc: (2,65)-(2,66) = "\""
- │ └── unescaped: "ンãƒã‚šÃ½;foo@bar.com"
- └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt b/test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt
deleted file mode 100644
index d55d965068..0000000000
--- a/test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,1))
- └── body: (length: 2)
- ├── @ StringNode (location: (1,0)-(1,11))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,1) = "\""
- │ ├── content_loc: (1,1)-(1,10) = "\\n\\n\\n\\n#"
- │ ├── closing_loc: (1,10)-(1,11) = "\""
- │ └── unescaped: "\n\n\n\n#"
- └── @ IntegerNode (location: (2,0)-(2,1))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt b/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt
deleted file mode 100644
index 1db0e76270..0000000000
--- a/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,26))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,26))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,26))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,3) = "%Q["
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (1,3)-(1,11))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,3)-(1,11) = "before ["
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "before ["
- │ ├── @ EmbeddedStatementsNode (location: (1,11)-(1,18))
- │ │ ├── opening_loc: (1,11)-(1,13) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,13)-(1,17))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,13)-(1,17))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :nest
- │ │ │ ├── message_loc: (1,13)-(1,17) = "nest"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (1,17)-(1,18) = "}"
- │ └── @ StringNode (location: (1,18)-(1,25))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (1,18)-(1,25) = "] after"
- │ ├── closing_loc: ∅
- │ └── unescaped: "] after"
- └── closing_loc: (1,25)-(1,26) = "]"
diff --git a/test/prism/snapshots/seattlerb/str_pct_nested_nested.txt b/test/prism/snapshots/seattlerb/str_pct_nested_nested.txt
deleted file mode 100644
index 22c3031832..0000000000
--- a/test/prism/snapshots/seattlerb/str_pct_nested_nested.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,20))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,20))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,20))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,2) = "%{"
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (1,2)-(1,5))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,2)-(1,5) = " { "
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " { "
- │ ├── @ EmbeddedStatementsNode (location: (1,5)-(1,16))
- │ │ ├── opening_loc: (1,5)-(1,7) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,8)-(1,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ InterpolatedStringNode (location: (1,8)-(1,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (1,8)-(1,9) = "\""
- │ │ │ ├── parts: (length: 1)
- │ │ │ │ └── @ EmbeddedStatementsNode (location: (1,9)-(1,13))
- │ │ │ │ ├── opening_loc: (1,9)-(1,11) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (1,11)-(1,12))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (1,11)-(1,12))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── closing_loc: (1,12)-(1,13) = "}"
- │ │ │ └── closing_loc: (1,13)-(1,14) = "\""
- │ │ └── closing_loc: (1,15)-(1,16) = "}"
- │ └── @ StringNode (location: (1,16)-(1,19))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (1,16)-(1,19) = " } "
- │ ├── closing_loc: ∅
- │ └── unescaped: " } "
- └── closing_loc: (1,19)-(1,20) = "}"
diff --git a/test/prism/snapshots/seattlerb/str_pct_q.txt b/test/prism/snapshots/seattlerb/str_pct_q.txt
deleted file mode 100644
index c4dd5bacae..0000000000
--- a/test/prism/snapshots/seattlerb/str_pct_q.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,9))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,3) = "%q{"
- ├── content_loc: (1,3)-(1,8) = "a b c"
- ├── closing_loc: (1,8)-(1,9) = "}"
- └── unescaped: "a b c"
diff --git a/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt
deleted file mode 100644
index 8fa8886029..0000000000
--- a/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,2)-(1,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "'"
- │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n"
- │ │ ├── closing_loc: (1,6)-(1,7) = "'"
- │ │ └── unescaped: "\\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (1,8)-(1,9))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (1,8)-(1,9) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt
deleted file mode 100644
index c840c7688b..0000000000
--- a/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,6))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(1,6))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,2)-(1,6))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "'"
- │ │ ├── content_loc: (1,3)-(1,5) = "\\n"
- │ │ ├── closing_loc: (1,5)-(1,6) = "'"
- │ │ └── unescaped: "\\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (1,7)-(1,8))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (1,7)-(1,8) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_single_newline.txt b/test/prism/snapshots/seattlerb/str_single_newline.txt
deleted file mode 100644
index 15b0f2ff72..0000000000
--- a/test/prism/snapshots/seattlerb/str_single_newline.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,3))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(2,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,2)-(2,1))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,2)-(2,1))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,2)-(1,3) = "'"
- │ │ ├── content_loc: (1,3)-(2,0) = "\n"
- │ │ ├── closing_loc: (2,0)-(2,1) = "'"
- │ │ └── unescaped: "\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (2,2)-(2,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :b
- ├── message_loc: (2,2)-(2,3) = "b"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/str_str.txt b/test/prism/snapshots/seattlerb/str_str.txt
deleted file mode 100644
index 97031c8a65..0000000000
--- a/test/prism/snapshots/seattlerb/str_str.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,10))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,10))
- ├── flags: mutable
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 2)
- │ ├── @ StringNode (location: (1,1)-(1,3))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,1)-(1,3) = "a "
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a "
- │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,9))
- │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,5)-(1,8))
- │ │ └── body: (length: 1)
- │ │ └── @ StringNode (location: (1,5)-(1,8))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (1,5)-(1,6) = "'"
- │ │ ├── content_loc: (1,6)-(1,7) = "b"
- │ │ ├── closing_loc: (1,7)-(1,8) = "'"
- │ │ └── unescaped: "b"
- │ └── closing_loc: (1,8)-(1,9) = "}"
- └── closing_loc: (1,9)-(1,10) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_str_str.txt b/test/prism/snapshots/seattlerb/str_str_str.txt
deleted file mode 100644
index b592d380ef..0000000000
--- a/test/prism/snapshots/seattlerb/str_str_str.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,12))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,12))
- └── body: (length: 1)
- └── @ InterpolatedStringNode (location: (1,0)-(1,12))
- ├── flags: mutable
- ├── opening_loc: (1,0)-(1,1) = "\""
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (1,1)-(1,3))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,1)-(1,3) = "a "
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a "
- │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,9))
- │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,5)-(1,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ StringNode (location: (1,5)-(1,8))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (1,5)-(1,6) = "'"
- │ │ │ ├── content_loc: (1,6)-(1,7) = "b"
- │ │ │ ├── closing_loc: (1,7)-(1,8) = "'"
- │ │ │ └── unescaped: "b"
- │ │ └── closing_loc: (1,8)-(1,9) = "}"
- │ └── @ StringNode (location: (1,9)-(1,11))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (1,9)-(1,11) = " c"
- │ ├── closing_loc: ∅
- │ └── unescaped: " c"
- └── closing_loc: (1,11)-(1,12) = "\""
diff --git a/test/prism/snapshots/seattlerb/super_arg.txt b/test/prism/snapshots/seattlerb/super_arg.txt
deleted file mode 100644
index 61b5f0b631..0000000000
--- a/test/prism/snapshots/seattlerb/super_arg.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ SuperNode (location: (1,0)-(1,8))
- ├── keyword_loc: (1,0)-(1,5) = "super"
- ├── lparen_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,6)-(1,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,6)-(1,8))
- │ ├── flags: decimal
- │ └── value: 42
- ├── rparen_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/symbol_empty.txt b/test/prism/snapshots/seattlerb/symbol_empty.txt
deleted file mode 100644
index e95543e925..0000000000
--- a/test/prism/snapshots/seattlerb/symbol_empty.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,3))
- └── body: (length: 1)
- └── @ SymbolNode (location: (1,0)-(1,3))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (1,0)-(1,2) = ":'"
- ├── value_loc: (1,2)-(1,2) = ""
- ├── closing_loc: (1,2)-(1,3) = "'"
- └── unescaped: ""
diff --git a/test/prism/snapshots/seattlerb/symbol_list.txt b/test/prism/snapshots/seattlerb/symbol_list.txt
deleted file mode 100644
index 6750160d50..0000000000
--- a/test/prism/snapshots/seattlerb/symbol_list.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,13))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,13))
- ├── flags: ∅
- ├── elements: (length: 2)
- │ ├── @ InterpolatedSymbolNode (location: (1,3)-(1,7))
- │ │ ├── opening_loc: ∅
- │ │ ├── parts: (length: 1)
- │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
- │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (1,5)-(1,6) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
- │ │ └── closing_loc: ∅
- │ └── @ InterpolatedSymbolNode (location: (1,8)-(1,12))
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (1,8)-(1,12))
- │ │ ├── opening_loc: (1,8)-(1,10) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,10)-(1,11))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,10)-(1,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,10)-(1,11) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (1,11)-(1,12) = "}"
- │ └── closing_loc: ∅
- ├── opening_loc: (1,0)-(1,3) = "%I["
- └── closing_loc: (1,12)-(1,13) = "]"
diff --git a/test/prism/snapshots/seattlerb/symbols.txt b/test/prism/snapshots/seattlerb/symbols.txt
deleted file mode 100644
index 30cf57c528..0000000000
--- a/test/prism/snapshots/seattlerb/symbols.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,9))
- ├── flags: ∅
- ├── elements: (length: 3)
- │ ├── @ SymbolNode (location: (1,3)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,3)-(1,4) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── @ SymbolNode (location: (1,5)-(1,6))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,5)-(1,6) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ └── @ SymbolNode (location: (1,7)-(1,8))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (1,7)-(1,8) = "c"
- │ ├── closing_loc: ∅
- │ └── unescaped: "c"
- ├── opening_loc: (1,0)-(1,3) = "%i("
- └── closing_loc: (1,8)-(1,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/symbols_empty.txt b/test/prism/snapshots/seattlerb/symbols_empty.txt
deleted file mode 100644
index dc743e2be5..0000000000
--- a/test/prism/snapshots/seattlerb/symbols_empty.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,4))
- ├── flags: ∅
- ├── elements: (length: 0)
- ├── opening_loc: (1,0)-(1,3) = "%i("
- └── closing_loc: (1,3)-(1,4) = ")"
diff --git a/test/prism/snapshots/seattlerb/symbols_empty_space.txt b/test/prism/snapshots/seattlerb/symbols_empty_space.txt
deleted file mode 100644
index ea7ada9446..0000000000
--- a/test/prism/snapshots/seattlerb/symbols_empty_space.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,5))
- ├── flags: ∅
- ├── elements: (length: 0)
- ├── opening_loc: (1,0)-(1,3) = "%i("
- └── closing_loc: (1,4)-(1,5) = ")"
diff --git a/test/prism/snapshots/seattlerb/symbols_interp.txt b/test/prism/snapshots/seattlerb/symbols_interp.txt
deleted file mode 100644
index 2ad3cc502d..0000000000
--- a/test/prism/snapshots/seattlerb/symbols_interp.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,15))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,15))
- ├── flags: ∅
- ├── elements: (length: 3)
- │ ├── @ SymbolNode (location: (1,3)-(1,4))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,3)-(1,4) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ ├── @ SymbolNode (location: (1,5)-(1,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,5)-(1,12) = "b\#{1+1}"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\#{1+1}"
- │ └── @ SymbolNode (location: (1,13)-(1,14))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (1,13)-(1,14) = "c"
- │ ├── closing_loc: ∅
- │ └── unescaped: "c"
- ├── opening_loc: (1,0)-(1,3) = "%i("
- └── closing_loc: (1,14)-(1,15) = ")"
diff --git a/test/prism/snapshots/seattlerb/thingy.txt b/test/prism/snapshots/seattlerb/thingy.txt
deleted file mode 100644
index 4dd2ac44a6..0000000000
--- a/test/prism/snapshots/seattlerb/thingy.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,7))
- └── body: (length: 2)
- ├── @ CallNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :f
- │ │ ├── message_loc: (1,0)-(1,1) = "f"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (1,1)-(1,2) = "."
- │ ├── name: :call
- │ ├── message_loc: ∅
- │ ├── opening_loc: (1,2)-(1,3) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,3)-(1,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (1,3)-(1,5))
- │ │ ├── flags: decimal
- │ │ └── value: 42
- │ ├── closing_loc: (1,5)-(1,6) = ")"
- │ └── block: ∅
- └── @ CallNode (location: (3,0)-(3,7))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (3,0)-(3,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :f
- │ ├── message_loc: (3,0)-(3,1) = "f"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (3,1)-(3,3) = "::"
- ├── name: :call
- ├── message_loc: ∅
- ├── opening_loc: (3,3)-(3,4) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (3,4)-(3,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (3,4)-(3,6))
- │ ├── flags: decimal
- │ └── value: 42
- ├── closing_loc: (3,6)-(3,7) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/uminus_float.txt b/test/prism/snapshots/seattlerb/uminus_float.txt
deleted file mode 100644
index 0578dbbd68..0000000000
--- a/test/prism/snapshots/seattlerb/uminus_float.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ FloatNode (location: (1,0)-(1,4))
- └── value: -0.0
diff --git a/test/prism/snapshots/seattlerb/unary_minus.txt b/test/prism/snapshots/seattlerb/unary_minus.txt
deleted file mode 100644
index 79889bffb0..0000000000
--- a/test/prism/snapshots/seattlerb/unary_minus.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,2))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,2))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,1)-(1,2))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,1)-(1,2) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :-@
- ├── message_loc: (1,0)-(1,1) = "-"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/unary_plus.txt b/test/prism/snapshots/seattlerb/unary_plus.txt
deleted file mode 100644
index b570cbf73b..0000000000
--- a/test/prism/snapshots/seattlerb/unary_plus.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,2))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,2))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,1)-(1,2))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,1)-(1,2) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :+@
- ├── message_loc: (1,0)-(1,1) = "+"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt b/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt
deleted file mode 100644
index 4deb857536..0000000000
--- a/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,3))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,3))
- ├── flags: ∅
- ├── receiver:
- │ @ SymbolNode (location: (1,1)-(1,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,1)-(1,2) = ":"
- │ ├── value_loc: (1,2)-(1,3) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── call_operator_loc: ∅
- ├── name: :+@
- ├── message_loc: (1,0)-(1,1) = "+"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/unary_tilde.txt b/test/prism/snapshots/seattlerb/unary_tilde.txt
deleted file mode 100644
index 5fd1a5d00e..0000000000
--- a/test/prism/snapshots/seattlerb/unary_tilde.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,2))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,2))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,1)-(1,2))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,1)-(1,2) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :~
- ├── message_loc: (1,0)-(1,1) = "~"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/utf8_bom.txt b/test/prism/snapshots/seattlerb/utf8_bom.txt
deleted file mode 100644
index 9f0eb83b05..0000000000
--- a/test/prism/snapshots/seattlerb/utf8_bom.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ ProgramNode (location: (2,0)-(2,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (2,0)-(2,3))
- └── body: (length: 1)
- └── @ CallNode (location: (2,0)-(2,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :p
- ├── message_loc: (2,0)-(2,1) = "p"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (2,2)-(2,3))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (2,2)-(2,3))
- │ ├── flags: decimal
- │ └── value: 0
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/when_splat.txt b/test/prism/snapshots/seattlerb/when_splat.txt
deleted file mode 100644
index 19e70019c0..0000000000
--- a/test/prism/snapshots/seattlerb/when_splat.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,25))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,25))
- └── body: (length: 1)
- └── @ CaseNode (location: (1,0)-(1,25))
- ├── predicate:
- │ @ CallNode (location: (1,5)-(1,6))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,5)-(1,6) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── conditions: (length: 1)
- │ └── @ WhenNode (location: (1,8)-(1,20))
- │ ├── keyword_loc: (1,8)-(1,12) = "when"
- │ ├── conditions: (length: 1)
- │ │ └── @ SplatNode (location: (1,13)-(1,15))
- │ │ ├── operator_loc: (1,13)-(1,14) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (1,14)-(1,15))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,14)-(1,15) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (1,16)-(1,20) = "then"
- │ └── statements: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (1,0)-(1,4) = "case"
- └── end_keyword_loc: (1,22)-(1,25) = "end"
diff --git a/test/prism/snapshots/seattlerb/words_interp.txt b/test/prism/snapshots/seattlerb/words_interp.txt
deleted file mode 100644
index 1175a6f476..0000000000
--- a/test/prism/snapshots/seattlerb/words_interp.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,9))
- └── body: (length: 1)
- └── @ ArrayNode (location: (1,0)-(1,9))
- ├── flags: ∅
- ├── elements: (length: 1)
- │ └── @ InterpolatedStringNode (location: (1,3)-(1,8))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
- │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
- │ │ └── @ StringNode (location: (1,7)-(1,8))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,7)-(1,8) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ └── closing_loc: ∅
- ├── opening_loc: (1,0)-(1,3) = "%W("
- └── closing_loc: (1,8)-(1,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/yield_arg.txt b/test/prism/snapshots/seattlerb/yield_arg.txt
deleted file mode 100644
index 22e0c14f83..0000000000
--- a/test/prism/snapshots/seattlerb/yield_arg.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ YieldNode (location: (1,0)-(1,8))
- ├── keyword_loc: (1,0)-(1,5) = "yield"
- ├── lparen_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (1,6)-(1,8))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ IntegerNode (location: (1,6)-(1,8))
- │ ├── flags: decimal
- │ └── value: 42
- └── rparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/yield_call_assocs.txt b/test/prism/snapshots/seattlerb/yield_call_assocs.txt
deleted file mode 100644
index c04273f5aa..0000000000
--- a/test/prism/snapshots/seattlerb/yield_call_assocs.txt
+++ /dev/null
@@ -1,224 +0,0 @@
-@ ProgramNode (location: (1,0)-(11,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(11,13))
- └── body: (length: 6)
- ├── @ YieldNode (location: (1,0)-(1,16))
- │ ├── keyword_loc: (1,0)-(1,5) = "yield"
- │ ├── lparen_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,6)-(1,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (1,6)-(1,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ KeywordHashNode (location: (1,9)-(1,16))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (1,9)-(1,16))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (1,9)-(1,11))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,9)-(1,10) = ":"
- │ │ │ ├── value_loc: (1,10)-(1,11) = "z"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "z"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (1,15)-(1,16))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (1,12)-(1,14) = "=>"
- │ └── rparen_loc: ∅
- ├── @ YieldNode (location: (3,0)-(3,25))
- │ ├── keyword_loc: (3,0)-(3,5) = "yield"
- │ ├── lparen_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,6)-(3,25))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (3,6)-(3,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ KeywordHashNode (location: (3,9)-(3,25))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (3,9)-(3,16))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (3,9)-(3,11))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (3,9)-(3,10) = ":"
- │ │ │ │ ├── value_loc: (3,10)-(3,11) = "z"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "z"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (3,15)-(3,16))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: (3,12)-(3,14) = "=>"
- │ │ └── @ AssocNode (location: (3,18)-(3,25))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (3,18)-(3,20))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (3,18)-(3,19) = ":"
- │ │ │ ├── value_loc: (3,19)-(3,20) = "w"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "w"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (3,24)-(3,25))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (3,21)-(3,23) = "=>"
- │ └── rparen_loc: ∅
- ├── @ YieldNode (location: (5,0)-(5,13))
- │ ├── keyword_loc: (5,0)-(5,5) = "yield"
- │ ├── lparen_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,6)-(5,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (5,6)-(5,13))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :y
- │ │ ├── message_loc: (5,6)-(5,7) = "y"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,8)-(5,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ KeywordHashNode (location: (5,8)-(5,13))
- │ │ │ ├── flags: symbol_keys
- │ │ │ └── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (5,8)-(5,13))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (5,8)-(5,10))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (5,8)-(5,9) = ":"
- │ │ │ │ ├── value_loc: (5,9)-(5,10) = "z"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "z"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (5,12)-(5,13))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: (5,10)-(5,12) = "=>"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── rparen_loc: ∅
- ├── @ YieldNode (location: (7,0)-(7,11))
- │ ├── keyword_loc: (7,0)-(7,5) = "yield"
- │ ├── lparen_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,6)-(7,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (7,6)-(7,11))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :y
- │ │ ├── message_loc: (7,6)-(7,7) = "y"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (7,8)-(7,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ KeywordHashNode (location: (7,8)-(7,11))
- │ │ │ ├── flags: symbol_keys
- │ │ │ └── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (7,8)-(7,11))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (7,8)-(7,10))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (7,8)-(7,9) = "z"
- │ │ │ │ ├── closing_loc: (7,9)-(7,10) = ":"
- │ │ │ │ └── unescaped: "z"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (7,10)-(7,11))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── rparen_loc: ∅
- ├── @ YieldNode (location: (9,0)-(9,12))
- │ ├── keyword_loc: (9,0)-(9,5) = "yield"
- │ ├── lparen_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (9,6)-(9,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (9,6)-(9,12))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :y
- │ │ ├── message_loc: (9,6)-(9,7) = "y"
- │ │ ├── opening_loc: (9,7)-(9,8) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (9,8)-(9,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ KeywordHashNode (location: (9,8)-(9,11))
- │ │ │ ├── flags: symbol_keys
- │ │ │ └── elements: (length: 1)
- │ │ │ └── @ AssocNode (location: (9,8)-(9,11))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (9,8)-(9,10))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (9,8)-(9,9) = "z"
- │ │ │ │ ├── closing_loc: (9,9)-(9,10) = ":"
- │ │ │ │ └── unescaped: "z"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (9,10)-(9,11))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: ∅
- │ │ ├── closing_loc: (9,11)-(9,12) = ")"
- │ │ └── block: ∅
- │ └── rparen_loc: ∅
- └── @ YieldNode (location: (11,0)-(11,13))
- ├── keyword_loc: (11,0)-(11,5) = "yield"
- ├── lparen_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (11,6)-(11,13))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (11,6)-(11,13))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :y
- │ ├── message_loc: (11,6)-(11,7) = "y"
- │ ├── opening_loc: (11,7)-(11,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,8)-(11,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (11,8)-(11,12))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (11,8)-(11,12))
- │ │ ├── key:
- │ │ │ @ CallNode (location: (11,8)-(11,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :z
- │ │ │ ├── message_loc: (11,8)-(11,9) = "z"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (11,11)-(11,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (11,9)-(11,11) = "=>"
- │ ├── closing_loc: (11,12)-(11,13) = ")"
- │ └── block: ∅
- └── rparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/yield_empty_parens.txt b/test/prism/snapshots/seattlerb/yield_empty_parens.txt
deleted file mode 100644
index 5ecd89823f..0000000000
--- a/test/prism/snapshots/seattlerb/yield_empty_parens.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,7))
- └── body: (length: 1)
- └── @ YieldNode (location: (1,0)-(1,7))
- ├── keyword_loc: (1,0)-(1,5) = "yield"
- ├── lparen_loc: (1,5)-(1,6) = "("
- ├── arguments: ∅
- └── rparen_loc: (1,6)-(1,7) = ")"
diff --git a/test/prism/snapshots/single_method_call_with_bang.txt b/test/prism/snapshots/single_method_call_with_bang.txt
deleted file mode 100644
index 4c68e0adac..0000000000
--- a/test/prism/snapshots/single_method_call_with_bang.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,4))
- └── body: (length: 1)
- └── @ CallNode (location: (1,0)-(1,4))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo!
- ├── message_loc: (1,0)-(1,4) = "foo!"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/single_quote_heredocs.txt b/test/prism/snapshots/single_quote_heredocs.txt
deleted file mode 100644
index 429c9daf11..0000000000
--- a/test/prism/snapshots/single_quote_heredocs.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,8))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,8))
- └── body: (length: 1)
- └── @ StringNode (location: (1,0)-(1,8))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,8) = "<<-'EOS'"
- ├── content_loc: (2,0)-(3,0) = " cd L:\\Work\\MG3710IQPro\\Develop\n"
- ├── closing_loc: (3,0)-(4,0) = "EOS\n"
- └── unescaped: " cd L:\\Work\\MG3710IQPro\\Develop\n"
diff --git a/test/prism/snapshots/spanning_heredoc.txt b/test/prism/snapshots/spanning_heredoc.txt
deleted file mode 100644
index c89daaed09..0000000000
--- a/test/prism/snapshots/spanning_heredoc.txt
+++ /dev/null
@@ -1,413 +0,0 @@
-@ ProgramNode (location: (4,0)-(63,2))
-├── locals: [:a]
-└── statements:
- @ StatementsNode (location: (4,0)-(63,2))
- └── body: (length: 14)
- ├── @ CallNode (location: (4,0)-(7,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (4,0)-(4,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (4,3)-(7,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (4,3)-(7,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ StringNode (location: (4,3)-(4,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (4,3)-(4,7) = "<<-A"
- │ │ │ ├── content_loc: (5,0)-(6,0) = "a\n"
- │ │ │ ├── closing_loc: (6,0)-(7,0) = "A\n"
- │ │ │ └── unescaped: "a\n"
- │ │ ├── call_operator_loc: (4,7)-(4,8) = "."
- │ │ ├── name: :gsub
- │ │ ├── message_loc: (4,8)-(4,12) = "gsub"
- │ │ ├── opening_loc: (4,12)-(4,13) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (4,13)-(7,6))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ InterpolatedRegularExpressionNode (location: (4,13)-(7,2))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (4,13)-(4,14) = "/"
- │ │ │ │ ├── parts: (length: 2)
- │ │ │ │ │ ├── @ StringNode (location: (4,14)-(4,16))
- │ │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── content_loc: (4,14)-(4,16) = "b\\"
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ │ └── @ StringNode (location: (7,0)-(7,1))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (7,0)-(7,1) = "b"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ └── closing_loc: (7,1)-(7,2) = "/"
- │ │ │ └── @ StringNode (location: (7,4)-(7,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (7,4)-(7,5) = "\""
- │ │ │ ├── content_loc: (7,5)-(7,5) = ""
- │ │ │ ├── closing_loc: (7,5)-(7,6) = "\""
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: (7,6)-(7,7) = ")"
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (10,0)-(13,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (10,0)-(10,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (10,3)-(13,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (10,3)-(10,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (10,3)-(10,7) = "<<-A"
- │ │ │ ├── content_loc: (11,0)-(12,0) = "c\n"
- │ │ │ ├── closing_loc: (12,0)-(13,0) = "A\n"
- │ │ │ └── unescaped: "c\n"
- │ │ └── @ InterpolatedStringNode (location: (10,9)-(13,2))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (10,9)-(10,10) = "\""
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (10,10)-(10,12))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (10,10)-(10,12) = "d\\"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "d"
- │ │ │ └── @ StringNode (location: (13,0)-(13,1))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (13,0)-(13,1) = "d"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "d"
- │ │ └── closing_loc: (13,1)-(13,2) = "\""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (16,0)-(19,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (16,0)-(16,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (16,3)-(19,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (16,3)-(16,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (16,3)-(16,7) = "<<-A"
- │ │ │ ├── content_loc: (17,0)-(18,0) = "e\n"
- │ │ │ ├── closing_loc: (18,0)-(19,0) = "A\n"
- │ │ │ └── unescaped: "e\n"
- │ │ └── @ InterpolatedStringNode (location: (16,9)-(19,2))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (16,9)-(16,12) = "%q["
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (16,12)-(16,14))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (16,12)-(16,14) = "f\\"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "f\\\n"
- │ │ │ └── @ StringNode (location: (19,0)-(19,1))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (19,0)-(19,1) = "f"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "f"
- │ │ └── closing_loc: (19,1)-(19,2) = "]"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (22,0)-(25,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (22,0)-(22,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (22,3)-(25,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (22,3)-(22,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (22,3)-(22,7) = "<<-A"
- │ │ │ ├── content_loc: (23,0)-(24,0) = "g\n"
- │ │ │ ├── closing_loc: (24,0)-(25,0) = "A\n"
- │ │ │ └── unescaped: "g\n"
- │ │ └── @ InterpolatedStringNode (location: (22,9)-(25,2))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (22,9)-(22,12) = "%Q["
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (22,12)-(22,14))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (22,12)-(22,14) = "h\\"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "h"
- │ │ │ └── @ StringNode (location: (25,0)-(25,1))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (25,0)-(25,1) = "h"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "h"
- │ │ └── closing_loc: (25,1)-(25,2) = "]"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (28,0)-(31,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (28,0)-(28,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (28,3)-(31,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (28,3)-(28,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (28,3)-(28,7) = "<<-A"
- │ │ │ ├── content_loc: (29,0)-(30,0) = "i\n"
- │ │ │ ├── closing_loc: (30,0)-(31,0) = "A\n"
- │ │ │ └── unescaped: "i\n"
- │ │ └── @ ArrayNode (location: (28,9)-(31,2))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ StringNode (location: (28,12)-(28,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (28,12)-(28,14) = "j\\"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "j\n"
- │ │ │ └── @ StringNode (location: (31,0)-(31,1))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (31,0)-(31,1) = "j"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "j"
- │ │ ├── opening_loc: (28,9)-(28,12) = "%w["
- │ │ └── closing_loc: (31,1)-(31,2) = "]"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (35,0)-(38,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (35,0)-(35,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (35,3)-(38,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (35,3)-(35,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (35,3)-(35,7) = "<<-A"
- │ │ │ ├── content_loc: (36,0)-(37,0) = "k\n"
- │ │ │ ├── closing_loc: (37,0)-(38,0) = "A\n"
- │ │ │ └── unescaped: "k\n"
- │ │ └── @ ArrayNode (location: (35,9)-(38,2))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ InterpolatedStringNode (location: (35,12)-(38,1))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (35,12)-(35,14))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (35,12)-(35,14) = "l\\"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "l\n"
- │ │ │ │ └── @ StringNode (location: (38,0)-(38,1))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (38,0)-(38,1) = "l"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "l"
- │ │ │ └── closing_loc: ∅
- │ │ ├── opening_loc: (35,9)-(35,12) = "%W["
- │ │ └── closing_loc: (38,1)-(38,2) = "]"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (41,0)-(44,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (41,0)-(41,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (41,3)-(44,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (41,3)-(41,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (41,3)-(41,7) = "<<-A"
- │ │ │ ├── content_loc: (42,0)-(43,0) = "m\n"
- │ │ │ ├── closing_loc: (43,0)-(44,0) = "A\n"
- │ │ │ └── unescaped: "m\n"
- │ │ └── @ ArrayNode (location: (41,9)-(44,2))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ SymbolNode (location: (41,12)-(41,14))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (41,12)-(41,14) = "n\\"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "n\n"
- │ │ │ └── @ SymbolNode (location: (44,0)-(44,1))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (44,0)-(44,1) = "n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "n"
- │ │ ├── opening_loc: (41,9)-(41,12) = "%i["
- │ │ └── closing_loc: (44,1)-(44,2) = "]"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (48,0)-(51,2))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :pp
- │ ├── message_loc: (48,0)-(48,2) = "pp"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (48,3)-(51,2))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (48,3)-(48,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (48,3)-(48,7) = "<<-A"
- │ │ │ ├── content_loc: (49,0)-(50,0) = "o\n"
- │ │ │ ├── closing_loc: (50,0)-(51,0) = "A\n"
- │ │ │ └── unescaped: "o\n"
- │ │ └── @ ArrayNode (location: (48,9)-(51,2))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ InterpolatedSymbolNode (location: (48,12)-(48,14))
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (48,12)-(48,14))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (48,12)-(48,14) = "p\\"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "p\n"
- │ │ │ │ └── @ StringNode (location: (48,12)-(48,14))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (48,12)-(48,14) = "p\\"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "p"
- │ │ │ └── closing_loc: ∅
- │ │ ├── opening_loc: (48,9)-(48,12) = "%I["
- │ │ └── closing_loc: (51,1)-(51,2) = "]"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ StringNode (location: (53,0)-(53,3))
- │ ├── flags: ∅
- │ ├── opening_loc: (53,0)-(53,3) = "<<A"
- │ ├── content_loc: (54,0)-(54,0) = ""
- │ ├── closing_loc: (54,0)-(55,0) = "A\n"
- │ └── unescaped: ""
- ├── @ MatchWriteNode (location: (53,5)-(55,13))
- │ ├── call:
- │ │ @ CallNode (location: (53,5)-(55,13))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ InterpolatedRegularExpressionNode (location: (53,5)-(55,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (53,5)-(53,6) = "/"
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (53,6)-(53,7))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (53,6)-(53,7) = "\\"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: ""
- │ │ │ │ └── @ StringNode (location: (55,0)-(55,6))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (55,0)-(55,6) = "(?<a>)"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "(?<a>)"
- │ │ │ └── closing_loc: (55,6)-(55,7) = "/"
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :=~
- │ │ ├── message_loc: (55,8)-(55,10) = "=~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (55,11)-(55,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (55,11)-(55,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (55,11)-(55,12) = "'"
- │ │ │ ├── content_loc: (55,12)-(55,12) = ""
- │ │ │ ├── closing_loc: (55,12)-(55,13) = "'"
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── targets: (length: 1)
- │ └── @ LocalVariableTargetNode (location: (53,5)-(55,7))
- │ ├── name: :a
- │ └── depth: 0
- ├── @ StringNode (location: (57,0)-(57,3))
- │ ├── flags: ∅
- │ ├── opening_loc: (57,0)-(57,3) = "<<A"
- │ ├── content_loc: (58,0)-(58,0) = ""
- │ ├── closing_loc: (58,0)-(59,0) = "A\n"
- │ └── unescaped: ""
- ├── @ InterpolatedSymbolNode (location: (57,5)-(59,2))
- │ ├── opening_loc: (57,5)-(57,7) = ":'"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (57,7)-(58,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (57,7)-(58,0) = "a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ StringNode (location: (59,0)-(59,1))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (59,0)-(59,1) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ └── closing_loc: (59,1)-(59,2) = "'"
- ├── @ StringNode (location: (61,0)-(61,3))
- │ ├── flags: ∅
- │ ├── opening_loc: (61,0)-(61,3) = "<<A"
- │ ├── content_loc: (62,0)-(62,0) = ""
- │ ├── closing_loc: (62,0)-(63,0) = "A\n"
- │ └── unescaped: ""
- └── @ InterpolatedSymbolNode (location: (61,5)-(63,2))
- ├── opening_loc: (61,5)-(61,7) = ":\""
- ├── parts: (length: 2)
- │ ├── @ StringNode (location: (61,7)-(62,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (61,7)-(62,0) = "a\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\n"
- │ └── @ StringNode (location: (63,0)-(63,1))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (63,0)-(63,1) = "b"
- │ ├── closing_loc: ∅
- │ └── unescaped: "b"
- └── closing_loc: (63,1)-(63,2) = "\""
diff --git a/test/prism/snapshots/spanning_heredoc_newlines.txt b/test/prism/snapshots/spanning_heredoc_newlines.txt
deleted file mode 100644
index e3609ddbba..0000000000
--- a/test/prism/snapshots/spanning_heredoc_newlines.txt
+++ /dev/null
@@ -1,155 +0,0 @@
-@ ProgramNode (location: (1,0)-(24,0))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(24,0))
- └── body: (length: 6)
- ├── @ CallNode (location: (1,0)-(4,0))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (1,0)-(1,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,0)-(1,3) = "<<A"
- │ │ ├── content_loc: (2,0)-(2,0) = ""
- │ │ ├── closing_loc: (2,0)-(3,0) = "A\n"
- │ │ └── unescaped: ""
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (1,3)-(1,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(4,0))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (1,4)-(4,0))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,4)-(2,0) = "%\n"
- │ │ ├── content_loc: (3,0)-(3,0) = ""
- │ │ ├── closing_loc: (3,0)-(4,0) = "\n"
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(8,0))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (5,0)-(5,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (5,0)-(5,3) = "<<A"
- │ │ ├── content_loc: (6,0)-(6,0) = ""
- │ │ ├── closing_loc: (6,0)-(7,0) = "A\n"
- │ │ └── unescaped: ""
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (5,3)-(5,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,4)-(8,0))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ RegularExpressionNode (location: (5,4)-(8,0))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (5,4)-(6,0) = "%r\n"
- │ │ ├── content_loc: (6,0)-(6,0) = ""
- │ │ ├── closing_loc: (7,0)-(8,0) = "\n"
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (9,0)-(12,0))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (9,0)-(9,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (9,0)-(9,3) = "<<A"
- │ │ ├── content_loc: (10,0)-(10,0) = ""
- │ │ ├── closing_loc: (10,0)-(11,0) = "A\n"
- │ │ └── unescaped: ""
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (9,3)-(9,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (9,4)-(12,0))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (9,4)-(12,0))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (9,4)-(10,0) = "%q\n"
- │ │ ├── content_loc: (11,0)-(11,0) = ""
- │ │ ├── closing_loc: (11,0)-(12,0) = "\n"
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (13,0)-(16,0))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (13,0)-(13,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (13,0)-(13,3) = "<<A"
- │ │ ├── content_loc: (14,0)-(14,0) = ""
- │ │ ├── closing_loc: (14,0)-(15,0) = "A\n"
- │ │ └── unescaped: ""
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (13,3)-(13,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (13,4)-(16,0))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (13,4)-(16,0))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (13,4)-(14,0) = "%Q\n"
- │ │ ├── content_loc: (15,0)-(15,0) = ""
- │ │ ├── closing_loc: (15,0)-(16,0) = "\n"
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (17,0)-(20,0))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (17,0)-(17,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (17,0)-(17,3) = "<<A"
- │ │ ├── content_loc: (18,0)-(18,0) = ""
- │ │ ├── closing_loc: (18,0)-(19,0) = "A\n"
- │ │ └── unescaped: ""
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (17,3)-(17,4) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (17,4)-(20,0))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (17,4)-(20,0))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (17,4)-(18,0) = "%s\n"
- │ │ ├── value_loc: (18,0)-(18,0) = ""
- │ │ ├── closing_loc: (19,0)-(20,0) = "\n"
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (21,0)-(24,0))
- ├── flags: ∅
- ├── receiver:
- │ @ StringNode (location: (21,0)-(21,3))
- │ ├── flags: ∅
- │ ├── opening_loc: (21,0)-(21,3) = "<<A"
- │ ├── content_loc: (22,0)-(22,0) = ""
- │ ├── closing_loc: (22,0)-(23,0) = "A\n"
- │ └── unescaped: ""
- ├── call_operator_loc: ∅
- ├── name: :+
- ├── message_loc: (21,3)-(21,4) = "+"
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (21,4)-(24,0))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ XStringNode (location: (21,4)-(24,0))
- │ ├── flags: ∅
- │ ├── opening_loc: (21,4)-(22,0) = "%x\n"
- │ ├── content_loc: (22,0)-(22,0) = ""
- │ ├── closing_loc: (23,0)-(24,0) = "\n"
- │ └── unescaped: ""
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/strings.txt b/test/prism/snapshots/strings.txt
deleted file mode 100644
index 632d2ac3b5..0000000000
--- a/test/prism/snapshots/strings.txt
+++ /dev/null
@@ -1,534 +0,0 @@
-@ ProgramNode (location: (1,0)-(105,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(105,4))
- └── body: (length: 50)
- ├── @ StringNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,2) = "%%"
- │ ├── content_loc: (1,2)-(1,5) = "abc"
- │ ├── closing_loc: (1,5)-(1,6) = "%"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (3,0)-(3,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (3,0)-(3,2) = "%^"
- │ ├── content_loc: (3,2)-(3,5) = "abc"
- │ ├── closing_loc: (3,5)-(3,6) = "^"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (5,0)-(5,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (5,0)-(5,2) = "%&"
- │ ├── content_loc: (5,2)-(5,5) = "abc"
- │ ├── closing_loc: (5,5)-(5,6) = "&"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (7,0)-(7,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (7,0)-(7,2) = "%*"
- │ ├── content_loc: (7,2)-(7,5) = "abc"
- │ ├── closing_loc: (7,5)-(7,6) = "*"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (9,0)-(9,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (9,0)-(9,2) = "%_"
- │ ├── content_loc: (9,2)-(9,5) = "abc"
- │ ├── closing_loc: (9,5)-(9,6) = "_"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (11,0)-(11,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (11,0)-(11,2) = "%+"
- │ ├── content_loc: (11,2)-(11,5) = "abc"
- │ ├── closing_loc: (11,5)-(11,6) = "+"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (13,0)-(13,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (13,0)-(13,2) = "%-"
- │ ├── content_loc: (13,2)-(13,5) = "abc"
- │ ├── closing_loc: (13,5)-(13,6) = "-"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (15,0)-(15,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (15,0)-(15,2) = "%:"
- │ ├── content_loc: (15,2)-(15,5) = "abc"
- │ ├── closing_loc: (15,5)-(15,6) = ":"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (17,0)-(17,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (17,0)-(17,2) = "%;"
- │ ├── content_loc: (17,2)-(17,5) = "abc"
- │ ├── closing_loc: (17,5)-(17,6) = ";"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (19,0)-(19,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (19,0)-(19,2) = "%'"
- │ ├── content_loc: (19,2)-(19,5) = "abc"
- │ ├── closing_loc: (19,5)-(19,6) = "'"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (21,0)-(21,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (21,0)-(21,2) = "%~"
- │ ├── content_loc: (21,2)-(21,5) = "abc"
- │ ├── closing_loc: (21,5)-(21,6) = "~"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (23,0)-(23,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (23,0)-(23,2) = "%?"
- │ ├── content_loc: (23,2)-(23,5) = "abc"
- │ ├── closing_loc: (23,5)-(23,6) = "?"
- │ └── unescaped: "abc"
- ├── @ ArrayNode (location: (25,0)-(25,8))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (25,0)-(25,3) = "%w{"
- │ └── closing_loc: (25,7)-(25,8) = "}"
- ├── @ StringNode (location: (27,0)-(27,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (27,0)-(27,2) = "%/"
- │ ├── content_loc: (27,2)-(27,5) = "abc"
- │ ├── closing_loc: (27,5)-(27,6) = "/"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (29,0)-(29,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (29,0)-(29,2) = "%`"
- │ ├── content_loc: (29,2)-(29,5) = "abc"
- │ ├── closing_loc: (29,5)-(29,6) = "`"
- │ └── unescaped: "abc"
- ├── @ InterpolatedStringNode (location: (31,0)-(31,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (31,0)-(31,1) = "\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedVariableNode (location: (31,1)-(31,7))
- │ │ ├── operator_loc: (31,1)-(31,2) = "#"
- │ │ └── variable:
- │ │ @ ClassVariableReadNode (location: (31,2)-(31,7))
- │ │ └── name: :@@foo
- │ └── closing_loc: (31,7)-(31,8) = "\""
- ├── @ StringNode (location: (33,0)-(33,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (33,0)-(33,2) = "%\\"
- │ ├── content_loc: (33,2)-(33,5) = "abc"
- │ ├── closing_loc: (33,5)-(33,6) = "\\"
- │ └── unescaped: "abc"
- ├── @ InterpolatedStringNode (location: (35,0)-(35,17))
- │ ├── flags: ∅
- │ ├── opening_loc: (35,0)-(35,2) = "%{"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (35,2)-(35,6))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (35,2)-(35,6) = "aaa "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "aaa "
- │ │ ├── @ EmbeddedStatementsNode (location: (35,6)-(35,12))
- │ │ │ ├── opening_loc: (35,6)-(35,8) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (35,8)-(35,11))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (35,8)-(35,11))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bbb
- │ │ │ │ ├── message_loc: (35,8)-(35,11) = "bbb"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (35,11)-(35,12) = "}"
- │ │ └── @ StringNode (location: (35,12)-(35,16))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (35,12)-(35,16) = " ccc"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " ccc"
- │ └── closing_loc: (35,16)-(35,17) = "}"
- ├── @ StringNode (location: (37,0)-(37,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (37,0)-(37,2) = "%["
- │ ├── content_loc: (37,2)-(37,7) = "foo[]"
- │ ├── closing_loc: (37,7)-(37,8) = "]"
- │ └── unescaped: "foo[]"
- ├── @ CallNode (location: (39,0)-(41,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ StringNode (location: (39,0)-(39,5))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (39,0)-(39,1) = "\""
- │ │ ├── content_loc: (39,1)-(39,4) = "foo"
- │ │ ├── closing_loc: (39,4)-(39,5) = "\""
- │ │ └── unescaped: "foo"
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (39,6)-(39,7) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (41,0)-(41,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (41,0)-(41,5))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (41,0)-(41,1) = "\""
- │ │ ├── content_loc: (41,1)-(41,4) = "bar"
- │ │ ├── closing_loc: (41,4)-(41,5) = "\""
- │ │ └── unescaped: "bar"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ StringNode (location: (43,0)-(43,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (43,0)-(43,3) = "%q{"
- │ ├── content_loc: (43,3)-(43,6) = "abc"
- │ ├── closing_loc: (43,6)-(43,7) = "}"
- │ └── unescaped: "abc"
- ├── @ SymbolNode (location: (45,0)-(45,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (45,0)-(45,3) = "%s["
- │ ├── value_loc: (45,3)-(45,6) = "abc"
- │ ├── closing_loc: (45,6)-(45,7) = "]"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (47,0)-(47,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (47,0)-(47,2) = "%{"
- │ ├── content_loc: (47,2)-(47,5) = "abc"
- │ ├── closing_loc: (47,5)-(47,6) = "}"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (49,0)-(49,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (49,0)-(49,1) = "'"
- │ ├── content_loc: (49,1)-(49,1) = ""
- │ ├── closing_loc: (49,1)-(49,2) = "'"
- │ └── unescaped: ""
- ├── @ StringNode (location: (51,0)-(51,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (51,0)-(51,1) = "\""
- │ ├── content_loc: (51,1)-(51,4) = "abc"
- │ ├── closing_loc: (51,4)-(51,5) = "\""
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (53,0)-(53,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (53,0)-(53,1) = "\""
- │ ├── content_loc: (53,1)-(53,6) = "\#@---"
- │ ├── closing_loc: (53,6)-(53,7) = "\""
- │ └── unescaped: "\#@---"
- ├── @ InterpolatedStringNode (location: (55,0)-(55,16))
- │ ├── flags: ∅
- │ ├── opening_loc: (55,0)-(55,1) = "\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (55,1)-(55,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (55,1)-(55,5) = "aaa "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "aaa "
- │ │ ├── @ EmbeddedStatementsNode (location: (55,5)-(55,11))
- │ │ │ ├── opening_loc: (55,5)-(55,7) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (55,7)-(55,10))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (55,7)-(55,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bbb
- │ │ │ │ ├── message_loc: (55,7)-(55,10) = "bbb"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (55,10)-(55,11) = "}"
- │ │ └── @ StringNode (location: (55,11)-(55,15))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (55,11)-(55,15) = " ccc"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " ccc"
- │ └── closing_loc: (55,15)-(55,16) = "\""
- ├── @ StringNode (location: (57,0)-(57,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (57,0)-(57,1) = "'"
- │ ├── content_loc: (57,1)-(57,4) = "abc"
- │ ├── closing_loc: (57,4)-(57,5) = "'"
- │ └── unescaped: "abc"
- ├── @ ArrayNode (location: (59,0)-(59,9))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (59,3)-(59,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (59,3)-(59,4) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ StringNode (location: (59,5)-(59,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (59,5)-(59,6) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── @ StringNode (location: (59,7)-(59,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (59,7)-(59,8) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── opening_loc: (59,0)-(59,3) = "%w["
- │ └── closing_loc: (59,8)-(59,9) = "]"
- ├── @ ArrayNode (location: (61,0)-(61,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (61,3)-(61,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (61,3)-(61,6) = "a[]"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a[]"
- │ │ ├── @ StringNode (location: (61,7)-(61,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (61,7)-(61,12) = "b[[]]"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b[[]]"
- │ │ └── @ StringNode (location: (61,13)-(61,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (61,13)-(61,16) = "c[]"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c[]"
- │ ├── opening_loc: (61,0)-(61,3) = "%w["
- │ └── closing_loc: (61,16)-(61,17) = "]"
- ├── @ ArrayNode (location: (63,0)-(63,18))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (63,3)-(63,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (63,3)-(63,11) = "foo\\ bar"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo bar"
- │ │ └── @ StringNode (location: (63,12)-(63,17))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (63,12)-(63,17) = "\\\#{1}"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\\\#{1}"
- │ ├── opening_loc: (63,0)-(63,3) = "%w["
- │ └── closing_loc: (63,17)-(63,18) = "]"
- ├── @ ArrayNode (location: (65,0)-(65,16))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (65,3)-(65,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (65,3)-(65,11) = "foo\\ bar"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo bar"
- │ │ └── @ StringNode (location: (65,12)-(65,15))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (65,12)-(65,15) = "baz"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "baz"
- │ ├── opening_loc: (65,0)-(65,3) = "%w["
- │ └── closing_loc: (65,15)-(65,16) = "]"
- ├── @ ArrayNode (location: (67,0)-(67,14))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (67,3)-(67,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (67,3)-(67,4) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ InterpolatedStringNode (location: (67,5)-(67,11))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── parts: (length: 3)
- │ │ │ │ ├── @ StringNode (location: (67,5)-(67,6))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (67,5)-(67,6) = "b"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── @ EmbeddedStatementsNode (location: (67,6)-(67,10))
- │ │ │ │ │ ├── opening_loc: (67,6)-(67,8) = "\#{"
- │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ @ StatementsNode (location: (67,8)-(67,9))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ CallNode (location: (67,8)-(67,9))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :c
- │ │ │ │ │ │ ├── message_loc: (67,8)-(67,9) = "c"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ └── closing_loc: (67,9)-(67,10) = "}"
- │ │ │ │ └── @ StringNode (location: (67,10)-(67,11))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (67,10)-(67,11) = "d"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "d"
- │ │ │ └── closing_loc: ∅
- │ │ └── @ StringNode (location: (67,12)-(67,13))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (67,12)-(67,13) = "e"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "e"
- │ ├── opening_loc: (67,0)-(67,3) = "%W["
- │ └── closing_loc: (67,13)-(67,14) = "]"
- ├── @ ArrayNode (location: (69,0)-(69,9))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (69,3)-(69,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (69,3)-(69,4) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ StringNode (location: (69,5)-(69,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (69,5)-(69,6) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── @ StringNode (location: (69,7)-(69,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (69,7)-(69,8) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── opening_loc: (69,0)-(69,3) = "%W["
- │ └── closing_loc: (69,8)-(69,9) = "]"
- ├── @ ArrayNode (location: (71,0)-(75,1))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ StringNode (location: (72,2)-(72,3))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (72,2)-(72,3) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ StringNode (location: (73,2)-(73,3))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (73,2)-(73,3) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── @ StringNode (location: (74,2)-(74,3))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (74,2)-(74,3) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── opening_loc: (71,0)-(71,3) = "%w["
- │ └── closing_loc: (75,0)-(75,1) = "]"
- ├── @ StringNode (location: (77,0)-(77,15))
- │ ├── flags: ∅
- │ ├── opening_loc: (77,0)-(77,1) = "'"
- │ ├── content_loc: (77,1)-(77,14) = "\\' foo \\' bar"
- │ ├── closing_loc: (77,14)-(77,15) = "'"
- │ └── unescaped: "' foo ' bar"
- ├── @ StringNode (location: (79,0)-(79,15))
- │ ├── flags: ∅
- │ ├── opening_loc: (79,0)-(79,1) = "'"
- │ ├── content_loc: (79,1)-(79,14) = "\\\\ foo \\\\ bar"
- │ ├── closing_loc: (79,14)-(79,15) = "'"
- │ └── unescaped: "\\ foo \\ bar"
- ├── @ InterpolatedStringNode (location: (81,0)-(81,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (81,0)-(81,1) = "\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedVariableNode (location: (81,1)-(81,6))
- │ │ ├── operator_loc: (81,1)-(81,2) = "#"
- │ │ └── variable:
- │ │ @ GlobalVariableReadNode (location: (81,2)-(81,6))
- │ │ └── name: :$foo
- │ └── closing_loc: (81,6)-(81,7) = "\""
- ├── @ InterpolatedStringNode (location: (83,0)-(83,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (83,0)-(83,1) = "\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedVariableNode (location: (83,1)-(83,6))
- │ │ ├── operator_loc: (83,1)-(83,2) = "#"
- │ │ └── variable:
- │ │ @ InstanceVariableReadNode (location: (83,2)-(83,6))
- │ │ └── name: :@foo
- │ └── closing_loc: (83,6)-(83,7) = "\""
- ├── @ StringNode (location: (85,0)-(85,15))
- │ ├── flags: ∅
- │ ├── opening_loc: (85,0)-(85,1) = "\""
- │ ├── content_loc: (85,1)-(85,14) = "\\x7 \\x23 \\x61"
- │ ├── closing_loc: (85,14)-(85,15) = "\""
- │ └── unescaped: "\a # a"
- ├── @ StringNode (location: (87,0)-(87,13))
- │ ├── flags: ∅
- │ ├── opening_loc: (87,0)-(87,1) = "\""
- │ ├── content_loc: (87,1)-(87,12) = "\\7 \\43 \\141"
- │ ├── closing_loc: (87,12)-(87,13) = "\""
- │ └── unescaped: "\a # a"
- ├── @ StringNode (location: (89,0)-(89,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (89,0)-(89,2) = "%["
- │ ├── content_loc: (89,2)-(89,5) = "abc"
- │ ├── closing_loc: (89,5)-(89,6) = "]"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (91,0)-(91,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (91,0)-(91,2) = "%("
- │ ├── content_loc: (91,2)-(91,5) = "abc"
- │ ├── closing_loc: (91,5)-(91,6) = ")"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (93,0)-(93,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (93,0)-(93,2) = "%@"
- │ ├── content_loc: (93,2)-(93,5) = "abc"
- │ ├── closing_loc: (93,5)-(93,6) = "@"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (95,0)-(95,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (95,0)-(95,2) = "%$"
- │ ├── content_loc: (95,2)-(95,5) = "abc"
- │ ├── closing_loc: (95,5)-(95,6) = "$"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (97,0)-(97,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (97,0)-(97,1) = "?"
- │ ├── content_loc: (97,1)-(97,2) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── @ InterpolatedStringNode (location: (99,0)-(99,6))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (99,0)-(99,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (99,0)-(99,1) = "?"
- │ │ │ ├── content_loc: (99,1)-(99,2) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ StringNode (location: (99,3)-(99,6))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (99,3)-(99,4) = "\""
- │ │ ├── content_loc: (99,4)-(99,5) = "a"
- │ │ ├── closing_loc: (99,5)-(99,6) = "\""
- │ │ └── unescaped: "a"
- │ └── closing_loc: ∅
- ├── @ StringNode (location: (101,0)-(101,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (101,0)-(101,3) = "%Q{"
- │ ├── content_loc: (101,3)-(101,6) = "abc"
- │ ├── closing_loc: (101,6)-(101,7) = "}"
- │ └── unescaped: "abc"
- ├── @ StringNode (location: (103,0)-(103,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (103,0)-(103,2) = "%^"
- │ ├── content_loc: (103,2)-(103,4) = "\#$"
- │ ├── closing_loc: (103,4)-(103,5) = "^"
- │ └── unescaped: "\#$"
- └── @ StringNode (location: (105,0)-(105,4))
- ├── flags: ∅
- ├── opening_loc: (105,0)-(105,2) = "%@"
- ├── content_loc: (105,2)-(105,3) = "#"
- ├── closing_loc: (105,3)-(105,4) = "@"
- └── unescaped: "#"
diff --git a/test/prism/snapshots/super.txt b/test/prism/snapshots/super.txt
deleted file mode 100644
index 79f9a5d5a5..0000000000
--- a/test/prism/snapshots/super.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-@ ProgramNode (location: (1,0)-(17,21))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(17,21))
- └── body: (length: 9)
- ├── @ ForwardingSuperNode (location: (1,0)-(1,5))
- │ └── block: ∅
- ├── @ SuperNode (location: (3,0)-(3,7))
- │ ├── keyword_loc: (3,0)-(3,5) = "super"
- │ ├── lparen_loc: (3,5)-(3,6) = "("
- │ ├── arguments: ∅
- │ ├── rparen_loc: (3,6)-(3,7) = ")"
- │ └── block: ∅
- ├── @ SuperNode (location: (5,0)-(5,8))
- │ ├── keyword_loc: (5,0)-(5,5) = "super"
- │ ├── lparen_loc: (5,5)-(5,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (5,6)-(5,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (5,6)-(5,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── rparen_loc: (5,7)-(5,8) = ")"
- │ └── block: ∅
- ├── @ SuperNode (location: (7,0)-(7,14))
- │ ├── keyword_loc: (7,0)-(7,5) = "super"
- │ ├── lparen_loc: (7,5)-(7,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,6)-(7,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ IntegerNode (location: (7,6)-(7,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ IntegerNode (location: (7,9)-(7,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── @ IntegerNode (location: (7,12)-(7,13))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── rparen_loc: (7,13)-(7,14) = ")"
- │ └── block: ∅
- ├── @ SuperNode (location: (9,0)-(9,11))
- │ ├── keyword_loc: (9,0)-(9,5) = "super"
- │ ├── lparen_loc: ∅
- │ ├── arguments: ∅
- │ ├── rparen_loc: ∅
- │ └── block:
- │ @ BlockArgumentNode (location: (9,6)-(9,11))
- │ ├── expression:
- │ │ @ SymbolNode (location: (9,7)-(9,11))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (9,7)-(9,8) = ":"
- │ │ ├── value_loc: (9,8)-(9,11) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (9,6)-(9,7) = "&"
- ├── @ SuperNode (location: (11,0)-(11,12))
- │ ├── keyword_loc: (11,0)-(11,5) = "super"
- │ ├── lparen_loc: (11,5)-(11,6) = "("
- │ ├── arguments: ∅
- │ ├── rparen_loc: (11,11)-(11,12) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (11,6)-(11,11))
- │ ├── expression:
- │ │ @ SymbolNode (location: (11,7)-(11,11))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (11,7)-(11,8) = ":"
- │ │ ├── value_loc: (11,8)-(11,11) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── operator_loc: (11,6)-(11,7) = "&"
- ├── @ ForwardingSuperNode (location: (13,0)-(13,8))
- │ └── block:
- │ @ BlockNode (location: (13,6)-(13,8))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (13,6)-(13,7) = "{"
- │ └── closing_loc: (13,7)-(13,8) = "}"
- ├── @ SuperNode (location: (15,0)-(15,17))
- │ ├── keyword_loc: (15,0)-(15,5) = "super"
- │ ├── lparen_loc: (15,5)-(15,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (15,6)-(15,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ IntegerNode (location: (15,6)-(15,7))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ IntegerNode (location: (15,9)-(15,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── @ IntegerNode (location: (15,12)-(15,13))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── rparen_loc: (15,13)-(15,14) = ")"
- │ └── block:
- │ @ BlockNode (location: (15,15)-(15,17))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (15,15)-(15,16) = "{"
- │ └── closing_loc: (15,16)-(15,17) = "}"
- └── @ SuperNode (location: (17,0)-(17,21))
- ├── keyword_loc: (17,0)-(17,5) = "super"
- ├── lparen_loc: (17,5)-(17,6) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (17,6)-(17,13))
- │ ├── flags: ∅
- │ └── arguments: (length: 3)
- │ ├── @ IntegerNode (location: (17,6)-(17,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── @ IntegerNode (location: (17,9)-(17,10))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── @ IntegerNode (location: (17,12)-(17,13))
- │ ├── flags: decimal
- │ └── value: 3
- ├── rparen_loc: (17,20)-(17,21) = ")"
- └── block:
- @ BlockArgumentNode (location: (17,15)-(17,20))
- ├── expression:
- │ @ SymbolNode (location: (17,16)-(17,20))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (17,16)-(17,17) = ":"
- │ ├── value_loc: (17,17)-(17,20) = "foo"
- │ ├── closing_loc: ∅
- │ └── unescaped: "foo"
- └── operator_loc: (17,15)-(17,16) = "&"
diff --git a/test/prism/snapshots/symbols.txt b/test/prism/snapshots/symbols.txt
deleted file mode 100644
index dbd3a4d030..0000000000
--- a/test/prism/snapshots/symbols.txt
+++ /dev/null
@@ -1,464 +0,0 @@
-@ ProgramNode (location: (1,0)-(93,13))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(93,13))
- └── body: (length: 47)
- ├── @ SymbolNode (location: (1,0)-(1,6))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (1,0)-(1,2) = ":'"
- │ ├── value_loc: (1,2)-(1,5) = "abc"
- │ ├── closing_loc: (1,5)-(1,6) = "'"
- │ └── unescaped: "abc"
- ├── @ InterpolatedSymbolNode (location: (3,0)-(3,9))
- │ ├── opening_loc: (3,0)-(3,2) = ":\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (3,2)-(3,8))
- │ │ ├── opening_loc: (3,2)-(3,4) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,4)-(3,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,4)-(3,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var
- │ │ │ ├── message_loc: (3,4)-(3,7) = "var"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (3,7)-(3,8) = "}"
- │ └── closing_loc: (3,8)-(3,9) = "\""
- ├── @ InterpolatedSymbolNode (location: (5,0)-(5,10))
- │ ├── opening_loc: (5,0)-(5,2) = ":\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (5,2)-(5,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (5,2)-(5,5) = "abc"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "abc"
- │ │ └── @ EmbeddedStatementsNode (location: (5,5)-(5,9))
- │ │ ├── opening_loc: (5,5)-(5,7) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (5,7)-(5,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,7)-(5,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── closing_loc: (5,8)-(5,9) = "}"
- │ └── closing_loc: (5,9)-(5,10) = "\""
- ├── @ ArrayNode (location: (7,0)-(7,20))
- │ ├── flags: ∅
- │ ├── elements: (length: 4)
- │ │ ├── @ SymbolNode (location: (7,1)-(7,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (7,1)-(7,2) = ":"
- │ │ │ ├── value_loc: (7,2)-(7,4) = "Υ"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "Υ"
- │ │ ├── @ SymbolNode (location: (7,6)-(7,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (7,6)-(7,7) = ":"
- │ │ │ ├── value_loc: (7,7)-(7,9) = "ά"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "ά"
- │ │ ├── @ SymbolNode (location: (7,11)-(7,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (7,11)-(7,12) = ":"
- │ │ │ ├── value_loc: (7,12)-(7,14) = "ŗ"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "ŗ"
- │ │ └── @ SymbolNode (location: (7,16)-(7,19))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (7,16)-(7,17) = ":"
- │ │ ├── value_loc: (7,17)-(7,19) = "Ï"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "Ï"
- │ ├── opening_loc: (7,0)-(7,1) = "["
- │ └── closing_loc: (7,19)-(7,20) = "]"
- ├── @ SymbolNode (location: (9,0)-(9,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (9,0)-(9,1) = ":"
- │ ├── value_loc: (9,1)-(9,3) = "-@"
- │ ├── closing_loc: ∅
- │ └── unescaped: "-@"
- ├── @ SymbolNode (location: (11,0)-(11,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (11,0)-(11,1) = ":"
- │ ├── value_loc: (11,1)-(11,2) = "-"
- │ ├── closing_loc: ∅
- │ └── unescaped: "-"
- ├── @ SymbolNode (location: (13,0)-(13,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (13,0)-(13,1) = ":"
- │ ├── value_loc: (13,1)-(13,2) = "%"
- │ ├── closing_loc: ∅
- │ └── unescaped: "%"
- ├── @ SymbolNode (location: (15,0)-(15,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (15,0)-(15,1) = ":"
- │ ├── value_loc: (15,1)-(15,2) = "|"
- │ ├── closing_loc: ∅
- │ └── unescaped: "|"
- ├── @ SymbolNode (location: (17,0)-(17,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (17,0)-(17,1) = ":"
- │ ├── value_loc: (17,1)-(17,3) = "+@"
- │ ├── closing_loc: ∅
- │ └── unescaped: "+@"
- ├── @ SymbolNode (location: (19,0)-(19,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (19,0)-(19,1) = ":"
- │ ├── value_loc: (19,1)-(19,2) = "+"
- │ ├── closing_loc: ∅
- │ └── unescaped: "+"
- ├── @ SymbolNode (location: (21,0)-(21,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (21,0)-(21,1) = ":"
- │ ├── value_loc: (21,1)-(21,2) = "/"
- │ ├── closing_loc: ∅
- │ └── unescaped: "/"
- ├── @ SymbolNode (location: (23,0)-(23,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (23,0)-(23,1) = ":"
- │ ├── value_loc: (23,1)-(23,3) = "**"
- │ ├── closing_loc: ∅
- │ └── unescaped: "**"
- ├── @ SymbolNode (location: (25,0)-(25,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (25,0)-(25,1) = ":"
- │ ├── value_loc: (25,1)-(25,2) = "*"
- │ ├── closing_loc: ∅
- │ └── unescaped: "*"
- ├── @ SymbolNode (location: (27,0)-(27,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (27,0)-(27,1) = ":"
- │ ├── value_loc: (27,1)-(27,3) = "~@"
- │ ├── closing_loc: ∅
- │ └── unescaped: "~"
- ├── @ ArrayNode (location: (29,0)-(29,16))
- │ ├── flags: ∅
- │ ├── elements: (length: 4)
- │ │ ├── @ IntegerNode (location: (29,1)-(29,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ FloatNode (location: (29,4)-(29,7))
- │ │ │ └── value: 1.0
- │ │ ├── @ RationalNode (location: (29,9)-(29,11))
- │ │ │ └── numeric:
- │ │ │ @ IntegerNode (location: (29,9)-(29,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ ImaginaryNode (location: (29,13)-(29,15))
- │ │ └── numeric:
- │ │ @ IntegerNode (location: (29,13)-(29,14))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── opening_loc: (29,0)-(29,1) = "["
- │ └── closing_loc: (29,15)-(29,16) = "]"
- ├── @ SymbolNode (location: (31,0)-(31,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (31,0)-(31,1) = ":"
- │ ├── value_loc: (31,1)-(31,2) = "~"
- │ ├── closing_loc: ∅
- │ └── unescaped: "~"
- ├── @ SymbolNode (location: (33,0)-(33,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (33,0)-(33,1) = ":"
- │ ├── value_loc: (33,1)-(33,2) = "a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "a"
- ├── @ ArrayNode (location: (35,0)-(35,9))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ SymbolNode (location: (35,3)-(35,4))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (35,3)-(35,4) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ SymbolNode (location: (35,5)-(35,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (35,5)-(35,6) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── @ SymbolNode (location: (35,7)-(35,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (35,7)-(35,8) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ ├── opening_loc: (35,0)-(35,3) = "%i["
- │ └── closing_loc: (35,8)-(35,9) = "]"
- ├── @ ArrayNode (location: (37,0)-(37,24))
- │ ├── flags: ∅
- │ ├── elements: (length: 4)
- │ │ ├── @ SymbolNode (location: (37,3)-(37,4))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (37,3)-(37,4) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ SymbolNode (location: (37,5)-(37,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (37,5)-(37,10) = "b\#{1}"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b\#{1}"
- │ │ ├── @ SymbolNode (location: (37,11)-(37,16))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (37,11)-(37,16) = "\#{2}c"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\#{2}c"
- │ │ └── @ SymbolNode (location: (37,17)-(37,23))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (37,17)-(37,23) = "d\#{3}f"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "d\#{3}f"
- │ ├── opening_loc: (37,0)-(37,3) = "%i["
- │ └── closing_loc: (37,23)-(37,24) = "]"
- ├── @ ArrayNode (location: (39,0)-(39,24))
- │ ├── flags: ∅
- │ ├── elements: (length: 4)
- │ │ ├── @ SymbolNode (location: (39,3)-(39,4))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (39,3)-(39,4) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ InterpolatedSymbolNode (location: (39,5)-(39,10))
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (39,5)-(39,6))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (39,5)-(39,6) = "b"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ └── @ EmbeddedStatementsNode (location: (39,6)-(39,10))
- │ │ │ │ ├── opening_loc: (39,6)-(39,8) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (39,8)-(39,9))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (39,8)-(39,9))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── closing_loc: (39,9)-(39,10) = "}"
- │ │ │ └── closing_loc: ∅
- │ │ ├── @ InterpolatedSymbolNode (location: (39,11)-(39,16))
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ EmbeddedStatementsNode (location: (39,11)-(39,15))
- │ │ │ │ │ ├── opening_loc: (39,11)-(39,13) = "\#{"
- │ │ │ │ │ ├── statements:
- │ │ │ │ │ │ @ StatementsNode (location: (39,13)-(39,14))
- │ │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ │ └── @ IntegerNode (location: (39,13)-(39,14))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 2
- │ │ │ │ │ └── closing_loc: (39,14)-(39,15) = "}"
- │ │ │ │ └── @ StringNode (location: (39,15)-(39,16))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (39,15)-(39,16) = "c"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "c"
- │ │ │ └── closing_loc: ∅
- │ │ └── @ InterpolatedSymbolNode (location: (39,17)-(39,23))
- │ │ ├── opening_loc: ∅
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (39,17)-(39,18))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (39,17)-(39,18) = "d"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "d"
- │ │ │ ├── @ EmbeddedStatementsNode (location: (39,18)-(39,22))
- │ │ │ │ ├── opening_loc: (39,18)-(39,20) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (39,20)-(39,21))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (39,20)-(39,21))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 3
- │ │ │ │ └── closing_loc: (39,21)-(39,22) = "}"
- │ │ │ └── @ StringNode (location: (39,22)-(39,23))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (39,22)-(39,23) = "f"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "f"
- │ │ └── closing_loc: ∅
- │ ├── opening_loc: (39,0)-(39,3) = "%I["
- │ └── closing_loc: (39,23)-(39,24) = "]"
- ├── @ SymbolNode (location: (41,0)-(41,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (41,0)-(41,1) = ":"
- │ ├── value_loc: (41,1)-(41,4) = "@@a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "@@a"
- ├── @ SymbolNode (location: (43,0)-(43,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (43,0)-(43,1) = ":"
- │ ├── value_loc: (43,1)-(43,5) = "ðŸ‘"
- │ ├── closing_loc: ∅
- │ └── unescaped: "ðŸ‘"
- ├── @ ArrayNode (location: (45,0)-(45,7))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ SymbolNode (location: (45,3)-(45,6))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (45,3)-(45,6) = "a\\b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\\b"
- │ ├── opening_loc: (45,0)-(45,3) = "%i["
- │ └── closing_loc: (45,6)-(45,7) = "]"
- ├── @ SymbolNode (location: (47,0)-(47,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (47,0)-(47,1) = ":"
- │ ├── value_loc: (47,1)-(47,3) = "$a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "$a"
- ├── @ SymbolNode (location: (49,0)-(49,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (49,0)-(49,1) = ":"
- │ ├── value_loc: (49,1)-(49,3) = "@a"
- │ ├── closing_loc: ∅
- │ └── unescaped: "@a"
- ├── @ SymbolNode (location: (51,0)-(51,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (51,0)-(51,1) = ":"
- │ ├── value_loc: (51,1)-(51,3) = "do"
- │ ├── closing_loc: ∅
- │ └── unescaped: "do"
- ├── @ SymbolNode (location: (53,0)-(53,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (53,0)-(53,1) = ":"
- │ ├── value_loc: (53,1)-(53,2) = "&"
- │ ├── closing_loc: ∅
- │ └── unescaped: "&"
- ├── @ SymbolNode (location: (55,0)-(55,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (55,0)-(55,1) = ":"
- │ ├── value_loc: (55,1)-(55,2) = "`"
- │ ├── closing_loc: ∅
- │ └── unescaped: "`"
- ├── @ SymbolNode (location: (57,0)-(57,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (57,0)-(57,1) = ":"
- │ ├── value_loc: (57,1)-(57,3) = "!@"
- │ ├── closing_loc: ∅
- │ └── unescaped: "!"
- ├── @ SymbolNode (location: (59,0)-(59,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (59,0)-(59,1) = ":"
- │ ├── value_loc: (59,1)-(59,3) = "!~"
- │ ├── closing_loc: ∅
- │ └── unescaped: "!~"
- ├── @ SymbolNode (location: (61,0)-(61,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (61,0)-(61,1) = ":"
- │ ├── value_loc: (61,1)-(61,2) = "!"
- │ ├── closing_loc: ∅
- │ └── unescaped: "!"
- ├── @ SymbolNode (location: (63,0)-(63,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (63,0)-(63,1) = ":"
- │ ├── value_loc: (63,1)-(63,3) = "[]"
- │ ├── closing_loc: ∅
- │ └── unescaped: "[]"
- ├── @ SymbolNode (location: (65,0)-(65,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (65,0)-(65,1) = ":"
- │ ├── value_loc: (65,1)-(65,4) = "[]="
- │ ├── closing_loc: ∅
- │ └── unescaped: "[]="
- ├── @ SymbolNode (location: (67,0)-(67,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (67,0)-(67,1) = ":"
- │ ├── value_loc: (67,1)-(67,2) = "^"
- │ ├── closing_loc: ∅
- │ └── unescaped: "^"
- ├── @ SymbolNode (location: (69,0)-(69,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (69,0)-(69,1) = ":"
- │ ├── value_loc: (69,1)-(69,3) = "=="
- │ ├── closing_loc: ∅
- │ └── unescaped: "=="
- ├── @ SymbolNode (location: (71,0)-(71,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (71,0)-(71,1) = ":"
- │ ├── value_loc: (71,1)-(71,4) = "==="
- │ ├── closing_loc: ∅
- │ └── unescaped: "==="
- ├── @ SymbolNode (location: (73,0)-(73,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (73,0)-(73,1) = ":"
- │ ├── value_loc: (73,1)-(73,3) = "=~"
- │ ├── closing_loc: ∅
- │ └── unescaped: "=~"
- ├── @ SymbolNode (location: (75,0)-(75,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (75,0)-(75,1) = ":"
- │ ├── value_loc: (75,1)-(75,3) = ">="
- │ ├── closing_loc: ∅
- │ └── unescaped: ">="
- ├── @ SymbolNode (location: (77,0)-(77,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (77,0)-(77,1) = ":"
- │ ├── value_loc: (77,1)-(77,3) = ">>"
- │ ├── closing_loc: ∅
- │ └── unescaped: ">>"
- ├── @ SymbolNode (location: (79,0)-(79,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (79,0)-(79,1) = ":"
- │ ├── value_loc: (79,1)-(79,2) = ">"
- │ ├── closing_loc: ∅
- │ └── unescaped: ">"
- ├── @ SymbolNode (location: (81,0)-(81,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (81,0)-(81,1) = ":"
- │ ├── value_loc: (81,1)-(81,4) = "<=>"
- │ ├── closing_loc: ∅
- │ └── unescaped: "<=>"
- ├── @ SymbolNode (location: (83,0)-(83,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (83,0)-(83,1) = ":"
- │ ├── value_loc: (83,1)-(83,3) = "<="
- │ ├── closing_loc: ∅
- │ └── unescaped: "<="
- ├── @ SymbolNode (location: (85,0)-(85,3))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (85,0)-(85,1) = ":"
- │ ├── value_loc: (85,1)-(85,3) = "<<"
- │ ├── closing_loc: ∅
- │ └── unescaped: "<<"
- ├── @ SymbolNode (location: (87,0)-(87,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (87,0)-(87,1) = ":"
- │ ├── value_loc: (87,1)-(87,2) = "<"
- │ ├── closing_loc: ∅
- │ └── unescaped: "<"
- ├── @ SymbolNode (location: (89,0)-(89,9))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (89,0)-(89,1) = ":"
- │ ├── value_loc: (89,1)-(89,9) = "__LINE__"
- │ ├── closing_loc: ∅
- │ └── unescaped: "__LINE__"
- ├── @ SymbolNode (location: (91,0)-(91,9))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (91,0)-(91,1) = ":"
- │ ├── value_loc: (91,1)-(91,9) = "__FILE__"
- │ ├── closing_loc: ∅
- │ └── unescaped: "__FILE__"
- └── @ SymbolNode (location: (93,0)-(93,13))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (93,0)-(93,1) = ":"
- ├── value_loc: (93,1)-(93,13) = "__ENCODING__"
- ├── closing_loc: ∅
- └── unescaped: "__ENCODING__"
diff --git a/test/prism/snapshots/ternary_operator.txt b/test/prism/snapshots/ternary_operator.txt
deleted file mode 100644
index 0277ac88f0..0000000000
--- a/test/prism/snapshots/ternary_operator.txt
+++ /dev/null
@@ -1,295 +0,0 @@
-@ ProgramNode (location: (1,0)-(15,12))
-├── locals: [:_a]
-└── statements:
- @ StatementsNode (location: (1,0)-(15,12))
- └── body: (length: 8)
- ├── @ IfNode (location: (1,0)-(1,9))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (1,2)-(1,3) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,4)-(1,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (1,4)-(1,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (1,6)-(1,9))
- │ │ ├── else_keyword_loc: (1,6)-(1,7) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,8)-(1,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (1,8)-(1,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (1,8)-(1,9) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- ├── @ IfNode (location: (3,0)-(3,27))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (3,0)-(3,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (3,0)-(3,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (3,2)-(3,3) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (3,4)-(3,14))
- │ │ └── body: (length: 1)
- │ │ └── @ DefinedNode (location: (3,4)-(3,14))
- │ │ ├── lparen_loc: ∅
- │ │ ├── value:
- │ │ │ @ CallNode (location: (3,13)-(3,14))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (3,13)-(3,14) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rparen_loc: ∅
- │ │ └── keyword_loc: (3,4)-(3,12) = "defined?"
- │ ├── consequent:
- │ │ @ ElseNode (location: (3,15)-(3,27))
- │ │ ├── else_keyword_loc: (3,15)-(3,16) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (3,17)-(3,27))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ DefinedNode (location: (3,17)-(3,27))
- │ │ │ ├── lparen_loc: ∅
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (3,26)-(3,27))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :c
- │ │ │ │ ├── message_loc: (3,26)-(3,27) = "c"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── rparen_loc: ∅
- │ │ │ └── keyword_loc: (3,17)-(3,25) = "defined?"
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- ├── @ IfNode (location: (5,0)-(5,15))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (5,0)-(5,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :empty?
- │ │ ├── message_loc: (5,0)-(5,6) = "empty?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (5,6)-(5,7) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,7)-(5,11))
- │ │ └── body: (length: 1)
- │ │ └── @ TrueNode (location: (5,7)-(5,11))
- │ ├── consequent:
- │ │ @ ElseNode (location: (5,11)-(5,15))
- │ │ ├── else_keyword_loc: (5,11)-(5,12) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (5,12)-(5,15))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ NilNode (location: (5,12)-(5,15))
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- ├── @ IfNode (location: (7,0)-(7,16))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (7,0)-(7,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :empty?
- │ │ ├── message_loc: (7,0)-(7,6) = "empty?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (7,6)-(7,7) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (7,7)-(7,12))
- │ │ └── body: (length: 1)
- │ │ └── @ FalseNode (location: (7,7)-(7,12))
- │ ├── consequent:
- │ │ @ ElseNode (location: (7,12)-(7,16))
- │ │ ├── else_keyword_loc: (7,12)-(7,13) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (7,13)-(7,16))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ NilNode (location: (7,13)-(7,16))
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- ├── @ IfNode (location: (9,0)-(9,14))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (9,0)-(9,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :empty?
- │ │ ├── message_loc: (9,0)-(9,6) = "empty?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (9,6)-(9,7) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (9,7)-(9,10))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (9,7)-(9,10))
- │ ├── consequent:
- │ │ @ ElseNode (location: (9,10)-(9,14))
- │ │ ├── else_keyword_loc: (9,10)-(9,11) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (9,11)-(9,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ NilNode (location: (9,11)-(9,14))
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- ├── @ IfNode (location: (11,0)-(11,10))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (11,0)-(11,2))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a?
- │ │ ├── message_loc: (11,0)-(11,2) = "a?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (11,2)-(11,3) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (11,3)-(11,6))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (11,3)-(11,6))
- │ ├── consequent:
- │ │ @ ElseNode (location: (11,6)-(11,10))
- │ │ ├── else_keyword_loc: (11,6)-(11,7) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (11,7)-(11,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ NilNode (location: (11,7)-(11,10))
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- ├── @ IfNode (location: (13,0)-(13,14))
- │ ├── if_keyword_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (13,0)-(13,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (13,0)-(13,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: (13,2)-(13,3) = "?"
- │ ├── statements:
- │ │ @ StatementsNode (location: (13,3)-(13,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (13,3)-(13,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :var1
- │ │ ├── message_loc: (13,3)-(13,7) = "var1"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (13,8)-(13,14))
- │ │ ├── else_keyword_loc: (13,8)-(13,9) = ":"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (13,10)-(13,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (13,10)-(13,14))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :var2
- │ │ │ ├── message_loc: (13,10)-(13,14) = "var2"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: ∅
- │ └── end_keyword_loc: ∅
- └── @ IfNode (location: (15,0)-(15,12))
- ├── if_keyword_loc: ∅
- ├── predicate:
- │ @ CallNode (location: (15,0)-(15,4))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :nil?
- │ ├── message_loc: (15,0)-(15,4) = "nil?"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: (15,4)-(15,5) = "?"
- ├── statements:
- │ @ StatementsNode (location: (15,5)-(15,10))
- │ └── body: (length: 1)
- │ └── @ LocalVariableWriteNode (location: (15,5)-(15,10))
- │ ├── name: :_a
- │ ├── depth: 0
- │ ├── name_loc: (15,5)-(15,7) = "_a"
- │ ├── value:
- │ │ @ IntegerNode (location: (15,9)-(15,10))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (15,8)-(15,9) = "="
- ├── consequent:
- │ @ ElseNode (location: (15,10)-(15,12))
- │ ├── else_keyword_loc: (15,10)-(15,11) = ":"
- │ ├── statements:
- │ │ @ StatementsNode (location: (15,11)-(15,12))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (15,11)-(15,12))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── end_keyword_loc: ∅
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/tilde_heredocs.txt b/test/prism/snapshots/tilde_heredocs.txt
deleted file mode 100644
index f50f915a64..0000000000
--- a/test/prism/snapshots/tilde_heredocs.txt
+++ /dev/null
@@ -1,405 +0,0 @@
-@ ProgramNode (location: (1,0)-(94,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(94,6))
- └── body: (length: 19)
- ├── @ InterpolatedStringNode (location: (1,0)-(1,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,6) = "<<~EOF"
- │ ├── parts: (length: 4)
- │ │ ├── @ StringNode (location: (2,0)-(3,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (3,0)-(3,4))
- │ │ │ ├── opening_loc: (3,0)-(3,2) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (3,2)-(3,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (3,2)-(3,3))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (3,3)-(3,4) = "}"
- │ │ ├── @ StringNode (location: (3,4)-(4,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,4)-(4,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (4,0)-(5,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (4,0)-(5,0) = " a\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " a\n"
- │ └── closing_loc: (5,0)-(6,0) = "EOF\n"
- ├── @ StringNode (location: (7,0)-(7,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (7,0)-(7,6) = "<<~EOF"
- │ ├── content_loc: (8,0)-(9,0) = " a\n"
- │ ├── closing_loc: (9,0)-(10,0) = "EOF\n"
- │ └── unescaped: "a\n"
- ├── @ InterpolatedStringNode (location: (11,0)-(11,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (11,0)-(11,6) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (12,0)-(13,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (12,0)-(13,0) = "\ta\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\ta\n"
- │ │ ├── @ StringNode (location: (13,0)-(14,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (13,0)-(14,0) = " b\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b\n"
- │ │ └── @ StringNode (location: (14,0)-(15,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (14,0)-(15,0) = "\t\tc\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\t\tc\n"
- │ └── closing_loc: (15,0)-(16,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (17,0)-(17,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (17,0)-(17,6) = "<<~EOF"
- │ ├── parts: (length: 2)
- │ │ ├── @ EmbeddedStatementsNode (location: (18,2)-(18,6))
- │ │ │ ├── opening_loc: (18,2)-(18,4) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (18,4)-(18,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (18,4)-(18,5))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (18,5)-(18,6) = "}"
- │ │ └── @ StringNode (location: (18,6)-(19,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (18,6)-(19,0) = " a\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " a\n"
- │ └── closing_loc: (19,0)-(20,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (21,0)-(21,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (21,0)-(21,6) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (22,0)-(22,4))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (22,0)-(22,4) = " a "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a "
- │ │ ├── @ EmbeddedStatementsNode (location: (22,4)-(22,8))
- │ │ │ ├── opening_loc: (22,4)-(22,6) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (22,6)-(22,7))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (22,6)-(22,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (22,7)-(22,8) = "}"
- │ │ └── @ StringNode (location: (22,8)-(23,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (22,8)-(23,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (23,0)-(24,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (25,0)-(25,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (25,0)-(25,6) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (26,0)-(27,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (26,0)-(27,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (27,1)-(27,5))
- │ │ │ ├── opening_loc: (27,1)-(27,3) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (27,3)-(27,4))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (27,3)-(27,4))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (27,4)-(27,5) = "}"
- │ │ └── @ StringNode (location: (27,5)-(28,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (27,5)-(28,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (28,0)-(29,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (30,0)-(30,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (30,0)-(30,6) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (31,0)-(32,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (31,0)-(32,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (32,2)-(32,6))
- │ │ │ ├── opening_loc: (32,2)-(32,4) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (32,4)-(32,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (32,4)-(32,5))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (32,5)-(32,6) = "}"
- │ │ └── @ StringNode (location: (32,6)-(33,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (32,6)-(33,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (33,0)-(34,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (35,0)-(35,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (35,0)-(35,6) = "<<~EOF"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (36,0)-(37,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (36,0)-(37,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ StringNode (location: (37,0)-(38,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (37,0)-(38,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (38,0)-(39,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (40,0)-(40,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (40,0)-(40,6) = "<<~EOF"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (41,0)-(42,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (41,0)-(42,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ StringNode (location: (42,0)-(43,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (42,0)-(43,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " b\n"
- │ └── closing_loc: (43,0)-(44,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (45,0)-(45,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (45,0)-(45,6) = "<<~EOF"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (46,0)-(47,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (46,0)-(47,0) = "\t\t\ta\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\ta\n"
- │ │ └── @ StringNode (location: (47,0)-(48,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (47,0)-(48,0) = "\t\tb\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (48,0)-(49,0) = "EOF\n"
- ├── @ StringNode (location: (50,0)-(50,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (50,0)-(50,8) = "<<~'EOF'"
- │ ├── content_loc: (51,0)-(52,0) = " a \#{1}\n"
- │ ├── closing_loc: (52,0)-(53,0) = "EOF\n"
- │ └── unescaped: "a \#{1}\n"
- ├── @ InterpolatedStringNode (location: (54,0)-(54,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (54,0)-(54,6) = "<<~EOF"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (55,0)-(56,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (55,0)-(56,0) = "\ta\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ StringNode (location: (56,0)-(57,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (56,0)-(57,0) = "\t b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " b\n"
- │ └── closing_loc: (57,0)-(58,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (59,0)-(59,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (59,0)-(59,6) = "<<~EOF"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (60,0)-(61,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (60,0)-(61,0) = "\t a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a\n"
- │ │ └── @ StringNode (location: (61,0)-(62,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (61,0)-(62,0) = "\tb\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (62,0)-(63,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (64,0)-(64,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (64,0)-(64,6) = "<<~EOF"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (65,0)-(66,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (65,0)-(66,0) = " \ta\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ StringNode (location: (66,0)-(67,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (66,0)-(67,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (67,0)-(68,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (69,0)-(69,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (69,0)-(69,6) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (70,0)-(71,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (70,0)-(71,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ StringNode (location: (71,0)-(72,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (71,0)-(72,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (72,0)-(73,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (72,0)-(73,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (73,0)-(74,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (75,0)-(75,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (75,0)-(75,6) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (76,0)-(77,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (76,0)-(77,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ StringNode (location: (77,0)-(78,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (77,0)-(78,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (78,0)-(79,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (78,0)-(79,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (79,0)-(80,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (81,0)-(81,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (81,0)-(81,6) = "<<~EOF"
- │ ├── parts: (length: 5)
- │ │ ├── @ StringNode (location: (82,0)-(83,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (82,0)-(83,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ StringNode (location: (83,0)-(84,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (83,0)-(84,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ ├── @ StringNode (location: (84,0)-(85,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (84,0)-(85,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ ├── @ StringNode (location: (85,0)-(86,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (85,0)-(86,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (86,0)-(87,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (86,0)-(87,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (87,0)-(88,0) = "EOF\n"
- ├── @ InterpolatedStringNode (location: (89,0)-(89,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (89,0)-(89,6) = "<<~EOF"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (90,0)-(91,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (90,0)-(91,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (91,2)-(91,6))
- │ │ │ ├── opening_loc: (91,2)-(91,4) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (91,4)-(91,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (91,4)-(91,5))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (91,5)-(91,6) = "}"
- │ │ └── @ StringNode (location: (91,6)-(92,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (91,6)-(92,0) = "a\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\n"
- │ └── closing_loc: (92,0)-(93,0) = " EOF\n"
- └── @ InterpolatedStringNode (location: (94,0)-(94,6))
- ├── flags: ∅
- ├── opening_loc: (94,0)-(94,6) = "<<~EOT"
- ├── parts: (length: 3)
- │ ├── @ EmbeddedStatementsNode (location: (95,2)-(95,6))
- │ │ ├── opening_loc: (95,2)-(95,4) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (95,4)-(95,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (95,4)-(95,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── closing_loc: (95,5)-(95,6) = "}"
- │ ├── @ StringNode (location: (95,6)-(96,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (95,6)-(96,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── @ StringNode (location: (96,0)-(97,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (96,0)-(97,0) = "\tb\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\tb\n"
- └── closing_loc: (97,0)-(98,0) = "EOT\n"
diff --git a/test/prism/snapshots/undef.txt b/test/prism/snapshots/undef.txt
deleted file mode 100644
index e59ace92f5..0000000000
--- a/test/prism/snapshots/undef.txt
+++ /dev/null
@@ -1,117 +0,0 @@
-@ ProgramNode (location: (1,0)-(17,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(17,14))
- └── body: (length: 9)
- ├── @ UndefNode (location: (1,0)-(1,7))
- │ ├── names: (length: 1)
- │ │ └── @ SymbolNode (location: (1,6)-(1,7))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,6)-(1,7) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ └── keyword_loc: (1,0)-(1,5) = "undef"
- ├── @ UndefNode (location: (3,0)-(3,10))
- │ ├── names: (length: 2)
- │ │ ├── @ SymbolNode (location: (3,6)-(3,7))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (3,6)-(3,7) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (3,9)-(3,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (3,9)-(3,10) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ └── keyword_loc: (3,0)-(3,5) = "undef"
- ├── @ UndefNode (location: (5,0)-(5,8))
- │ ├── names: (length: 1)
- │ │ └── @ SymbolNode (location: (5,6)-(5,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (5,6)-(5,8) = "if"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "if"
- │ └── keyword_loc: (5,0)-(5,5) = "undef"
- ├── @ UndefNode (location: (7,0)-(7,9))
- │ ├── names: (length: 1)
- │ │ └── @ SymbolNode (location: (7,6)-(7,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (7,6)-(7,9) = "<=>"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "<=>"
- │ └── keyword_loc: (7,0)-(7,5) = "undef"
- ├── @ UndefNode (location: (9,0)-(9,8))
- │ ├── names: (length: 1)
- │ │ └── @ SymbolNode (location: (9,6)-(9,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (9,6)-(9,7) = ":"
- │ │ ├── value_loc: (9,7)-(9,8) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ └── keyword_loc: (9,0)-(9,5) = "undef"
- ├── @ UndefNode (location: (11,0)-(11,16))
- │ ├── names: (length: 3)
- │ │ ├── @ SymbolNode (location: (11,6)-(11,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (11,6)-(11,7) = ":"
- │ │ │ ├── value_loc: (11,7)-(11,8) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ ├── @ SymbolNode (location: (11,10)-(11,12))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (11,10)-(11,11) = ":"
- │ │ │ ├── value_loc: (11,11)-(11,12) = "b"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "b"
- │ │ └── @ SymbolNode (location: (11,14)-(11,16))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (11,14)-(11,15) = ":"
- │ │ ├── value_loc: (11,15)-(11,16) = "c"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "c"
- │ └── keyword_loc: (11,0)-(11,5) = "undef"
- ├── @ UndefNode (location: (13,0)-(13,12))
- │ ├── names: (length: 1)
- │ │ └── @ SymbolNode (location: (13,6)-(13,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (13,6)-(13,8) = ":'"
- │ │ ├── value_loc: (13,8)-(13,11) = "abc"
- │ │ ├── closing_loc: (13,11)-(13,12) = "'"
- │ │ └── unescaped: "abc"
- │ └── keyword_loc: (13,0)-(13,5) = "undef"
- ├── @ UndefNode (location: (15,0)-(15,16))
- │ ├── names: (length: 1)
- │ │ └── @ InterpolatedSymbolNode (location: (15,6)-(15,16))
- │ │ ├── opening_loc: (15,6)-(15,8) = ":\""
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (15,8)-(15,11))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (15,8)-(15,11) = "abc"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "abc"
- │ │ │ └── @ EmbeddedStatementsNode (location: (15,11)-(15,15))
- │ │ │ ├── opening_loc: (15,11)-(15,13) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (15,13)-(15,14))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (15,13)-(15,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (15,14)-(15,15) = "}"
- │ │ └── closing_loc: (15,15)-(15,16) = "\""
- │ └── keyword_loc: (15,0)-(15,5) = "undef"
- └── @ UndefNode (location: (17,0)-(17,14))
- ├── names: (length: 1)
- │ └── @ SymbolNode (location: (17,6)-(17,14))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (17,6)-(17,14) = "Constant"
- │ ├── closing_loc: ∅
- │ └── unescaped: "Constant"
- └── keyword_loc: (17,0)-(17,5) = "undef"
diff --git a/test/prism/snapshots/unescaping.txt b/test/prism/snapshots/unescaping.txt
deleted file mode 100644
index 456ef226d0..0000000000
--- a/test/prism/snapshots/unescaping.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,7))
- └── body: (length: 4)
- ├── @ ArrayNode (location: (1,0)-(1,10))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ StringNode (location: (1,1)-(1,9))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (1,1)-(1,2) = "\""
- │ │ ├── content_loc: (1,2)-(1,8) = "\\c\#{1}"
- │ │ ├── closing_loc: (1,8)-(1,9) = "\""
- │ │ └── unescaped: "\u0003{1}"
- │ ├── opening_loc: (1,0)-(1,1) = "["
- │ └── closing_loc: (1,9)-(1,10) = "]"
- ├── @ RegularExpressionNode (location: (3,0)-(3,8))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (3,0)-(3,1) = "/"
- │ ├── content_loc: (3,1)-(3,7) = "\\c\#{1}"
- │ ├── closing_loc: (3,7)-(3,8) = "/"
- │ └── unescaped: "\\x03{1}"
- ├── @ StringNode (location: (5,0)-(5,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (5,0)-(5,1) = "\""
- │ ├── content_loc: (5,1)-(5,7) = "\\c\#{1}"
- │ ├── closing_loc: (5,7)-(5,8) = "\""
- │ └── unescaped: "\u0003{1}"
- └── @ StringNode (location: (7,0)-(7,7))
- ├── flags: ∅
- ├── opening_loc: (7,0)-(7,7) = "<<~HERE"
- ├── content_loc: (8,0)-(9,0) = " \\c\#{1}\n"
- ├── closing_loc: (9,0)-(10,0) = "HERE\n"
- └── unescaped: "\u0003{1}\n"
diff --git a/test/prism/snapshots/unless.txt b/test/prism/snapshots/unless.txt
deleted file mode 100644
index 6c4aaf66a5..0000000000
--- a/test/prism/snapshots/unless.txt
+++ /dev/null
@@ -1,173 +0,0 @@
-@ ProgramNode (location: (1,0)-(14,22))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(14,22))
- └── body: (length: 7)
- ├── @ UnlessNode (location: (1,0)-(1,19))
- │ ├── keyword_loc: (1,0)-(1,6) = "unless"
- │ ├── predicate:
- │ │ @ TrueNode (location: (1,7)-(1,11))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (1,13)-(1,14))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (1,13)-(1,14))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (1,16)-(1,19) = "end"
- ├── @ UnlessNode (location: (3,0)-(4,12))
- │ ├── keyword_loc: (3,0)-(3,6) = "unless"
- │ ├── predicate:
- │ │ @ TrueNode (location: (3,7)-(3,11))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (4,0)-(4,1))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (4,0)-(4,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── consequent:
- │ │ @ ElseNode (location: (4,2)-(4,12))
- │ │ ├── else_keyword_loc: (4,2)-(4,6) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (4,7)-(4,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (4,7)-(4,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── end_keyword_loc: (4,9)-(4,12) = "end"
- │ └── end_keyword_loc: (4,9)-(4,12) = "end"
- ├── @ UnlessNode (location: (6,0)-(6,13))
- │ ├── keyword_loc: (6,2)-(6,8) = "unless"
- │ ├── predicate:
- │ │ @ TrueNode (location: (6,9)-(6,13))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (6,0)-(6,1))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (6,0)-(6,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- ├── @ CallNode (location: (8,0)-(8,25))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (8,0)-(8,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (8,4)-(8,25))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (8,6)-(8,23))
- │ │ └── body: (length: 1)
- │ │ └── @ UnlessNode (location: (8,6)-(8,23))
- │ │ ├── keyword_loc: (8,12)-(8,18) = "unless"
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (8,19)-(8,23))
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (8,6)-(8,11))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ BreakNode (location: (8,6)-(8,11))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (8,6)-(8,11) = "break"
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── opening_loc: (8,4)-(8,5) = "{"
- │ └── closing_loc: (8,24)-(8,25) = "}"
- ├── @ CallNode (location: (10,0)-(10,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (10,0)-(10,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (10,4)-(10,24))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (10,6)-(10,22))
- │ │ └── body: (length: 1)
- │ │ └── @ UnlessNode (location: (10,6)-(10,22))
- │ │ ├── keyword_loc: (10,11)-(10,17) = "unless"
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (10,18)-(10,22))
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (10,6)-(10,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ NextNode (location: (10,6)-(10,10))
- │ │ │ ├── arguments: ∅
- │ │ │ └── keyword_loc: (10,6)-(10,10) = "next"
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── opening_loc: (10,4)-(10,5) = "{"
- │ └── closing_loc: (10,23)-(10,24) = "}"
- ├── @ UnlessNode (location: (12,0)-(12,18))
- │ ├── keyword_loc: (12,7)-(12,13) = "unless"
- │ ├── predicate:
- │ │ @ TrueNode (location: (12,14)-(12,18))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (12,0)-(12,6))
- │ │ └── body: (length: 1)
- │ │ └── @ ReturnNode (location: (12,0)-(12,6))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (12,0)-(12,6) = "return"
- │ │ └── arguments: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: ∅
- └── @ UnlessNode (location: (14,0)-(14,22))
- ├── keyword_loc: (14,11)-(14,17) = "unless"
- ├── predicate:
- │ @ CallNode (location: (14,18)-(14,22))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar?
- │ ├── message_loc: (14,18)-(14,22) = "bar?"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── then_keyword_loc: ∅
- ├── statements:
- │ @ StatementsNode (location: (14,0)-(14,10))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (14,0)-(14,10))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (14,0)-(14,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (14,4)-(14,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (14,4)-(14,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (14,4)-(14,5) = ":"
- │ │ │ ├── value_loc: (14,5)-(14,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (14,8)-(14,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (14,8)-(14,9) = ":"
- │ │ ├── value_loc: (14,9)-(14,10) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── consequent: ∅
- └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/alias.txt b/test/prism/snapshots/unparser/corpus/literal/alias.txt
deleted file mode 100644
index 18ddc86d4f..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/alias.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,15))
- └── body: (length: 2)
- ├── @ AliasGlobalVariableNode (location: (1,0)-(1,15))
- │ ├── new_name:
- │ │ @ GlobalVariableReadNode (location: (1,6)-(1,10))
- │ │ └── name: :$foo
- │ ├── old_name:
- │ │ @ GlobalVariableReadNode (location: (1,11)-(1,15))
- │ │ └── name: :$bar
- │ └── keyword_loc: (1,0)-(1,5) = "alias"
- └── @ AliasMethodNode (location: (2,0)-(2,15))
- ├── new_name:
- │ @ SymbolNode (location: (2,6)-(2,10))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (2,6)-(2,7) = ":"
- │ ├── value_loc: (2,7)-(2,10) = "foo"
- │ ├── closing_loc: ∅
- │ └── unescaped: "foo"
- ├── old_name:
- │ @ SymbolNode (location: (2,11)-(2,15))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (2,11)-(2,12) = ":"
- │ ├── value_loc: (2,12)-(2,15) = "bar"
- │ ├── closing_loc: ∅
- │ └── unescaped: "bar"
- └── keyword_loc: (2,0)-(2,5) = "alias"
diff --git a/test/prism/snapshots/unparser/corpus/literal/assignment.txt b/test/prism/snapshots/unparser/corpus/literal/assignment.txt
deleted file mode 100644
index 7d3cc389c6..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/assignment.txt
+++ /dev/null
@@ -1,1076 +0,0 @@
-@ ProgramNode (location: (1,0)-(51,17))
-├── locals: [:a, :b, :foo, :c, :x]
-└── statements:
- @ StatementsNode (location: (1,0)-(51,17))
- └── body: (length: 43)
- ├── @ GlobalVariableWriteNode (location: (1,0)-(1,6))
- │ ├── name: :$a
- │ ├── name_loc: (1,0)-(1,2) = "$a"
- │ ├── value:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (1,3)-(1,4) = "="
- ├── @ MultiWriteNode (location: (2,0)-(2,17))
- │ ├── lefts: (length: 2)
- │ │ ├── @ GlobalVariableTargetNode (location: (2,1)-(2,3))
- │ │ │ └── name: :$a
- │ │ └── @ GlobalVariableTargetNode (location: (2,5)-(2,7))
- │ │ └── name: :$b
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (2,0)-(2,1) = "("
- │ ├── rparen_loc: (2,7)-(2,8) = ")"
- │ ├── operator_loc: (2,9)-(2,10) = "="
- │ └── value:
- │ @ ArrayNode (location: (2,11)-(2,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (2,12)-(2,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (2,15)-(2,16))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (2,11)-(2,12) = "["
- │ └── closing_loc: (2,16)-(2,17) = "]"
- ├── @ MultiWriteNode (location: (3,0)-(3,13))
- │ ├── lefts: (length: 2)
- │ │ ├── @ MultiTargetNode (location: (3,1)-(3,5))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ LocalVariableTargetNode (location: (3,2)-(3,3))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── rest:
- │ │ │ │ @ ImplicitRestNode (location: (3,3)-(3,4))
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (3,1)-(3,2) = "("
- │ │ │ └── rparen_loc: (3,4)-(3,5) = ")"
- │ │ └── @ LocalVariableTargetNode (location: (3,7)-(3,8))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (3,0)-(3,1) = "("
- │ ├── rparen_loc: (3,8)-(3,9) = ")"
- │ ├── operator_loc: (3,10)-(3,11) = "="
- │ └── value:
- │ @ IntegerNode (location: (3,12)-(3,13))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ MultiWriteNode (location: (4,0)-(4,9))
- │ ├── lefts: (length: 0)
- │ ├── rest:
- │ │ @ SplatNode (location: (4,1)-(4,3))
- │ │ ├── operator_loc: (4,1)-(4,2) = "*"
- │ │ └── expression:
- │ │ @ LocalVariableTargetNode (location: (4,2)-(4,3))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (4,0)-(4,1) = "("
- │ ├── rparen_loc: (4,3)-(4,4) = ")"
- │ ├── operator_loc: (4,5)-(4,6) = "="
- │ └── value:
- │ @ ArrayNode (location: (4,7)-(4,9))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (4,7)-(4,8) = "["
- │ └── closing_loc: (4,8)-(4,9) = "]"
- ├── @ MultiWriteNode (location: (5,0)-(5,15))
- │ ├── lefts: (length: 0)
- │ ├── rest:
- │ │ @ SplatNode (location: (5,1)-(5,5))
- │ │ ├── operator_loc: (5,1)-(5,2) = "*"
- │ │ └── expression:
- │ │ @ LocalVariableTargetNode (location: (5,2)-(5,5))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (5,0)-(5,1) = "("
- │ ├── rparen_loc: (5,5)-(5,6) = ")"
- │ ├── operator_loc: (5,7)-(5,8) = "="
- │ └── value:
- │ @ ArrayNode (location: (5,9)-(5,15))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (5,10)-(5,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (5,13)-(5,14))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (5,9)-(5,10) = "["
- │ └── closing_loc: (5,14)-(5,15) = "]"
- ├── @ MultiWriteNode (location: (6,0)-(6,19))
- │ ├── lefts: (length: 2)
- │ │ ├── @ ClassVariableTargetNode (location: (6,1)-(6,4))
- │ │ │ └── name: :@@a
- │ │ └── @ ClassVariableTargetNode (location: (6,6)-(6,9))
- │ │ └── name: :@@b
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (6,0)-(6,1) = "("
- │ ├── rparen_loc: (6,9)-(6,10) = ")"
- │ ├── operator_loc: (6,11)-(6,12) = "="
- │ └── value:
- │ @ ArrayNode (location: (6,13)-(6,19))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (6,14)-(6,15))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (6,17)-(6,18))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (6,13)-(6,14) = "["
- │ └── closing_loc: (6,18)-(6,19) = "]"
- ├── @ MultiWriteNode (location: (7,0)-(7,17))
- │ ├── lefts: (length: 2)
- │ │ ├── @ InstanceVariableTargetNode (location: (7,1)-(7,3))
- │ │ │ └── name: :@a
- │ │ └── @ InstanceVariableTargetNode (location: (7,5)-(7,7))
- │ │ └── name: :@b
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (7,0)-(7,1) = "("
- │ ├── rparen_loc: (7,7)-(7,8) = ")"
- │ ├── operator_loc: (7,9)-(7,10) = "="
- │ └── value:
- │ @ ArrayNode (location: (7,11)-(7,17))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (7,12)-(7,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (7,15)-(7,16))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (7,11)-(7,12) = "["
- │ └── closing_loc: (7,16)-(7,17) = "]"
- ├── @ MultiWriteNode (location: (8,0)-(8,25))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (8,1)-(8,2))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ MultiTargetNode (location: (8,4)-(8,10))
- │ │ ├── lefts: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (8,5)-(8,6))
- │ │ │ │ ├── name: :b
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (8,8)-(8,9))
- │ │ │ ├── name: :c
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── rights: (length: 0)
- │ │ ├── lparen_loc: (8,4)-(8,5) = "("
- │ │ └── rparen_loc: (8,9)-(8,10) = ")"
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (8,0)-(8,1) = "("
- │ ├── rparen_loc: (8,10)-(8,11) = ")"
- │ ├── operator_loc: (8,12)-(8,13) = "="
- │ └── value:
- │ @ ArrayNode (location: (8,14)-(8,25))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (8,15)-(8,16))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ ArrayNode (location: (8,18)-(8,24))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (8,19)-(8,20))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (8,22)-(8,23))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── opening_loc: (8,18)-(8,19) = "["
- │ │ └── closing_loc: (8,23)-(8,24) = "]"
- │ ├── opening_loc: (8,14)-(8,15) = "["
- │ └── closing_loc: (8,24)-(8,25) = "]"
- ├── @ MultiWriteNode (location: (9,0)-(9,15))
- │ ├── lefts: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (9,1)-(9,2))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── rest:
- │ │ @ SplatNode (location: (9,4)-(9,5))
- │ │ ├── operator_loc: (9,4)-(9,5) = "*"
- │ │ └── expression: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (9,0)-(9,1) = "("
- │ ├── rparen_loc: (9,5)-(9,6) = ")"
- │ ├── operator_loc: (9,7)-(9,8) = "="
- │ └── value:
- │ @ ArrayNode (location: (9,9)-(9,15))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (9,10)-(9,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (9,13)-(9,14))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (9,9)-(9,10) = "["
- │ └── closing_loc: (9,14)-(9,15) = "]"
- ├── @ MultiWriteNode (location: (10,0)-(10,18))
- │ ├── lefts: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (10,1)-(10,2))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── rest:
- │ │ @ SplatNode (location: (10,4)-(10,8))
- │ │ ├── operator_loc: (10,4)-(10,5) = "*"
- │ │ └── expression:
- │ │ @ LocalVariableTargetNode (location: (10,5)-(10,8))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (10,0)-(10,1) = "("
- │ ├── rparen_loc: (10,8)-(10,9) = ")"
- │ ├── operator_loc: (10,10)-(10,11) = "="
- │ └── value:
- │ @ ArrayNode (location: (10,12)-(10,18))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (10,13)-(10,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (10,16)-(10,17))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (10,12)-(10,13) = "["
- │ └── closing_loc: (10,17)-(10,18) = "]"
- ├── @ MultiWriteNode (location: (11,0)-(11,15))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (11,1)-(11,2))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableTargetNode (location: (11,4)-(11,5))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (11,0)-(11,1) = "("
- │ ├── rparen_loc: (11,5)-(11,6) = ")"
- │ ├── operator_loc: (11,7)-(11,8) = "="
- │ └── value:
- │ @ ArrayNode (location: (11,9)-(11,15))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (11,10)-(11,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (11,13)-(11,14))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (11,9)-(11,10) = "["
- │ └── closing_loc: (11,14)-(11,15) = "]"
- ├── @ MultiWriteNode (location: (12,0)-(12,12))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (12,1)-(12,2))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableTargetNode (location: (12,4)-(12,5))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (12,0)-(12,1) = "("
- │ ├── rparen_loc: (12,5)-(12,6) = ")"
- │ ├── operator_loc: (12,7)-(12,8) = "="
- │ └── value:
- │ @ LocalVariableReadNode (location: (12,9)-(12,12))
- │ ├── name: :foo
- │ └── depth: 0
- ├── @ MultiWriteNode (location: (13,0)-(13,10))
- │ ├── lefts: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (13,1)-(13,2))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── rest:
- │ │ @ ImplicitRestNode (location: (13,2)-(13,3))
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (13,0)-(13,1) = "("
- │ ├── rparen_loc: (13,3)-(13,4) = ")"
- │ ├── operator_loc: (13,5)-(13,6) = "="
- │ └── value:
- │ @ LocalVariableReadNode (location: (13,7)-(13,10))
- │ ├── name: :foo
- │ └── depth: 0
- ├── @ MultiWriteNode (location: (14,0)-(14,23))
- │ ├── lefts: (length: 2)
- │ │ ├── @ CallTargetNode (location: (14,1)-(14,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ LocalVariableReadNode (location: (14,1)-(14,2))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── call_operator_loc: (14,2)-(14,3) = "."
- │ │ │ ├── name: :foo=
- │ │ │ └── message_loc: (14,3)-(14,6) = "foo"
- │ │ └── @ CallTargetNode (location: (14,8)-(14,13))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ LocalVariableReadNode (location: (14,8)-(14,9))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── call_operator_loc: (14,9)-(14,10) = "."
- │ │ ├── name: :bar=
- │ │ └── message_loc: (14,10)-(14,13) = "bar"
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (14,0)-(14,1) = "("
- │ ├── rparen_loc: (14,13)-(14,14) = ")"
- │ ├── operator_loc: (14,15)-(14,16) = "="
- │ └── value:
- │ @ ArrayNode (location: (14,17)-(14,23))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (14,18)-(14,19))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (14,21)-(14,22))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (14,17)-(14,18) = "["
- │ └── closing_loc: (14,22)-(14,23) = "]"
- ├── @ MultiWriteNode (location: (15,0)-(15,24))
- │ ├── lefts: (length: 2)
- │ │ ├── @ IndexTargetNode (location: (15,1)-(15,8))
- │ │ │ ├── flags: attribute_write
- │ │ │ ├── receiver:
- │ │ │ │ @ LocalVariableReadNode (location: (15,1)-(15,2))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── opening_loc: (15,2)-(15,3) = "["
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (15,3)-(15,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ SplatNode (location: (15,3)-(15,7))
- │ │ │ │ ├── operator_loc: (15,3)-(15,4) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ LocalVariableReadNode (location: (15,4)-(15,7))
- │ │ │ │ ├── name: :foo
- │ │ │ │ └── depth: 0
- │ │ │ ├── closing_loc: (15,7)-(15,8) = "]"
- │ │ │ └── block: ∅
- │ │ └── @ IndexTargetNode (location: (15,10)-(15,14))
- │ │ ├── flags: attribute_write
- │ │ ├── receiver:
- │ │ │ @ LocalVariableReadNode (location: (15,10)-(15,11))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (15,11)-(15,12) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (15,12)-(15,13))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (15,12)-(15,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: (15,13)-(15,14) = "]"
- │ │ └── block: ∅
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (15,0)-(15,1) = "("
- │ ├── rparen_loc: (15,14)-(15,15) = ")"
- │ ├── operator_loc: (15,16)-(15,17) = "="
- │ └── value:
- │ @ ArrayNode (location: (15,18)-(15,24))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (15,19)-(15,20))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (15,22)-(15,23))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (15,18)-(15,19) = "["
- │ └── closing_loc: (15,23)-(15,24) = "]"
- ├── @ MultiWriteNode (location: (16,0)-(16,21))
- │ ├── lefts: (length: 2)
- │ │ ├── @ IndexTargetNode (location: (16,1)-(16,5))
- │ │ │ ├── flags: attribute_write
- │ │ │ ├── receiver:
- │ │ │ │ @ LocalVariableReadNode (location: (16,1)-(16,2))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── opening_loc: (16,2)-(16,3) = "["
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (16,3)-(16,4))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (16,3)-(16,4))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 0
- │ │ │ ├── closing_loc: (16,4)-(16,5) = "]"
- │ │ │ └── block: ∅
- │ │ └── @ IndexTargetNode (location: (16,7)-(16,11))
- │ │ ├── flags: attribute_write
- │ │ ├── receiver:
- │ │ │ @ LocalVariableReadNode (location: (16,7)-(16,8))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (16,8)-(16,9) = "["
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (16,9)-(16,10))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (16,9)-(16,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: (16,10)-(16,11) = "]"
- │ │ └── block: ∅
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (16,0)-(16,1) = "("
- │ ├── rparen_loc: (16,11)-(16,12) = ")"
- │ ├── operator_loc: (16,13)-(16,14) = "="
- │ └── value:
- │ @ ArrayNode (location: (16,15)-(16,21))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (16,16)-(16,17))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (16,19)-(16,20))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (16,15)-(16,16) = "["
- │ └── closing_loc: (16,20)-(16,21) = "]"
- ├── @ MultiWriteNode (location: (17,0)-(17,12))
- │ ├── lefts: (length: 0)
- │ ├── rest:
- │ │ @ SplatNode (location: (17,1)-(17,7))
- │ │ ├── operator_loc: (17,1)-(17,2) = "*"
- │ │ └── expression:
- │ │ @ CallTargetNode (location: (17,2)-(17,7))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ LocalVariableReadNode (location: (17,2)-(17,3))
- │ │ │ ├── name: :c
- │ │ │ └── depth: 0
- │ │ ├── call_operator_loc: (17,3)-(17,4) = "."
- │ │ ├── name: :foo=
- │ │ └── message_loc: (17,4)-(17,7) = "foo"
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (17,0)-(17,1) = "("
- │ ├── rparen_loc: (17,7)-(17,8) = ")"
- │ ├── operator_loc: (17,9)-(17,10) = "="
- │ └── value:
- │ @ IntegerNode (location: (17,11)-(17,12))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ConstantPathWriteNode (location: (18,0)-(18,13))
- │ ├── target:
- │ │ @ ConstantPathNode (location: (18,0)-(18,5))
- │ │ ├── parent: ∅
- │ │ ├── name: :Foo
- │ │ ├── delimiter_loc: (18,0)-(18,2) = "::"
- │ │ └── name_loc: (18,2)-(18,5) = "Foo"
- │ ├── operator_loc: (18,6)-(18,7) = "="
- │ └── value:
- │ @ ConstantPathNode (location: (18,8)-(18,13))
- │ ├── parent: ∅
- │ ├── name: :Bar
- │ ├── delimiter_loc: (18,8)-(18,10) = "::"
- │ └── name_loc: (18,10)-(18,13) = "Bar"
- ├── @ ClassVariableWriteNode (location: (19,0)-(19,7))
- │ ├── name: :@@a
- │ ├── name_loc: (19,0)-(19,3) = "@@a"
- │ ├── value:
- │ │ @ IntegerNode (location: (19,6)-(19,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (19,4)-(19,5) = "="
- ├── @ InstanceVariableWriteNode (location: (20,0)-(20,6))
- │ ├── name: :@a
- │ ├── name_loc: (20,0)-(20,2) = "@a"
- │ ├── value:
- │ │ @ IntegerNode (location: (20,5)-(20,6))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (20,3)-(20,4) = "="
- ├── @ ConstantWriteNode (location: (21,0)-(21,9))
- │ ├── name: :CONST
- │ ├── name_loc: (21,0)-(21,5) = "CONST"
- │ ├── value:
- │ │ @ IntegerNode (location: (21,8)-(21,9))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (21,6)-(21,7) = "="
- ├── @ ConstantPathWriteNode (location: (22,0)-(22,23))
- │ ├── target:
- │ │ @ ConstantPathNode (location: (22,0)-(22,19))
- │ │ ├── parent:
- │ │ │ @ ConstantPathNode (location: (22,0)-(22,12))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (22,0)-(22,4))
- │ │ │ │ └── name: :Name
- │ │ │ ├── name: :Spaced
- │ │ │ ├── delimiter_loc: (22,4)-(22,6) = "::"
- │ │ │ └── name_loc: (22,6)-(22,12) = "Spaced"
- │ │ ├── name: :CONST
- │ │ ├── delimiter_loc: (22,12)-(22,14) = "::"
- │ │ └── name_loc: (22,14)-(22,19) = "CONST"
- │ ├── operator_loc: (22,20)-(22,21) = "="
- │ └── value:
- │ @ IntegerNode (location: (22,22)-(22,23))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ LocalVariableWriteNode (location: (23,0)-(23,16))
- │ ├── name: :a
- │ ├── depth: 0
- │ ├── name_loc: (23,0)-(23,1) = "a"
- │ ├── value:
- │ │ @ ParenthesesNode (location: (23,4)-(23,16))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (23,5)-(23,15))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ MultiWriteNode (location: (23,5)-(23,15))
- │ │ │ ├── lefts: (length: 2)
- │ │ │ │ ├── @ LocalVariableTargetNode (location: (23,6)-(23,7))
- │ │ │ │ │ ├── name: :b
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── @ LocalVariableTargetNode (location: (23,9)-(23,10))
- │ │ │ │ ├── name: :c
- │ │ │ │ └── depth: 0
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (23,5)-(23,6) = "("
- │ │ │ ├── rparen_loc: (23,10)-(23,11) = ")"
- │ │ │ ├── operator_loc: (23,12)-(23,13) = "="
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (23,14)-(23,15))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── opening_loc: (23,4)-(23,5) = "("
- │ │ └── closing_loc: (23,15)-(23,16) = ")"
- │ └── operator_loc: (23,2)-(23,3) = "="
- ├── @ LocalVariableWriteNode (location: (24,0)-(24,5))
- │ ├── name: :a
- │ ├── depth: 0
- │ ├── name_loc: (24,0)-(24,1) = "a"
- │ ├── value:
- │ │ @ IntegerNode (location: (24,4)-(24,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (24,2)-(24,3) = "="
- ├── @ LocalVariableWriteNode (location: (25,0)-(25,11))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (25,0)-(25,3) = "foo"
- │ ├── value:
- │ │ @ CallNode (location: (25,6)-(25,11))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (25,6)-(25,9) = "foo"
- │ │ ├── opening_loc: (25,9)-(25,10) = "("
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: (25,10)-(25,11) = ")"
- │ │ └── block: ∅
- │ └── operator_loc: (25,4)-(25,5) = "="
- ├── @ CallNode (location: (26,0)-(26,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (26,0)-(26,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: (26,3)-(26,4) = "."
- │ ├── name: :[]=
- │ ├── message_loc: (26,4)-(26,7) = "[]="
- │ ├── opening_loc: (26,7)-(26,8) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (26,8)-(26,9) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (27,0)-(27,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (27,0)-(27,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: (27,3)-(27,4) = "."
- │ ├── name: :[]=
- │ ├── message_loc: (27,4)-(27,7) = "[]="
- │ ├── opening_loc: (27,7)-(27,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (27,8)-(27,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (27,8)-(27,9))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (27,11)-(27,12))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: (27,12)-(27,13) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (28,0)-(28,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (28,0)-(28,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: (28,3)-(28,4) = "."
- │ ├── name: :[]=
- │ ├── message_loc: (28,4)-(28,7) = "[]="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (28,7)-(28,11))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ TrueNode (location: (28,7)-(28,11))
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (29,0)-(29,19))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (29,0)-(29,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (29,3)-(29,11) = "[*index]"
- │ ├── opening_loc: (29,3)-(29,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (29,4)-(29,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SplatNode (location: (29,4)-(29,10))
- │ │ │ ├── operator_loc: (29,4)-(29,5) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (29,5)-(29,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :index
- │ │ │ ├── message_loc: (29,5)-(29,10) = "index"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (29,14)-(29,19))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :value
- │ │ ├── message_loc: (29,14)-(29,19) = "value"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (29,10)-(29,11) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (30,0)-(30,17))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (30,0)-(30,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (30,3)-(30,9) = "[1..2]"
- │ ├── opening_loc: (30,3)-(30,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (30,4)-(30,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ RangeNode (location: (30,4)-(30,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── left:
- │ │ │ │ @ IntegerNode (location: (30,4)-(30,5))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── right:
- │ │ │ │ @ IntegerNode (location: (30,7)-(30,8))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── operator_loc: (30,5)-(30,7) = ".."
- │ │ └── @ CallNode (location: (30,12)-(30,17))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :value
- │ │ ├── message_loc: (30,12)-(30,17) = "value"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (30,8)-(30,9) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (31,0)-(31,9))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (31,0)-(31,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (31,3)-(31,5) = "[]"
- │ ├── opening_loc: (31,3)-(31,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (31,8)-(31,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (31,8)-(31,9))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: (31,4)-(31,5) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (32,0)-(32,17))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (32,0)-(32,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (32,3)-(32,9) = "[a, b]"
- │ ├── opening_loc: (32,3)-(32,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (32,4)-(32,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ LocalVariableReadNode (location: (32,4)-(32,5))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── @ LocalVariableReadNode (location: (32,7)-(32,8))
- │ │ │ ├── name: :b
- │ │ │ └── depth: 0
- │ │ └── @ CallNode (location: (32,12)-(32,17))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :value
- │ │ ├── message_loc: (32,12)-(32,17) = "value"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (32,8)-(32,9) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (33,0)-(33,18))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (33,0)-(33,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (33,3)-(33,10) = "[index]"
- │ ├── opening_loc: (33,3)-(33,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (33,4)-(33,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (33,4)-(33,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :index
- │ │ │ ├── message_loc: (33,4)-(33,9) = "index"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (33,13)-(33,18))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :value
- │ │ ├── message_loc: (33,13)-(33,18) = "value"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (33,9)-(33,10) = "]"
- │ └── block: ∅
- ├── @ LocalVariableWriteNode (location: (34,0)-(34,7))
- │ ├── name: :x
- │ ├── depth: 0
- │ ├── name_loc: (34,0)-(34,1) = "x"
- │ ├── value:
- │ │ @ StringNode (location: (34,4)-(34,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (34,4)-(34,6) = "%("
- │ │ ├── content_loc: (34,6)-(34,6) = ""
- │ │ ├── closing_loc: (34,6)-(34,7) = ")"
- │ │ └── unescaped: ""
- │ └── operator_loc: (34,2)-(34,3) = "="
- ├── @ CallNode (location: (35,0)-(35,7))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (35,0)-(35,1))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── call_operator_loc: (35,1)-(35,2) = "."
- │ ├── name: :x=
- │ ├── message_loc: (35,2)-(35,3) = "x"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (35,4)-(35,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (35,4)-(35,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (35,4)-(35,6) = "%("
- │ │ ├── content_loc: (35,6)-(35,6) = ""
- │ │ ├── closing_loc: (35,6)-(35,7) = ")"
- │ │ └── unescaped: ""
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (36,0)-(36,12))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (36,0)-(36,1))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (36,1)-(36,6) = "[%()]"
- │ ├── opening_loc: (36,1)-(36,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (36,2)-(36,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ StringNode (location: (36,2)-(36,5))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (36,2)-(36,4) = "%("
- │ │ │ ├── content_loc: (36,4)-(36,4) = ""
- │ │ │ ├── closing_loc: (36,4)-(36,5) = ")"
- │ │ │ └── unescaped: ""
- │ │ └── @ CallNode (location: (36,9)-(36,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (36,9)-(36,12) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (36,5)-(36,6) = "]"
- │ └── block: ∅
- ├── @ IndexOrWriteNode (location: (37,0)-(37,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (37,0)-(37,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (37,1)-(37,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (37,2)-(37,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (37,2)-(37,5))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (37,2)-(37,4) = "%("
- │ │ ├── content_loc: (37,4)-(37,4) = ""
- │ │ ├── closing_loc: (37,4)-(37,5) = ")"
- │ │ └── unescaped: ""
- │ ├── closing_loc: (37,5)-(37,6) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (37,7)-(37,10) = "||="
- │ └── value:
- │ @ CallNode (location: (37,11)-(37,14))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (37,11)-(37,14) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ InstanceVariableOrWriteNode (location: (38,0)-(38,10))
- │ ├── name: :@a
- │ ├── name_loc: (38,0)-(38,2) = "@a"
- │ ├── operator_loc: (38,3)-(38,6) = "||="
- │ └── value:
- │ @ StringNode (location: (38,7)-(38,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (38,7)-(38,9) = "%("
- │ ├── content_loc: (38,9)-(38,9) = ""
- │ ├── closing_loc: (38,9)-(38,10) = ")"
- │ └── unescaped: ""
- ├── @ LocalVariableWriteNode (location: (39,0)-(39,14))
- │ ├── name: :x
- │ ├── depth: 0
- │ ├── name_loc: (39,0)-(39,1) = "x"
- │ ├── value:
- │ │ @ InterpolatedStringNode (location: (39,4)-(39,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (39,4)-(39,14) = "<<-HEREDOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (40,0)-(40,2))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (40,0)-(40,2) = " "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (40,2)-(40,5))
- │ │ │ │ ├── opening_loc: (40,2)-(40,4) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (40,4)-(40,5) = "}"
- │ │ │ └── @ StringNode (location: (40,5)-(41,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (40,5)-(41,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (41,0)-(42,0) = "HEREDOC\n"
- │ └── operator_loc: (39,2)-(39,3) = "="
- ├── @ CallNode (location: (42,0)-(42,14))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (42,0)-(42,1))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── call_operator_loc: (42,1)-(42,2) = "."
- │ ├── name: :x=
- │ ├── message_loc: (42,2)-(42,3) = "x"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (42,4)-(42,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (42,4)-(42,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (42,4)-(42,14) = "<<-HEREDOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (43,0)-(43,2))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (43,0)-(43,2) = " "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (43,2)-(43,5))
- │ │ │ │ ├── opening_loc: (43,2)-(43,4) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (43,4)-(43,5) = "}"
- │ │ │ └── @ StringNode (location: (43,5)-(44,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (43,5)-(44,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (44,0)-(45,0) = "HEREDOC\n"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,16))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (45,0)-(45,1))
- │ │ ├── name: :x
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (45,1)-(45,3) = "[]"
- │ ├── opening_loc: (45,1)-(45,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (45,6)-(45,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (45,6)-(45,16))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (45,6)-(45,16) = "<<-HEREDOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (46,0)-(46,2))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (46,0)-(46,2) = " "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (46,2)-(46,5))
- │ │ │ │ ├── opening_loc: (46,2)-(46,4) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (46,4)-(46,5) = "}"
- │ │ │ └── @ StringNode (location: (46,5)-(47,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (46,5)-(47,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (47,0)-(48,0) = "HEREDOC\n"
- │ ├── closing_loc: (45,2)-(45,3) = "]"
- │ └── block: ∅
- ├── @ IndexOrWriteNode (location: (48,0)-(48,21))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (48,0)-(48,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (48,1)-(48,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (48,2)-(48,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (48,2)-(48,12))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (48,2)-(48,12) = "<<-HEREDOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (49,0)-(49,2))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (49,0)-(49,2) = " "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (49,2)-(49,5))
- │ │ │ │ ├── opening_loc: (49,2)-(49,4) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (49,4)-(49,5) = "}"
- │ │ │ └── @ StringNode (location: (49,5)-(50,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (49,5)-(50,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (50,0)-(51,0) = "HEREDOC\n"
- │ ├── closing_loc: (48,12)-(48,13) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (48,14)-(48,17) = "||="
- │ └── value:
- │ @ CallNode (location: (48,18)-(48,21))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (48,18)-(48,21) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ InstanceVariableOrWriteNode (location: (51,0)-(51,17))
- ├── name: :@a
- ├── name_loc: (51,0)-(51,2) = "@a"
- ├── operator_loc: (51,3)-(51,6) = "||="
- └── value:
- @ InterpolatedStringNode (location: (51,7)-(51,17))
- ├── flags: ∅
- ├── opening_loc: (51,7)-(51,17) = "<<-HEREDOC"
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (52,0)-(52,2))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (52,0)-(52,2) = " "
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " "
- │ ├── @ EmbeddedStatementsNode (location: (52,2)-(52,5))
- │ │ ├── opening_loc: (52,2)-(52,4) = "\#{"
- │ │ ├── statements: ∅
- │ │ └── closing_loc: (52,4)-(52,5) = "}"
- │ └── @ StringNode (location: (52,5)-(53,0))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (52,5)-(53,0) = "\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\n"
- └── closing_loc: (53,0)-(54,0) = "HEREDOC\n"
diff --git a/test/prism/snapshots/unparser/corpus/literal/block.txt b/test/prism/snapshots/unparser/corpus/literal/block.txt
deleted file mode 100644
index b4c86d0b04..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/block.txt
+++ /dev/null
@@ -1,1402 +0,0 @@
-@ ProgramNode (location: (1,0)-(96,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(96,1))
- └── body: (length: 30)
- ├── @ CallNode (location: (1,0)-(2,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,4)-(2,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,4)-(1,5) = "{"
- │ └── closing_loc: (2,0)-(2,1) = "}"
- ├── @ CallNode (location: (3,0)-(4,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (3,0)-(3,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (3,4)-(4,1))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (3,6)-(3,9))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (3,7)-(3,8))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (3,7)-(3,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (3,6)-(3,7) = "|"
- │ │ └── closing_loc: (3,8)-(3,9) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (3,4)-(3,5) = "{"
- │ └── closing_loc: (4,0)-(4,1) = "}"
- ├── @ CallNode (location: (5,0)-(6,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (5,0)-(5,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (5,4)-(6,1))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (5,6)-(5,10))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (5,7)-(5,9))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (5,7)-(5,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ ImplicitRestNode (location: (5,8)-(5,9))
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (5,6)-(5,7) = "|"
- │ │ └── closing_loc: (5,9)-(5,10) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (5,4)-(5,5) = "{"
- │ └── closing_loc: (6,0)-(6,1) = "}"
- ├── @ CallNode (location: (7,0)-(8,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (7,0)-(7,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (7,4)-(8,1))
- │ ├── locals: [:a, :x]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (7,6)-(7,13))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (7,7)-(7,9))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (7,7)-(7,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ ImplicitRestNode (location: (7,8)-(7,9))
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 1)
- │ │ │ └── @ BlockLocalVariableNode (location: (7,11)-(7,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :x
- │ │ ├── opening_loc: (7,6)-(7,7) = "|"
- │ │ └── closing_loc: (7,12)-(7,13) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (7,4)-(7,5) = "{"
- │ └── closing_loc: (8,0)-(8,1) = "}"
- ├── @ CallNode (location: (9,0)-(10,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (9,0)-(9,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (9,4)-(10,1))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (9,6)-(9,12))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (9,7)-(9,11))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (9,7)-(9,8))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (9,10)-(9,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (9,6)-(9,7) = "|"
- │ │ └── closing_loc: (9,11)-(9,12) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (9,4)-(9,5) = "{"
- │ └── closing_loc: (10,0)-(10,1) = "}"
- ├── @ CallNode (location: (11,0)-(13,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (11,0)-(11,3) = "foo"
- │ ├── opening_loc: (11,3)-(11,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,4)-(11,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (11,4)-(11,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: (11,5)-(11,6) = ")"
- │ └── block:
- │ @ BlockNode (location: (11,7)-(13,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (12,2)-(12,5))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (12,2)-(12,5))
- │ ├── opening_loc: (11,7)-(11,8) = "{"
- │ └── closing_loc: (13,0)-(13,1) = "}"
- ├── @ CallNode (location: (14,0)-(16,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (14,0)-(14,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (14,4)-(16,1))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (14,6)-(14,13))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (14,7)-(14,12))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (14,7)-(14,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ RestParameterNode (location: (14,10)-(14,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── name_loc: (14,11)-(14,12) = "b"
- │ │ │ │ └── operator_loc: (14,10)-(14,11) = "*"
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (14,6)-(14,7) = "|"
- │ │ └── closing_loc: (14,12)-(14,13) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (15,2)-(15,5))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (15,2)-(15,5))
- │ ├── opening_loc: (14,4)-(14,5) = "{"
- │ └── closing_loc: (16,0)-(16,1) = "}"
- ├── @ CallNode (location: (17,0)-(19,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (17,0)-(17,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (17,4)-(19,1))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (17,6)-(17,12))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (17,7)-(17,11))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (17,7)-(17,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ RestParameterNode (location: (17,10)-(17,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: ∅
- │ │ │ │ ├── name_loc: ∅
- │ │ │ │ └── operator_loc: (17,10)-(17,11) = "*"
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (17,6)-(17,7) = "|"
- │ │ └── closing_loc: (17,11)-(17,12) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (18,2)-(18,5))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (18,2)-(18,5))
- │ ├── opening_loc: (17,4)-(17,5) = "{"
- │ └── closing_loc: (19,0)-(19,1) = "}"
- ├── @ CallNode (location: (20,0)-(22,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (20,0)-(20,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (20,4)-(22,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (21,2)-(21,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (21,2)-(21,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (21,2)-(21,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (20,4)-(20,5) = "{"
- │ └── closing_loc: (22,0)-(22,1) = "}"
- ├── @ CallNode (location: (23,0)-(25,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (23,0)-(23,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (23,0)-(23,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (23,3)-(23,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (23,4)-(23,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (23,8)-(25,1))
- │ ├── locals: [:a, :b, :c]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (23,10)-(23,21))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (23,11)-(23,20))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ MultiTargetNode (location: (23,11)-(23,17))
- │ │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (23,12)-(23,13))
- │ │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ │ └── name: :a
- │ │ │ │ │ │ └── @ RequiredParameterNode (location: (23,15)-(23,16))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :b
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ │ ├── lparen_loc: (23,11)-(23,12) = "("
- │ │ │ │ │ └── rparen_loc: (23,16)-(23,17) = ")"
- │ │ │ │ └── @ RequiredParameterNode (location: (23,19)-(23,20))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :c
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (23,10)-(23,11) = "|"
- │ │ └── closing_loc: (23,20)-(23,21) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (24,2)-(24,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (24,2)-(24,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (24,2)-(24,3) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (23,8)-(23,9) = "{"
- │ └── closing_loc: (25,0)-(25,1) = "}"
- ├── @ CallNode (location: (26,0)-(27,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (26,0)-(26,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (26,0)-(26,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (26,3)-(26,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (26,4)-(26,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (26,8)-(27,1))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (26,10)-(26,17))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (26,11)-(26,13))
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ RestParameterNode (location: (26,11)-(26,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── name_loc: (26,12)-(26,13) = "a"
- │ │ │ │ └── operator_loc: (26,11)-(26,12) = "*"
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 1)
- │ │ │ └── @ BlockLocalVariableNode (location: (26,15)-(26,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── opening_loc: (26,10)-(26,11) = "|"
- │ │ └── closing_loc: (26,16)-(26,17) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (26,8)-(26,9) = "{"
- │ └── closing_loc: (27,0)-(27,1) = "}"
- ├── @ CallNode (location: (28,0)-(29,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (28,0)-(28,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (28,0)-(28,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (28,3)-(28,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (28,4)-(28,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (28,8)-(29,1))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (28,10)-(28,16))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (28,11)-(28,12))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (28,11)-(28,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 1)
- │ │ │ └── @ BlockLocalVariableNode (location: (28,14)-(28,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── opening_loc: (28,10)-(28,11) = "|"
- │ │ └── closing_loc: (28,15)-(28,16) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (28,8)-(28,9) = "{"
- │ └── closing_loc: (29,0)-(29,1) = "}"
- ├── @ CallNode (location: (30,0)-(31,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (30,0)-(30,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (30,0)-(30,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (30,3)-(30,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (30,4)-(30,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (30,8)-(31,1))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (30,10)-(30,18))
- │ │ ├── parameters: ∅
- │ │ ├── locals: (length: 2)
- │ │ │ ├── @ BlockLocalVariableNode (location: (30,13)-(30,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ BlockLocalVariableNode (location: (30,16)-(30,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── opening_loc: (30,10)-(30,11) = "|"
- │ │ └── closing_loc: (30,17)-(30,18) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (30,8)-(30,9) = "{"
- │ └── closing_loc: (31,0)-(31,1) = "}"
- ├── @ CallNode (location: (32,0)-(34,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (32,0)-(32,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (32,0)-(32,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (32,3)-(32,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (32,4)-(32,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (32,8)-(34,1))
- │ ├── locals: []
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (32,10)-(32,13))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (32,11)-(32,12))
- │ │ │ ├── requireds: (length: 0)
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest:
- │ │ │ │ @ RestParameterNode (location: (32,11)-(32,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: ∅
- │ │ │ │ ├── name_loc: ∅
- │ │ │ │ └── operator_loc: (32,11)-(32,12) = "*"
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (32,10)-(32,11) = "|"
- │ │ └── closing_loc: (32,12)-(32,13) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (33,2)-(33,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (33,2)-(33,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (33,2)-(33,3) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (32,8)-(32,9) = "{"
- │ └── closing_loc: (34,0)-(34,1) = "}"
- ├── @ CallNode (location: (35,0)-(37,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (35,0)-(35,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (35,0)-(35,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (35,3)-(35,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (35,4)-(35,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (35,8)-(37,1))
- │ ├── locals: []
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (35,10)-(35,15))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (35,11)-(35,14))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ MultiTargetNode (location: (35,11)-(35,14))
- │ │ │ │ ├── lefts: (length: 0)
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ SplatNode (location: (35,12)-(35,13))
- │ │ │ │ │ ├── operator_loc: (35,12)-(35,13) = "*"
- │ │ │ │ │ └── expression: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (35,11)-(35,12) = "("
- │ │ │ │ └── rparen_loc: (35,13)-(35,14) = ")"
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (35,10)-(35,11) = "|"
- │ │ └── closing_loc: (35,14)-(35,15) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (36,2)-(36,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (36,2)-(36,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (36,2)-(36,3) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (35,8)-(35,9) = "{"
- │ └── closing_loc: (37,0)-(37,1) = "}"
- ├── @ CallNode (location: (38,0)-(40,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (38,0)-(38,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (38,0)-(38,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (38,3)-(38,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (38,4)-(38,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (38,8)-(40,1))
- │ ├── locals: []
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (38,10)-(38,17))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (38,11)-(38,16))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ MultiTargetNode (location: (38,11)-(38,16))
- │ │ │ │ ├── lefts: (length: 1)
- │ │ │ │ │ └── @ MultiTargetNode (location: (38,12)-(38,15))
- │ │ │ │ │ ├── lefts: (length: 0)
- │ │ │ │ │ ├── rest:
- │ │ │ │ │ │ @ SplatNode (location: (38,13)-(38,14))
- │ │ │ │ │ │ ├── operator_loc: (38,13)-(38,14) = "*"
- │ │ │ │ │ │ └── expression: ∅
- │ │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ │ ├── lparen_loc: (38,12)-(38,13) = "("
- │ │ │ │ │ └── rparen_loc: (38,14)-(38,15) = ")"
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (38,11)-(38,12) = "("
- │ │ │ │ └── rparen_loc: (38,15)-(38,16) = ")"
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (38,10)-(38,11) = "|"
- │ │ └── closing_loc: (38,16)-(38,17) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (39,2)-(39,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (39,2)-(39,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (39,2)-(39,3) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (38,8)-(38,9) = "{"
- │ └── closing_loc: (40,0)-(40,1) = "}"
- ├── @ CallNode (location: (41,0)-(43,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (41,0)-(41,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (41,0)-(41,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (41,3)-(41,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (41,4)-(41,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (41,8)-(43,1))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (41,10)-(41,20))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (41,11)-(41,19))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ MultiTargetNode (location: (41,11)-(41,19))
- │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ ├── @ RequiredParameterNode (location: (41,12)-(41,13))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :a
- │ │ │ │ │ └── @ MultiTargetNode (location: (41,15)-(41,18))
- │ │ │ │ │ ├── lefts: (length: 0)
- │ │ │ │ │ ├── rest:
- │ │ │ │ │ │ @ SplatNode (location: (41,16)-(41,17))
- │ │ │ │ │ │ ├── operator_loc: (41,16)-(41,17) = "*"
- │ │ │ │ │ │ └── expression: ∅
- │ │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ │ ├── lparen_loc: (41,15)-(41,16) = "("
- │ │ │ │ │ └── rparen_loc: (41,17)-(41,18) = ")"
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (41,11)-(41,12) = "("
- │ │ │ │ └── rparen_loc: (41,18)-(41,19) = ")"
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (41,10)-(41,11) = "|"
- │ │ └── closing_loc: (41,19)-(41,20) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (42,2)-(42,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (42,2)-(42,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (42,2)-(42,3) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (41,8)-(41,9) = "{"
- │ └── closing_loc: (43,0)-(43,1) = "}"
- ├── @ CallNode (location: (44,0)-(46,1))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (44,0)-(44,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (44,0)-(44,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (44,3)-(44,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (44,4)-(44,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (44,8)-(46,1))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (44,10)-(44,18))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (44,11)-(44,17))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ MultiTargetNode (location: (44,11)-(44,17))
- │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ ├── @ RequiredParameterNode (location: (44,12)-(44,13))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :a
- │ │ │ │ │ └── @ RequiredParameterNode (location: (44,15)-(44,16))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :b
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (44,11)-(44,12) = "("
- │ │ │ │ └── rparen_loc: (44,16)-(44,17) = ")"
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (44,10)-(44,11) = "|"
- │ │ └── closing_loc: (44,17)-(44,18) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (45,2)-(45,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (45,2)-(45,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (45,2)-(45,3) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (44,8)-(44,9) = "{"
- │ └── closing_loc: (46,0)-(46,1) = "}"
- ├── @ CallNode (location: (47,0)-(48,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (47,0)-(48,1))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (47,0)-(47,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (47,0)-(47,3) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (47,3)-(47,4) = "."
- │ │ ├── name: :bar
- │ │ ├── message_loc: (47,4)-(47,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (47,8)-(48,1))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (47,8)-(47,9) = "{"
- │ │ └── closing_loc: (48,0)-(48,1) = "}"
- │ ├── call_operator_loc: (48,1)-(48,2) = "."
- │ ├── name: :baz
- │ ├── message_loc: (48,2)-(48,5) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (49,0)-(51,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (49,0)-(49,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (49,2)-(51,3))
- │ ├── locals: [:e]
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (49,2)-(51,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (50,0)-(50,21))
- │ │ │ ├── keyword_loc: (50,0)-(50,6) = "rescue"
- │ │ │ ├── exceptions: (length: 1)
- │ │ │ │ └── @ ConstantReadNode (location: (50,7)-(50,16))
- │ │ │ │ └── name: :Exception
- │ │ │ ├── operator_loc: (50,17)-(50,19) = "=>"
- │ │ │ ├── reference:
- │ │ │ │ @ LocalVariableTargetNode (location: (50,20)-(50,21))
- │ │ │ │ ├── name: :e
- │ │ │ │ └── depth: 0
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
- │ ├── opening_loc: (49,2)-(49,4) = "do"
- │ └── closing_loc: (51,0)-(51,3) = "end"
- ├── @ CallNode (location: (52,0)-(56,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (52,0)-(52,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (52,2)-(56,3))
- │ ├── locals: [:bar]
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (52,2)-(56,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (53,2)-(53,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (53,2)-(53,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (53,2)-(53,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (54,0)-(55,5))
- │ │ │ ├── keyword_loc: (54,0)-(54,6) = "rescue"
- │ │ │ ├── exceptions: (length: 1)
- │ │ │ │ └── @ ConstantReadNode (location: (54,7)-(54,16))
- │ │ │ │ └── name: :Exception
- │ │ │ ├── operator_loc: (54,17)-(54,19) = "=>"
- │ │ │ ├── reference:
- │ │ │ │ @ LocalVariableTargetNode (location: (54,20)-(54,23))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 0
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (55,2)-(55,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableReadNode (location: (55,2)-(55,5))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 0
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (56,0)-(56,3) = "end"
- │ ├── opening_loc: (52,2)-(52,4) = "do"
- │ └── closing_loc: (56,0)-(56,3) = "end"
- ├── @ CallNode (location: (57,0)-(61,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (57,0)-(57,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (57,2)-(61,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (57,2)-(61,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (58,2)-(58,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (58,2)-(58,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (58,2)-(58,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (59,0)-(60,5))
- │ │ │ ├── keyword_loc: (59,0)-(59,6) = "rescue"
- │ │ │ ├── exceptions: (length: 2)
- │ │ │ │ ├── @ ConstantReadNode (location: (59,7)-(59,16))
- │ │ │ │ │ └── name: :SomeError
- │ │ │ │ └── @ SplatNode (location: (59,18)-(59,22))
- │ │ │ │ ├── operator_loc: (59,18)-(59,19) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ CallNode (location: (59,19)-(59,22))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (59,19)-(59,22) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (60,2)-(60,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (60,2)-(60,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (60,2)-(60,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (61,0)-(61,3) = "end"
- │ ├── opening_loc: (57,2)-(57,4) = "do"
- │ └── closing_loc: (61,0)-(61,3) = "end"
- ├── @ CallNode (location: (62,0)-(66,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (62,0)-(62,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (62,2)-(66,3))
- │ ├── locals: [:exception]
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (62,2)-(66,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (63,2)-(63,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (63,2)-(63,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (63,2)-(63,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (64,0)-(65,5))
- │ │ │ ├── keyword_loc: (64,0)-(64,6) = "rescue"
- │ │ │ ├── exceptions: (length: 2)
- │ │ │ │ ├── @ ConstantReadNode (location: (64,7)-(64,16))
- │ │ │ │ │ └── name: :SomeError
- │ │ │ │ └── @ SplatNode (location: (64,18)-(64,22))
- │ │ │ │ ├── operator_loc: (64,18)-(64,19) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ CallNode (location: (64,19)-(64,22))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (64,19)-(64,22) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── operator_loc: (64,23)-(64,25) = "=>"
- │ │ │ ├── reference:
- │ │ │ │ @ LocalVariableTargetNode (location: (64,26)-(64,35))
- │ │ │ │ ├── name: :exception
- │ │ │ │ └── depth: 0
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (65,2)-(65,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (65,2)-(65,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (65,2)-(65,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (66,0)-(66,3) = "end"
- │ ├── opening_loc: (62,2)-(62,4) = "do"
- │ └── closing_loc: (66,0)-(66,3) = "end"
- ├── @ CallNode (location: (67,0)-(71,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (67,0)-(67,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (67,2)-(71,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (67,2)-(71,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (68,2)-(68,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (68,2)-(68,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (68,2)-(68,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (69,0)-(70,5))
- │ │ │ ├── keyword_loc: (69,0)-(69,6) = "rescue"
- │ │ │ ├── exceptions: (length: 1)
- │ │ │ │ └── @ SplatNode (location: (69,7)-(69,11))
- │ │ │ │ ├── operator_loc: (69,7)-(69,8) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ CallNode (location: (69,8)-(69,11))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (69,8)-(69,11) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (70,2)-(70,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (70,2)-(70,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (70,2)-(70,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (71,0)-(71,3) = "end"
- │ ├── opening_loc: (67,2)-(67,4) = "do"
- │ └── closing_loc: (71,0)-(71,3) = "end"
- ├── @ CallNode (location: (72,0)-(75,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (72,0)-(72,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (72,2)-(75,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (72,2)-(75,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (73,2)-(73,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (73,2)-(73,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (73,2)-(73,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (74,0)-(74,16))
- │ │ │ ├── keyword_loc: (74,0)-(74,6) = "rescue"
- │ │ │ ├── exceptions: (length: 1)
- │ │ │ │ └── @ ConstantReadNode (location: (74,7)-(74,16))
- │ │ │ │ └── name: :LoadError
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (75,0)-(75,3) = "end"
- │ ├── opening_loc: (72,2)-(72,4) = "do"
- │ └── closing_loc: (75,0)-(75,3) = "end"
- ├── @ CallNode (location: (76,0)-(81,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (76,0)-(76,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (76,2)-(81,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (76,2)-(81,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (77,2)-(77,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (77,2)-(77,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (77,2)-(77,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (78,0)-(78,6))
- │ │ │ ├── keyword_loc: (78,0)-(78,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause:
- │ │ │ @ ElseNode (location: (79,0)-(81,3))
- │ │ │ ├── else_keyword_loc: (79,0)-(79,4) = "else"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (80,2)-(80,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (80,2)-(80,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (80,2)-(80,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
- │ ├── opening_loc: (76,2)-(76,4) = "do"
- │ └── closing_loc: (81,0)-(81,3) = "end"
- ├── @ CallNode (location: (82,0)-(86,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (82,0)-(82,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (82,2)-(86,3))
- │ ├── locals: [:exception]
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (82,2)-(86,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (83,2)-(83,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (83,2)-(83,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (83,2)-(83,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (84,0)-(85,5))
- │ │ │ ├── keyword_loc: (84,0)-(84,6) = "rescue"
- │ │ │ ├── exceptions: (length: 1)
- │ │ │ │ └── @ SplatNode (location: (84,7)-(84,11))
- │ │ │ │ ├── operator_loc: (84,7)-(84,8) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ CallNode (location: (84,8)-(84,11))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (84,8)-(84,11) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── operator_loc: (84,12)-(84,14) = "=>"
- │ │ │ ├── reference:
- │ │ │ │ @ LocalVariableTargetNode (location: (84,15)-(84,24))
- │ │ │ │ ├── name: :exception
- │ │ │ │ └── depth: 0
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (85,2)-(85,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (85,2)-(85,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (85,2)-(85,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (86,0)-(86,3) = "end"
- │ ├── opening_loc: (82,2)-(82,4) = "do"
- │ └── closing_loc: (86,0)-(86,3) = "end"
- ├── @ CallNode (location: (87,0)-(89,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (87,0)-(87,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (87,2)-(89,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (87,2)-(89,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (88,0)-(89,3))
- │ │ │ ├── ensure_keyword_loc: (88,0)-(88,6) = "ensure"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (89,0)-(89,3) = "end"
- │ │ └── end_keyword_loc: (89,0)-(89,3) = "end"
- │ ├── opening_loc: (87,2)-(87,4) = "do"
- │ └── closing_loc: (89,0)-(89,3) = "end"
- ├── @ CallNode (location: (90,0)-(93,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :m
- │ ├── message_loc: (90,0)-(90,1) = "m"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (90,2)-(93,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (90,2)-(93,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (91,0)-(91,6))
- │ │ │ ├── keyword_loc: (91,0)-(91,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (92,0)-(93,3))
- │ │ │ ├── ensure_keyword_loc: (92,0)-(92,6) = "ensure"
- │ │ │ ├── statements: ∅
- │ │ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
- │ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
- │ ├── opening_loc: (90,2)-(90,4) = "do"
- │ └── closing_loc: (93,0)-(93,3) = "end"
- └── @ CallNode (location: (94,0)-(96,1))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :bar
- ├── message_loc: (94,0)-(94,3) = "bar"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block:
- @ BlockNode (location: (94,4)-(96,1))
- ├── locals: [:_1, :_2]
- ├── parameters:
- │ @ NumberedParametersNode (location: (94,4)-(96,1))
- │ └── maximum: 2
- ├── body:
- │ @ StatementsNode (location: (95,2)-(95,9))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (95,2)-(95,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (95,2)-(95,4))
- │ │ ├── name: :_1
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (95,5)-(95,6) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (95,7)-(95,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (95,7)-(95,9))
- │ │ ├── name: :_2
- │ │ └── depth: 0
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (94,4)-(94,5) = "{"
- └── closing_loc: (96,0)-(96,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/case.txt b/test/prism/snapshots/unparser/corpus/literal/case.txt
deleted file mode 100644
index 509caa55c8..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/case.txt
+++ /dev/null
@@ -1,446 +0,0 @@
-@ ProgramNode (location: (1,0)-(37,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(37,3))
- └── body: (length: 8)
- ├── @ CaseNode (location: (1,0)-(6,3))
- │ ├── predicate: ∅
- │ ├── conditions: (length: 2)
- │ │ ├── @ WhenNode (location: (2,0)-(3,5))
- │ │ │ ├── keyword_loc: (2,0)-(2,4) = "when"
- │ │ │ ├── conditions: (length: 1)
- │ │ │ │ └── @ CallNode (location: (2,5)-(2,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (2,5)-(2,8) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (3,2)-(3,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,2)-(3,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (3,2)-(3,5) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ WhenNode (location: (4,0)-(5,5))
- │ │ ├── keyword_loc: (4,0)-(4,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ CallNode (location: (4,5)-(4,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (4,5)-(4,8) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (5,2)-(5,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (5,2)-(5,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (5,2)-(5,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
- │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- ├── @ CaseNode (location: (7,0)-(11,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (7,5)-(7,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (7,5)-(7,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 2)
- │ │ ├── @ WhenNode (location: (8,0)-(8,8))
- │ │ │ ├── keyword_loc: (8,0)-(8,4) = "when"
- │ │ │ ├── conditions: (length: 1)
- │ │ │ │ └── @ CallNode (location: (8,5)-(8,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (8,5)-(8,8) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ └── statements: ∅
- │ │ └── @ WhenNode (location: (9,0)-(10,5))
- │ │ ├── keyword_loc: (9,0)-(9,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ CallNode (location: (9,5)-(9,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (9,5)-(9,8) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (10,2)-(10,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (10,2)-(10,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (10,2)-(10,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (7,0)-(7,4) = "case"
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ CaseNode (location: (12,0)-(17,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (12,5)-(12,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (12,5)-(12,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 2)
- │ │ ├── @ WhenNode (location: (13,0)-(14,5))
- │ │ │ ├── keyword_loc: (13,0)-(13,4) = "when"
- │ │ │ ├── conditions: (length: 1)
- │ │ │ │ └── @ CallNode (location: (13,5)-(13,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (13,5)-(13,8) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (14,2)-(14,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (14,2)-(14,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (14,2)-(14,5) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ WhenNode (location: (15,0)-(16,5))
- │ │ ├── keyword_loc: (15,0)-(15,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ CallNode (location: (15,5)-(15,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (15,5)-(15,8) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (16,2)-(16,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (16,2)-(16,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (16,2)-(16,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (12,0)-(12,4) = "case"
- │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- ├── @ CaseNode (location: (18,0)-(21,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (18,5)-(18,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (18,5)-(18,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (19,0)-(20,8))
- │ │ ├── keyword_loc: (19,0)-(19,4) = "when"
- │ │ ├── conditions: (length: 2)
- │ │ │ ├── @ CallNode (location: (19,5)-(19,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (19,5)-(19,8) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── @ CallNode (location: (19,10)-(19,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (19,10)-(19,13) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (20,2)-(20,8))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (20,2)-(20,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (20,2)-(20,3) = ":"
- │ │ ├── value_loc: (20,3)-(20,8) = "other"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "other"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (18,0)-(18,4) = "case"
- │ └── end_keyword_loc: (21,0)-(21,3) = "end"
- ├── @ CaseNode (location: (22,0)-(25,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (22,5)-(22,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (22,5)-(22,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (23,0)-(24,8))
- │ │ ├── keyword_loc: (23,0)-(23,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ SplatNode (location: (23,5)-(23,9))
- │ │ │ ├── operator_loc: (23,5)-(23,6) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (23,6)-(23,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (23,6)-(23,9) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (24,2)-(24,8))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (24,2)-(24,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (24,2)-(24,3) = ":"
- │ │ ├── value_loc: (24,3)-(24,8) = "value"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "value"
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (22,0)-(22,4) = "case"
- │ └── end_keyword_loc: (25,0)-(25,3) = "end"
- ├── @ CaseNode (location: (26,0)-(31,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (26,5)-(26,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (26,5)-(26,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (27,0)-(28,5))
- │ │ ├── keyword_loc: (27,0)-(27,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ CallNode (location: (27,5)-(27,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (27,5)-(27,8) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (28,2)-(28,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (28,2)-(28,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (28,2)-(28,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (29,0)-(31,3))
- │ │ ├── else_keyword_loc: (29,0)-(29,4) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (30,2)-(30,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (30,2)-(30,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (30,2)-(30,3) = ":"
- │ │ │ ├── value_loc: (30,3)-(30,6) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- │ ├── case_keyword_loc: (26,0)-(26,4) = "case"
- │ └── end_keyword_loc: (31,0)-(31,3) = "end"
- ├── @ CaseNode (location: (32,0)-(34,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (32,5)-(32,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (32,5)-(32,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ WhenNode (location: (33,0)-(33,15))
- │ │ ├── keyword_loc: (33,0)-(33,4) = "when"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ SplatNode (location: (33,5)-(33,15))
- │ │ │ ├── operator_loc: (33,5)-(33,6) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (33,6)-(33,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (33,6)-(33,9))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (33,6)-(33,9) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :|
- │ │ │ ├── message_loc: (33,10)-(33,11) = "|"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (33,12)-(33,15))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (33,12)-(33,15))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (33,12)-(33,15) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ └── statements: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (32,0)-(32,4) = "case"
- │ └── end_keyword_loc: (34,0)-(34,3) = "end"
- └── @ CaseNode (location: (35,0)-(37,3))
- ├── predicate:
- │ @ CallNode (location: (35,5)-(35,8))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (35,5)-(35,8) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── conditions: (length: 1)
- │ └── @ WhenNode (location: (36,0)-(36,15))
- │ ├── keyword_loc: (36,0)-(36,4) = "when"
- │ ├── conditions: (length: 1)
- │ │ └── @ SplatNode (location: (36,5)-(36,15))
- │ │ ├── operator_loc: (36,5)-(36,6) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (36,6)-(36,15))
- │ │ ├── flags: attribute_write
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (36,6)-(36,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (36,6)-(36,9) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (36,9)-(36,10) = "."
- │ │ ├── name: :baz=
- │ │ ├── message_loc: (36,10)-(36,13) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (36,14)-(36,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (36,14)-(36,15))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: ∅
- │ └── statements: ∅
- ├── consequent: ∅
- ├── case_keyword_loc: (35,0)-(35,4) = "case"
- └── end_keyword_loc: (37,0)-(37,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/class.txt b/test/prism/snapshots/unparser/corpus/literal/class.txt
deleted file mode 100644
index 5306888398..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/class.txt
+++ /dev/null
@@ -1,226 +0,0 @@
-@ ProgramNode (location: (1,0)-(35,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(35,3))
- └── body: (length: 10)
- ├── @ ClassNode (location: (1,0)-(2,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (1,0)-(1,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (1,6)-(1,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body: ∅
- │ ├── end_keyword_loc: (2,0)-(2,3) = "end"
- │ └── name: :A
- ├── @ SingletonClassNode (location: (4,0)-(5,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (4,0)-(4,5) = "class"
- │ ├── operator_loc: (4,6)-(4,8) = "<<"
- │ ├── expression:
- │ │ @ CallNode (location: (4,9)-(4,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (4,9)-(4,10) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- ├── @ SingletonClassNode (location: (7,0)-(9,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (7,0)-(7,5) = "class"
- │ ├── operator_loc: (7,6)-(7,8) = "<<"
- │ ├── expression:
- │ │ @ CallNode (location: (7,9)-(7,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (7,9)-(7,10) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (8,2)-(8,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (8,2)-(8,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (8,2)-(8,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- ├── @ ClassNode (location: (11,0)-(12,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (11,0)-(11,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (11,6)-(11,10))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (11,6)-(11,7))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (11,7)-(11,9) = "::"
- │ │ └── name_loc: (11,9)-(11,10) = "B"
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body: ∅
- │ ├── end_keyword_loc: (12,0)-(12,3) = "end"
- │ └── name: :B
- ├── @ ClassNode (location: (14,0)-(15,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (14,0)-(14,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (14,6)-(14,13))
- │ │ ├── parent:
- │ │ │ @ ConstantPathNode (location: (14,6)-(14,10))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (14,6)-(14,7))
- │ │ │ │ └── name: :A
- │ │ │ ├── name: :B
- │ │ │ ├── delimiter_loc: (14,7)-(14,9) = "::"
- │ │ │ └── name_loc: (14,9)-(14,10) = "B"
- │ │ ├── name: :C
- │ │ ├── delimiter_loc: (14,10)-(14,12) = "::"
- │ │ └── name_loc: (14,12)-(14,13) = "C"
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body: ∅
- │ ├── end_keyword_loc: (15,0)-(15,3) = "end"
- │ └── name: :C
- ├── @ ClassNode (location: (17,0)-(18,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (17,0)-(17,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (17,6)-(17,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: (17,8)-(17,9) = "<"
- │ ├── superclass:
- │ │ @ ConstantReadNode (location: (17,10)-(17,11))
- │ │ └── name: :B
- │ ├── body: ∅
- │ ├── end_keyword_loc: (18,0)-(18,3) = "end"
- │ └── name: :A
- ├── @ ClassNode (location: (20,0)-(21,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (20,0)-(20,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (20,6)-(20,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: (20,8)-(20,9) = "<"
- │ ├── superclass:
- │ │ @ ConstantPathNode (location: (20,10)-(20,14))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (20,10)-(20,11))
- │ │ │ └── name: :B
- │ │ ├── name: :C
- │ │ ├── delimiter_loc: (20,11)-(20,13) = "::"
- │ │ └── name_loc: (20,13)-(20,14) = "C"
- │ ├── body: ∅
- │ ├── end_keyword_loc: (21,0)-(21,3) = "end"
- │ └── name: :A
- ├── @ ClassNode (location: (23,0)-(24,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (23,0)-(23,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (23,6)-(23,10))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (23,6)-(23,7))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (23,7)-(23,9) = "::"
- │ │ └── name_loc: (23,9)-(23,10) = "B"
- │ ├── inheritance_operator_loc: (23,11)-(23,12) = "<"
- │ ├── superclass:
- │ │ @ ConstantPathNode (location: (23,13)-(23,17))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (23,13)-(23,14))
- │ │ │ └── name: :C
- │ │ ├── name: :D
- │ │ ├── delimiter_loc: (23,14)-(23,16) = "::"
- │ │ └── name_loc: (23,16)-(23,17) = "D"
- │ ├── body: ∅
- │ ├── end_keyword_loc: (24,0)-(24,3) = "end"
- │ └── name: :B
- ├── @ ClassNode (location: (26,0)-(32,3))
- │ ├── locals: []
- │ ├── class_keyword_loc: (26,0)-(26,5) = "class"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (26,6)-(26,7))
- │ │ └── name: :A
- │ ├── inheritance_operator_loc: ∅
- │ ├── superclass: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (27,2)-(31,5))
- │ │ └── body: (length: 2)
- │ │ ├── @ CallNode (location: (27,2)-(27,16))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :include
- │ │ │ ├── message_loc: (27,2)-(27,9) = "include"
- │ │ │ ├── opening_loc: (27,9)-(27,10) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (27,10)-(27,15))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (27,10)-(27,15))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ ConstantReadNode (location: (27,10)-(27,11))
- │ │ │ │ │ └── name: :B
- │ │ │ │ ├── call_operator_loc: (27,11)-(27,12) = "."
- │ │ │ │ ├── name: :new
- │ │ │ │ ├── message_loc: (27,12)-(27,15) = "new"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: (27,15)-(27,16) = ")"
- │ │ │ └── block: ∅
- │ │ └── @ DefNode (location: (29,2)-(31,5))
- │ │ ├── name: :foo
- │ │ ├── name_loc: (29,6)-(29,9) = "foo"
- │ │ ├── receiver: ∅
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (30,4)-(30,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ SymbolNode (location: (30,4)-(30,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (30,4)-(30,5) = ":"
- │ │ │ ├── value_loc: (30,5)-(30,8) = "bar"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "bar"
- │ │ ├── locals: []
- │ │ ├── def_keyword_loc: (29,2)-(29,5) = "def"
- │ │ ├── operator_loc: ∅
- │ │ ├── lparen_loc: ∅
- │ │ ├── rparen_loc: ∅
- │ │ ├── equal_loc: ∅
- │ │ └── end_keyword_loc: (31,2)-(31,5) = "end"
- │ ├── end_keyword_loc: (32,0)-(32,3) = "end"
- │ └── name: :A
- └── @ ClassNode (location: (34,0)-(35,3))
- ├── locals: []
- ├── class_keyword_loc: (34,0)-(34,5) = "class"
- ├── constant_path:
- │ @ ConstantPathNode (location: (34,6)-(34,9))
- │ ├── parent: ∅
- │ ├── name: :A
- │ ├── delimiter_loc: (34,6)-(34,8) = "::"
- │ └── name_loc: (34,8)-(34,9) = "A"
- ├── inheritance_operator_loc: ∅
- ├── superclass: ∅
- ├── body: ∅
- ├── end_keyword_loc: (35,0)-(35,3) = "end"
- └── name: :A
diff --git a/test/prism/snapshots/unparser/corpus/literal/def.txt b/test/prism/snapshots/unparser/corpus/literal/def.txt
deleted file mode 100644
index f3ef6c388e..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/def.txt
+++ /dev/null
@@ -1,1204 +0,0 @@
-@ ProgramNode (location: (1,0)-(134,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(134,3))
- └── body: (length: 30)
- ├── @ DefNode (location: (1,0)-(9,3))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (1,0)-(9,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,2)-(2,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,2)-(2,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (2,2)-(2,3) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (3,0)-(4,3))
- │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (4,2)-(4,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (4,2)-(4,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (4,2)-(4,3) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause:
- │ │ │ @ ElseNode (location: (5,0)-(7,6))
- │ │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (6,2)-(6,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (6,2)-(6,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :c
- │ │ │ │ ├── message_loc: (6,2)-(6,3) = "c"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (7,0)-(9,3))
- │ │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (8,2)-(8,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (8,2)-(8,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :d
- │ │ │ │ ├── message_loc: (8,2)-(8,3) = "d"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- ├── @ DefNode (location: (11,0)-(19,3))
- │ ├── name: :foo
- │ ├── name_loc: (11,4)-(11,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (11,0)-(19,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (12,2)-(12,12))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ RescueModifierNode (location: (12,2)-(12,12))
- │ │ │ ├── expression:
- │ │ │ │ @ CallNode (location: (12,2)-(12,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (12,2)-(12,3) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── keyword_loc: (12,4)-(12,10) = "rescue"
- │ │ │ └── rescue_expression:
- │ │ │ @ CallNode (location: (12,11)-(12,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (12,11)-(12,12) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (13,0)-(14,3))
- │ │ │ ├── keyword_loc: (13,0)-(13,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (14,2)-(14,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (14,2)-(14,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (14,2)-(14,3) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause:
- │ │ │ @ ElseNode (location: (15,0)-(17,6))
- │ │ │ ├── else_keyword_loc: (15,0)-(15,4) = "else"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (16,2)-(16,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (16,2)-(16,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :c
- │ │ │ │ ├── message_loc: (16,2)-(16,3) = "c"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── end_keyword_loc: (17,0)-(17,6) = "ensure"
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (17,0)-(19,3))
- │ │ │ ├── ensure_keyword_loc: (17,0)-(17,6) = "ensure"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (18,2)-(18,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (18,2)-(18,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :d
- │ │ │ │ ├── message_loc: (18,2)-(18,3) = "d"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- │ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (11,0)-(11,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- ├── @ DefNode (location: (21,0)-(22,3))
- │ ├── name: :foo
- │ ├── name_loc: (21,4)-(21,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (21,8)-(21,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ RequiredKeywordParameterNode (location: (21,8)-(21,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── name_loc: (21,8)-(21,12) = "bar:"
- │ │ │ └── @ RequiredKeywordParameterNode (location: (21,14)-(21,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :baz
- │ │ │ └── name_loc: (21,14)-(21,18) = "baz:"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar, :baz]
- │ ├── def_keyword_loc: (21,0)-(21,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (21,7)-(21,8) = "("
- │ ├── rparen_loc: (21,18)-(21,19) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (22,0)-(22,3) = "end"
- ├── @ DefNode (location: (24,0)-(25,3))
- │ ├── name: :foo
- │ ├── name_loc: (24,4)-(24,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (24,0)-(24,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (25,0)-(25,3) = "end"
- ├── @ DefNode (location: (27,0)-(29,3))
- │ ├── name: :foo
- │ ├── name_loc: (27,4)-(27,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (28,2)-(28,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (28,2)-(28,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (28,2)-(28,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (29,0)-(29,3) = "end"
- ├── @ DefNode (location: (31,0)-(37,3))
- │ ├── name: :foo
- │ ├── name_loc: (31,4)-(31,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (31,0)-(37,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (32,2)-(32,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (32,2)-(32,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (32,2)-(32,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (33,0)-(34,5))
- │ │ │ ├── keyword_loc: (33,0)-(33,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (34,2)-(34,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (34,2)-(34,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (34,2)-(34,5) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (35,0)-(37,3))
- │ │ │ ├── ensure_keyword_loc: (35,0)-(35,6) = "ensure"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (36,2)-(36,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (36,2)-(36,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (36,2)-(36,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
- │ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (31,0)-(31,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (37,0)-(37,3) = "end"
- ├── @ DefNode (location: (39,0)-(43,3))
- │ ├── name: :foo
- │ ├── name_loc: (39,4)-(39,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (39,0)-(43,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (40,2)-(40,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (40,2)-(40,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (40,2)-(40,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause:
- │ │ │ @ EnsureNode (location: (41,0)-(43,3))
- │ │ │ ├── ensure_keyword_loc: (41,0)-(41,6) = "ensure"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (42,2)-(42,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (42,2)-(42,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (42,2)-(42,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
- │ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (39,0)-(39,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (43,0)-(43,3) = "end"
- ├── @ DefNode (location: (45,0)-(49,3))
- │ ├── name: :foo
- │ ├── name_loc: (45,4)-(45,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (45,0)-(49,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (46,2)-(46,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (46,2)-(46,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (46,2)-(46,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (47,0)-(48,5))
- │ │ │ ├── keyword_loc: (47,0)-(47,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (48,2)-(48,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (48,2)-(48,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (48,2)-(48,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (49,0)-(49,3) = "end"
- │ ├── locals: []
- │ ├── def_keyword_loc: (45,0)-(45,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (49,0)-(49,3) = "end"
- ├── @ DefNode (location: (51,0)-(53,3))
- │ ├── name: :foo
- │ ├── name_loc: (51,4)-(51,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (51,8)-(51,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (51,8)-(51,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (52,2)-(52,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (52,2)-(52,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (51,0)-(51,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (51,7)-(51,8) = "("
- │ ├── rparen_loc: (51,11)-(51,12) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (53,0)-(53,3) = "end"
- ├── @ DefNode (location: (55,0)-(57,3))
- │ ├── name: :foo
- │ ├── name_loc: (55,4)-(55,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (55,8)-(55,16))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (55,8)-(55,11))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :bar
- │ │ │ └── @ RequiredParameterNode (location: (55,13)-(55,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :baz
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (56,2)-(56,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (56,2)-(56,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar, :baz]
- │ ├── def_keyword_loc: (55,0)-(55,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (55,7)-(55,8) = "("
- │ ├── rparen_loc: (55,16)-(55,17) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (57,0)-(57,3) = "end"
- ├── @ DefNode (location: (59,0)-(61,3))
- │ ├── name: :foo
- │ ├── name_loc: (59,4)-(59,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (59,8)-(59,16))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (59,8)-(59,16))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (59,8)-(59,11) = "bar"
- │ │ │ ├── operator_loc: (59,12)-(59,13) = "="
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (59,14)-(59,16))
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (59,14)-(59,15) = "("
- │ │ │ └── closing_loc: (59,15)-(59,16) = ")"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (60,2)-(60,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (60,2)-(60,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (59,0)-(59,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (59,7)-(59,8) = "("
- │ ├── rparen_loc: (59,16)-(59,17) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (61,0)-(61,3) = "end"
- ├── @ DefNode (location: (63,0)-(64,3))
- │ ├── name: :foo
- │ ├── name_loc: (63,4)-(63,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (63,8)-(63,24))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (63,8)-(63,24))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (63,8)-(63,11) = "bar"
- │ │ │ ├── operator_loc: (63,12)-(63,13) = "="
- │ │ │ └── value:
- │ │ │ @ ParenthesesNode (location: (63,14)-(63,24))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (63,15)-(63,23))
- │ │ │ │ └── body: (length: 2)
- │ │ │ │ ├── @ CallNode (location: (63,15)-(63,18))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :baz
- │ │ │ │ │ ├── message_loc: (63,15)-(63,18) = "baz"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── @ NilNode (location: (63,20)-(63,23))
- │ │ │ ├── opening_loc: (63,14)-(63,15) = "("
- │ │ │ └── closing_loc: (63,23)-(63,24) = ")"
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (63,0)-(63,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (63,7)-(63,8) = "("
- │ ├── rparen_loc: (63,24)-(63,25) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (64,0)-(64,3) = "end"
- ├── @ DefNode (location: (66,0)-(68,3))
- │ ├── name: :foo
- │ ├── name_loc: (66,4)-(66,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (66,8)-(66,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (66,8)-(66,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (66,8)-(66,11) = "bar"
- │ │ │ ├── operator_loc: (66,12)-(66,13) = "="
- │ │ │ └── value:
- │ │ │ @ TrueNode (location: (66,14)-(66,18))
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (67,2)-(67,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (67,2)-(67,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (66,0)-(66,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (66,7)-(66,8) = "("
- │ ├── rparen_loc: (66,18)-(66,19) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (68,0)-(68,3) = "end"
- ├── @ DefNode (location: (70,0)-(72,3))
- │ ├── name: :foo
- │ ├── name_loc: (70,4)-(70,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (70,8)-(70,23))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (70,8)-(70,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (70,13)-(70,23))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── name_loc: (70,13)-(70,16) = "baz"
- │ │ │ ├── operator_loc: (70,17)-(70,18) = "="
- │ │ │ └── value:
- │ │ │ @ TrueNode (location: (70,19)-(70,23))
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (71,2)-(71,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (71,2)-(71,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar, :baz]
- │ ├── def_keyword_loc: (70,0)-(70,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (70,7)-(70,8) = "("
- │ ├── rparen_loc: (70,23)-(70,24) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (72,0)-(72,3) = "end"
- ├── @ DefNode (location: (74,0)-(75,3))
- │ ├── name: :foo
- │ ├── name_loc: (74,4)-(74,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (74,8)-(74,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (74,8)-(74,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (74,8)-(74,12) = "bar:"
- │ │ │ └── value:
- │ │ │ @ IntegerNode (location: (74,13)-(74,14))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (74,0)-(74,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (74,7)-(74,8) = "("
- │ ├── rparen_loc: (74,14)-(74,15) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (75,0)-(75,3) = "end"
- ├── @ DefNode (location: (77,0)-(78,3))
- │ ├── name: :foo
- │ ├── name_loc: (77,4)-(77,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (77,8)-(77,16))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (77,8)-(77,16))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (77,8)-(77,12) = "bar:"
- │ │ │ └── value:
- │ │ │ @ CallNode (location: (77,13)-(77,16))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (77,13)-(77,16) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (77,0)-(77,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (77,7)-(77,8) = "("
- │ ├── rparen_loc: (77,16)-(77,17) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (78,0)-(78,3) = "end"
- ├── @ DefNode (location: (80,0)-(81,3))
- │ ├── name: :foo
- │ ├── name_loc: (80,4)-(80,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (80,8)-(80,18))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 1)
- │ │ │ └── @ OptionalKeywordParameterNode (location: (80,8)-(80,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (80,8)-(80,12) = "bar:"
- │ │ │ └── value:
- │ │ │ @ CallNode (location: (80,13)-(80,18))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (80,13)-(80,16) = "bar"
- │ │ │ ├── opening_loc: (80,16)-(80,17) = "("
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: (80,17)-(80,18) = ")"
- │ │ │ └── block: ∅
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (80,0)-(80,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (80,7)-(80,8) = "("
- │ ├── rparen_loc: (80,18)-(80,19) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (81,0)-(81,3) = "end"
- ├── @ DefNode (location: (83,0)-(85,3))
- │ ├── name: :foo
- │ ├── name_loc: (83,4)-(83,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (83,8)-(83,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (83,8)-(83,9))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (83,8)-(83,9) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (84,2)-(84,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (84,2)-(84,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (84,2)-(84,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (83,0)-(83,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (83,7)-(83,8) = "("
- │ ├── rparen_loc: (83,9)-(83,10) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (85,0)-(85,3) = "end"
- ├── @ DefNode (location: (87,0)-(89,3))
- │ ├── name: :foo
- │ ├── name_loc: (87,4)-(87,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (87,8)-(87,12))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (87,8)-(87,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── name_loc: (87,9)-(87,12) = "bar"
- │ │ │ └── operator_loc: (87,8)-(87,9) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (88,2)-(88,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (88,2)-(88,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar]
- │ ├── def_keyword_loc: (87,0)-(87,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (87,7)-(87,8) = "("
- │ ├── rparen_loc: (87,12)-(87,13) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (89,0)-(89,3) = "end"
- ├── @ DefNode (location: (91,0)-(93,3))
- │ ├── name: :foo
- │ ├── name_loc: (91,4)-(91,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (91,8)-(91,17))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (91,8)-(91,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (91,13)-(91,17))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── name_loc: (91,14)-(91,17) = "baz"
- │ │ │ └── operator_loc: (91,13)-(91,14) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (92,2)-(92,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (92,2)-(92,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar, :baz]
- │ ├── def_keyword_loc: (91,0)-(91,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (91,7)-(91,8) = "("
- │ ├── rparen_loc: (91,17)-(91,18) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (93,0)-(93,3) = "end"
- ├── @ DefNode (location: (95,0)-(97,3))
- │ ├── name: :foo
- │ ├── name_loc: (95,4)-(95,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (95,8)-(95,24))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (95,8)-(95,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── name_loc: (95,8)-(95,11) = "baz"
- │ │ │ ├── operator_loc: (95,12)-(95,13) = "="
- │ │ │ └── value:
- │ │ │ @ TrueNode (location: (95,14)-(95,18))
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (95,20)-(95,24))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bor
- │ │ │ ├── name_loc: (95,21)-(95,24) = "bor"
- │ │ │ └── operator_loc: (95,20)-(95,21) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (96,2)-(96,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (96,2)-(96,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (96,2)-(96,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: [:baz, :bor]
- │ ├── def_keyword_loc: (95,0)-(95,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (95,7)-(95,8) = "("
- │ ├── rparen_loc: (95,24)-(95,25) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (97,0)-(97,3) = "end"
- ├── @ DefNode (location: (99,0)-(101,3))
- │ ├── name: :foo
- │ ├── name_loc: (99,4)-(99,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (99,8)-(99,32))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (99,8)-(99,18))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── name_loc: (99,8)-(99,11) = "baz"
- │ │ │ ├── operator_loc: (99,12)-(99,13) = "="
- │ │ │ └── value:
- │ │ │ @ TrueNode (location: (99,14)-(99,18))
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (99,20)-(99,24))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bor
- │ │ │ ├── name_loc: (99,21)-(99,24) = "bor"
- │ │ │ └── operator_loc: (99,20)-(99,21) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (99,26)-(99,32))
- │ │ ├── flags: ∅
- │ │ ├── name: :block
- │ │ ├── name_loc: (99,27)-(99,32) = "block"
- │ │ └── operator_loc: (99,26)-(99,27) = "&"
- │ ├── body:
- │ │ @ StatementsNode (location: (100,2)-(100,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (100,2)-(100,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (100,2)-(100,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: [:baz, :bor, :block]
- │ ├── def_keyword_loc: (99,0)-(99,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (99,7)-(99,8) = "("
- │ ├── rparen_loc: (99,32)-(99,33) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (101,0)-(101,3) = "end"
- ├── @ DefNode (location: (103,0)-(105,3))
- │ ├── name: :foo
- │ ├── name_loc: (103,4)-(103,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (103,8)-(103,29))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (103,8)-(103,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 1)
- │ │ │ └── @ OptionalParameterNode (location: (103,13)-(103,23))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── name_loc: (103,13)-(103,16) = "baz"
- │ │ │ ├── operator_loc: (103,17)-(103,18) = "="
- │ │ │ └── value:
- │ │ │ @ TrueNode (location: (103,19)-(103,23))
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (103,25)-(103,29))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :bor
- │ │ │ ├── name_loc: (103,26)-(103,29) = "bor"
- │ │ │ └── operator_loc: (103,25)-(103,26) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (104,2)-(104,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (104,2)-(104,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar, :baz, :bor]
- │ ├── def_keyword_loc: (103,0)-(103,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (103,7)-(103,8) = "("
- │ ├── rparen_loc: (103,29)-(103,30) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (105,0)-(105,3) = "end"
- ├── @ DefNode (location: (107,0)-(109,3))
- │ ├── name: :foo
- │ ├── name_loc: (107,4)-(107,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (107,8)-(107,14))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (107,8)-(107,14))
- │ │ ├── flags: ∅
- │ │ ├── name: :block
- │ │ ├── name_loc: (107,9)-(107,14) = "block"
- │ │ └── operator_loc: (107,8)-(107,9) = "&"
- │ ├── body:
- │ │ @ StatementsNode (location: (108,2)-(108,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (108,2)-(108,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (108,2)-(108,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: [:block]
- │ ├── def_keyword_loc: (107,0)-(107,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (107,7)-(107,8) = "("
- │ ├── rparen_loc: (107,14)-(107,15) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (109,0)-(109,3) = "end"
- ├── @ DefNode (location: (111,0)-(113,3))
- │ ├── name: :foo
- │ ├── name_loc: (111,4)-(111,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (111,8)-(111,19))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (111,8)-(111,11))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :bar
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (111,13)-(111,19))
- │ │ ├── flags: ∅
- │ │ ├── name: :block
- │ │ ├── name_loc: (111,14)-(111,19) = "block"
- │ │ └── operator_loc: (111,13)-(111,14) = "&"
- │ ├── body:
- │ │ @ StatementsNode (location: (112,2)-(112,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (112,2)-(112,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── locals: [:bar, :block]
- │ ├── def_keyword_loc: (111,0)-(111,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (111,7)-(111,8) = "("
- │ ├── rparen_loc: (111,19)-(111,20) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (113,0)-(113,3) = "end"
- ├── @ DefNode (location: (115,0)-(118,3))
- │ ├── name: :foo
- │ ├── name_loc: (115,4)-(115,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (116,2)-(117,5))
- │ │ └── body: (length: 2)
- │ │ ├── @ CallNode (location: (116,2)-(116,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (116,2)-(116,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (117,2)-(117,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (117,2)-(117,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (115,0)-(115,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (118,0)-(118,3) = "end"
- ├── @ DefNode (location: (120,0)-(121,3))
- │ ├── name: :f
- │ ├── name_loc: (120,4)-(120,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (120,6)-(120,11))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ MultiTargetNode (location: (120,6)-(120,11))
- │ │ │ ├── lefts: (length: 1)
- │ │ │ │ └── @ MultiTargetNode (location: (120,7)-(120,10))
- │ │ │ │ ├── lefts: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (120,8)-(120,9))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (120,7)-(120,8) = "("
- │ │ │ │ └── rparen_loc: (120,9)-(120,10) = ")"
- │ │ │ ├── rest: ∅
- │ │ │ ├── rights: (length: 0)
- │ │ │ ├── lparen_loc: (120,6)-(120,7) = "("
- │ │ │ └── rparen_loc: (120,10)-(120,11) = ")"
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:a]
- │ ├── def_keyword_loc: (120,0)-(120,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (120,5)-(120,6) = "("
- │ ├── rparen_loc: (120,11)-(120,12) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (121,0)-(121,3) = "end"
- ├── @ DefNode (location: (123,0)-(124,3))
- │ ├── name: :foo
- │ ├── name_loc: (123,4)-(123,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (123,8)-(123,26))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 2)
- │ │ │ ├── @ RequiredKeywordParameterNode (location: (123,8)-(123,12))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── name_loc: (123,8)-(123,12) = "bar:"
- │ │ │ └── @ OptionalKeywordParameterNode (location: (123,14)-(123,26))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── name_loc: (123,14)-(123,18) = "baz:"
- │ │ │ └── value:
- │ │ │ @ StringNode (location: (123,19)-(123,26))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (123,19)-(123,20) = "\""
- │ │ │ ├── content_loc: (123,20)-(123,25) = "value"
- │ │ │ ├── closing_loc: (123,25)-(123,26) = "\""
- │ │ │ └── unescaped: "value"
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body: ∅
- │ ├── locals: [:bar, :baz]
- │ ├── def_keyword_loc: (123,0)-(123,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (123,7)-(123,8) = "("
- │ ├── rparen_loc: (123,26)-(123,27) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (124,0)-(124,3) = "end"
- ├── @ DefNode (location: (126,0)-(130,3))
- │ ├── name: :f
- │ ├── name_loc: (126,4)-(126,5) = "f"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (127,2)-(127,12))
- │ │ └── body: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (127,2)-(127,12))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (127,2)-(127,12) = "<<-HEREDOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (128,0)-(128,4))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (128,0)-(128,4) = " "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (128,4)-(128,7))
- │ │ │ │ ├── opening_loc: (128,4)-(128,6) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (128,6)-(128,7) = "}"
- │ │ │ └── @ StringNode (location: (128,7)-(129,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (128,7)-(129,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (129,0)-(130,0) = " HEREDOC\n"
- │ ├── locals: []
- │ ├── def_keyword_loc: (126,0)-(126,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (130,0)-(130,3) = "end"
- └── @ DefNode (location: (132,0)-(134,3))
- ├── name: :f
- ├── name_loc: (132,4)-(132,5) = "f"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (133,2)-(133,5))
- │ └── body: (length: 1)
- │ └── @ StringNode (location: (133,2)-(133,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (133,2)-(133,4) = "%("
- │ ├── content_loc: (133,4)-(133,4) = ""
- │ ├── closing_loc: (133,4)-(133,5) = ")"
- │ └── unescaped: ""
- ├── locals: []
- ├── def_keyword_loc: (132,0)-(132,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (134,0)-(134,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/defined.txt b/test/prism/snapshots/unparser/corpus/literal/defined.txt
deleted file mode 100644
index 89145ddcda..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/defined.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,27))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,27))
- └── body: (length: 3)
- ├── @ DefinedNode (location: (1,0)-(1,14))
- │ ├── lparen_loc: (1,8)-(1,9) = "("
- │ ├── value:
- │ │ @ InstanceVariableReadNode (location: (1,9)-(1,13))
- │ │ └── name: :@foo
- │ ├── rparen_loc: (1,13)-(1,14) = ")"
- │ └── keyword_loc: (1,0)-(1,8) = "defined?"
- ├── @ DefinedNode (location: (2,0)-(2,13))
- │ ├── lparen_loc: (2,8)-(2,9) = "("
- │ ├── value:
- │ │ @ ConstantReadNode (location: (2,9)-(2,12))
- │ │ └── name: :Foo
- │ ├── rparen_loc: (2,12)-(2,13) = ")"
- │ └── keyword_loc: (2,0)-(2,8) = "defined?"
- └── @ DefinedNode (location: (3,0)-(3,27))
- ├── lparen_loc: (3,8)-(3,9) = "("
- ├── value:
- │ @ ParenthesesNode (location: (3,9)-(3,26))
- │ ├── body:
- │ │ @ StatementsNode (location: (3,10)-(3,25))
- │ │ └── body: (length: 1)
- │ │ └── @ MultiWriteNode (location: (3,10)-(3,25))
- │ │ ├── lefts: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (3,11)-(3,12))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (3,14)-(3,15))
- │ │ │ ├── name: :b
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── rights: (length: 0)
- │ │ ├── lparen_loc: (3,10)-(3,11) = "("
- │ │ ├── rparen_loc: (3,15)-(3,16) = ")"
- │ │ ├── operator_loc: (3,17)-(3,18) = "="
- │ │ └── value:
- │ │ @ ArrayNode (location: (3,19)-(3,25))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (3,20)-(3,21))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (3,23)-(3,24))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: (3,19)-(3,20) = "["
- │ │ └── closing_loc: (3,24)-(3,25) = "]"
- │ ├── opening_loc: (3,9)-(3,10) = "("
- │ └── closing_loc: (3,25)-(3,26) = ")"
- ├── rparen_loc: (3,26)-(3,27) = ")"
- └── keyword_loc: (3,0)-(3,8) = "defined?"
diff --git a/test/prism/snapshots/unparser/corpus/literal/defs.txt b/test/prism/snapshots/unparser/corpus/literal/defs.txt
deleted file mode 100644
index 7858877172..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/defs.txt
+++ /dev/null
@@ -1,358 +0,0 @@
-@ ProgramNode (location: (1,0)-(40,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(40,3))
- └── body: (length: 10)
- ├── @ DefNode (location: (1,0)-(2,3))
- │ ├── name: :foo
- │ ├── name_loc: (1,9)-(1,12) = "foo"
- │ ├── receiver:
- │ │ @ SelfNode (location: (1,4)-(1,8))
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: (1,8)-(1,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (2,0)-(2,3) = "end"
- ├── @ DefNode (location: (4,0)-(6,3))
- │ ├── name: :foo
- │ ├── name_loc: (4,9)-(4,12) = "foo"
- │ ├── receiver:
- │ │ @ SelfNode (location: (4,4)-(4,8))
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (5,2)-(5,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (5,2)-(5,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (5,2)-(5,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
- │ ├── operator_loc: (4,8)-(4,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- ├── @ DefNode (location: (8,0)-(11,3))
- │ ├── name: :foo
- │ ├── name_loc: (8,9)-(8,12) = "foo"
- │ ├── receiver:
- │ │ @ SelfNode (location: (8,4)-(8,8))
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (9,2)-(10,5))
- │ │ └── body: (length: 2)
- │ │ ├── @ CallNode (location: (9,2)-(9,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (9,2)-(9,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (10,2)-(10,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (10,2)-(10,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
- │ ├── operator_loc: (8,8)-(8,9) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ DefNode (location: (13,0)-(15,3))
- │ ├── name: :bar
- │ ├── name_loc: (13,8)-(13,11) = "bar"
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (13,4)-(13,7))
- │ │ └── name: :Foo
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (14,2)-(14,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (14,2)-(14,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (14,2)-(14,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
- │ ├── operator_loc: (13,7)-(13,8) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (15,0)-(15,3) = "end"
- ├── @ DefNode (location: (17,0)-(20,3))
- │ ├── name: :bar
- │ ├── name_loc: (18,3)-(18,6) = "bar"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (17,4)-(18,2))
- │ │ ├── body:
- │ │ │ @ CallNode (location: (17,5)-(18,1))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (17,5)-(17,8) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (17,9)-(18,1))
- │ │ │ ├── locals: [:bar]
- │ │ │ ├── parameters:
- │ │ │ │ @ BlockParametersNode (location: (17,11)-(17,16))
- │ │ │ │ ├── parameters:
- │ │ │ │ │ @ ParametersNode (location: (17,12)-(17,15))
- │ │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ │ └── @ RequiredParameterNode (location: (17,12)-(17,15))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── name: :bar
- │ │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── locals: (length: 0)
- │ │ │ │ ├── opening_loc: (17,11)-(17,12) = "|"
- │ │ │ │ └── closing_loc: (17,15)-(17,16) = "|"
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (17,9)-(17,10) = "{"
- │ │ │ └── closing_loc: (18,0)-(18,1) = "}"
- │ │ ├── opening_loc: (17,4)-(17,5) = "("
- │ │ └── closing_loc: (18,1)-(18,2) = ")"
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (19,2)-(19,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (19,2)-(19,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (19,2)-(19,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (17,0)-(17,3) = "def"
- │ ├── operator_loc: (18,2)-(18,3) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (20,0)-(20,3) = "end"
- ├── @ DefNode (location: (22,0)-(24,3))
- │ ├── name: :bar
- │ ├── name_loc: (22,13)-(22,16) = "bar"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (22,4)-(22,12))
- │ │ ├── body:
- │ │ │ @ CallNode (location: (22,5)-(22,11))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (22,5)-(22,8) = "foo"
- │ │ │ ├── opening_loc: (22,8)-(22,9) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (22,9)-(22,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (22,9)-(22,10))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── closing_loc: (22,10)-(22,11) = ")"
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (22,4)-(22,5) = "("
- │ │ └── closing_loc: (22,11)-(22,12) = ")"
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (23,2)-(23,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (23,2)-(23,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (23,2)-(23,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
- │ ├── operator_loc: (22,12)-(22,13) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (24,0)-(24,3) = "end"
- ├── @ DefNode (location: (26,0)-(28,3))
- │ ├── name: :bar
- │ ├── name_loc: (26,19)-(26,22) = "bar"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (26,4)-(26,18))
- │ │ ├── body:
- │ │ │ @ CallNode (location: (26,5)-(26,17))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ ConstantPathNode (location: (26,5)-(26,13))
- │ │ │ │ ├── parent:
- │ │ │ │ │ @ ConstantReadNode (location: (26,5)-(26,8))
- │ │ │ │ │ └── name: :Foo
- │ │ │ │ ├── name: :Bar
- │ │ │ │ ├── delimiter_loc: (26,8)-(26,10) = "::"
- │ │ │ │ └── name_loc: (26,10)-(26,13) = "Bar"
- │ │ │ ├── call_operator_loc: (26,13)-(26,14) = "."
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (26,14)-(26,17) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (26,4)-(26,5) = "("
- │ │ └── closing_loc: (26,17)-(26,18) = ")"
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (27,2)-(27,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (27,2)-(27,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (27,2)-(27,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (26,0)-(26,3) = "def"
- │ ├── operator_loc: (26,18)-(26,19) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (28,0)-(28,3) = "end"
- ├── @ DefNode (location: (30,0)-(32,3))
- │ ├── name: :bar
- │ ├── name_loc: (30,15)-(30,18) = "bar"
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (30,4)-(30,14))
- │ │ ├── body:
- │ │ │ @ ConstantPathNode (location: (30,5)-(30,13))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (30,5)-(30,8))
- │ │ │ │ └── name: :Foo
- │ │ │ ├── name: :Bar
- │ │ │ ├── delimiter_loc: (30,8)-(30,10) = "::"
- │ │ │ └── name_loc: (30,10)-(30,13) = "Bar"
- │ │ ├── opening_loc: (30,4)-(30,5) = "("
- │ │ └── closing_loc: (30,13)-(30,14) = ")"
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (31,2)-(31,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (31,2)-(31,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (31,2)-(31,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (30,0)-(30,3) = "def"
- │ ├── operator_loc: (30,14)-(30,15) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (32,0)-(32,3) = "end"
- ├── @ DefNode (location: (34,0)-(36,3))
- │ ├── name: :bar
- │ ├── name_loc: (34,8)-(34,11) = "bar"
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (34,4)-(34,7))
- │ │ └── name: :Foo
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (35,2)-(35,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (35,2)-(35,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (35,2)-(35,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (34,0)-(34,3) = "def"
- │ ├── operator_loc: (34,7)-(34,8) = "."
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (36,0)-(36,3) = "end"
- └── @ DefNode (location: (38,0)-(40,3))
- ├── name: :bar
- ├── name_loc: (38,8)-(38,11) = "bar"
- ├── receiver:
- │ @ CallNode (location: (38,4)-(38,7))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (38,4)-(38,7) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (39,2)-(39,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (39,2)-(39,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :baz
- │ ├── message_loc: (39,2)-(39,5) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── locals: []
- ├── def_keyword_loc: (38,0)-(38,3) = "def"
- ├── operator_loc: (38,7)-(38,8) = "."
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (40,0)-(40,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/dstr.txt b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
deleted file mode 100644
index 8893e8b75d..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/dstr.txt
+++ /dev/null
@@ -1,353 +0,0 @@
-@ ProgramNode (location: (1,0)-(37,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(37,1))
- └── body: (length: 11)
- ├── @ IfNode (location: (1,0)-(3,3))
- │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (1,3)-(1,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(2,8))
- │ │ └── body: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (2,2)-(2,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (2,2)-(2,3) = "\""
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ EmbeddedStatementsNode (location: (2,3)-(2,6))
- │ │ │ │ ├── opening_loc: (2,3)-(2,5) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (2,5)-(2,6) = "}"
- │ │ │ └── @ StringNode (location: (2,6)-(2,7))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (2,6)-(2,7) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── closing_loc: (2,7)-(2,8) = "\""
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ IfNode (location: (4,0)-(11,3))
- │ ├── if_keyword_loc: (4,0)-(4,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (4,3)-(4,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,2)-(10,3))
- │ │ └── body: (length: 2)
- │ │ ├── @ InterpolatedStringNode (location: (5,2)-(5,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (5,2)-(5,12) = "<<-HEREDOC"
- │ │ │ ├── parts: (length: 3)
- │ │ │ │ ├── @ StringNode (location: (6,0)-(7,0))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (6,0)-(7,0) = "a\n"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a\n"
- │ │ │ │ ├── @ EmbeddedStatementsNode (location: (7,0)-(7,3))
- │ │ │ │ │ ├── opening_loc: (7,0)-(7,2) = "\#{"
- │ │ │ │ │ ├── statements: ∅
- │ │ │ │ │ └── closing_loc: (7,2)-(7,3) = "}"
- │ │ │ │ └── @ StringNode (location: (7,3)-(9,0))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (7,3)-(9,0) = "a\nb\n"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "a\nb\n"
- │ │ │ └── closing_loc: (9,0)-(10,0) = " HEREDOC\n"
- │ │ └── @ CallNode (location: (10,2)-(10,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :x
- │ │ ├── message_loc: (10,2)-(10,3) = "x"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ InterpolatedStringNode (location: (12,0)-(12,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (12,0)-(12,10) = "<<-HEREDOC"
- │ ├── parts: (length: 7)
- │ │ ├── @ StringNode (location: (13,0)-(14,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (13,0)-(14,0) = "\\\#{}\\\#{}\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\#{}\#{}\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (14,0)-(14,3))
- │ │ │ ├── opening_loc: (14,0)-(14,2) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (14,2)-(14,3) = "}"
- │ │ ├── @ StringNode (location: (14,3)-(15,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (14,3)-(15,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (15,0)-(15,3))
- │ │ │ ├── opening_loc: (15,0)-(15,2) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (15,2)-(15,3) = "}"
- │ │ ├── @ StringNode (location: (15,3)-(16,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (15,3)-(16,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (16,0)-(16,3))
- │ │ │ ├── opening_loc: (16,0)-(16,2) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (16,2)-(16,3) = "}"
- │ │ └── @ StringNode (location: (16,3)-(17,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (16,3)-(17,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (17,0)-(18,0) = "HEREDOC\n"
- ├── @ RescueModifierNode (location: (18,0)-(18,21))
- │ ├── expression:
- │ │ @ InterpolatedStringNode (location: (18,0)-(18,10))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (18,0)-(18,10) = "<<-HEREDOC"
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ EmbeddedStatementsNode (location: (19,0)-(19,3))
- │ │ │ │ ├── opening_loc: (19,0)-(19,2) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (19,2)-(19,3) = "}"
- │ │ │ └── @ StringNode (location: (19,3)-(21,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (19,3)-(21,0) = "\na\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\na\n"
- │ │ └── closing_loc: (21,0)-(22,0) = "HEREDOC\n"
- │ ├── keyword_loc: (18,11)-(18,17) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (18,18)-(18,21))
- ├── @ InterpolatedStringNode (location: (22,0)-(22,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (22,0)-(22,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (22,1)-(22,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (22,1)-(22,2) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ EmbeddedVariableNode (location: (22,2)-(22,5))
- │ │ ├── operator_loc: (22,2)-(22,3) = "#"
- │ │ └── variable:
- │ │ @ NumberedReferenceReadNode (location: (22,3)-(22,5))
- │ │ └── number: 1
- │ └── closing_loc: (22,5)-(22,6) = "\""
- ├── @ InterpolatedStringNode (location: (23,0)-(23,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (23,0)-(23,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (23,1)-(23,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (23,1)-(23,2) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ EmbeddedVariableNode (location: (23,2)-(23,5))
- │ │ ├── operator_loc: (23,2)-(23,3) = "#"
- │ │ └── variable:
- │ │ @ GlobalVariableReadNode (location: (23,3)-(23,5))
- │ │ └── name: :$a
- │ └── closing_loc: (23,5)-(23,6) = "\""
- ├── @ InterpolatedStringNode (location: (24,0)-(24,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (24,0)-(24,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (24,1)-(24,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (24,1)-(24,2) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ EmbeddedVariableNode (location: (24,2)-(24,5))
- │ │ ├── operator_loc: (24,2)-(24,3) = "#"
- │ │ └── variable:
- │ │ @ InstanceVariableReadNode (location: (24,3)-(24,5))
- │ │ └── name: :@a
- │ └── closing_loc: (24,5)-(24,6) = "\""
- ├── @ InterpolatedStringNode (location: (25,0)-(25,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (25,0)-(25,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (25,1)-(25,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (25,1)-(25,2) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ EmbeddedVariableNode (location: (25,2)-(25,6))
- │ │ ├── operator_loc: (25,2)-(25,3) = "#"
- │ │ └── variable:
- │ │ @ ClassVariableReadNode (location: (25,3)-(25,6))
- │ │ └── name: :@@a
- │ └── closing_loc: (25,6)-(25,7) = "\""
- ├── @ IfNode (location: (26,0)-(30,3))
- │ ├── if_keyword_loc: (26,0)-(26,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (26,3)-(26,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (27,2)-(27,19))
- │ │ └── body: (length: 1)
- │ │ └── @ ReturnNode (location: (27,2)-(27,19))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (27,2)-(27,8) = "return"
- │ │ └── arguments:
- │ │ @ ArgumentsNode (location: (27,9)-(27,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (27,9)-(27,19))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (27,9)-(27,19) = "<<-HEREDOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (28,0)-(28,4))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (28,0)-(28,4) = " "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (28,4)-(28,9))
- │ │ │ │ ├── opening_loc: (28,4)-(28,6) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (28,6)-(28,8))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (28,6)-(28,8))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 42
- │ │ │ │ └── closing_loc: (28,8)-(28,9) = "}"
- │ │ │ └── @ StringNode (location: (28,9)-(29,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (28,9)-(29,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (29,0)-(30,0) = " HEREDOC\n"
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (30,0)-(30,3) = "end"
- ├── @ CallNode (location: (31,0)-(31,15))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (31,0)-(31,3) = "foo"
- │ ├── opening_loc: (31,3)-(31,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (31,4)-(31,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (31,4)-(31,14))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (31,4)-(31,14) = "<<-HEREDOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (32,0)-(32,2))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (32,0)-(32,2) = " "
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: " "
- │ │ │ ├── @ EmbeddedStatementsNode (location: (32,2)-(32,8))
- │ │ │ │ ├── opening_loc: (32,2)-(32,4) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (32,4)-(32,7))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (32,4)-(32,7))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :bar
- │ │ │ │ │ ├── message_loc: (32,4)-(32,7) = "bar"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── closing_loc: (32,7)-(32,8) = "}"
- │ │ │ └── @ StringNode (location: (32,8)-(33,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (32,8)-(33,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (33,0)-(34,0) = "HEREDOC\n"
- │ ├── closing_loc: (31,14)-(31,15) = ")"
- │ └── block: ∅
- └── @ CallNode (location: (34,0)-(37,1))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (34,0)-(34,3) = "foo"
- ├── opening_loc: (34,3)-(34,4) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (34,4)-(34,14))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ InterpolatedStringNode (location: (34,4)-(34,14))
- │ ├── flags: ∅
- │ ├── opening_loc: (34,4)-(34,14) = "<<-HEREDOC"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (35,0)-(35,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (35,0)-(35,2) = " "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " "
- │ │ ├── @ EmbeddedStatementsNode (location: (35,2)-(35,8))
- │ │ │ ├── opening_loc: (35,2)-(35,4) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (35,4)-(35,7))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (35,4)-(35,7))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (35,4)-(35,7) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (35,7)-(35,8) = "}"
- │ │ └── @ StringNode (location: (35,8)-(36,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (35,8)-(36,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (36,0)-(37,0) = "HEREDOC\n"
- ├── closing_loc: (34,14)-(34,15) = ")"
- └── block:
- @ BlockNode (location: (34,16)-(37,1))
- ├── locals: [:x]
- ├── parameters:
- │ @ BlockParametersNode (location: (34,18)-(34,21))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (34,19)-(34,20))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (34,19)-(34,20))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :x
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 0)
- │ ├── opening_loc: (34,18)-(34,19) = "|"
- │ └── closing_loc: (34,20)-(34,21) = "|"
- ├── body: ∅
- ├── opening_loc: (34,16)-(34,17) = "{"
- └── closing_loc: (37,0)-(37,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/empty.txt b/test/prism/snapshots/unparser/corpus/literal/empty.txt
deleted file mode 100644
index 3a21ce5559..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/empty.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,0))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,0))
- └── body: (length: 0)
diff --git a/test/prism/snapshots/unparser/corpus/literal/empty_begin.txt b/test/prism/snapshots/unparser/corpus/literal/empty_begin.txt
deleted file mode 100644
index 838b4bf6f0..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/empty_begin.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,2))
- └── body: (length: 1)
- └── @ ParenthesesNode (location: (1,0)-(1,2))
- ├── body: ∅
- ├── opening_loc: (1,0)-(1,1) = "("
- └── closing_loc: (1,1)-(1,2) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/literal/flipflop.txt b/test/prism/snapshots/unparser/corpus/literal/flipflop.txt
deleted file mode 100644
index 2d9f669e6f..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/flipflop.txt
+++ /dev/null
@@ -1,237 +0,0 @@
-@ ProgramNode (location: (1,0)-(10,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(10,3))
- └── body: (length: 4)
- ├── @ IfNode (location: (1,0)-(3,3))
- │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
- │ ├── predicate:
- │ │ @ ParenthesesNode (location: (1,3)-(1,23))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (1,4)-(1,22))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ FlipFlopNode (location: (1,4)-(1,22))
- │ │ │ ├── flags: ∅
- │ │ │ ├── left:
- │ │ │ │ @ ParenthesesNode (location: (1,4)-(1,12))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (1,5)-(1,11))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (1,5)-(1,11))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── receiver:
- │ │ │ │ │ │ @ CallNode (location: (1,5)-(1,6))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :i
- │ │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "i"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :==
- │ │ │ │ │ ├── message_loc: (1,7)-(1,9) = "=="
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments:
- │ │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 4
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── opening_loc: (1,4)-(1,5) = "("
- │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
- │ │ │ ├── right:
- │ │ │ │ @ ParenthesesNode (location: (1,14)-(1,22))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (1,15)-(1,21))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (1,15)-(1,21))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── receiver:
- │ │ │ │ │ │ @ CallNode (location: (1,15)-(1,16))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :i
- │ │ │ │ │ │ ├── message_loc: (1,15)-(1,16) = "i"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :==
- │ │ │ │ │ ├── message_loc: (1,17)-(1,19) = "=="
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments:
- │ │ │ │ │ │ @ ArgumentsNode (location: (1,20)-(1,21))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ │ └── @ IntegerNode (location: (1,20)-(1,21))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 4
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── opening_loc: (1,14)-(1,15) = "("
- │ │ │ │ └── closing_loc: (1,21)-(1,22) = ")"
- │ │ │ └── operator_loc: (1,12)-(1,14) = ".."
- │ │ ├── opening_loc: (1,3)-(1,4) = "("
- │ │ └── closing_loc: (1,22)-(1,23) = ")"
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(2,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(2,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (2,2)-(2,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ IfNode (location: (4,0)-(6,3))
- │ ├── if_keyword_loc: (4,0)-(4,2) = "if"
- │ ├── predicate:
- │ │ @ ParenthesesNode (location: (4,3)-(4,24))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (4,4)-(4,23))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ FlipFlopNode (location: (4,4)-(4,23))
- │ │ │ ├── flags: exclude_end
- │ │ │ ├── left:
- │ │ │ │ @ ParenthesesNode (location: (4,4)-(4,12))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (4,5)-(4,11))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (4,5)-(4,11))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── receiver:
- │ │ │ │ │ │ @ CallNode (location: (4,5)-(4,6))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :i
- │ │ │ │ │ │ ├── message_loc: (4,5)-(4,6) = "i"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :==
- │ │ │ │ │ ├── message_loc: (4,7)-(4,9) = "=="
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments:
- │ │ │ │ │ │ @ ArgumentsNode (location: (4,10)-(4,11))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ │ └── @ IntegerNode (location: (4,10)-(4,11))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 4
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── opening_loc: (4,4)-(4,5) = "("
- │ │ │ │ └── closing_loc: (4,11)-(4,12) = ")"
- │ │ │ ├── right:
- │ │ │ │ @ ParenthesesNode (location: (4,15)-(4,23))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (4,16)-(4,22))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ CallNode (location: (4,16)-(4,22))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── receiver:
- │ │ │ │ │ │ @ CallNode (location: (4,16)-(4,17))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :i
- │ │ │ │ │ │ ├── message_loc: (4,16)-(4,17) = "i"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :==
- │ │ │ │ │ ├── message_loc: (4,18)-(4,20) = "=="
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments:
- │ │ │ │ │ │ @ ArgumentsNode (location: (4,21)-(4,22))
- │ │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ │ │ └── @ IntegerNode (location: (4,21)-(4,22))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 4
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── opening_loc: (4,15)-(4,16) = "("
- │ │ │ │ └── closing_loc: (4,22)-(4,23) = ")"
- │ │ │ └── operator_loc: (4,12)-(4,15) = "..."
- │ │ ├── opening_loc: (4,3)-(4,4) = "("
- │ │ └── closing_loc: (4,23)-(4,24) = ")"
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,2)-(5,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (5,2)-(5,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (5,2)-(5,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- ├── @ IfNode (location: (7,0)-(8,3))
- │ ├── if_keyword_loc: (7,0)-(7,2) = "if"
- │ ├── predicate:
- │ │ @ FlipFlopNode (location: (7,3)-(7,8))
- │ │ ├── flags: ∅
- │ │ ├── left: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (7,5)-(7,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (7,5)-(7,8) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (7,3)-(7,5) = ".."
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (8,0)-(8,3) = "end"
- └── @ IfNode (location: (9,0)-(10,3))
- ├── if_keyword_loc: (9,0)-(9,2) = "if"
- ├── predicate:
- │ @ FlipFlopNode (location: (9,3)-(9,8))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ CallNode (location: (9,3)-(9,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (9,3)-(9,6) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── right: ∅
- │ └── operator_loc: (9,6)-(9,8) = ".."
- ├── then_keyword_loc: ∅
- ├── statements: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (10,0)-(10,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/for.txt b/test/prism/snapshots/unparser/corpus/literal/for.txt
deleted file mode 100644
index 660c6b73f3..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/for.txt
+++ /dev/null
@@ -1,171 +0,0 @@
-@ ProgramNode (location: (1,0)-(12,3))
-├── locals: [:a, :b]
-└── statements:
- @ StatementsNode (location: (1,0)-(12,3))
- └── body: (length: 4)
- ├── @ CallNode (location: (1,0)-(3,4))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (1,0)-(1,3) = "bar"
- │ ├── opening_loc: (1,3)-(1,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (1,4)-(3,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ForNode (location: (1,4)-(3,3))
- │ │ ├── index:
- │ │ │ @ LocalVariableTargetNode (location: (1,8)-(1,9))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── collection:
- │ │ │ @ CallNode (location: (1,13)-(1,16))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (1,13)-(1,16) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (2,2)-(2,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,2)-(2,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (2,2)-(2,5) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── for_keyword_loc: (1,4)-(1,7) = "for"
- │ │ ├── in_keyword_loc: (1,10)-(1,12) = "in"
- │ │ ├── do_keyword_loc: (1,17)-(1,19) = "do"
- │ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- │ ├── closing_loc: (3,3)-(3,4) = ")"
- │ └── block: ∅
- ├── @ ForNode (location: (4,0)-(6,3))
- │ ├── index:
- │ │ @ LocalVariableTargetNode (location: (4,4)-(4,5))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── collection:
- │ │ @ CallNode (location: (4,9)-(4,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (4,9)-(4,12) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,2)-(5,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (5,2)-(5,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (5,2)-(5,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── for_keyword_loc: (4,0)-(4,3) = "for"
- │ ├── in_keyword_loc: (4,6)-(4,8) = "in"
- │ ├── do_keyword_loc: (4,13)-(4,15) = "do"
- │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- ├── @ ForNode (location: (7,0)-(9,3))
- │ ├── index:
- │ │ @ MultiTargetNode (location: (7,4)-(7,11))
- │ │ ├── lefts: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (7,5)-(7,6))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (7,8)-(7,10))
- │ │ │ ├── operator_loc: (7,8)-(7,9) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableTargetNode (location: (7,9)-(7,10))
- │ │ │ ├── name: :b
- │ │ │ └── depth: 0
- │ │ ├── rights: (length: 0)
- │ │ ├── lparen_loc: (7,4)-(7,5) = "("
- │ │ └── rparen_loc: (7,10)-(7,11) = ")"
- │ ├── collection:
- │ │ @ CallNode (location: (7,15)-(7,18))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (7,15)-(7,18) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (8,2)-(8,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (8,2)-(8,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (8,2)-(8,5) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── for_keyword_loc: (7,0)-(7,3) = "for"
- │ ├── in_keyword_loc: (7,12)-(7,14) = "in"
- │ ├── do_keyword_loc: (7,19)-(7,21) = "do"
- │ └── end_keyword_loc: (9,0)-(9,3) = "end"
- └── @ ForNode (location: (10,0)-(12,3))
- ├── index:
- │ @ MultiTargetNode (location: (10,4)-(10,10))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (10,5)-(10,6))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ └── @ LocalVariableTargetNode (location: (10,8)-(10,9))
- │ │ ├── name: :b
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: (10,4)-(10,5) = "("
- │ └── rparen_loc: (10,9)-(10,10) = ")"
- ├── collection:
- │ @ CallNode (location: (10,14)-(10,17))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (10,14)-(10,17) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── statements:
- │ @ StatementsNode (location: (11,2)-(11,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (11,2)-(11,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :baz
- │ ├── message_loc: (11,2)-(11,5) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── for_keyword_loc: (10,0)-(10,3) = "for"
- ├── in_keyword_loc: (10,11)-(10,13) = "in"
- ├── do_keyword_loc: (10,18)-(10,20) = "do"
- └── end_keyword_loc: (12,0)-(12,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/hookexe.txt b/test/prism/snapshots/unparser/corpus/literal/hookexe.txt
deleted file mode 100644
index dabedbc588..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/hookexe.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,1))
- └── body: (length: 3)
- ├── @ PreExecutionNode (location: (1,0)-(3,1))
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(2,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(2,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (2,2)-(2,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,0)-(1,5) = "BEGIN"
- │ ├── opening_loc: (1,6)-(1,7) = "{"
- │ └── closing_loc: (3,0)-(3,1) = "}"
- ├── @ CallNode (location: (4,0)-(4,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (4,0)-(4,3) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ PostExecutionNode (location: (5,0)-(7,1))
- ├── statements:
- │ @ StatementsNode (location: (6,2)-(6,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (6,2)-(6,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :baz
- │ ├── message_loc: (6,2)-(6,5) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── keyword_loc: (5,0)-(5,3) = "END"
- ├── opening_loc: (5,4)-(5,5) = "{"
- └── closing_loc: (7,0)-(7,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/if.txt b/test/prism/snapshots/unparser/corpus/literal/if.txt
deleted file mode 100644
index 00eeba179c..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/if.txt
+++ /dev/null
@@ -1,288 +0,0 @@
-@ ProgramNode (location: (1,0)-(36,3))
-├── locals: [:foo, :pair]
-└── statements:
- @ StatementsNode (location: (1,0)-(36,3))
- └── body: (length: 10)
- ├── @ IfNode (location: (1,0)-(3,3))
- │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
- │ ├── predicate:
- │ │ @ MatchLastLineNode (location: (1,3)-(1,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,3)-(1,4) = "/"
- │ │ ├── content_loc: (1,4)-(1,7) = "foo"
- │ │ ├── closing_loc: (1,7)-(1,8) = "/"
- │ │ └── unescaped: "foo"
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (2,2)-(2,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(2,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (2,2)-(2,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ IfNode (location: (4,0)-(6,3))
- │ ├── if_keyword_loc: (4,0)-(4,2) = "if"
- │ ├── predicate:
- │ │ @ IntegerNode (location: (4,3)-(4,4))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (5,2)-(5,3))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (5,2)-(5,3))
- │ │ ├── flags: decimal
- │ │ └── value: 9
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- ├── @ IfNode (location: (7,0)-(11,3))
- │ ├── if_keyword_loc: (7,0)-(7,2) = "if"
- │ ├── predicate:
- │ │ @ IntegerNode (location: (7,3)-(7,4))
- │ │ ├── flags: decimal
- │ │ └── value: 4
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (8,2)-(8,3))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (8,2)-(8,3))
- │ │ ├── flags: decimal
- │ │ └── value: 5
- │ ├── consequent:
- │ │ @ ElseNode (location: (9,0)-(11,3))
- │ │ ├── else_keyword_loc: (9,0)-(9,4) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (10,2)-(10,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (10,2)-(10,3))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 6
- │ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ UnlessNode (location: (12,0)-(14,3))
- │ ├── keyword_loc: (12,0)-(12,6) = "unless"
- │ ├── predicate:
- │ │ @ IntegerNode (location: (12,7)-(12,8))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (13,2)-(13,5))
- │ │ └── body: (length: 1)
- │ │ └── @ NilNode (location: (13,2)-(13,5))
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (14,0)-(14,3) = "end"
- ├── @ UnlessNode (location: (15,0)-(17,3))
- │ ├── keyword_loc: (15,0)-(15,6) = "unless"
- │ ├── predicate:
- │ │ @ IntegerNode (location: (15,7)-(15,8))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (16,2)-(16,3))
- │ │ └── body: (length: 1)
- │ │ └── @ IntegerNode (location: (16,2)-(16,3))
- │ │ ├── flags: decimal
- │ │ └── value: 9
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- ├── @ IfNode (location: (18,0)-(19,3))
- │ ├── if_keyword_loc: (18,0)-(18,2) = "if"
- │ ├── predicate:
- │ │ @ CallNode (location: (18,3)-(18,6))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (18,3)-(18,6) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- ├── @ ModuleNode (location: (21,0)-(23,3))
- │ ├── locals: [:foo]
- │ ├── module_keyword_loc: (21,0)-(21,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (21,7)-(21,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (22,2)-(22,18))
- │ │ └── body: (length: 1)
- │ │ └── @ IfNode (location: (22,2)-(22,18))
- │ │ ├── if_keyword_loc: (22,12)-(22,14) = "if"
- │ │ ├── predicate:
- │ │ │ @ LocalVariableReadNode (location: (22,15)-(22,18))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (22,2)-(22,11))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableWriteNode (location: (22,2)-(22,11))
- │ │ │ ├── name: :foo
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (22,2)-(22,5) = "foo"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (22,8)-(22,11))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (22,8)-(22,11) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (22,6)-(22,7) = "="
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── end_keyword_loc: (23,0)-(23,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (25,0)-(27,3))
- │ ├── locals: [:foo]
- │ ├── module_keyword_loc: (25,0)-(25,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (25,7)-(25,8))
- │ │ └── name: :B
- │ ├── body:
- │ │ @ StatementsNode (location: (26,2)-(26,22))
- │ │ └── body: (length: 1)
- │ │ └── @ UnlessNode (location: (26,2)-(26,22))
- │ │ ├── keyword_loc: (26,12)-(26,18) = "unless"
- │ │ ├── predicate:
- │ │ │ @ LocalVariableReadNode (location: (26,19)-(26,22))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (26,2)-(26,11))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableWriteNode (location: (26,2)-(26,11))
- │ │ │ ├── name: :foo
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (26,2)-(26,5) = "foo"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (26,8)-(26,11))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (26,8)-(26,11) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (26,6)-(26,7) = "="
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: ∅
- │ ├── end_keyword_loc: (27,0)-(27,3) = "end"
- │ └── name: :B
- ├── @ UnlessNode (location: (28,0)-(30,3))
- │ ├── keyword_loc: (28,0)-(28,6) = "unless"
- │ ├── predicate:
- │ │ @ CallNode (location: (28,7)-(28,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (28,7)-(28,10) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (29,2)-(29,11))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (29,2)-(29,11))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (29,2)-(29,5) = "foo"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (29,8)-(29,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (29,8)-(29,11) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (29,6)-(29,7) = "="
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (30,0)-(30,3) = "end"
- └── @ IfNode (location: (31,0)-(36,3))
- ├── if_keyword_loc: (31,0)-(31,2) = "if"
- ├── predicate:
- │ @ CallNode (location: (31,3)-(33,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (31,3)-(31,6) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (31,7)-(33,1))
- │ ├── locals: [:pair]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (31,9)-(31,15))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (31,10)-(31,14))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (31,10)-(31,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :pair
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (31,9)-(31,10) = "|"
- │ │ └── closing_loc: (31,14)-(31,15) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (32,2)-(32,6))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (32,2)-(32,6))
- │ │ ├── name: :pair
- │ │ └── depth: 0
- │ ├── opening_loc: (31,7)-(31,8) = "{"
- │ └── closing_loc: (33,0)-(33,1) = "}"
- ├── then_keyword_loc: ∅
- ├── statements:
- │ @ StatementsNode (location: (34,2)-(35,5))
- │ └── body: (length: 2)
- │ ├── @ LocalVariableWriteNode (location: (34,2)-(34,13))
- │ │ ├── name: :pair
- │ │ ├── depth: 0
- │ │ ├── name_loc: (34,2)-(34,6) = "pair"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (34,9)-(34,13))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (34,9)-(34,10) = ":"
- │ │ │ ├── value_loc: (34,10)-(34,13) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ └── operator_loc: (34,7)-(34,8) = "="
- │ └── @ LocalVariableReadNode (location: (35,2)-(35,5))
- │ ├── name: :foo
- │ └── depth: 0
- ├── consequent: ∅
- └── end_keyword_loc: (36,0)-(36,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/kwbegin.txt b/test/prism/snapshots/unparser/corpus/literal/kwbegin.txt
deleted file mode 100644
index 48e53af00e..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/kwbegin.txt
+++ /dev/null
@@ -1,491 +0,0 @@
-@ ProgramNode (location: (1,0)-(80,3))
-├── locals: [:foo, :bar, :exception]
-└── statements:
- @ StatementsNode (location: (1,0)-(80,3))
- └── body: (length: 14)
- ├── @ BeginNode (location: (1,0)-(3,3))
- │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (2,0)-(2,6))
- │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ BeginNode (location: (5,0)-(7,3))
- │ ├── begin_keyword_loc: (5,0)-(5,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (6,0)-(7,3))
- │ │ ├── ensure_keyword_loc: (6,0)-(6,6) = "ensure"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (7,0)-(7,3) = "end"
- │ └── end_keyword_loc: (7,0)-(7,3) = "end"
- ├── @ BeginNode (location: (9,0)-(11,3))
- │ ├── begin_keyword_loc: (9,0)-(9,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (10,2)-(10,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (10,2)-(10,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (10,2)-(10,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ BeginNode (location: (13,0)-(17,3))
- │ ├── begin_keyword_loc: (13,0)-(13,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (14,2)-(14,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (14,2)-(14,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (14,2)-(14,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (15,0)-(16,3))
- │ │ ├── keyword_loc: (15,0)-(15,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (16,2)-(16,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (16,2)-(16,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (16,2)-(16,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- ├── @ BeginNode (location: (19,0)-(24,3))
- │ ├── begin_keyword_loc: (19,0)-(19,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (20,2)-(21,3))
- │ │ └── body: (length: 2)
- │ │ ├── @ CallNode (location: (20,2)-(20,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (20,2)-(20,3) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (21,2)-(21,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (21,2)-(21,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (22,0)-(23,3))
- │ │ ├── keyword_loc: (22,0)-(22,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (23,2)-(23,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (23,2)-(23,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (23,2)-(23,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (24,0)-(24,3) = "end"
- ├── @ BeginNode (location: (26,0)-(28,3))
- │ ├── begin_keyword_loc: (26,0)-(26,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (27,0)-(27,8))
- │ │ ├── keyword_loc: (27,0)-(27,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (27,7)-(27,8))
- │ │ │ └── name: :A
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (28,0)-(28,3) = "end"
- ├── @ BeginNode (location: (30,0)-(32,3))
- │ ├── begin_keyword_loc: (30,0)-(30,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (31,0)-(31,15))
- │ │ ├── keyword_loc: (31,0)-(31,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (31,7)-(31,8))
- │ │ │ └── name: :A
- │ │ ├── operator_loc: (31,9)-(31,11) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (31,12)-(31,15))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (32,0)-(32,3) = "end"
- ├── @ BeginNode (location: (34,0)-(42,3))
- │ ├── begin_keyword_loc: (34,0)-(34,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (35,2)-(35,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (35,2)-(35,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (35,2)-(35,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (36,0)-(39,3))
- │ │ ├── keyword_loc: (36,0)-(36,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (36,7)-(36,8))
- │ │ │ └── name: :A
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (37,2)-(37,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (37,2)-(37,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent:
- │ │ @ RescueNode (location: (38,0)-(39,3))
- │ │ ├── keyword_loc: (38,0)-(38,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (38,7)-(38,8))
- │ │ │ └── name: :B
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (39,2)-(39,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (39,2)-(39,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (39,2)-(39,3) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause:
- │ │ @ EnsureNode (location: (40,0)-(42,3))
- │ │ ├── ensure_keyword_loc: (40,0)-(40,6) = "ensure"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (41,2)-(41,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (41,2)-(41,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (41,2)-(41,3) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
- │ └── end_keyword_loc: (42,0)-(42,3) = "end"
- ├── @ BeginNode (location: (44,0)-(53,3))
- │ ├── begin_keyword_loc: (44,0)-(44,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (45,2)-(49,5))
- │ │ └── body: (length: 1)
- │ │ └── @ BeginNode (location: (45,2)-(49,5))
- │ │ ├── begin_keyword_loc: (45,2)-(45,7) = "begin"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (46,4)-(47,7))
- │ │ │ └── body: (length: 2)
- │ │ │ ├── @ LocalVariableReadNode (location: (46,4)-(46,7))
- │ │ │ │ ├── name: :foo
- │ │ │ │ └── depth: 0
- │ │ │ └── @ CallNode (location: (47,4)-(47,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (47,4)-(47,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (48,2)-(48,8))
- │ │ │ ├── keyword_loc: (48,2)-(48,8) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (49,2)-(49,5) = "end"
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (50,0)-(52,5))
- │ │ ├── keyword_loc: (50,0)-(50,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (51,2)-(52,5))
- │ │ │ └── body: (length: 2)
- │ │ │ ├── @ CallNode (location: (51,2)-(51,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (51,2)-(51,5) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── @ CallNode (location: (52,2)-(52,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (52,2)-(52,5) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (53,0)-(53,3) = "end"
- ├── @ BeginNode (location: (55,0)-(58,3))
- │ ├── begin_keyword_loc: (55,0)-(55,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (56,2)-(56,35))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (56,2)-(56,35))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (56,2)-(56,18))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :raise
- │ │ │ ├── message_loc: (56,2)-(56,7) = "raise"
- │ │ │ ├── opening_loc: (56,7)-(56,8) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (56,8)-(56,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ ConstantReadNode (location: (56,8)-(56,17))
- │ │ │ │ └── name: :Exception
- │ │ │ ├── closing_loc: (56,17)-(56,18) = ")"
- │ │ │ └── block: ∅
- │ │ ├── keyword_loc: (56,19)-(56,25) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ LocalVariableWriteNode (location: (56,26)-(56,35))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (56,26)-(56,29) = "foo"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (56,32)-(56,35))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (56,32)-(56,35) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (56,30)-(56,31) = "="
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (57,0)-(57,16))
- │ │ ├── keyword_loc: (57,0)-(57,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (57,7)-(57,16))
- │ │ │ └── name: :Exception
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (58,0)-(58,3) = "end"
- ├── @ BeginNode (location: (60,0)-(64,3))
- │ ├── begin_keyword_loc: (60,0)-(60,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (61,2)-(61,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (61,2)-(61,5))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (62,0)-(63,5))
- │ │ ├── keyword_loc: (62,0)-(62,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: (62,7)-(62,9) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (62,10)-(62,13))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (63,2)-(63,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (63,2)-(63,5))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (64,0)-(64,3) = "end"
- ├── @ BeginNode (location: (66,0)-(70,3))
- │ ├── begin_keyword_loc: (66,0)-(66,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (67,2)-(67,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (67,2)-(67,5))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (68,0)-(69,5))
- │ │ ├── keyword_loc: (68,0)-(68,6) = "rescue"
- │ │ ├── exceptions: (length: 2)
- │ │ │ ├── @ ConstantReadNode (location: (68,7)-(68,16))
- │ │ │ │ └── name: :Exception
- │ │ │ └── @ ConstantReadNode (location: (68,18)-(68,23))
- │ │ │ └── name: :Other
- │ │ ├── operator_loc: (68,24)-(68,26) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (68,27)-(68,30))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (69,2)-(69,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (69,2)-(69,5))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (70,0)-(70,3) = "end"
- ├── @ BeginNode (location: (72,0)-(76,3))
- │ ├── begin_keyword_loc: (72,0)-(72,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (73,2)-(73,5))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (73,2)-(73,5))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (74,0)-(75,5))
- │ │ ├── keyword_loc: (74,0)-(74,6) = "rescue"
- │ │ ├── exceptions: (length: 2)
- │ │ │ ├── @ ConstantReadNode (location: (74,7)-(74,16))
- │ │ │ │ └── name: :SomeError
- │ │ │ └── @ SplatNode (location: (74,18)-(74,22))
- │ │ │ ├── operator_loc: (74,18)-(74,19) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableReadNode (location: (74,19)-(74,22))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── operator_loc: (74,23)-(74,25) = "=>"
- │ │ ├── reference:
- │ │ │ @ LocalVariableTargetNode (location: (74,26)-(74,35))
- │ │ │ ├── name: :exception
- │ │ │ └── depth: 0
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (75,2)-(75,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (75,2)-(75,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (75,2)-(75,5) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (76,0)-(76,3) = "end"
- └── @ SingletonClassNode (location: (78,0)-(80,3))
- ├── locals: []
- ├── class_keyword_loc: (78,0)-(78,5) = "class"
- ├── operator_loc: (78,6)-(78,8) = "<<"
- ├── expression:
- │ @ SelfNode (location: (78,9)-(78,13))
- ├── body:
- │ @ StatementsNode (location: (79,2)-(79,23))
- │ └── body: (length: 1)
- │ └── @ RescueModifierNode (location: (79,2)-(79,23))
- │ ├── expression:
- │ │ @ UndefNode (location: (79,2)-(79,12))
- │ │ ├── names: (length: 1)
- │ │ │ └── @ SymbolNode (location: (79,8)-(79,12))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (79,8)-(79,9) = ":"
- │ │ │ ├── value_loc: (79,9)-(79,12) = "bar"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "bar"
- │ │ └── keyword_loc: (79,2)-(79,7) = "undef"
- │ ├── keyword_loc: (79,13)-(79,19) = "rescue"
- │ └── rescue_expression:
- │ @ NilNode (location: (79,20)-(79,23))
- └── end_keyword_loc: (80,0)-(80,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/lambda.txt b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
deleted file mode 100644
index 3594787bca..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/lambda.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-@ ProgramNode (location: (1,0)-(13,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(13,1))
- └── body: (length: 6)
- ├── @ CallNode (location: (1,0)-(2,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :lambda
- │ ├── message_loc: (1,0)-(1,6) = "lambda"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,7)-(2,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,7)-(1,8) = "{"
- │ └── closing_loc: (2,0)-(2,1) = "}"
- ├── @ CallNode (location: (3,0)-(5,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :lambda
- │ ├── message_loc: (3,0)-(3,6) = "lambda"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (3,7)-(5,1))
- │ ├── locals: [:a, :b]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (3,9)-(3,15))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (3,10)-(3,14))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (3,10)-(3,11))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (3,13)-(3,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (3,9)-(3,10) = "|"
- │ │ └── closing_loc: (3,14)-(3,15) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (4,2)-(4,3))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (4,2)-(4,3))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── opening_loc: (3,7)-(3,8) = "{"
- │ └── closing_loc: (5,0)-(5,1) = "}"
- ├── @ LambdaNode (location: (6,0)-(7,1))
- │ ├── locals: []
- │ ├── operator_loc: (6,0)-(6,2) = "->"
- │ ├── opening_loc: (6,5)-(6,6) = "{"
- │ ├── closing_loc: (7,0)-(7,1) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (6,2)-(6,4))
- │ │ ├── parameters: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (6,2)-(6,3) = "("
- │ │ └── closing_loc: (6,3)-(6,4) = ")"
- │ └── body: ∅
- ├── @ LambdaNode (location: (8,0)-(9,1))
- │ ├── locals: [:a]
- │ ├── operator_loc: (8,0)-(8,2) = "->"
- │ ├── opening_loc: (8,6)-(8,7) = "{"
- │ ├── closing_loc: (9,0)-(9,1) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (8,2)-(8,5))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (8,3)-(8,4))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (8,3)-(8,4))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (8,2)-(8,3) = "("
- │ │ └── closing_loc: (8,4)-(8,5) = ")"
- │ └── body: ∅
- ├── @ LambdaNode (location: (10,0)-(11,1))
- │ ├── locals: [:a, :b]
- │ ├── operator_loc: (10,0)-(10,2) = "->"
- │ ├── opening_loc: (10,9)-(10,10) = "{"
- │ ├── closing_loc: (11,0)-(11,1) = "}"
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (10,2)-(10,8))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (10,3)-(10,7))
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ RequiredParameterNode (location: (10,3)-(10,4))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :a
- │ │ │ │ └── @ RequiredParameterNode (location: (10,6)-(10,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :b
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (10,2)-(10,3) = "("
- │ │ └── closing_loc: (10,7)-(10,8) = ")"
- │ └── body: ∅
- └── @ LambdaNode (location: (12,0)-(13,1))
- ├── locals: [:a, :b, :c]
- ├── operator_loc: (12,0)-(12,2) = "->"
- ├── opening_loc: (12,12)-(12,13) = "{"
- ├── closing_loc: (13,0)-(13,1) = "}"
- ├── parameters:
- │ @ BlockParametersNode (location: (12,2)-(12,11))
- │ ├── parameters:
- │ │ @ ParametersNode (location: (12,3)-(12,7))
- │ │ ├── requireds: (length: 2)
- │ │ │ ├── @ RequiredParameterNode (location: (12,3)-(12,4))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ └── @ RequiredParameterNode (location: (12,6)-(12,7))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :b
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── locals: (length: 1)
- │ │ └── @ BlockLocalVariableNode (location: (12,9)-(12,10))
- │ │ ├── flags: ∅
- │ │ └── name: :c
- │ ├── opening_loc: (12,2)-(12,3) = "("
- │ └── closing_loc: (12,10)-(12,11) = ")"
- └── body: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/literal.txt b/test/prism/snapshots/unparser/corpus/literal/literal.txt
deleted file mode 100644
index 98b88e11ce..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/literal.txt
+++ /dev/null
@@ -1,1198 +0,0 @@
-@ ProgramNode (location: (1,0)-(91,2))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(91,2))
- └── body: (length: 78)
- ├── @ HashNode (location: (1,0)-(1,38))
- │ ├── opening_loc: (1,0)-(1,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (1,2)-(1,21))
- │ │ │ ├── key:
- │ │ │ │ @ StringNode (location: (1,2)-(1,7))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ │ │ │ ├── content_loc: (1,3)-(1,6) = "foo"
- │ │ │ │ ├── closing_loc: (1,6)-(1,7) = "\""
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── value:
- │ │ │ │ @ InterpolatedStringNode (location: (1,11)-(1,21))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (1,11)-(1,21) = "<<-HEREDOC"
- │ │ │ │ ├── parts: (length: 3)
- │ │ │ │ │ ├── @ StringNode (location: (2,0)-(2,2))
- │ │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── content_loc: (2,0)-(2,2) = " "
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── unescaped: " "
- │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (2,2)-(2,5))
- │ │ │ │ │ │ ├── opening_loc: (2,2)-(2,4) = "\#{"
- │ │ │ │ │ │ ├── statements: ∅
- │ │ │ │ │ │ └── closing_loc: (2,4)-(2,5) = "}"
- │ │ │ │ │ └── @ StringNode (location: (2,5)-(3,0))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (2,5)-(3,0) = "\n"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "\n"
- │ │ │ │ └── closing_loc: (3,0)-(4,0) = "HEREDOC\n"
- │ │ │ └── operator_loc: (1,8)-(1,10) = "=>"
- │ │ └── @ AssocNode (location: (1,23)-(1,36))
- │ │ ├── key:
- │ │ │ @ StringNode (location: (1,23)-(1,28))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (1,23)-(1,24) = "\""
- │ │ │ ├── content_loc: (1,24)-(1,27) = "bar"
- │ │ │ ├── closing_loc: (1,27)-(1,28) = "\""
- │ │ │ └── unescaped: "bar"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (1,32)-(1,36))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (1,32)-(1,33) = ":"
- │ │ │ ├── value_loc: (1,33)-(1,36) = "baz"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "baz"
- │ │ └── operator_loc: (1,29)-(1,31) = "=>"
- │ └── closing_loc: (1,37)-(1,38) = "}"
- ├── @ HashNode (location: (4,0)-(4,31))
- │ ├── opening_loc: (4,0)-(4,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (4,2)-(4,14))
- │ │ │ ├── key:
- │ │ │ │ @ StringNode (location: (4,2)-(4,7))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: (4,2)-(4,3) = "\""
- │ │ │ │ ├── content_loc: (4,3)-(4,6) = "foo"
- │ │ │ │ ├── closing_loc: (4,6)-(4,7) = "\""
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── value:
- │ │ │ │ @ StringNode (location: (4,11)-(4,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (4,11)-(4,13) = "%("
- │ │ │ │ ├── content_loc: (4,13)-(4,13) = ""
- │ │ │ │ ├── closing_loc: (4,13)-(4,14) = ")"
- │ │ │ │ └── unescaped: ""
- │ │ │ └── operator_loc: (4,8)-(4,10) = "=>"
- │ │ └── @ AssocNode (location: (4,16)-(4,29))
- │ │ ├── key:
- │ │ │ @ StringNode (location: (4,16)-(4,21))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (4,16)-(4,17) = "\""
- │ │ │ ├── content_loc: (4,17)-(4,20) = "bar"
- │ │ │ ├── closing_loc: (4,20)-(4,21) = "\""
- │ │ │ └── unescaped: "bar"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (4,25)-(4,29))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (4,25)-(4,26) = ":"
- │ │ │ ├── value_loc: (4,26)-(4,29) = "baz"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "baz"
- │ │ └── operator_loc: (4,22)-(4,24) = "=>"
- │ └── closing_loc: (4,30)-(4,31) = "}"
- ├── @ ArrayNode (location: (5,0)-(5,12))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ StringNode (location: (5,1)-(5,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (5,1)-(5,2) = "\""
- │ │ │ ├── content_loc: (5,2)-(5,5) = "foo"
- │ │ │ ├── closing_loc: (5,5)-(5,6) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ └── @ StringNode (location: (5,8)-(5,11))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (5,8)-(5,10) = "%("
- │ │ ├── content_loc: (5,10)-(5,10) = ""
- │ │ ├── closing_loc: (5,10)-(5,11) = ")"
- │ │ └── unescaped: ""
- │ ├── opening_loc: (5,0)-(5,1) = "["
- │ └── closing_loc: (5,11)-(5,12) = "]"
- ├── @ CallNode (location: (6,0)-(6,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (6,0)-(6,13))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (6,0)-(6,1) = "a"
- │ │ ├── opening_loc: (6,1)-(6,2) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (6,2)-(6,12))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ InterpolatedStringNode (location: (6,2)-(6,12))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (6,2)-(6,12) = "<<-HEREDOC"
- │ │ │ ├── parts: (length: 3)
- │ │ │ │ ├── @ StringNode (location: (7,0)-(7,2))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (7,0)-(7,2) = " "
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: " "
- │ │ │ │ ├── @ EmbeddedStatementsNode (location: (7,2)-(7,5))
- │ │ │ │ │ ├── opening_loc: (7,2)-(7,4) = "\#{"
- │ │ │ │ │ ├── statements: ∅
- │ │ │ │ │ └── closing_loc: (7,4)-(7,5) = "}"
- │ │ │ │ └── @ StringNode (location: (7,5)-(8,0))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (7,5)-(8,0) = "\n"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "\n"
- │ │ │ └── closing_loc: (8,0)-(9,0) = "HEREDOC\n"
- │ │ ├── closing_loc: (6,12)-(6,13) = ")"
- │ │ └── block: ∅
- │ ├── call_operator_loc: (6,13)-(6,14) = "."
- │ ├── name: :a
- │ ├── message_loc: (6,14)-(6,15) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (9,0)-(9,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (9,0)-(9,6))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (9,0)-(9,1) = "a"
- │ │ ├── opening_loc: (9,1)-(9,2) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (9,2)-(9,5))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (9,2)-(9,5))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (9,2)-(9,4) = "%("
- │ │ │ ├── content_loc: (9,4)-(9,4) = ""
- │ │ │ ├── closing_loc: (9,4)-(9,5) = ")"
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: (9,5)-(9,6) = ")"
- │ │ └── block: ∅
- │ ├── call_operator_loc: (9,6)-(9,7) = "."
- │ ├── name: :a
- │ ├── message_loc: (9,7)-(9,8) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ HashNode (location: (10,0)-(10,30))
- │ ├── opening_loc: (10,0)-(10,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (10,2)-(10,21))
- │ │ │ ├── key:
- │ │ │ │ @ StringNode (location: (10,2)-(10,7))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: (10,2)-(10,3) = "\""
- │ │ │ │ ├── content_loc: (10,3)-(10,6) = "foo"
- │ │ │ │ ├── closing_loc: (10,6)-(10,7) = "\""
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── value:
- │ │ │ │ @ InterpolatedStringNode (location: (10,11)-(10,21))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (10,11)-(10,21) = "<<-HEREDOC"
- │ │ │ │ ├── parts: (length: 3)
- │ │ │ │ │ ├── @ StringNode (location: (11,0)-(11,2))
- │ │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── content_loc: (11,0)-(11,2) = " "
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── unescaped: " "
- │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (11,2)-(11,5))
- │ │ │ │ │ │ ├── opening_loc: (11,2)-(11,4) = "\#{"
- │ │ │ │ │ │ ├── statements: ∅
- │ │ │ │ │ │ └── closing_loc: (11,4)-(11,5) = "}"
- │ │ │ │ │ └── @ StringNode (location: (11,5)-(12,0))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (11,5)-(12,0) = "\n"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "\n"
- │ │ │ │ └── closing_loc: (12,0)-(13,0) = "HEREDOC\n"
- │ │ │ └── operator_loc: (10,8)-(10,10) = "=>"
- │ │ └── @ AssocSplatNode (location: (10,23)-(10,28))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (10,25)-(10,28))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (10,25)-(10,28) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (10,23)-(10,25) = "**"
- │ └── closing_loc: (10,29)-(10,30) = "}"
- ├── @ HashNode (location: (13,0)-(13,23))
- │ ├── opening_loc: (13,0)-(13,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (13,2)-(13,14))
- │ │ │ ├── key:
- │ │ │ │ @ StringNode (location: (13,2)-(13,7))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: (13,2)-(13,3) = "\""
- │ │ │ │ ├── content_loc: (13,3)-(13,6) = "foo"
- │ │ │ │ ├── closing_loc: (13,6)-(13,7) = "\""
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── value:
- │ │ │ │ @ StringNode (location: (13,11)-(13,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── opening_loc: (13,11)-(13,13) = "%("
- │ │ │ │ ├── content_loc: (13,13)-(13,13) = ""
- │ │ │ │ ├── closing_loc: (13,13)-(13,14) = ")"
- │ │ │ │ └── unescaped: ""
- │ │ │ └── operator_loc: (13,8)-(13,10) = "=>"
- │ │ └── @ AssocSplatNode (location: (13,16)-(13,21))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (13,18)-(13,21))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (13,18)-(13,21) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (13,16)-(13,18) = "**"
- │ └── closing_loc: (13,22)-(13,23) = "}"
- ├── @ InterpolatedStringNode (location: (14,0)-(14,14))
- │ ├── flags: ∅
- │ ├── opening_loc: (14,0)-(14,1) = "\""
- │ ├── parts: (length: 5)
- │ │ ├── @ EmbeddedVariableNode (location: (14,1)-(14,4))
- │ │ │ ├── operator_loc: (14,1)-(14,2) = "#"
- │ │ │ └── variable:
- │ │ │ @ InstanceVariableReadNode (location: (14,2)-(14,4))
- │ │ │ └── name: :@a
- │ │ ├── @ StringNode (location: (14,4)-(14,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (14,4)-(14,5) = " "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " "
- │ │ ├── @ EmbeddedVariableNode (location: (14,5)-(14,9))
- │ │ │ ├── operator_loc: (14,5)-(14,6) = "#"
- │ │ │ └── variable:
- │ │ │ @ ClassVariableReadNode (location: (14,6)-(14,9))
- │ │ │ └── name: :@@a
- │ │ ├── @ StringNode (location: (14,9)-(14,10))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (14,9)-(14,10) = " "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " "
- │ │ └── @ EmbeddedVariableNode (location: (14,10)-(14,13))
- │ │ ├── operator_loc: (14,10)-(14,11) = "#"
- │ │ └── variable:
- │ │ @ GlobalVariableReadNode (location: (14,11)-(14,13))
- │ │ └── name: :$a
- │ └── closing_loc: (14,13)-(14,14) = "\""
- ├── @ IntegerNode (location: (15,0)-(15,1))
- │ ├── flags: decimal
- │ └── value: 0
- ├── @ CallNode (location: (16,0)-(16,3))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (16,1)-(16,3))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :+@
- │ ├── message_loc: (16,0)-(16,1) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ IntegerNode (location: (17,0)-(17,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ IntegerNode (location: (18,0)-(18,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ RationalNode (location: (19,0)-(19,2))
- │ └── numeric:
- │ @ IntegerNode (location: (19,0)-(19,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ RationalNode (location: (20,0)-(20,4))
- │ └── numeric:
- │ @ FloatNode (location: (20,0)-(20,3))
- │ └── value: 1.5
- ├── @ RationalNode (location: (21,0)-(21,4))
- │ └── numeric:
- │ @ FloatNode (location: (21,0)-(21,3))
- │ └── value: 1.3
- ├── @ ImaginaryNode (location: (22,0)-(22,2))
- │ └── numeric:
- │ @ IntegerNode (location: (22,0)-(22,1))
- │ ├── flags: decimal
- │ └── value: 5
- ├── @ ImaginaryNode (location: (23,0)-(23,3))
- │ └── numeric:
- │ @ IntegerNode (location: (23,0)-(23,2))
- │ ├── flags: decimal
- │ └── value: -5
- ├── @ ImaginaryNode (location: (24,0)-(24,4))
- │ └── numeric:
- │ @ FloatNode (location: (24,0)-(24,3))
- │ └── value: 0.6
- ├── @ ImaginaryNode (location: (25,0)-(25,5))
- │ └── numeric:
- │ @ FloatNode (location: (25,0)-(25,4))
- │ └── value: -0.6
- ├── @ ImaginaryNode (location: (26,0)-(26,32))
- │ └── numeric:
- │ @ IntegerNode (location: (26,0)-(26,31))
- │ ├── flags: decimal
- │ └── value: 1000000000000000000000000000000
- ├── @ ImaginaryNode (location: (27,0)-(27,3))
- │ └── numeric:
- │ @ RationalNode (location: (27,0)-(27,2))
- │ └── numeric:
- │ @ IntegerNode (location: (27,0)-(27,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ InterpolatedStringNode (location: (28,0)-(28,11))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (28,0)-(28,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (28,0)-(28,1) = "\""
- │ │ │ ├── content_loc: (28,1)-(28,4) = "foo"
- │ │ │ ├── closing_loc: (28,4)-(28,5) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ └── @ StringNode (location: (28,6)-(28,11))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (28,6)-(28,7) = "\""
- │ │ ├── content_loc: (28,7)-(28,10) = "bar"
- │ │ ├── closing_loc: (28,10)-(28,11) = "\""
- │ │ └── unescaped: "bar"
- │ └── closing_loc: ∅
- ├── @ InterpolatedStringNode (location: (29,0)-(29,15))
- │ ├── flags: ∅
- │ ├── opening_loc: (29,0)-(29,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (29,1)-(29,8))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (29,1)-(29,8) = "foobar "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foobar "
- │ │ └── @ EmbeddedStatementsNode (location: (29,8)-(29,14))
- │ │ ├── opening_loc: (29,8)-(29,10) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (29,10)-(29,13))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (29,10)-(29,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :baz
- │ │ │ ├── message_loc: (29,10)-(29,13) = "baz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (29,13)-(29,14) = "}"
- │ └── closing_loc: (29,14)-(29,15) = "\""
- ├── @ InterpolatedStringNode (location: (30,0)-(30,12))
- │ ├── flags: ∅
- │ ├── opening_loc: (30,0)-(30,1) = "\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (30,1)-(30,4))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (30,1)-(30,4) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── @ EmbeddedStatementsNode (location: (30,4)-(30,8))
- │ │ │ ├── opening_loc: (30,4)-(30,6) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (30,6)-(30,7))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (30,6)-(30,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── closing_loc: (30,7)-(30,8) = "}"
- │ │ └── @ StringNode (location: (30,8)-(30,11))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (30,8)-(30,11) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ └── closing_loc: (30,11)-(30,12) = "\""
- ├── @ InterpolatedStringNode (location: (31,0)-(31,9))
- │ ├── flags: ∅
- │ ├── opening_loc: (31,0)-(31,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (31,1)-(31,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (31,1)-(31,5) = "\\\\\\\\"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\\\\"
- │ │ └── @ EmbeddedStatementsNode (location: (31,5)-(31,8))
- │ │ ├── opening_loc: (31,5)-(31,7) = "\#{"
- │ │ ├── statements: ∅
- │ │ └── closing_loc: (31,7)-(31,8) = "}"
- │ └── closing_loc: (31,8)-(31,9) = "\""
- ├── @ InterpolatedStringNode (location: (32,0)-(32,9))
- │ ├── flags: ∅
- │ ├── opening_loc: (32,0)-(32,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ EmbeddedStatementsNode (location: (32,1)-(32,4))
- │ │ │ ├── opening_loc: (32,1)-(32,3) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (32,3)-(32,4) = "}"
- │ │ └── @ StringNode (location: (32,4)-(32,8))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (32,4)-(32,8) = "\\\#{}"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\#{}"
- │ └── closing_loc: (32,8)-(32,9) = "\""
- ├── @ InterpolatedStringNode (location: (33,0)-(33,9))
- │ ├── flags: ∅
- │ ├── opening_loc: (33,0)-(33,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (33,1)-(33,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (33,1)-(33,5) = "\\\#{}"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\#{}"
- │ │ └── @ EmbeddedStatementsNode (location: (33,5)-(33,8))
- │ │ ├── opening_loc: (33,5)-(33,7) = "\#{"
- │ │ ├── statements: ∅
- │ │ └── closing_loc: (33,7)-(33,8) = "}"
- │ └── closing_loc: (33,8)-(33,9) = "\""
- ├── @ StringNode (location: (34,0)-(34,15))
- │ ├── flags: ∅
- │ ├── opening_loc: (34,0)-(34,1) = "\""
- │ ├── content_loc: (34,1)-(34,14) = "foo\\\\\\\#{@bar}"
- │ ├── closing_loc: (34,14)-(34,15) = "\""
- │ └── unescaped: "foo\\\#{@bar}"
- ├── @ StringNode (location: (35,0)-(35,4))
- │ ├── flags: ∅
- │ ├── opening_loc: (35,0)-(35,1) = "\""
- │ ├── content_loc: (35,1)-(35,3) = "\\\""
- │ ├── closing_loc: (35,3)-(35,4) = "\""
- │ └── unescaped: "\""
- ├── @ StringNode (location: (36,0)-(36,9))
- │ ├── flags: ∅
- │ ├── opening_loc: (36,0)-(36,1) = "\""
- │ ├── content_loc: (36,1)-(36,8) = "foo bar"
- │ ├── closing_loc: (36,8)-(36,9) = "\""
- │ └── unescaped: "foo bar"
- ├── @ StringNode (location: (37,0)-(37,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (37,0)-(37,1) = "\""
- │ ├── content_loc: (37,1)-(37,9) = "foo\\nbar"
- │ ├── closing_loc: (37,9)-(37,10) = "\""
- │ └── unescaped: "foo\nbar"
- ├── @ XStringNode (location: (38,0)-(38,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (38,0)-(38,1) = "`"
- │ ├── content_loc: (38,1)-(38,4) = "foo"
- │ ├── closing_loc: (38,4)-(38,5) = "`"
- │ └── unescaped: "foo"
- ├── @ InterpolatedXStringNode (location: (39,0)-(39,12))
- │ ├── opening_loc: (39,0)-(39,1) = "`"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (39,1)-(39,4))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (39,1)-(39,4) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ └── @ EmbeddedStatementsNode (location: (39,4)-(39,11))
- │ │ ├── opening_loc: (39,4)-(39,6) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (39,6)-(39,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ InstanceVariableReadNode (location: (39,6)-(39,10))
- │ │ │ └── name: :@bar
- │ │ └── closing_loc: (39,10)-(39,11) = "}"
- │ └── closing_loc: (39,11)-(39,12) = "`"
- ├── @ XStringNode (location: (40,0)-(40,3))
- │ ├── flags: ∅
- │ ├── opening_loc: (40,0)-(40,1) = "`"
- │ ├── content_loc: (40,1)-(40,2) = ")"
- │ ├── closing_loc: (40,2)-(40,3) = "`"
- │ └── unescaped: ")"
- ├── @ XStringNode (location: (41,0)-(41,4))
- │ ├── flags: ∅
- │ ├── opening_loc: (41,0)-(41,1) = "`"
- │ ├── content_loc: (41,1)-(41,3) = "\\`"
- │ ├── closing_loc: (41,3)-(41,4) = "`"
- │ └── unescaped: "`"
- ├── @ XStringNode (location: (42,0)-(42,3))
- │ ├── flags: ∅
- │ ├── opening_loc: (42,0)-(42,1) = "`"
- │ ├── content_loc: (42,1)-(42,2) = "\""
- │ ├── closing_loc: (42,2)-(42,3) = "`"
- │ └── unescaped: "\""
- ├── @ SymbolNode (location: (43,0)-(43,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (43,0)-(43,1) = ":"
- │ ├── value_loc: (43,1)-(43,4) = "foo"
- │ ├── closing_loc: ∅
- │ └── unescaped: "foo"
- ├── @ SymbolNode (location: (44,0)-(44,6))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (44,0)-(44,2) = ":\""
- │ ├── value_loc: (44,2)-(44,5) = "A B"
- │ ├── closing_loc: (44,5)-(44,6) = "\""
- │ └── unescaped: "A B"
- ├── @ SymbolNode (location: (45,0)-(45,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (45,0)-(45,1) = ":"
- │ ├── value_loc: (45,1)-(45,4) = "foo"
- │ ├── closing_loc: ∅
- │ └── unescaped: "foo"
- ├── @ SymbolNode (location: (46,0)-(46,6))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (46,0)-(46,2) = ":\""
- │ ├── value_loc: (46,2)-(46,5) = "A B"
- │ ├── closing_loc: (46,5)-(46,6) = "\""
- │ └── unescaped: "A B"
- ├── @ SymbolNode (location: (47,0)-(47,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (47,0)-(47,2) = ":\""
- │ ├── value_loc: (47,2)-(47,6) = "A\\\"B"
- │ ├── closing_loc: (47,6)-(47,7) = "\""
- │ └── unescaped: "A\"B"
- ├── @ SymbolNode (location: (48,0)-(48,3))
- │ ├── flags: ∅
- │ ├── opening_loc: (48,0)-(48,2) = ":\""
- │ ├── value_loc: (1,0)-(1,0) = ""
- │ ├── closing_loc: (48,2)-(48,3) = "\""
- │ └── unescaped: ""
- ├── @ RegularExpressionNode (location: (49,0)-(49,5))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (49,0)-(49,1) = "/"
- │ ├── content_loc: (49,1)-(49,4) = "foo"
- │ ├── closing_loc: (49,4)-(49,5) = "/"
- │ └── unescaped: "foo"
- ├── @ RegularExpressionNode (location: (50,0)-(50,28))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (50,0)-(50,1) = "/"
- │ ├── content_loc: (50,1)-(50,27) = "[^-+',.\\/:@[:alnum:]\\[\\]]+"
- │ ├── closing_loc: (50,27)-(50,28) = "/"
- │ └── unescaped: "[^-+',./:@[:alnum:]\\[\\]]+"
- ├── @ InterpolatedRegularExpressionNode (location: (51,0)-(51,12))
- │ ├── flags: ∅
- │ ├── opening_loc: (51,0)-(51,1) = "/"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (51,1)-(51,4))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (51,1)-(51,4) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ └── @ EmbeddedStatementsNode (location: (51,4)-(51,11))
- │ │ ├── opening_loc: (51,4)-(51,6) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (51,6)-(51,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ InstanceVariableReadNode (location: (51,6)-(51,10))
- │ │ │ └── name: :@bar
- │ │ └── closing_loc: (51,10)-(51,11) = "}"
- │ └── closing_loc: (51,11)-(51,12) = "/"
- ├── @ InterpolatedRegularExpressionNode (location: (52,0)-(52,15))
- │ ├── flags: ignore_case, extended, multi_line
- │ ├── opening_loc: (52,0)-(52,1) = "/"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (52,1)-(52,4))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (52,1)-(52,4) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ └── @ EmbeddedStatementsNode (location: (52,4)-(52,11))
- │ │ ├── opening_loc: (52,4)-(52,6) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (52,6)-(52,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ InstanceVariableReadNode (location: (52,6)-(52,10))
- │ │ │ └── name: :@bar
- │ │ └── closing_loc: (52,10)-(52,11) = "}"
- │ └── closing_loc: (52,11)-(52,15) = "/imx"
- ├── @ InterpolatedRegularExpressionNode (location: (53,0)-(53,13))
- │ ├── flags: ∅
- │ ├── opening_loc: (53,0)-(53,1) = "/"
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (53,1)-(53,12))
- │ │ ├── opening_loc: (53,1)-(53,3) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (53,3)-(53,11))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ StringNode (location: (53,3)-(53,11))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (53,3)-(53,4) = "\""
- │ │ │ ├── content_loc: (53,4)-(53,10) = "\\u0000"
- │ │ │ ├── closing_loc: (53,10)-(53,11) = "\""
- │ │ │ └── unescaped: "\u0000"
- │ │ └── closing_loc: (53,11)-(53,12) = "}"
- │ └── closing_loc: (53,12)-(53,13) = "/"
- ├── @ RegularExpressionNode (location: (54,0)-(54,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (54,0)-(54,1) = "/"
- │ ├── content_loc: (54,1)-(54,3) = "\\n"
- │ ├── closing_loc: (54,3)-(54,4) = "/"
- │ └── unescaped: "\\n"
- ├── @ RegularExpressionNode (location: (55,0)-(55,4))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (55,0)-(55,1) = "/"
- │ ├── content_loc: (55,1)-(55,3) = "\\n"
- │ ├── closing_loc: (55,3)-(55,4) = "/"
- │ └── unescaped: "\\n"
- ├── @ RegularExpressionNode (location: (56,0)-(56,5))
- │ ├── flags: extended, forced_us_ascii_encoding
- │ ├── opening_loc: (56,0)-(56,1) = "/"
- │ ├── content_loc: (56,1)-(56,3) = "\\n"
- │ ├── closing_loc: (56,3)-(56,5) = "/x"
- │ └── unescaped: "\\n"
- ├── @ RegularExpressionNode (location: (57,0)-(57,7))
- │ ├── flags: extended, forced_us_ascii_encoding
- │ ├── opening_loc: (57,0)-(57,1) = "/"
- │ ├── content_loc: (57,1)-(57,5) = "\\/\\/"
- │ ├── closing_loc: (57,5)-(57,7) = "/x"
- │ └── unescaped: "//"
- ├── @ InterpolatedSymbolNode (location: (58,0)-(58,15))
- │ ├── opening_loc: (58,0)-(58,2) = ":\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (58,2)-(58,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (58,2)-(58,5) = "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo"
- │ │ ├── @ EmbeddedStatementsNode (location: (58,5)-(58,11))
- │ │ │ ├── opening_loc: (58,5)-(58,7) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (58,7)-(58,10))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (58,7)-(58,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (58,7)-(58,10) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (58,10)-(58,11) = "}"
- │ │ └── @ StringNode (location: (58,11)-(58,14))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (58,11)-(58,14) = "baz"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "baz"
- │ └── closing_loc: (58,14)-(58,15) = "\""
- ├── @ InterpolatedSymbolNode (location: (59,0)-(59,11))
- │ ├── opening_loc: (59,0)-(59,2) = ":\""
- │ ├── parts: (length: 1)
- │ │ └── @ EmbeddedStatementsNode (location: (59,2)-(59,10))
- │ │ ├── opening_loc: (59,2)-(59,4) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (59,4)-(59,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ StringNode (location: (59,4)-(59,9))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (59,4)-(59,5) = "\""
- │ │ │ ├── content_loc: (59,5)-(59,8) = "foo"
- │ │ │ ├── closing_loc: (59,8)-(59,9) = "\""
- │ │ │ └── unescaped: "foo"
- │ │ └── closing_loc: (59,9)-(59,10) = "}"
- │ └── closing_loc: (59,10)-(59,11) = "\""
- ├── @ RangeNode (location: (60,0)-(60,14))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ ParenthesesNode (location: (60,0)-(60,11))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (60,1)-(60,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (60,1)-(60,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ FloatNode (location: (60,1)-(60,4))
- │ │ │ │ └── value: 0.0
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :/
- │ │ │ ├── message_loc: (60,5)-(60,6) = "/"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (60,7)-(60,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ FloatNode (location: (60,7)-(60,10))
- │ │ │ │ └── value: 0.0
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (60,0)-(60,1) = "("
- │ │ └── closing_loc: (60,10)-(60,11) = ")"
- │ ├── right:
- │ │ @ IntegerNode (location: (60,13)-(60,14))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (60,11)-(60,13) = ".."
- ├── @ RangeNode (location: (61,0)-(61,14))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (61,0)-(61,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ ParenthesesNode (location: (61,3)-(61,14))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (61,4)-(61,13))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (61,4)-(61,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ FloatNode (location: (61,4)-(61,7))
- │ │ │ │ └── value: 0.0
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :/
- │ │ │ ├── message_loc: (61,8)-(61,9) = "/"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (61,10)-(61,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ FloatNode (location: (61,10)-(61,13))
- │ │ │ │ └── value: 0.0
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (61,3)-(61,4) = "("
- │ │ └── closing_loc: (61,13)-(61,14) = ")"
- │ └── operator_loc: (61,1)-(61,3) = ".."
- ├── @ RangeNode (location: (62,0)-(62,16))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ ParenthesesNode (location: (62,0)-(62,11))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (62,1)-(62,10))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (62,1)-(62,10))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ FloatNode (location: (62,1)-(62,4))
- │ │ │ │ └── value: 0.0
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :/
- │ │ │ ├── message_loc: (62,5)-(62,6) = "/"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (62,7)-(62,10))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ FloatNode (location: (62,7)-(62,10))
- │ │ │ │ └── value: 0.0
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (62,0)-(62,1) = "("
- │ │ └── closing_loc: (62,10)-(62,11) = ")"
- │ ├── right:
- │ │ @ IntegerNode (location: (62,13)-(62,16))
- │ │ ├── flags: decimal
- │ │ └── value: 100
- │ └── operator_loc: (62,11)-(62,13) = ".."
- ├── @ FloatNode (location: (63,0)-(63,4))
- │ └── value: -0.1
- ├── @ FloatNode (location: (64,0)-(64,3))
- │ └── value: 0.1
- ├── @ ArrayNode (location: (65,0)-(65,6))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (65,1)-(65,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (65,4)-(65,5))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: (65,0)-(65,1) = "["
- │ └── closing_loc: (65,5)-(65,6) = "]"
- ├── @ ArrayNode (location: (66,0)-(66,11))
- │ ├── flags: ∅
- │ ├── elements: (length: 3)
- │ │ ├── @ IntegerNode (location: (66,1)-(66,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ ParenthesesNode (location: (66,4)-(66,6))
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (66,4)-(66,5) = "("
- │ │ │ └── closing_loc: (66,5)-(66,6) = ")"
- │ │ └── @ CallNode (location: (66,8)-(66,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :n2
- │ │ ├── message_loc: (66,8)-(66,10) = "n2"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (66,0)-(66,1) = "["
- │ └── closing_loc: (66,10)-(66,11) = "]"
- ├── @ ArrayNode (location: (67,0)-(67,3))
- │ ├── flags: ∅
- │ ├── elements: (length: 1)
- │ │ └── @ IntegerNode (location: (67,1)-(67,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── opening_loc: (67,0)-(67,1) = "["
- │ └── closing_loc: (67,2)-(67,3) = "]"
- ├── @ ArrayNode (location: (68,0)-(68,2))
- │ ├── flags: ∅
- │ ├── elements: (length: 0)
- │ ├── opening_loc: (68,0)-(68,1) = "["
- │ └── closing_loc: (68,1)-(68,2) = "]"
- ├── @ ArrayNode (location: (69,0)-(69,10))
- │ ├── flags: contains_splat
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (69,1)-(69,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ SplatNode (location: (69,4)-(69,9))
- │ │ ├── operator_loc: (69,4)-(69,5) = "*"
- │ │ └── expression:
- │ │ @ InstanceVariableReadNode (location: (69,5)-(69,9))
- │ │ └── name: :@foo
- │ ├── opening_loc: (69,0)-(69,1) = "["
- │ └── closing_loc: (69,9)-(69,10) = "]"
- ├── @ ArrayNode (location: (70,0)-(70,10))
- │ ├── flags: contains_splat
- │ ├── elements: (length: 2)
- │ │ ├── @ SplatNode (location: (70,1)-(70,6))
- │ │ │ ├── operator_loc: (70,1)-(70,2) = "*"
- │ │ │ └── expression:
- │ │ │ @ InstanceVariableReadNode (location: (70,2)-(70,6))
- │ │ │ └── name: :@foo
- │ │ └── @ IntegerNode (location: (70,8)-(70,9))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── opening_loc: (70,0)-(70,1) = "["
- │ └── closing_loc: (70,9)-(70,10) = "]"
- ├── @ ArrayNode (location: (71,0)-(71,14))
- │ ├── flags: contains_splat
- │ ├── elements: (length: 2)
- │ │ ├── @ SplatNode (location: (71,1)-(71,6))
- │ │ │ ├── operator_loc: (71,1)-(71,2) = "*"
- │ │ │ └── expression:
- │ │ │ @ InstanceVariableReadNode (location: (71,2)-(71,6))
- │ │ │ └── name: :@foo
- │ │ └── @ SplatNode (location: (71,8)-(71,13))
- │ │ ├── operator_loc: (71,8)-(71,9) = "*"
- │ │ └── expression:
- │ │ @ InstanceVariableReadNode (location: (71,9)-(71,13))
- │ │ └── name: :@baz
- │ ├── opening_loc: (71,0)-(71,1) = "["
- │ └── closing_loc: (71,13)-(71,14) = "]"
- ├── @ HashNode (location: (72,0)-(72,2))
- │ ├── opening_loc: (72,0)-(72,1) = "{"
- │ ├── elements: (length: 0)
- │ └── closing_loc: (72,1)-(72,2) = "}"
- ├── @ HashNode (location: (73,0)-(73,12))
- │ ├── opening_loc: (73,0)-(73,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (73,2)-(73,10))
- │ │ ├── key:
- │ │ │ @ ParenthesesNode (location: (73,2)-(73,4))
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (73,2)-(73,3) = "("
- │ │ │ └── closing_loc: (73,3)-(73,4) = ")"
- │ │ ├── value:
- │ │ │ @ ParenthesesNode (location: (73,8)-(73,10))
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (73,8)-(73,9) = "("
- │ │ │ └── closing_loc: (73,9)-(73,10) = ")"
- │ │ └── operator_loc: (73,5)-(73,7) = "=>"
- │ └── closing_loc: (73,11)-(73,12) = "}"
- ├── @ HashNode (location: (74,0)-(74,10))
- │ ├── opening_loc: (74,0)-(74,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (74,2)-(74,8))
- │ │ ├── key:
- │ │ │ @ IntegerNode (location: (74,2)-(74,3))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (74,7)-(74,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: (74,4)-(74,6) = "=>"
- │ └── closing_loc: (74,9)-(74,10) = "}"
- ├── @ HashNode (location: (75,0)-(75,18))
- │ ├── opening_loc: (75,0)-(75,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (75,2)-(75,8))
- │ │ │ ├── key:
- │ │ │ │ @ IntegerNode (location: (75,2)-(75,3))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (75,7)-(75,8))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── operator_loc: (75,4)-(75,6) = "=>"
- │ │ └── @ AssocNode (location: (75,10)-(75,16))
- │ │ ├── key:
- │ │ │ @ IntegerNode (location: (75,10)-(75,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (75,15)-(75,16))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 4
- │ │ └── operator_loc: (75,12)-(75,14) = "=>"
- │ └── closing_loc: (75,17)-(75,18) = "}"
- ├── @ HashNode (location: (76,0)-(76,27))
- │ ├── opening_loc: (76,0)-(76,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (76,2)-(76,19))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (76,2)-(76,4))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (76,2)-(76,3) = "a"
- │ │ │ │ ├── closing_loc: (76,3)-(76,4) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ ParenthesesNode (location: (76,5)-(76,19))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (76,6)-(76,18))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ RescueModifierNode (location: (76,6)-(76,18))
- │ │ │ │ │ ├── expression:
- │ │ │ │ │ │ @ IntegerNode (location: (76,6)-(76,7))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 1
- │ │ │ │ │ ├── keyword_loc: (76,8)-(76,14) = "rescue"
- │ │ │ │ │ └── rescue_expression:
- │ │ │ │ │ @ CallNode (location: (76,15)-(76,18))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :foo
- │ │ │ │ │ ├── message_loc: (76,15)-(76,18) = "foo"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ ├── opening_loc: (76,5)-(76,6) = "("
- │ │ │ │ └── closing_loc: (76,18)-(76,19) = ")"
- │ │ │ └── operator_loc: ∅
- │ │ └── @ AssocNode (location: (76,21)-(76,25))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (76,21)-(76,23))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (76,21)-(76,22) = "b"
- │ │ │ ├── closing_loc: (76,22)-(76,23) = ":"
- │ │ │ └── unescaped: "b"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (76,24)-(76,25))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (76,26)-(76,27) = "}"
- ├── @ HashNode (location: (77,0)-(77,14))
- │ ├── opening_loc: (77,0)-(77,1) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (77,2)-(77,6))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (77,2)-(77,4))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (77,2)-(77,3) = "a"
- │ │ │ │ ├── closing_loc: (77,3)-(77,4) = ":"
- │ │ │ │ └── unescaped: "a"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (77,5)-(77,6))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: ∅
- │ │ └── @ AssocNode (location: (77,8)-(77,12))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (77,8)-(77,10))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (77,8)-(77,9) = "b"
- │ │ │ ├── closing_loc: (77,9)-(77,10) = ":"
- │ │ │ └── unescaped: "b"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (77,11)-(77,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (77,13)-(77,14) = "}"
- ├── @ HashNode (location: (78,0)-(78,9))
- │ ├── opening_loc: (78,0)-(78,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (78,2)-(78,7))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (78,2)-(78,4))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (78,2)-(78,3) = "a"
- │ │ │ ├── closing_loc: (78,3)-(78,4) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ SymbolNode (location: (78,5)-(78,7))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (78,5)-(78,6) = ":"
- │ │ │ ├── value_loc: (78,6)-(78,7) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── operator_loc: ∅
- │ └── closing_loc: (78,8)-(78,9) = "}"
- ├── @ HashNode (location: (79,0)-(79,15))
- │ ├── opening_loc: (79,0)-(79,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (79,2)-(79,13))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (79,2)-(79,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (79,2)-(79,4) = ":\""
- │ │ │ ├── value_loc: (79,4)-(79,7) = "a b"
- │ │ │ ├── closing_loc: (79,7)-(79,8) = "\""
- │ │ │ └── unescaped: "a b"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (79,12)-(79,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (79,9)-(79,11) = "=>"
- │ └── closing_loc: (79,14)-(79,15) = "}"
- ├── @ HashNode (location: (80,0)-(80,12))
- │ ├── opening_loc: (80,0)-(80,1) = "{"
- │ ├── elements: (length: 1)
- │ │ └── @ AssocNode (location: (80,2)-(80,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (80,2)-(80,5))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (80,2)-(80,3) = ":"
- │ │ │ ├── value_loc: (80,3)-(80,5) = "-@"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "-@"
- │ │ ├── value:
- │ │ │ @ IntegerNode (location: (80,9)-(80,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── operator_loc: (80,6)-(80,8) = "=>"
- │ └── closing_loc: (80,11)-(80,12) = "}"
- ├── @ InterpolatedStringNode (location: (81,0)-(82,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (81,0)-(81,1) = "\""
- │ ├── parts: (length: 4)
- │ │ ├── @ EmbeddedStatementsNode (location: (81,1)-(81,4))
- │ │ │ ├── opening_loc: (81,1)-(81,3) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (81,3)-(81,4) = "}"
- │ │ ├── @ StringNode (location: (81,4)-(82,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (81,4)-(82,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (82,0)-(82,3))
- │ │ │ ├── opening_loc: (82,0)-(82,2) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (82,2)-(82,3) = "}"
- │ │ └── @ StringNode (location: (82,3)-(82,6))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (82,3)-(82,6) = "\\na"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\na"
- │ └── closing_loc: (82,6)-(82,7) = "\""
- ├── @ CallNode (location: (83,0)-(86,1))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (83,0)-(83,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (83,4)-(86,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (84,2)-(85,7))
- │ │ └── body: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (84,2)-(85,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (84,2)-(84,3) = "\""
- │ │ ├── parts: (length: 4)
- │ │ │ ├── @ EmbeddedStatementsNode (location: (84,3)-(84,6))
- │ │ │ │ ├── opening_loc: (84,3)-(84,5) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (84,5)-(84,6) = "}"
- │ │ │ ├── @ StringNode (location: (84,6)-(85,0))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (84,6)-(85,0) = "\n"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "\n"
- │ │ │ ├── @ EmbeddedStatementsNode (location: (85,0)-(85,3))
- │ │ │ │ ├── opening_loc: (85,0)-(85,2) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (85,2)-(85,3) = "}"
- │ │ │ └── @ StringNode (location: (85,3)-(85,6))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (85,3)-(85,6) = "\\na"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\na"
- │ │ └── closing_loc: (85,6)-(85,7) = "\""
- │ ├── opening_loc: (83,4)-(83,5) = "{"
- │ └── closing_loc: (86,0)-(86,1) = "}"
- ├── @ SymbolNode (location: (87,0)-(88,2))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (87,0)-(87,2) = ":\""
- │ ├── value_loc: (87,2)-(88,1) = "a\\\\\nb"
- │ ├── closing_loc: (88,1)-(88,2) = "\""
- │ └── unescaped: "a\\\nb"
- └── @ InterpolatedXStringNode (location: (89,0)-(91,2))
- ├── opening_loc: (89,0)-(89,1) = "`"
- ├── parts: (length: 3)
- │ ├── @ StringNode (location: (89,1)-(90,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (89,1)-(90,0) = " x\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " x\n"
- │ ├── @ EmbeddedStatementsNode (location: (90,0)-(90,6))
- │ │ ├── opening_loc: (90,0)-(90,2) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (90,2)-(90,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (90,2)-(90,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (90,2)-(90,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── closing_loc: (90,5)-(90,6) = "}"
- │ └── @ StringNode (location: (90,6)-(91,1))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (90,6)-(91,1) = "\n#"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\n#"
- └── closing_loc: (91,1)-(91,2) = "`"
diff --git a/test/prism/snapshots/unparser/corpus/literal/module.txt b/test/prism/snapshots/unparser/corpus/literal/module.txt
deleted file mode 100644
index 6428aeea82..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/module.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-@ ProgramNode (location: (1,0)-(16,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(16,3))
- └── body: (length: 4)
- ├── @ ModuleNode (location: (1,0)-(2,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (1,7)-(1,8))
- │ │ └── name: :A
- │ ├── body: ∅
- │ ├── end_keyword_loc: (2,0)-(2,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (4,0)-(5,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (4,0)-(4,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (4,7)-(4,11))
- │ │ ├── parent:
- │ │ │ @ ConstantReadNode (location: (4,7)-(4,8))
- │ │ │ └── name: :A
- │ │ ├── name: :B
- │ │ ├── delimiter_loc: (4,8)-(4,10) = "::"
- │ │ └── name_loc: (4,10)-(4,11) = "B"
- │ ├── body: ∅
- │ ├── end_keyword_loc: (5,0)-(5,3) = "end"
- │ └── name: :B
- ├── @ ModuleNode (location: (7,0)-(8,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (7,0)-(7,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantPathNode (location: (7,7)-(7,14))
- │ │ ├── parent:
- │ │ │ @ ConstantPathNode (location: (7,7)-(7,11))
- │ │ │ ├── parent:
- │ │ │ │ @ ConstantReadNode (location: (7,7)-(7,8))
- │ │ │ │ └── name: :A
- │ │ │ ├── name: :B
- │ │ │ ├── delimiter_loc: (7,8)-(7,10) = "::"
- │ │ │ └── name_loc: (7,10)-(7,11) = "B"
- │ │ ├── name: :C
- │ │ ├── delimiter_loc: (7,11)-(7,13) = "::"
- │ │ └── name_loc: (7,13)-(7,14) = "C"
- │ ├── body: ∅
- │ ├── end_keyword_loc: (8,0)-(8,3) = "end"
- │ └── name: :C
- └── @ ModuleNode (location: (10,0)-(16,3))
- ├── locals: []
- ├── module_keyword_loc: (10,0)-(10,6) = "module"
- ├── constant_path:
- │ @ ConstantReadNode (location: (10,7)-(10,8))
- │ └── name: :A
- ├── body:
- │ @ StatementsNode (location: (11,2)-(15,5))
- │ └── body: (length: 2)
- │ ├── @ CallNode (location: (11,2)-(11,16))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :include
- │ │ ├── message_loc: (11,2)-(11,9) = "include"
- │ │ ├── opening_loc: (11,9)-(11,10) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (11,10)-(11,15))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ CallNode (location: (11,10)-(11,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ ConstantReadNode (location: (11,10)-(11,11))
- │ │ │ │ └── name: :B
- │ │ │ ├── call_operator_loc: (11,11)-(11,12) = "."
- │ │ │ ├── name: :new
- │ │ │ ├── message_loc: (11,12)-(11,15) = "new"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: (11,15)-(11,16) = ")"
- │ │ └── block: ∅
- │ └── @ DefNode (location: (13,2)-(15,5))
- │ ├── name: :foo
- │ ├── name_loc: (13,6)-(13,9) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (14,4)-(14,8))
- │ │ └── body: (length: 1)
- │ │ └── @ SymbolNode (location: (14,4)-(14,8))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (14,4)-(14,5) = ":"
- │ │ ├── value_loc: (14,5)-(14,8) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ ├── locals: []
- │ ├── def_keyword_loc: (13,2)-(13,5) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (15,2)-(15,5) = "end"
- ├── end_keyword_loc: (16,0)-(16,3) = "end"
- └── name: :A
diff --git a/test/prism/snapshots/unparser/corpus/literal/opasgn.txt b/test/prism/snapshots/unparser/corpus/literal/opasgn.txt
deleted file mode 100644
index 0761b47348..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/opasgn.txt
+++ /dev/null
@@ -1,509 +0,0 @@
-@ ProgramNode (location: (1,0)-(24,10))
-├── locals: [:a, :h]
-└── statements:
- @ StatementsNode (location: (1,0)-(24,10))
- └── body: (length: 24)
- ├── @ LocalVariableOperatorWriteNode (location: (1,0)-(1,6))
- │ ├── name_loc: (1,0)-(1,1) = "a"
- │ ├── binary_operator_loc: (1,2)-(1,4) = "+="
- │ ├── value:
- │ │ @ IntegerNode (location: (1,5)-(1,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── name: :a
- │ ├── binary_operator: :+
- │ └── depth: 0
- ├── @ LocalVariableOperatorWriteNode (location: (2,0)-(2,6))
- │ ├── name_loc: (2,0)-(2,1) = "a"
- │ ├── binary_operator_loc: (2,2)-(2,4) = "-="
- │ ├── value:
- │ │ @ IntegerNode (location: (2,5)-(2,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── name: :a
- │ ├── binary_operator: :-
- │ └── depth: 0
- ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,7))
- │ ├── name_loc: (3,0)-(3,1) = "a"
- │ ├── binary_operator_loc: (3,2)-(3,5) = "**="
- │ ├── value:
- │ │ @ IntegerNode (location: (3,6)-(3,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── name: :a
- │ ├── binary_operator: :**
- │ └── depth: 0
- ├── @ LocalVariableOperatorWriteNode (location: (4,0)-(4,6))
- │ ├── name_loc: (4,0)-(4,1) = "a"
- │ ├── binary_operator_loc: (4,2)-(4,4) = "*="
- │ ├── value:
- │ │ @ IntegerNode (location: (4,5)-(4,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── name: :a
- │ ├── binary_operator: :*
- │ └── depth: 0
- ├── @ LocalVariableOperatorWriteNode (location: (5,0)-(5,6))
- │ ├── name_loc: (5,0)-(5,1) = "a"
- │ ├── binary_operator_loc: (5,2)-(5,4) = "/="
- │ ├── value:
- │ │ @ IntegerNode (location: (5,5)-(5,6))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── name: :a
- │ ├── binary_operator: :/
- │ └── depth: 0
- ├── @ LocalVariableAndWriteNode (location: (6,0)-(6,7))
- │ ├── name_loc: (6,0)-(6,1) = "a"
- │ ├── operator_loc: (6,2)-(6,5) = "&&="
- │ ├── value:
- │ │ @ CallNode (location: (6,6)-(6,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (6,6)-(6,7) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── name: :a
- │ └── depth: 0
- ├── @ LocalVariableOrWriteNode (location: (7,0)-(7,7))
- │ ├── name_loc: (7,0)-(7,1) = "a"
- │ ├── operator_loc: (7,2)-(7,5) = "||="
- │ ├── value:
- │ │ @ IntegerNode (location: (7,6)-(7,7))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── name: :a
- │ └── depth: 0
- ├── @ CallNode (location: (8,0)-(8,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (8,0)-(8,9))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (8,1)-(8,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableOrWriteNode (location: (8,1)-(8,8))
- │ │ │ ├── name_loc: (8,1)-(8,2) = "a"
- │ │ │ ├── operator_loc: (8,3)-(8,6) = "||="
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (8,7)-(8,8))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (8,0)-(8,1) = "("
- │ │ └── closing_loc: (8,8)-(8,9) = ")"
- │ ├── call_operator_loc: (8,9)-(8,10) = "."
- │ ├── name: :bar
- │ ├── message_loc: (8,10)-(8,13) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (9,0)-(9,17))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (9,0)-(9,10))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (9,1)-(9,9))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableOrWriteNode (location: (9,1)-(9,9))
- │ │ │ ├── name_loc: (9,1)-(9,2) = "h"
- │ │ │ ├── operator_loc: (9,3)-(9,6) = "||="
- │ │ │ ├── value:
- │ │ │ │ @ HashNode (location: (9,7)-(9,9))
- │ │ │ │ ├── opening_loc: (9,7)-(9,8) = "{"
- │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ └── closing_loc: (9,8)-(9,9) = "}"
- │ │ │ ├── name: :h
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: (9,0)-(9,1) = "("
- │ │ └── closing_loc: (9,9)-(9,10) = ")"
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]=
- │ ├── message_loc: (9,10)-(9,13) = "[k]"
- │ ├── opening_loc: (9,10)-(9,11) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (9,11)-(9,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (9,11)-(9,12))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :k
- │ │ │ ├── message_loc: (9,11)-(9,12) = "k"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (9,16)-(9,17))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :v
- │ │ ├── message_loc: (9,16)-(9,17) = "v"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (9,12)-(9,13) = "]"
- │ └── block: ∅
- ├── @ CallOperatorWriteNode (location: (10,0)-(10,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (10,0)-(10,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: (10,1)-(10,2) = "."
- │ ├── message_loc: (10,2)-(10,3) = "b"
- │ ├── read_name: :b
- │ ├── write_name: :b=
- │ ├── binary_operator: :+
- │ ├── binary_operator_loc: (10,4)-(10,6) = "+="
- │ └── value:
- │ @ IntegerNode (location: (10,7)-(10,8))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ CallOperatorWriteNode (location: (11,0)-(11,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (11,0)-(11,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: (11,1)-(11,2) = "."
- │ ├── message_loc: (11,2)-(11,3) = "b"
- │ ├── read_name: :b
- │ ├── write_name: :b=
- │ ├── binary_operator: :-
- │ ├── binary_operator_loc: (11,4)-(11,6) = "-="
- │ └── value:
- │ @ IntegerNode (location: (11,7)-(11,8))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ CallOperatorWriteNode (location: (12,0)-(12,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (12,0)-(12,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: (12,1)-(12,2) = "."
- │ ├── message_loc: (12,2)-(12,3) = "b"
- │ ├── read_name: :b
- │ ├── write_name: :b=
- │ ├── binary_operator: :**
- │ ├── binary_operator_loc: (12,4)-(12,7) = "**="
- │ └── value:
- │ @ IntegerNode (location: (12,8)-(12,9))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ CallOperatorWriteNode (location: (13,0)-(13,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (13,0)-(13,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: (13,1)-(13,2) = "."
- │ ├── message_loc: (13,2)-(13,3) = "b"
- │ ├── read_name: :b
- │ ├── write_name: :b=
- │ ├── binary_operator: :*
- │ ├── binary_operator_loc: (13,4)-(13,6) = "*="
- │ └── value:
- │ @ IntegerNode (location: (13,7)-(13,8))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ CallOperatorWriteNode (location: (14,0)-(14,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (14,0)-(14,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: (14,1)-(14,2) = "."
- │ ├── message_loc: (14,2)-(14,3) = "b"
- │ ├── read_name: :b
- │ ├── write_name: :b=
- │ ├── binary_operator: :/
- │ ├── binary_operator_loc: (14,4)-(14,6) = "/="
- │ └── value:
- │ @ IntegerNode (location: (14,7)-(14,8))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ CallAndWriteNode (location: (15,0)-(15,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (15,0)-(15,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: (15,1)-(15,2) = "."
- │ ├── message_loc: (15,2)-(15,3) = "b"
- │ ├── read_name: :b
- │ ├── write_name: :b=
- │ ├── operator_loc: (15,4)-(15,7) = "&&="
- │ └── value:
- │ @ CallNode (location: (15,8)-(15,9))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (15,8)-(15,9) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallOrWriteNode (location: (16,0)-(16,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (16,0)-(16,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: (16,1)-(16,2) = "."
- │ ├── message_loc: (16,2)-(16,3) = "b"
- │ ├── read_name: :b
- │ ├── write_name: :b=
- │ ├── operator_loc: (16,4)-(16,7) = "||="
- │ └── value:
- │ @ IntegerNode (location: (16,8)-(16,9))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IndexOperatorWriteNode (location: (17,0)-(17,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (17,0)-(17,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (17,1)-(17,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (17,2)-(17,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (17,2)-(17,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (17,2)-(17,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (17,3)-(17,4) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :+
- │ ├── binary_operator_loc: (17,5)-(17,7) = "+="
- │ └── value:
- │ @ IntegerNode (location: (17,8)-(17,9))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IndexOperatorWriteNode (location: (18,0)-(18,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (18,0)-(18,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (18,1)-(18,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (18,2)-(18,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (18,2)-(18,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (18,2)-(18,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (18,3)-(18,4) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :-
- │ ├── binary_operator_loc: (18,5)-(18,7) = "-="
- │ └── value:
- │ @ IntegerNode (location: (18,8)-(18,9))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IndexOperatorWriteNode (location: (19,0)-(19,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (19,0)-(19,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (19,1)-(19,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (19,2)-(19,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (19,2)-(19,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (19,2)-(19,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (19,3)-(19,4) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :**
- │ ├── binary_operator_loc: (19,5)-(19,8) = "**="
- │ └── value:
- │ @ IntegerNode (location: (19,9)-(19,10))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IndexOperatorWriteNode (location: (20,0)-(20,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (20,0)-(20,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (20,1)-(20,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (20,2)-(20,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (20,2)-(20,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (20,2)-(20,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (20,3)-(20,4) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :*
- │ ├── binary_operator_loc: (20,5)-(20,7) = "*="
- │ └── value:
- │ @ IntegerNode (location: (20,8)-(20,9))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IndexOperatorWriteNode (location: (21,0)-(21,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (21,0)-(21,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (21,1)-(21,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (21,2)-(21,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (21,2)-(21,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (21,2)-(21,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (21,3)-(21,4) = "]"
- │ ├── block: ∅
- │ ├── binary_operator: :/
- │ ├── binary_operator_loc: (21,5)-(21,7) = "/="
- │ └── value:
- │ @ IntegerNode (location: (21,8)-(21,9))
- │ ├── flags: decimal
- │ └── value: 2
- ├── @ IndexAndWriteNode (location: (22,0)-(22,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (22,0)-(22,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (22,1)-(22,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (22,2)-(22,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (22,2)-(22,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (22,2)-(22,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (22,3)-(22,4) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (22,5)-(22,8) = "&&="
- │ └── value:
- │ @ CallNode (location: (22,9)-(22,10))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (22,9)-(22,10) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ IndexOrWriteNode (location: (23,0)-(23,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (23,0)-(23,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── opening_loc: (23,1)-(23,2) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (23,2)-(23,3))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (23,2)-(23,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (23,2)-(23,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (23,3)-(23,4) = "]"
- │ ├── block: ∅
- │ ├── operator_loc: (23,5)-(23,8) = "||="
- │ └── value:
- │ @ IntegerNode (location: (23,9)-(23,10))
- │ ├── flags: decimal
- │ └── value: 2
- └── @ CallOperatorWriteNode (location: (24,0)-(24,10))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (24,0)-(24,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (24,0)-(24,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (24,3)-(24,4) = "."
- ├── message_loc: (24,4)-(24,5) = "A"
- ├── read_name: :A
- ├── write_name: :A=
- ├── binary_operator: :+
- ├── binary_operator_loc: (24,6)-(24,8) = "+="
- └── value:
- @ IntegerNode (location: (24,9)-(24,10))
- ├── flags: decimal
- └── value: 1
diff --git a/test/prism/snapshots/unparser/corpus/literal/pattern.txt b/test/prism/snapshots/unparser/corpus/literal/pattern.txt
deleted file mode 100644
index 5a0b4bb733..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/pattern.txt
+++ /dev/null
@@ -1,446 +0,0 @@
-@ ProgramNode (location: (1,0)-(41,8))
-├── locals: [:a, :x, :y]
-└── statements:
- @ StatementsNode (location: (1,0)-(41,8))
- └── body: (length: 4)
- ├── @ CaseMatchNode (location: (1,0)-(33,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (1,5)-(1,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (1,5)-(1,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 15)
- │ │ ├── @ InNode (location: (2,0)-(3,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ ArrayPatternNode (location: (2,3)-(2,17))
- │ │ │ │ ├── constant:
- │ │ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
- │ │ │ │ │ └── name: :A
- │ │ │ │ ├── requireds: (length: 2)
- │ │ │ │ │ ├── @ IntegerNode (location: (2,5)-(2,6))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 1
- │ │ │ │ │ └── @ IntegerNode (location: (2,8)-(2,9))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ SplatNode (location: (2,11)-(2,13))
- │ │ │ │ │ ├── operator_loc: (2,11)-(2,12) = "*"
- │ │ │ │ │ └── expression:
- │ │ │ │ │ @ LocalVariableTargetNode (location: (2,12)-(2,13))
- │ │ │ │ │ ├── name: :a
- │ │ │ │ │ └── depth: 0
- │ │ │ │ ├── posts: (length: 1)
- │ │ │ │ │ └── @ IntegerNode (location: (2,15)-(2,16))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 3
- │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "["
- │ │ │ │ └── closing_loc: (2,16)-(2,17) = "]"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (3,2)-(3,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (3,2)-(3,6))
- │ │ │ ├── in_loc: (2,0)-(2,2) = "in"
- │ │ │ └── then_loc: (2,18)-(2,22) = "then"
- │ │ ├── @ InNode (location: (4,0)-(5,3))
- │ │ │ ├── pattern:
- │ │ │ │ @ ArrayPatternNode (location: (4,3)-(4,11))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 2)
- │ │ │ │ │ ├── @ IntegerNode (location: (4,4)-(4,5))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 1
- │ │ │ │ │ └── @ IntegerNode (location: (4,7)-(4,8))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ ImplicitRestNode (location: (4,8)-(4,9))
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── opening_loc: (4,3)-(4,4) = "["
- │ │ │ │ └── closing_loc: (4,10)-(4,11) = "]"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (5,2)-(5,3))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (5,2)-(5,3))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :y
- │ │ │ │ ├── message_loc: (5,2)-(5,3) = "y"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── in_loc: (4,0)-(4,2) = "in"
- │ │ │ └── then_loc: (4,12)-(4,16) = "then"
- │ │ ├── @ InNode (location: (6,0)-(7,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ HashPatternNode (location: (6,3)-(6,8))
- │ │ │ │ ├── constant:
- │ │ │ │ │ @ ConstantReadNode (location: (6,3)-(6,4))
- │ │ │ │ │ └── name: :A
- │ │ │ │ ├── elements: (length: 1)
- │ │ │ │ │ └── @ AssocNode (location: (6,5)-(6,7))
- │ │ │ │ │ ├── key:
- │ │ │ │ │ │ @ SymbolNode (location: (6,5)-(6,7))
- │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── value_loc: (6,5)-(6,6) = "x"
- │ │ │ │ │ │ ├── closing_loc: (6,6)-(6,7) = ":"
- │ │ │ │ │ │ └── unescaped: "x"
- │ │ │ │ │ ├── value:
- │ │ │ │ │ │ @ ImplicitNode (location: (6,5)-(6,6))
- │ │ │ │ │ │ └── value:
- │ │ │ │ │ │ @ LocalVariableTargetNode (location: (6,5)-(6,6))
- │ │ │ │ │ │ ├── name: :x
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ └── operator_loc: ∅
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── opening_loc: (6,4)-(6,5) = "("
- │ │ │ │ └── closing_loc: (6,7)-(6,8) = ")"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (7,2)-(7,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (7,2)-(7,6))
- │ │ │ ├── in_loc: (6,0)-(6,2) = "in"
- │ │ │ └── then_loc: (6,9)-(6,13) = "then"
- │ │ ├── @ InNode (location: (8,0)-(9,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ HashPatternNode (location: (8,3)-(8,8))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ AssocSplatNode (location: (8,4)-(8,7))
- │ │ │ │ │ ├── value:
- │ │ │ │ │ │ @ LocalVariableTargetNode (location: (8,6)-(8,7))
- │ │ │ │ │ │ ├── name: :a
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ └── operator_loc: (8,4)-(8,6) = "**"
- │ │ │ │ ├── opening_loc: (8,3)-(8,4) = "{"
- │ │ │ │ └── closing_loc: (8,7)-(8,8) = "}"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (9,2)-(9,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (9,2)-(9,6))
- │ │ │ ├── in_loc: (8,0)-(8,2) = "in"
- │ │ │ └── then_loc: (8,9)-(8,13) = "then"
- │ │ ├── @ InNode (location: (10,0)-(11,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ IfNode (location: (10,3)-(10,13))
- │ │ │ │ ├── if_keyword_loc: (10,6)-(10,8) = "if"
- │ │ │ │ ├── predicate:
- │ │ │ │ │ @ TrueNode (location: (10,9)-(10,13))
- │ │ │ │ ├── then_keyword_loc: ∅
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (10,3)-(10,5))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ HashPatternNode (location: (10,3)-(10,5))
- │ │ │ │ │ ├── constant: ∅
- │ │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ │ ├── rest: ∅
- │ │ │ │ │ ├── opening_loc: (10,3)-(10,4) = "{"
- │ │ │ │ │ └── closing_loc: (10,4)-(10,5) = "}"
- │ │ │ │ ├── consequent: ∅
- │ │ │ │ └── end_keyword_loc: ∅
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (11,2)-(11,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (11,2)-(11,6))
- │ │ │ ├── in_loc: (10,0)-(10,2) = "in"
- │ │ │ └── then_loc: (10,14)-(10,18) = "then"
- │ │ ├── @ InNode (location: (12,0)-(13,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ ArrayPatternNode (location: (12,3)-(12,12))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── requireds: (length: 2)
- │ │ │ │ │ ├── @ LocalVariableTargetNode (location: (12,4)-(12,5))
- │ │ │ │ │ │ ├── name: :x
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ └── @ LocalVariableTargetNode (location: (12,7)-(12,8))
- │ │ │ │ │ ├── name: :y
- │ │ │ │ │ └── depth: 0
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ SplatNode (location: (12,10)-(12,11))
- │ │ │ │ │ ├── operator_loc: (12,10)-(12,11) = "*"
- │ │ │ │ │ └── expression: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── opening_loc: (12,3)-(12,4) = "["
- │ │ │ │ └── closing_loc: (12,11)-(12,12) = "]"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (13,2)-(13,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (13,2)-(13,6))
- │ │ │ ├── in_loc: (12,0)-(12,2) = "in"
- │ │ │ └── then_loc: (12,13)-(12,17) = "then"
- │ │ ├── @ InNode (location: (14,0)-(15,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ HashPatternNode (location: (14,3)-(14,16))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── elements: (length: 2)
- │ │ │ │ │ ├── @ AssocNode (location: (14,4)-(14,8))
- │ │ │ │ │ │ ├── key:
- │ │ │ │ │ │ │ @ SymbolNode (location: (14,4)-(14,6))
- │ │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ │ ├── value_loc: (14,4)-(14,5) = "a"
- │ │ │ │ │ │ │ ├── closing_loc: (14,5)-(14,6) = ":"
- │ │ │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ │ │ ├── value:
- │ │ │ │ │ │ │ @ IntegerNode (location: (14,7)-(14,8))
- │ │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ │ └── value: 1
- │ │ │ │ │ │ └── operator_loc: ∅
- │ │ │ │ │ └── @ AssocNode (location: (14,10)-(14,15))
- │ │ │ │ │ ├── key:
- │ │ │ │ │ │ @ SymbolNode (location: (14,10)-(14,13))
- │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── value_loc: (14,10)-(14,12) = "aa"
- │ │ │ │ │ │ ├── closing_loc: (14,12)-(14,13) = ":"
- │ │ │ │ │ │ └── unescaped: "aa"
- │ │ │ │ │ ├── value:
- │ │ │ │ │ │ @ IntegerNode (location: (14,14)-(14,15))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 2
- │ │ │ │ │ └── operator_loc: ∅
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── opening_loc: (14,3)-(14,4) = "{"
- │ │ │ │ └── closing_loc: (14,15)-(14,16) = "}"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (15,2)-(15,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (15,2)-(15,6))
- │ │ │ ├── in_loc: (14,0)-(14,2) = "in"
- │ │ │ └── then_loc: (14,17)-(14,21) = "then"
- │ │ ├── @ InNode (location: (16,0)-(17,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ HashPatternNode (location: (16,3)-(16,5))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── opening_loc: (16,3)-(16,4) = "{"
- │ │ │ │ └── closing_loc: (16,4)-(16,5) = "}"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (17,2)-(17,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (17,2)-(17,6))
- │ │ │ ├── in_loc: (16,0)-(16,2) = "in"
- │ │ │ └── then_loc: (16,6)-(16,10) = "then"
- │ │ ├── @ InNode (location: (18,0)-(19,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ HashPatternNode (location: (18,3)-(18,10))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── elements: (length: 0)
- │ │ │ │ ├── rest:
- │ │ │ │ │ @ NoKeywordsParameterNode (location: (18,4)-(18,9))
- │ │ │ │ │ ├── operator_loc: (18,4)-(18,6) = "**"
- │ │ │ │ │ └── keyword_loc: (18,6)-(18,9) = "nil"
- │ │ │ │ ├── opening_loc: (18,3)-(18,4) = "{"
- │ │ │ │ └── closing_loc: (18,9)-(18,10) = "}"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (19,2)-(19,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (19,2)-(19,6))
- │ │ │ ├── in_loc: (18,0)-(18,2) = "in"
- │ │ │ └── then_loc: (18,11)-(18,15) = "then"
- │ │ ├── @ InNode (location: (20,0)-(21,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ HashPatternNode (location: (20,3)-(20,11))
- │ │ │ │ ├── constant: ∅
- │ │ │ │ ├── elements: (length: 1)
- │ │ │ │ │ └── @ AssocNode (location: (20,4)-(20,10))
- │ │ │ │ │ ├── key:
- │ │ │ │ │ │ @ SymbolNode (location: (20,4)-(20,8))
- │ │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ │ ├── opening_loc: (20,4)-(20,5) = "\""
- │ │ │ │ │ │ ├── value_loc: (20,5)-(20,6) = "a"
- │ │ │ │ │ │ ├── closing_loc: (20,6)-(20,8) = "\":"
- │ │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ │ ├── value:
- │ │ │ │ │ │ @ IntegerNode (location: (20,9)-(20,10))
- │ │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ │ └── value: 1
- │ │ │ │ │ └── operator_loc: ∅
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── opening_loc: (20,3)-(20,4) = "{"
- │ │ │ │ └── closing_loc: (20,10)-(20,11) = "}"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (21,2)-(21,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (21,2)-(21,6))
- │ │ │ ├── in_loc: (20,0)-(20,2) = "in"
- │ │ │ └── then_loc: (20,12)-(20,16) = "then"
- │ │ ├── @ InNode (location: (22,0)-(23,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ AlternationPatternNode (location: (22,3)-(22,8))
- │ │ │ │ ├── left:
- │ │ │ │ │ @ IntegerNode (location: (22,3)-(22,4))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── right:
- │ │ │ │ │ @ IntegerNode (location: (22,7)-(22,8))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 2
- │ │ │ │ └── operator_loc: (22,5)-(22,6) = "|"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (23,2)-(23,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (23,2)-(23,6))
- │ │ │ ├── in_loc: (22,0)-(22,2) = "in"
- │ │ │ └── then_loc: (22,9)-(22,13) = "then"
- │ │ ├── @ InNode (location: (24,0)-(25,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ CapturePatternNode (location: (24,3)-(24,9))
- │ │ │ │ ├── value:
- │ │ │ │ │ @ IntegerNode (location: (24,3)-(24,4))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── target:
- │ │ │ │ │ @ LocalVariableTargetNode (location: (24,8)-(24,9))
- │ │ │ │ │ ├── name: :a
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── operator_loc: (24,5)-(24,7) = "=>"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (25,2)-(25,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (25,2)-(25,6))
- │ │ │ ├── in_loc: (24,0)-(24,2) = "in"
- │ │ │ └── then_loc: (24,10)-(24,14) = "then"
- │ │ ├── @ InNode (location: (26,0)-(27,6))
- │ │ │ ├── pattern:
- │ │ │ │ @ PinnedVariableNode (location: (26,3)-(26,5))
- │ │ │ │ ├── variable:
- │ │ │ │ │ @ LocalVariableReadNode (location: (26,4)-(26,5))
- │ │ │ │ │ ├── name: :x
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── operator_loc: (26,3)-(26,4) = "^"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (27,2)-(27,6))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ TrueNode (location: (27,2)-(27,6))
- │ │ │ ├── in_loc: (26,0)-(26,2) = "in"
- │ │ │ └── then_loc: (26,6)-(26,10) = "then"
- │ │ ├── @ InNode (location: (28,0)-(28,4))
- │ │ │ ├── pattern:
- │ │ │ │ @ IntegerNode (location: (28,3)-(28,4))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── statements: ∅
- │ │ │ ├── in_loc: (28,0)-(28,2) = "in"
- │ │ │ └── then_loc: ∅
- │ │ └── @ InNode (location: (29,0)-(30,6))
- │ │ ├── pattern:
- │ │ │ @ IntegerNode (location: (29,3)-(29,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (30,2)-(30,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ TrueNode (location: (30,2)-(30,6))
- │ │ ├── in_loc: (29,0)-(29,2) = "in"
- │ │ └── then_loc: (29,5)-(29,9) = "then"
- │ ├── consequent:
- │ │ @ ElseNode (location: (31,0)-(33,3))
- │ │ ├── else_keyword_loc: (31,0)-(31,4) = "else"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (32,2)-(32,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ TrueNode (location: (32,2)-(32,6))
- │ │ └── end_keyword_loc: (33,0)-(33,3) = "end"
- │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
- │ └── end_keyword_loc: (33,0)-(33,3) = "end"
- ├── @ CaseMatchNode (location: (34,0)-(36,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (34,5)-(34,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (34,5)-(34,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (35,0)-(35,17))
- │ │ ├── pattern:
- │ │ │ @ ArrayPatternNode (location: (35,3)-(35,17))
- │ │ │ ├── constant:
- │ │ │ │ @ ConstantReadNode (location: (35,3)-(35,4))
- │ │ │ │ └── name: :A
- │ │ │ ├── requireds: (length: 2)
- │ │ │ │ ├── @ IntegerNode (location: (35,5)-(35,6))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ └── @ IntegerNode (location: (35,8)-(35,9))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ ├── rest:
- │ │ │ │ @ SplatNode (location: (35,11)-(35,13))
- │ │ │ │ ├── operator_loc: (35,11)-(35,12) = "*"
- │ │ │ │ └── expression:
- │ │ │ │ @ LocalVariableTargetNode (location: (35,12)-(35,13))
- │ │ │ │ ├── name: :a
- │ │ │ │ └── depth: 0
- │ │ │ ├── posts: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (35,15)-(35,16))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 3
- │ │ │ ├── opening_loc: (35,4)-(35,5) = "["
- │ │ │ └── closing_loc: (35,16)-(35,17) = "]"
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (35,0)-(35,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent: ∅
- │ ├── case_keyword_loc: (34,0)-(34,4) = "case"
- │ └── end_keyword_loc: (36,0)-(36,3) = "end"
- ├── @ CaseMatchNode (location: (37,0)-(40,3))
- │ ├── predicate:
- │ │ @ CallNode (location: (37,5)-(37,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (37,5)-(37,8) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── conditions: (length: 1)
- │ │ └── @ InNode (location: (38,0)-(38,4))
- │ │ ├── pattern:
- │ │ │ @ ConstantReadNode (location: (38,3)-(38,4))
- │ │ │ └── name: :A
- │ │ ├── statements: ∅
- │ │ ├── in_loc: (38,0)-(38,2) = "in"
- │ │ └── then_loc: ∅
- │ ├── consequent:
- │ │ @ ElseNode (location: (39,0)-(40,3))
- │ │ ├── else_keyword_loc: (39,0)-(39,4) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (40,0)-(40,3) = "end"
- │ ├── case_keyword_loc: (37,0)-(37,4) = "case"
- │ └── end_keyword_loc: (40,0)-(40,3) = "end"
- └── @ MatchPredicateNode (location: (41,0)-(41,8))
- ├── value:
- │ @ IntegerNode (location: (41,0)-(41,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── pattern:
- │ @ ArrayPatternNode (location: (41,5)-(41,8))
- │ ├── constant: ∅
- │ ├── requireds: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (41,6)-(41,7))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── opening_loc: (41,5)-(41,6) = "["
- │ └── closing_loc: (41,7)-(41,8) = "]"
- └── operator_loc: (41,2)-(41,4) = "in"
diff --git a/test/prism/snapshots/unparser/corpus/literal/pragma.txt b/test/prism/snapshots/unparser/corpus/literal/pragma.txt
deleted file mode 100644
index 08e386b872..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/pragma.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,7))
- └── body: (length: 4)
- ├── @ SourceEncodingNode (location: (1,0)-(1,12))
- ├── @ SourceFileNode (location: (2,0)-(2,8))
- │ ├── flags: ∅
- │ └── filepath: "unparser/corpus/literal/pragma.txt"
- ├── @ SourceLineNode (location: (3,0)-(3,8))
- └── @ CallNode (location: (4,0)-(4,7))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :__dir__
- ├── message_loc: (4,0)-(4,7) = "__dir__"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/range.txt b/test/prism/snapshots/unparser/corpus/literal/range.txt
deleted file mode 100644
index ab015d04fc..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/range.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,5))
- └── body: (length: 4)
- ├── @ ParenthesesNode (location: (1,0)-(1,5))
- │ ├── body:
- │ │ @ StatementsNode (location: (1,1)-(1,4))
- │ │ └── body: (length: 1)
- │ │ └── @ RangeNode (location: (1,1)-(1,4))
- │ │ ├── flags: ∅
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (1,1)-(1,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (1,2)-(1,4) = ".."
- │ ├── opening_loc: (1,0)-(1,1) = "("
- │ └── closing_loc: (1,4)-(1,5) = ")"
- ├── @ RangeNode (location: (2,0)-(2,4))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (2,0)-(2,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ IntegerNode (location: (2,3)-(2,4))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ └── operator_loc: (2,1)-(2,3) = ".."
- ├── @ ParenthesesNode (location: (3,0)-(3,6))
- │ ├── body:
- │ │ @ StatementsNode (location: (3,1)-(3,5))
- │ │ └── body: (length: 1)
- │ │ └── @ RangeNode (location: (3,1)-(3,5))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ IntegerNode (location: (3,1)-(3,2))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── right: ∅
- │ │ └── operator_loc: (3,2)-(3,5) = "..."
- │ ├── opening_loc: (3,0)-(3,1) = "("
- │ └── closing_loc: (3,5)-(3,6) = ")"
- └── @ RangeNode (location: (4,0)-(4,5))
- ├── flags: exclude_end
- ├── left:
- │ @ IntegerNode (location: (4,0)-(4,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── right:
- │ @ IntegerNode (location: (4,4)-(4,5))
- │ ├── flags: decimal
- │ └── value: 2
- └── operator_loc: (4,1)-(4,4) = "..."
diff --git a/test/prism/snapshots/unparser/corpus/literal/rescue.txt b/test/prism/snapshots/unparser/corpus/literal/rescue.txt
deleted file mode 100644
index d3c9d62166..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/rescue.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,27))
-├── locals: [:x]
-└── statements:
- @ StatementsNode (location: (1,0)-(3,27))
- └── body: (length: 3)
- ├── @ RescueModifierNode (location: (1,0)-(1,14))
- │ ├── expression:
- │ │ @ CallNode (location: (1,0)-(1,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (1,4)-(1,10) = "rescue"
- │ └── rescue_expression:
- │ @ CallNode (location: (1,11)-(1,14))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (1,11)-(1,14) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ RescueModifierNode (location: (2,0)-(2,21))
- │ ├── expression:
- │ │ @ CallNode (location: (2,0)-(2,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (2,0)-(2,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (2,4)-(2,10) = "rescue"
- │ └── rescue_expression:
- │ @ ReturnNode (location: (2,11)-(2,21))
- │ ├── flags: ∅
- │ ├── keyword_loc: (2,11)-(2,17) = "return"
- │ └── arguments:
- │ @ ArgumentsNode (location: (2,18)-(2,21))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (2,18)-(2,21))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (2,18)-(2,21) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ LocalVariableWriteNode (location: (3,0)-(3,27))
- ├── name: :x
- ├── depth: 0
- ├── name_loc: (3,0)-(3,1) = "x"
- ├── value:
- │ @ ParenthesesNode (location: (3,4)-(3,27))
- │ ├── body:
- │ │ @ StatementsNode (location: (3,5)-(3,26))
- │ │ └── body: (length: 1)
- │ │ └── @ RescueModifierNode (location: (3,5)-(3,26))
- │ │ ├── expression:
- │ │ │ @ CallNode (location: (3,5)-(3,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (3,5)-(3,8) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── keyword_loc: (3,9)-(3,15) = "rescue"
- │ │ └── rescue_expression:
- │ │ @ ReturnNode (location: (3,16)-(3,26))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (3,16)-(3,22) = "return"
- │ │ └── arguments:
- │ │ @ ArgumentsNode (location: (3,23)-(3,26))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (3,23)-(3,26))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (3,23)-(3,26) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (3,4)-(3,5) = "("
- │ └── closing_loc: (3,26)-(3,27) = ")"
- └── operator_loc: (3,2)-(3,3) = "="
diff --git a/test/prism/snapshots/unparser/corpus/literal/send.txt b/test/prism/snapshots/unparser/corpus/literal/send.txt
deleted file mode 100644
index 3fd7f719a1..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/send.txt
+++ /dev/null
@@ -1,2190 +0,0 @@
-@ ProgramNode (location: (1,0)-(84,7))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(84,7))
- └── body: (length: 62)
- ├── @ ModuleNode (location: (1,0)-(3,3))
- │ ├── locals: [:foo, :a, :_]
- │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (1,7)-(1,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (2,2)-(2,22))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableOrWriteNode (location: (2,2)-(2,22))
- │ │ ├── name_loc: (2,2)-(2,5) = "foo"
- │ │ ├── operator_loc: (2,6)-(2,9) = "||="
- │ │ ├── value:
- │ │ │ @ ParenthesesNode (location: (2,10)-(2,22))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (2,11)-(2,21))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ MultiWriteNode (location: (2,11)-(2,21))
- │ │ │ │ ├── lefts: (length: 2)
- │ │ │ │ │ ├── @ LocalVariableTargetNode (location: (2,12)-(2,13))
- │ │ │ │ │ │ ├── name: :a
- │ │ │ │ │ │ └── depth: 0
- │ │ │ │ │ └── @ LocalVariableTargetNode (location: (2,15)-(2,16))
- │ │ │ │ │ ├── name: :_
- │ │ │ │ │ └── depth: 0
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── rights: (length: 0)
- │ │ │ │ ├── lparen_loc: (2,11)-(2,12) = "("
- │ │ │ │ ├── rparen_loc: (2,16)-(2,17) = ")"
- │ │ │ │ ├── operator_loc: (2,18)-(2,19) = "="
- │ │ │ │ └── value:
- │ │ │ │ @ CallNode (location: (2,20)-(2,21))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── opening_loc: (2,10)-(2,11) = "("
- │ │ │ └── closing_loc: (2,21)-(2,22) = ")"
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── end_keyword_loc: (3,0)-(3,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (5,0)-(8,3))
- │ ├── locals: [:local]
- │ ├── module_keyword_loc: (5,0)-(5,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (5,7)-(5,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (6,2)-(7,11))
- │ │ └── body: (length: 2)
- │ │ ├── @ LocalVariableWriteNode (location: (6,2)-(6,11))
- │ │ │ ├── name: :local
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (6,2)-(6,7) = "local"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (6,10)-(6,11))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: (6,8)-(6,9) = "="
- │ │ └── @ CallNode (location: (7,2)-(7,11))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ LocalVariableReadNode (location: (7,2)-(7,7))
- │ │ │ ├── name: :local
- │ │ │ └── depth: 0
- │ │ ├── call_operator_loc: (7,7)-(7,8) = "."
- │ │ ├── name: :bar
- │ │ ├── message_loc: (7,8)-(7,11) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── end_keyword_loc: (8,0)-(8,3) = "end"
- │ └── name: :A
- ├── @ CallNode (location: (9,0)-(10,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ClassNode (location: (9,0)-(10,3))
- │ │ ├── locals: []
- │ │ ├── class_keyword_loc: (9,0)-(9,5) = "class"
- │ │ ├── constant_path:
- │ │ │ @ ConstantReadNode (location: (9,6)-(9,7))
- │ │ │ └── name: :A
- │ │ ├── inheritance_operator_loc: ∅
- │ │ ├── superclass: ∅
- │ │ ├── body: ∅
- │ │ ├── end_keyword_loc: (10,0)-(10,3) = "end"
- │ │ └── name: :A
- │ ├── call_operator_loc: (10,3)-(10,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (10,4)-(10,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (11,0)-(12,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ModuleNode (location: (11,0)-(12,3))
- │ │ ├── locals: []
- │ │ ├── module_keyword_loc: (11,0)-(11,6) = "module"
- │ │ ├── constant_path:
- │ │ │ @ ConstantReadNode (location: (11,7)-(11,8))
- │ │ │ └── name: :A
- │ │ ├── body: ∅
- │ │ ├── end_keyword_loc: (12,0)-(12,3) = "end"
- │ │ └── name: :A
- │ ├── call_operator_loc: (12,3)-(12,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (12,4)-(12,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (13,0)-(15,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ BeginNode (location: (13,0)-(15,3))
- │ │ ├── begin_keyword_loc: (13,0)-(13,5) = "begin"
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (14,0)-(14,6))
- │ │ │ ├── keyword_loc: (14,0)-(14,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (15,0)-(15,3) = "end"
- │ ├── call_operator_loc: (15,3)-(15,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (15,4)-(15,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (16,0)-(19,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CaseNode (location: (16,0)-(19,3))
- │ │ ├── predicate:
- │ │ │ @ ParenthesesNode (location: (16,5)-(17,10))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (16,6)-(17,9))
- │ │ │ │ └── body: (length: 2)
- │ │ │ │ ├── @ DefNode (location: (16,6)-(17,3))
- │ │ │ │ │ ├── name: :foo
- │ │ │ │ │ ├── name_loc: (16,10)-(16,13) = "foo"
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── def_keyword_loc: (16,6)-(16,9) = "def"
- │ │ │ │ │ ├── operator_loc: ∅
- │ │ │ │ │ ├── lparen_loc: ∅
- │ │ │ │ │ ├── rparen_loc: ∅
- │ │ │ │ │ ├── equal_loc: ∅
- │ │ │ │ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
- │ │ │ │ └── @ SymbolNode (location: (17,5)-(17,9))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (17,5)-(17,6) = ":"
- │ │ │ │ ├── value_loc: (17,6)-(17,9) = "bar"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "bar"
- │ │ │ ├── opening_loc: (16,5)-(16,6) = "("
- │ │ │ └── closing_loc: (17,9)-(17,10) = ")"
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ WhenNode (location: (18,0)-(18,8))
- │ │ │ ├── keyword_loc: (18,0)-(18,4) = "when"
- │ │ │ ├── conditions: (length: 1)
- │ │ │ │ └── @ CallNode (location: (18,5)-(18,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (18,5)-(18,8) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ └── statements: ∅
- │ │ ├── consequent: ∅
- │ │ ├── case_keyword_loc: (16,0)-(16,4) = "case"
- │ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
- │ ├── call_operator_loc: (19,3)-(19,4) = "."
- │ ├── name: :baz
- │ ├── message_loc: (19,4)-(19,7) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (20,0)-(22,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CaseNode (location: (20,0)-(22,3))
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (20,5)-(20,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (20,5)-(20,8) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── conditions: (length: 1)
- │ │ │ └── @ WhenNode (location: (21,0)-(21,8))
- │ │ │ ├── keyword_loc: (21,0)-(21,4) = "when"
- │ │ │ ├── conditions: (length: 1)
- │ │ │ │ └── @ CallNode (location: (21,5)-(21,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (21,5)-(21,8) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── then_keyword_loc: ∅
- │ │ │ └── statements: ∅
- │ │ ├── consequent: ∅
- │ │ ├── case_keyword_loc: (20,0)-(20,4) = "case"
- │ │ └── end_keyword_loc: (22,0)-(22,3) = "end"
- │ ├── call_operator_loc: (22,3)-(22,4) = "."
- │ ├── name: :baz
- │ ├── message_loc: (22,4)-(22,7) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (23,0)-(24,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ SingletonClassNode (location: (23,0)-(24,3))
- │ │ ├── locals: []
- │ │ ├── class_keyword_loc: (23,0)-(23,5) = "class"
- │ │ ├── operator_loc: (23,6)-(23,8) = "<<"
- │ │ ├── expression:
- │ │ │ @ SelfNode (location: (23,9)-(23,13))
- │ │ ├── body: ∅
- │ │ └── end_keyword_loc: (24,0)-(24,3) = "end"
- │ ├── call_operator_loc: (24,3)-(24,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (24,4)-(24,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (25,0)-(26,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ DefNode (location: (25,0)-(26,3))
- │ │ ├── name: :foo
- │ │ ├── name_loc: (25,9)-(25,12) = "foo"
- │ │ ├── receiver:
- │ │ │ @ SelfNode (location: (25,4)-(25,8))
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── locals: []
- │ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
- │ │ ├── operator_loc: (25,8)-(25,9) = "."
- │ │ ├── lparen_loc: ∅
- │ │ ├── rparen_loc: ∅
- │ │ ├── equal_loc: ∅
- │ │ └── end_keyword_loc: (26,0)-(26,3) = "end"
- │ ├── call_operator_loc: (26,3)-(26,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (26,4)-(26,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (27,0)-(28,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ DefNode (location: (27,0)-(28,3))
- │ │ ├── name: :foo
- │ │ ├── name_loc: (27,4)-(27,7) = "foo"
- │ │ ├── receiver: ∅
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── locals: []
- │ │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
- │ │ ├── operator_loc: ∅
- │ │ ├── lparen_loc: ∅
- │ │ ├── rparen_loc: ∅
- │ │ ├── equal_loc: ∅
- │ │ └── end_keyword_loc: (28,0)-(28,3) = "end"
- │ ├── call_operator_loc: (28,3)-(28,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (28,4)-(28,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (29,0)-(30,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ UntilNode (location: (29,0)-(30,3))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (29,0)-(29,5) = "until"
- │ │ ├── closing_loc: (30,0)-(30,3) = "end"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (29,6)-(29,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (29,6)-(29,9) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── statements: ∅
- │ ├── call_operator_loc: (30,3)-(30,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (30,4)-(30,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (31,0)-(32,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ WhileNode (location: (31,0)-(32,3))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (31,0)-(31,5) = "while"
- │ │ ├── closing_loc: (32,0)-(32,3) = "end"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (31,6)-(31,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (31,6)-(31,9) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── statements: ∅
- │ ├── call_operator_loc: (32,3)-(32,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (32,4)-(32,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (33,0)-(34,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (33,0)-(34,1))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :loop
- │ │ ├── message_loc: (33,0)-(33,4) = "loop"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (33,5)-(34,1))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (33,5)-(33,6) = "{"
- │ │ └── closing_loc: (34,0)-(34,1) = "}"
- │ ├── call_operator_loc: (34,1)-(34,2) = "."
- │ ├── name: :bar
- │ ├── message_loc: (34,2)-(34,5) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (35,0)-(36,7))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IfNode (location: (35,0)-(36,3))
- │ │ ├── if_keyword_loc: (35,0)-(35,2) = "if"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (35,3)-(35,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (35,3)-(35,6) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── then_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── consequent: ∅
- │ │ └── end_keyword_loc: (36,0)-(36,3) = "end"
- │ ├── call_operator_loc: (36,3)-(36,4) = "."
- │ ├── name: :baz
- │ ├── message_loc: (36,4)-(36,7) = "baz"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (37,0)-(37,19))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (37,0)-(37,15))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (37,1)-(37,14))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (37,1)-(37,14))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ RegularExpressionNode (location: (37,1)-(37,6))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (37,1)-(37,2) = "/"
- │ │ │ │ ├── content_loc: (37,2)-(37,5) = "bar"
- │ │ │ │ ├── closing_loc: (37,5)-(37,6) = "/"
- │ │ │ │ └── unescaped: "bar"
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :=~
- │ │ │ ├── message_loc: (37,7)-(37,9) = "=~"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (37,10)-(37,14))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ SymbolNode (location: (37,10)-(37,14))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (37,10)-(37,11) = ":"
- │ │ │ │ ├── value_loc: (37,11)-(37,14) = "foo"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "foo"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (37,0)-(37,1) = "("
- │ │ └── closing_loc: (37,14)-(37,15) = ")"
- │ ├── call_operator_loc: (37,15)-(37,16) = "."
- │ ├── name: :foo
- │ ├── message_loc: (37,16)-(37,19) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (38,0)-(38,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (38,0)-(38,6))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (38,1)-(38,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ RangeNode (location: (38,1)-(38,5))
- │ │ │ ├── flags: ∅
- │ │ │ ├── left:
- │ │ │ │ @ IntegerNode (location: (38,1)-(38,2))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── right:
- │ │ │ │ @ IntegerNode (location: (38,4)-(38,5))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── operator_loc: (38,2)-(38,4) = ".."
- │ │ ├── opening_loc: (38,0)-(38,1) = "("
- │ │ └── closing_loc: (38,5)-(38,6) = ")"
- │ ├── call_operator_loc: (38,6)-(38,7) = "."
- │ ├── name: :max
- │ ├── message_loc: (38,7)-(38,10) = "max"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (39,0)-(39,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (39,0)-(39,14))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (39,1)-(39,13))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (39,1)-(39,13))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (39,1)-(39,4))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (39,1)-(39,4) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :=~
- │ │ │ ├── message_loc: (39,5)-(39,7) = "=~"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (39,8)-(39,13))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ RegularExpressionNode (location: (39,8)-(39,13))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: (39,8)-(39,9) = "/"
- │ │ │ │ ├── content_loc: (39,9)-(39,12) = "bar"
- │ │ │ │ ├── closing_loc: (39,12)-(39,13) = "/"
- │ │ │ │ └── unescaped: "bar"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (39,0)-(39,1) = "("
- │ │ └── closing_loc: (39,13)-(39,14) = ")"
- │ ├── call_operator_loc: (39,14)-(39,15) = "."
- │ ├── name: :foo
- │ ├── message_loc: (39,15)-(39,18) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (40,0)-(40,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RegularExpressionNode (location: (40,0)-(40,5))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (40,0)-(40,1) = "/"
- │ │ ├── content_loc: (40,1)-(40,4) = "bar"
- │ │ ├── closing_loc: (40,4)-(40,5) = "/"
- │ │ └── unescaped: "bar"
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (40,6)-(40,8) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (40,9)-(40,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (40,9)-(40,13))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (40,9)-(40,10) = ":"
- │ │ ├── value_loc: (40,10)-(40,13) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (41,0)-(41,12))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ RegularExpressionNode (location: (41,0)-(41,5))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (41,0)-(41,1) = "/"
- │ │ ├── content_loc: (41,1)-(41,4) = "bar"
- │ │ ├── closing_loc: (41,4)-(41,5) = "/"
- │ │ └── unescaped: "bar"
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (41,6)-(41,8) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (41,9)-(41,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (41,9)-(41,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (41,9)-(41,12) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ RangeNode (location: (42,0)-(42,8))
- │ ├── flags: ∅
- │ ├── left:
- │ │ @ IntegerNode (location: (42,0)-(42,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── right:
- │ │ @ CallNode (location: (42,3)-(42,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ IntegerNode (location: (42,3)-(42,4))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── call_operator_loc: (42,4)-(42,5) = "."
- │ │ ├── name: :max
- │ │ ├── message_loc: (42,5)-(42,8) = "max"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (42,1)-(42,3) = ".."
- ├── @ CallNode (location: (43,0)-(43,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ConstantReadNode (location: (43,0)-(43,1))
- │ │ └── name: :A
- │ ├── call_operator_loc: (43,1)-(43,2) = "."
- │ ├── name: :foo
- │ ├── message_loc: (43,2)-(43,5) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (44,0)-(44,5))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :FOO
- │ ├── message_loc: (44,0)-(44,3) = "FOO"
- │ ├── opening_loc: (44,3)-(44,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (44,4)-(44,5) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (45,0)-(45,4))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (45,0)-(45,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (45,0)-(45,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (45,1)-(45,3) = "&."
- │ ├── name: :b
- │ ├── message_loc: (45,3)-(45,4) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (46,0)-(46,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (46,0)-(46,1))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (46,0)-(46,1) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (46,1)-(46,2) = "."
- │ ├── name: :foo
- │ ├── message_loc: (46,2)-(46,5) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (47,0)-(47,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (47,0)-(47,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (48,0)-(48,18))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (48,0)-(48,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (48,0)-(48,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :<<
- │ ├── message_loc: (48,4)-(48,6) = "<<"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (48,7)-(48,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ParenthesesNode (location: (48,7)-(48,18))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (48,8)-(48,17))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (48,8)-(48,17))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (48,8)-(48,11))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (48,8)-(48,11) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :*
- │ │ │ ├── message_loc: (48,12)-(48,13) = "*"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (48,14)-(48,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (48,14)-(48,17))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (48,14)-(48,17) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (48,7)-(48,8) = "("
- │ │ └── closing_loc: (48,17)-(48,18) = ")"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (49,0)-(49,12))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (49,0)-(49,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (49,0)-(49,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :=~
- │ ├── message_loc: (49,4)-(49,6) = "=~"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (49,7)-(49,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ RegularExpressionNode (location: (49,7)-(49,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (49,7)-(49,8) = "/"
- │ │ ├── content_loc: (49,8)-(49,11) = "bar"
- │ │ ├── closing_loc: (49,11)-(49,12) = "/"
- │ │ └── unescaped: "bar"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (50,0)-(50,17))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (50,0)-(50,3) = "foo"
- │ ├── opening_loc: (50,3)-(50,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (50,17)-(50,18) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (50,4)-(50,17))
- │ ├── expression:
- │ │ @ ParenthesesNode (location: (50,5)-(50,17))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (50,6)-(50,16))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ OrNode (location: (50,6)-(50,16))
- │ │ │ ├── left:
- │ │ │ │ @ CallNode (location: (50,6)-(50,9))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (50,6)-(50,9) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── right:
- │ │ │ │ @ CallNode (location: (50,13)-(50,16))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (50,13)-(50,16) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (50,10)-(50,12) = "||"
- │ │ ├── opening_loc: (50,5)-(50,6) = "("
- │ │ └── closing_loc: (50,16)-(50,17) = ")"
- │ └── operator_loc: (50,4)-(50,5) = "&"
- ├── @ CallNode (location: (51,0)-(51,10))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (51,0)-(51,3) = "foo"
- │ ├── opening_loc: (51,3)-(51,4) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (51,10)-(51,11) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (51,4)-(51,10))
- │ ├── expression:
- │ │ @ CallNode (location: (51,5)-(51,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :block
- │ │ ├── message_loc: (51,5)-(51,10) = "block"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (51,4)-(51,5) = "&"
- ├── @ CallNode (location: (52,0)-(52,17))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (52,0)-(52,3) = "foo"
- │ ├── opening_loc: (52,3)-(52,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (52,4)-(52,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (52,4)-(52,9))
- │ │ ├── operator_loc: (52,4)-(52,5) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (52,5)-(52,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :args
- │ │ ├── message_loc: (52,5)-(52,9) = "args"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (52,17)-(52,18) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (52,11)-(52,17))
- │ ├── expression:
- │ │ @ CallNode (location: (52,12)-(52,17))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :block
- │ │ ├── message_loc: (52,12)-(52,17) = "block"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (52,11)-(52,12) = "&"
- ├── @ CallNode (location: (53,0)-(53,15))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (53,0)-(53,3) = "foo"
- │ ├── opening_loc: (53,3)-(53,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (53,4)-(53,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (53,4)-(53,14))
- │ │ ├── operator_loc: (53,4)-(53,5) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (53,5)-(53,14))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :arguments
- │ │ ├── message_loc: (53,5)-(53,14) = "arguments"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (53,14)-(53,15) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (54,0)-(54,9))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (54,0)-(54,3) = "foo"
- │ ├── opening_loc: (54,3)-(54,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (54,4)-(54,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (54,4)-(54,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (54,7)-(54,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: (54,8)-(54,9) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (55,0)-(55,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (55,0)-(55,3) = "foo"
- │ ├── opening_loc: (55,3)-(55,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (55,4)-(55,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (55,4)-(55,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (55,4)-(55,7) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (55,7)-(55,8) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (56,0)-(56,15))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (56,0)-(56,3) = "foo"
- │ ├── opening_loc: (56,3)-(56,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (56,4)-(56,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (56,4)-(56,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (56,4)-(56,7) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ SplatNode (location: (56,9)-(56,14))
- │ │ ├── operator_loc: (56,9)-(56,10) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (56,10)-(56,14))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :args
- │ │ ├── message_loc: (56,10)-(56,14) = "args"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (56,14)-(56,15) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (57,0)-(57,17))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (57,0)-(57,3) = "foo"
- │ ├── opening_loc: (57,3)-(57,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (57,4)-(57,16))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (57,4)-(57,16))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (57,4)-(57,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (57,4)-(57,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :=~
- │ │ ├── message_loc: (57,8)-(57,10) = "=~"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (57,11)-(57,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ RegularExpressionNode (location: (57,11)-(57,16))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (57,11)-(57,12) = "/"
- │ │ │ ├── content_loc: (57,12)-(57,15) = "bar"
- │ │ │ ├── closing_loc: (57,15)-(57,16) = "/"
- │ │ │ └── unescaped: "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (57,16)-(57,17) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (58,0)-(58,13))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (58,0)-(58,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (58,0)-(58,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (58,3)-(58,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (58,4)-(58,7) = "bar"
- │ ├── opening_loc: (58,7)-(58,8) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (58,12)-(58,13) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (58,8)-(58,12))
- │ ├── expression:
- │ │ @ CallNode (location: (58,9)-(58,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (58,9)-(58,12) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (58,8)-(58,9) = "&"
- ├── @ CallNode (location: (59,0)-(59,26))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (59,0)-(59,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (59,0)-(59,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (59,3)-(59,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (59,4)-(59,7) = "bar"
- │ ├── opening_loc: (59,7)-(59,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (59,8)-(59,25))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ SplatNode (location: (59,8)-(59,13))
- │ │ │ ├── operator_loc: (59,8)-(59,9) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (59,9)-(59,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :arga
- │ │ │ ├── message_loc: (59,9)-(59,13) = "arga"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── @ CallNode (location: (59,15)-(59,18))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (59,15)-(59,18) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ SplatNode (location: (59,20)-(59,25))
- │ │ ├── operator_loc: (59,20)-(59,21) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (59,21)-(59,25))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :argb
- │ │ ├── message_loc: (59,21)-(59,25) = "argb"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (59,25)-(59,26) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (60,0)-(60,14))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (60,0)-(60,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (60,0)-(60,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (60,3)-(60,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (60,4)-(60,7) = "bar"
- │ ├── opening_loc: (60,7)-(60,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (60,8)-(60,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (60,8)-(60,13))
- │ │ ├── operator_loc: (60,8)-(60,9) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (60,9)-(60,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :args
- │ │ ├── message_loc: (60,9)-(60,13) = "args"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (60,13)-(60,14) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (61,0)-(61,19))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (61,0)-(61,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (61,0)-(61,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (61,3)-(61,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (61,4)-(61,7) = "bar"
- │ ├── opening_loc: (61,7)-(61,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (61,8)-(61,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SplatNode (location: (61,8)-(61,13))
- │ │ │ ├── operator_loc: (61,8)-(61,9) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (61,9)-(61,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :args
- │ │ │ ├── message_loc: (61,9)-(61,13) = "args"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (61,15)-(61,18))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (61,15)-(61,18) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (61,18)-(61,19) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (62,0)-(62,19))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (62,0)-(62,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (62,0)-(62,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (62,3)-(62,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (62,4)-(62,7) = "bar"
- │ ├── opening_loc: (62,7)-(62,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (62,8)-(62,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (62,8)-(62,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (62,8)-(62,9) = ":"
- │ │ ├── value_loc: (62,9)-(62,12) = "baz"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "baz"
- │ ├── closing_loc: (62,18)-(62,19) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (62,14)-(62,18))
- │ ├── expression:
- │ │ @ CallNode (location: (62,15)-(62,18))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (62,15)-(62,18) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (62,14)-(62,15) = "&"
- ├── @ CallNode (location: (63,0)-(63,17))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (63,0)-(63,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (63,0)-(63,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (63,3)-(63,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (63,4)-(63,7) = "bar"
- │ ├── opening_loc: (63,7)-(63,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (63,8)-(63,16))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (63,8)-(63,16))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (63,8)-(63,16))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (63,8)-(63,12))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (63,8)-(63,11) = "baz"
- │ │ │ ├── closing_loc: (63,11)-(63,12) = ":"
- │ │ │ └── unescaped: "baz"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (63,13)-(63,16))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :boz
- │ │ │ ├── message_loc: (63,13)-(63,16) = "boz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (63,16)-(63,17) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (64,0)-(64,26))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (64,0)-(64,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (64,0)-(64,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (64,3)-(64,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (64,4)-(64,7) = "bar"
- │ ├── opening_loc: (64,7)-(64,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (64,8)-(64,25))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (64,8)-(64,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (64,8)-(64,11) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ KeywordHashNode (location: (64,13)-(64,25))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (64,13)-(64,25))
- │ │ ├── key:
- │ │ │ @ StringNode (location: (64,13)-(64,18))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (64,13)-(64,14) = "\""
- │ │ │ ├── content_loc: (64,14)-(64,17) = "baz"
- │ │ │ ├── closing_loc: (64,17)-(64,18) = "\""
- │ │ │ └── unescaped: "baz"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (64,22)-(64,25))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :boz
- │ │ │ ├── message_loc: (64,22)-(64,25) = "boz"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (64,19)-(64,21) = "=>"
- │ ├── closing_loc: (64,25)-(64,26) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (65,0)-(65,19))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (65,0)-(65,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (65,0)-(65,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (65,3)-(65,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (65,4)-(65,7) = "bar"
- │ ├── opening_loc: (65,7)-(65,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (65,8)-(65,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (65,8)-(65,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (65,8)-(65,11) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ SplatNode (location: (65,13)-(65,18))
- │ │ ├── operator_loc: (65,13)-(65,14) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (65,14)-(65,18))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :args
- │ │ ├── message_loc: (65,14)-(65,18) = "args"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (65,18)-(65,19) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (66,0)-(66,27))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (66,0)-(66,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (66,0)-(66,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (66,3)-(66,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (66,4)-(66,7) = "bar"
- │ ├── opening_loc: (66,7)-(66,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (66,8)-(66,18))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (66,8)-(66,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (66,8)-(66,11) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ SplatNode (location: (66,13)-(66,18))
- │ │ ├── operator_loc: (66,13)-(66,14) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (66,14)-(66,18))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :args
- │ │ ├── message_loc: (66,14)-(66,18) = "args"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (66,26)-(66,27) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (66,20)-(66,26))
- │ ├── expression:
- │ │ @ CallNode (location: (66,21)-(66,26))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :block
- │ │ ├── message_loc: (66,21)-(66,26) = "block"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (66,20)-(66,21) = "&"
- ├── @ CallNode (location: (67,0)-(67,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (67,0)-(67,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (67,0)-(67,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (67,3)-(67,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (67,4)-(67,7) = "bar"
- │ ├── opening_loc: (67,7)-(67,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (67,8)-(67,15))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (67,8)-(67,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (67,8)-(67,11) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ HashNode (location: (67,13)-(67,15))
- │ │ ├── opening_loc: (67,13)-(67,14) = "{"
- │ │ ├── elements: (length: 0)
- │ │ └── closing_loc: (67,14)-(67,15) = "}"
- │ ├── closing_loc: (67,15)-(67,16) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (68,0)-(68,26))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (68,0)-(68,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (68,0)-(68,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (68,3)-(68,4) = "."
- │ ├── name: :bar
- │ ├── message_loc: (68,4)-(68,7) = "bar"
- │ ├── opening_loc: (68,7)-(68,8) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (68,8)-(68,25))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ HashNode (location: (68,8)-(68,20))
- │ │ │ ├── opening_loc: (68,8)-(68,9) = "{"
- │ │ │ ├── elements: (length: 1)
- │ │ │ │ └── @ AssocNode (location: (68,10)-(68,18))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (68,10)-(68,14))
- │ │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (68,10)-(68,13) = "foo"
- │ │ │ │ │ ├── closing_loc: (68,13)-(68,14) = ":"
- │ │ │ │ │ └── unescaped: "foo"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CallNode (location: (68,15)-(68,18))
- │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :boz
- │ │ │ │ │ ├── message_loc: (68,15)-(68,18) = "boz"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block: ∅
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── closing_loc: (68,19)-(68,20) = "}"
- │ │ └── @ CallNode (location: (68,22)-(68,25))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :boz
- │ │ ├── message_loc: (68,22)-(68,25) = "boz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (68,25)-(68,26) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (69,0)-(69,12))
- │ ├── flags: attribute_write
- │ ├── receiver:
- │ │ @ CallNode (location: (69,0)-(69,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (69,0)-(69,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (69,3)-(69,4) = "."
- │ ├── name: :bar=
- │ ├── message_loc: (69,4)-(69,7) = "bar"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (69,8)-(69,12))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (69,8)-(69,12))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (69,8)-(69,9) = ":"
- │ │ ├── value_loc: (69,9)-(69,12) = "baz"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "baz"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (70,0)-(70,9))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (70,0)-(70,3) = "foo"
- │ ├── opening_loc: (70,3)-(70,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (70,4)-(70,8))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (70,4)-(70,8))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (70,4)-(70,8))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (70,4)-(70,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (70,4)-(70,5) = "a"
- │ │ │ ├── closing_loc: (70,5)-(70,6) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (70,7)-(70,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (70,7)-(70,8) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (70,8)-(70,9) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (71,0)-(71,11))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (71,0)-(71,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (71,0)-(71,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (71,3)-(71,4) = "."
- │ ├── name: :&
- │ ├── message_loc: (71,4)-(71,5) = "&"
- │ ├── opening_loc: (71,5)-(71,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (71,6)-(71,10))
- │ │ ├── flags: contains_keywords
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (71,6)-(71,10))
- │ │ ├── flags: symbol_keys
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocNode (location: (71,6)-(71,10))
- │ │ ├── key:
- │ │ │ @ SymbolNode (location: (71,6)-(71,8))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── value_loc: (71,6)-(71,7) = "a"
- │ │ │ ├── closing_loc: (71,7)-(71,8) = ":"
- │ │ │ └── unescaped: "a"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (71,9)-(71,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (71,9)-(71,10) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: ∅
- │ ├── closing_loc: (71,10)-(71,11) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (72,0)-(72,10))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (72,0)-(72,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (72,0)-(72,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (72,3)-(72,4) = "."
- │ ├── name: :&
- │ ├── message_loc: (72,4)-(72,5) = "&"
- │ ├── opening_loc: (72,5)-(72,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (72,6)-(72,9))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (72,6)-(72,9))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (72,6)-(72,9))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (72,8)-(72,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (72,8)-(72,9) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (72,6)-(72,8) = "**"
- │ ├── closing_loc: (72,9)-(72,10) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (73,0)-(73,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (73,0)-(73,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (73,0)-(73,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (73,3)-(73,9) = "[*baz]"
- │ ├── opening_loc: (73,3)-(73,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (73,4)-(73,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SplatNode (location: (73,4)-(73,8))
- │ │ ├── operator_loc: (73,4)-(73,5) = "*"
- │ │ └── expression:
- │ │ @ CallNode (location: (73,5)-(73,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (73,5)-(73,8) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (73,8)-(73,9) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (74,0)-(74,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (74,0)-(74,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (74,0)-(74,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (74,3)-(74,9) = "[1, 2]"
- │ ├── opening_loc: (74,3)-(74,4) = "["
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (74,4)-(74,8))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ IntegerNode (location: (74,4)-(74,5))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (74,7)-(74,8))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── closing_loc: (74,8)-(74,9) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (75,0)-(75,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (75,0)-(75,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (75,0)-(75,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :[]
- │ ├── message_loc: (75,3)-(75,5) = "[]"
- │ ├── opening_loc: (75,3)-(75,4) = "["
- │ ├── arguments: ∅
- │ ├── closing_loc: (75,4)-(75,5) = "]"
- │ └── block: ∅
- ├── @ CallNode (location: (76,0)-(76,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver:
- │ │ @ SelfNode (location: (76,0)-(76,4))
- │ ├── call_operator_loc: (76,4)-(76,5) = "."
- │ ├── name: :foo
- │ ├── message_loc: (76,5)-(76,8) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (77,0)-(77,13))
- │ ├── flags: attribute_write, ignore_visibility
- │ ├── receiver:
- │ │ @ SelfNode (location: (77,0)-(77,4))
- │ ├── call_operator_loc: (77,4)-(77,5) = "."
- │ ├── name: :foo=
- │ ├── message_loc: (77,5)-(77,8) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (77,9)-(77,13))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ SymbolNode (location: (77,9)-(77,13))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (77,9)-(77,10) = ":"
- │ │ ├── value_loc: (77,10)-(77,13) = "bar"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "bar"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (78,0)-(78,17))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (78,0)-(78,7))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (78,1)-(78,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (78,1)-(78,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (78,1)-(78,2))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (78,1)-(78,2) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+
- │ │ │ ├── message_loc: (78,3)-(78,4) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (78,5)-(78,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (78,5)-(78,6))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (78,5)-(78,6) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (78,0)-(78,1) = "("
- │ │ └── closing_loc: (78,6)-(78,7) = ")"
- │ ├── call_operator_loc: ∅
- │ ├── name: :/
- │ ├── message_loc: (78,8)-(78,9) = "/"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (78,10)-(78,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ ParenthesesNode (location: (78,10)-(78,17))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (78,11)-(78,16))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (78,11)-(78,16))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (78,11)-(78,12))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :c
- │ │ │ │ ├── message_loc: (78,11)-(78,12) = "c"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :-
- │ │ │ ├── message_loc: (78,13)-(78,14) = "-"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (78,15)-(78,16))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (78,15)-(78,16))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :d
- │ │ │ │ ├── message_loc: (78,15)-(78,16) = "d"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (78,10)-(78,11) = "("
- │ │ └── closing_loc: (78,16)-(78,17) = ")"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (79,0)-(79,19))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (79,0)-(79,7))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (79,1)-(79,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (79,1)-(79,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (79,1)-(79,2))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (79,1)-(79,2) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+
- │ │ │ ├── message_loc: (79,3)-(79,4) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (79,5)-(79,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (79,5)-(79,6))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (79,5)-(79,6) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (79,0)-(79,1) = "("
- │ │ └── closing_loc: (79,6)-(79,7) = ")"
- │ ├── call_operator_loc: ∅
- │ ├── name: :/
- │ ├── message_loc: (79,8)-(79,9) = "/"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (79,10)-(79,19))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (79,10)-(79,19))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (79,10)-(79,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (79,10)-(79,11) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (79,11)-(79,12) = "."
- │ │ ├── name: :-
- │ │ ├── message_loc: (79,12)-(79,13) = "-"
- │ │ ├── opening_loc: (79,13)-(79,14) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (79,14)-(79,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ CallNode (location: (79,14)-(79,15))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :e
- │ │ │ │ ├── message_loc: (79,14)-(79,15) = "e"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── @ CallNode (location: (79,17)-(79,18))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :f
- │ │ │ ├── message_loc: (79,17)-(79,18) = "f"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: (79,18)-(79,19) = ")"
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (80,0)-(80,17))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (80,0)-(80,7))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (80,1)-(80,6))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (80,1)-(80,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (80,1)-(80,2))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (80,1)-(80,2) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :+
- │ │ │ ├── message_loc: (80,3)-(80,4) = "+"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (80,5)-(80,6))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (80,5)-(80,6))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (80,5)-(80,6) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (80,0)-(80,1) = "("
- │ │ └── closing_loc: (80,6)-(80,7) = ")"
- │ ├── call_operator_loc: ∅
- │ ├── name: :/
- │ ├── message_loc: (80,8)-(80,9) = "/"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (80,10)-(80,17))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (80,10)-(80,17))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (80,10)-(80,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (80,10)-(80,11) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (80,11)-(80,12) = "."
- │ │ ├── name: :-
- │ │ ├── message_loc: (80,12)-(80,13) = "-"
- │ │ ├── opening_loc: (80,13)-(80,14) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (80,14)-(80,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ SplatNode (location: (80,14)-(80,16))
- │ │ │ ├── operator_loc: (80,14)-(80,15) = "*"
- │ │ │ └── expression:
- │ │ │ @ CallNode (location: (80,15)-(80,16))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :f
- │ │ │ ├── message_loc: (80,15)-(80,16) = "f"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── closing_loc: (80,16)-(80,17) = ")"
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (81,0)-(81,8))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :x
- │ ├── message_loc: (81,0)-(81,1) = "x"
- │ ├── opening_loc: (81,1)-(81,2) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (81,2)-(81,7))
- │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ └── arguments: (length: 1)
- │ │ └── @ KeywordHashNode (location: (81,2)-(81,7))
- │ │ ├── flags: ∅
- │ │ └── elements: (length: 1)
- │ │ └── @ AssocSplatNode (location: (81,2)-(81,7))
- │ │ ├── value:
- │ │ │ @ CallNode (location: (81,4)-(81,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (81,4)-(81,7) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (81,2)-(81,4) = "**"
- │ ├── closing_loc: (81,7)-(81,8) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (82,0)-(82,6))
- │ ├── flags: safe_navigation
- │ ├── receiver:
- │ │ @ CallNode (location: (82,0)-(82,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (82,0)-(82,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (82,3)-(82,5) = "&."
- │ ├── name: :!
- │ ├── message_loc: (82,5)-(82,6) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (83,0)-(83,8))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (83,0)-(83,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (83,0)-(83,3) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (83,3)-(83,4) = "."
- │ ├── name: :~
- │ ├── message_loc: (83,4)-(83,5) = "~"
- │ ├── opening_loc: (83,5)-(83,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (83,6)-(83,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (83,6)-(83,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (83,6)-(83,7) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (83,7)-(83,8) = ")"
- │ └── block: ∅
- └── @ CallNode (location: (84,0)-(84,7))
- ├── flags: safe_navigation
- ├── receiver:
- │ @ CallNode (location: (84,0)-(84,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (84,0)-(84,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: (84,1)-(84,3) = "&."
- ├── name: :+
- ├── message_loc: (84,3)-(84,4) = "+"
- ├── opening_loc: (84,4)-(84,5) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (84,5)-(84,6))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (84,5)-(84,6))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (84,5)-(84,6) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: (84,6)-(84,7) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/27.txt b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
deleted file mode 100644
index 60edc18604..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/since/27.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,5))
- └── body: (length: 2)
- ├── @ LambdaNode (location: (1,0)-(3,1))
- │ ├── locals: [:_1, :_2]
- │ ├── operator_loc: (1,0)-(1,2) = "->"
- │ ├── opening_loc: (1,3)-(1,4) = "{"
- │ ├── closing_loc: (3,0)-(3,1) = "}"
- │ ├── parameters:
- │ │ @ NumberedParametersNode (location: (1,0)-(3,1))
- │ │ └── maximum: 2
- │ └── body:
- │ @ StatementsNode (location: (2,2)-(2,9))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (2,2)-(2,4))
- │ │ ├── name: :_1
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (2,5)-(2,6) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,7)-(2,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (2,7)-(2,9))
- │ │ ├── name: :_2
- │ │ └── depth: 0
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ ParenthesesNode (location: (4,0)-(4,5))
- ├── body:
- │ @ StatementsNode (location: (4,1)-(4,4))
- │ └── body: (length: 1)
- │ └── @ RangeNode (location: (4,1)-(4,4))
- │ ├── flags: ∅
- │ ├── left: ∅
- │ ├── right:
- │ │ @ IntegerNode (location: (4,3)-(4,4))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (4,1)-(4,3) = ".."
- ├── opening_loc: (4,0)-(4,1) = "("
- └── closing_loc: (4,4)-(4,5) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/30.txt b/test/prism/snapshots/unparser/corpus/literal/since/30.txt
deleted file mode 100644
index 300dd869f5..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/since/30.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,17))
-├── locals: [:a, :foo]
-└── statements:
- @ StatementsNode (location: (1,0)-(4,17))
- └── body: (length: 4)
- ├── @ MatchRequiredNode (location: (1,0)-(1,8))
- │ ├── value:
- │ │ @ IntegerNode (location: (1,0)-(1,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (1,5)-(1,8))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
- │ │ │ ├── name: :a
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (1,5)-(1,6) = "["
- │ │ └── closing_loc: (1,7)-(1,8) = "]"
- │ └── operator_loc: (1,2)-(1,4) = "=>"
- ├── @ MatchRequiredNode (location: (2,0)-(2,8))
- │ ├── value:
- │ │ @ IntegerNode (location: (2,0)-(2,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── pattern:
- │ │ @ ArrayPatternNode (location: (2,5)-(2,8))
- │ │ ├── constant: ∅
- │ │ ├── requireds: (length: 0)
- │ │ ├── rest:
- │ │ │ @ SplatNode (location: (2,6)-(2,7))
- │ │ │ ├── operator_loc: (2,6)-(2,7) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── opening_loc: (2,5)-(2,6) = "["
- │ │ └── closing_loc: (2,7)-(2,8) = "]"
- │ └── operator_loc: (2,2)-(2,4) = "=>"
- ├── @ MatchPredicateNode (location: (3,0)-(3,15))
- │ ├── value:
- │ │ @ IntegerNode (location: (3,0)-(3,1))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── pattern:
- │ │ @ FindPatternNode (location: (3,5)-(3,15))
- │ │ ├── constant: ∅
- │ │ ├── left:
- │ │ │ @ SplatNode (location: (3,6)-(3,7))
- │ │ │ ├── operator_loc: (3,6)-(3,7) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ IntegerNode (location: (3,9)-(3,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ ├── right:
- │ │ │ @ SplatNode (location: (3,13)-(3,14))
- │ │ │ ├── operator_loc: (3,13)-(3,14) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── opening_loc: (3,5)-(3,6) = "["
- │ │ └── closing_loc: (3,14)-(3,15) = "]"
- │ └── operator_loc: (3,2)-(3,4) = "in"
- └── @ MatchPredicateNode (location: (4,0)-(4,17))
- ├── value:
- │ @ IntegerNode (location: (4,0)-(4,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── pattern:
- │ @ FindPatternNode (location: (4,5)-(4,17))
- │ ├── constant: ∅
- │ ├── left:
- │ │ @ SplatNode (location: (4,6)-(4,7))
- │ │ ├── operator_loc: (4,6)-(4,7) = "*"
- │ │ └── expression: ∅
- │ ├── requireds: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (4,9)-(4,10))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── right:
- │ │ @ SplatNode (location: (4,12)-(4,16))
- │ │ ├── operator_loc: (4,12)-(4,13) = "*"
- │ │ └── expression:
- │ │ @ LocalVariableTargetNode (location: (4,13)-(4,16))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── opening_loc: (4,5)-(4,6) = "["
- │ └── closing_loc: (4,16)-(4,17) = "]"
- └── operator_loc: (4,2)-(4,4) = "in"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/31.txt b/test/prism/snapshots/unparser/corpus/literal/since/31.txt
deleted file mode 100644
index 142a56ae83..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/since/31.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,3))
- └── body: (length: 2)
- ├── @ DefNode (location: (1,0)-(3,3))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,8)-(1,9))
- │ │ ├── requireds: (length: 0)
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block:
- │ │ @ BlockParameterNode (location: (1,8)-(1,9))
- │ │ ├── flags: ∅
- │ │ ├── name: ∅
- │ │ ├── name_loc: ∅
- │ │ └── operator_loc: (1,8)-(1,9) = "&"
- │ ├── body:
- │ │ @ StatementsNode (location: (2,2)-(2,7))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(2,7))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (2,2)-(2,5) = "bar"
- │ │ ├── opening_loc: (2,5)-(2,6) = "("
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: (2,7)-(2,8) = ")"
- │ │ └── block:
- │ │ @ BlockArgumentNode (location: (2,6)-(2,7))
- │ │ ├── expression: ∅
- │ │ └── operator_loc: (2,6)-(2,7) = "&"
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (1,7)-(1,8) = "("
- │ ├── rparen_loc: (1,9)-(1,10) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- └── @ DefNode (location: (5,0)-(7,3))
- ├── name: :foo
- ├── name_loc: (5,4)-(5,7) = "foo"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (5,8)-(5,12))
- │ ├── requireds: (length: 1)
- │ │ └── @ RequiredParameterNode (location: (5,8)-(5,9))
- │ │ ├── flags: ∅
- │ │ └── name: :a
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest: ∅
- │ └── block:
- │ @ BlockParameterNode (location: (5,11)-(5,12))
- │ ├── flags: ∅
- │ ├── name: ∅
- │ ├── name_loc: ∅
- │ └── operator_loc: (5,11)-(5,12) = "&"
- ├── body:
- │ @ StatementsNode (location: (6,2)-(6,7))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (6,2)-(6,7))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :bar
- │ ├── message_loc: (6,2)-(6,5) = "bar"
- │ ├── opening_loc: (6,5)-(6,6) = "("
- │ ├── arguments: ∅
- │ ├── closing_loc: (6,7)-(6,8) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (6,6)-(6,7))
- │ ├── expression: ∅
- │ └── operator_loc: (6,6)-(6,7) = "&"
- ├── locals: [:a]
- ├── def_keyword_loc: (5,0)-(5,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (5,7)-(5,8) = "("
- ├── rparen_loc: (5,12)-(5,13) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (7,0)-(7,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/32.txt b/test/prism/snapshots/unparser/corpus/literal/since/32.txt
deleted file mode 100644
index 2b28be2fa8..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/since/32.txt
+++ /dev/null
@@ -1,156 +0,0 @@
-@ ProgramNode (location: (1,0)-(11,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(11,3))
- └── body: (length: 3)
- ├── @ DefNode (location: (1,0)-(3,3))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (1,8)-(1,20))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :argument
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest: ∅
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest:
- │ │ │ @ KeywordRestParameterNode (location: (1,18)-(1,20))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (1,18)-(1,20) = "**"
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (2,2)-(2,19))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(2,19))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (2,2)-(2,5) = "bar"
- │ │ ├── opening_loc: (2,5)-(2,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (2,6)-(2,18))
- │ │ │ ├── flags: contains_keywords, contains_keyword_splat
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ LocalVariableReadNode (location: (2,6)-(2,14))
- │ │ │ │ ├── name: :argument
- │ │ │ │ └── depth: 0
- │ │ │ └── @ KeywordHashNode (location: (2,16)-(2,18))
- │ │ │ ├── flags: ∅
- │ │ │ └── elements: (length: 1)
- │ │ │ └── @ AssocSplatNode (location: (2,16)-(2,18))
- │ │ │ ├── value: ∅
- │ │ │ └── operator_loc: (2,16)-(2,18) = "**"
- │ │ ├── closing_loc: (2,18)-(2,19) = ")"
- │ │ └── block: ∅
- │ ├── locals: [:argument]
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (1,7)-(1,8) = "("
- │ ├── rparen_loc: (1,20)-(1,21) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ DefNode (location: (5,0)-(7,3))
- │ ├── name: :foo
- │ ├── name_loc: (5,4)-(5,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters:
- │ │ @ ParametersNode (location: (5,8)-(5,19))
- │ │ ├── requireds: (length: 1)
- │ │ │ └── @ RequiredParameterNode (location: (5,8)-(5,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :argument
- │ │ ├── optionals: (length: 0)
- │ │ ├── rest:
- │ │ │ @ RestParameterNode (location: (5,18)-(5,19))
- │ │ │ ├── flags: ∅
- │ │ │ ├── name: ∅
- │ │ │ ├── name_loc: ∅
- │ │ │ └── operator_loc: (5,18)-(5,19) = "*"
- │ │ ├── posts: (length: 0)
- │ │ ├── keywords: (length: 0)
- │ │ ├── keyword_rest: ∅
- │ │ └── block: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (6,2)-(6,18))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (6,2)-(6,18))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (6,2)-(6,5) = "bar"
- │ │ ├── opening_loc: (6,5)-(6,6) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (6,6)-(6,17))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 2)
- │ │ │ ├── @ LocalVariableReadNode (location: (6,6)-(6,14))
- │ │ │ │ ├── name: :argument
- │ │ │ │ └── depth: 0
- │ │ │ └── @ SplatNode (location: (6,16)-(6,17))
- │ │ │ ├── operator_loc: (6,16)-(6,17) = "*"
- │ │ │ └── expression: ∅
- │ │ ├── closing_loc: (6,17)-(6,18) = ")"
- │ │ └── block: ∅
- │ ├── locals: [:argument]
- │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: (5,7)-(5,8) = "("
- │ ├── rparen_loc: (5,19)-(5,20) = ")"
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (7,0)-(7,3) = "end"
- └── @ DefNode (location: (9,0)-(11,3))
- ├── name: :foo
- ├── name_loc: (9,4)-(9,7) = "foo"
- ├── receiver: ∅
- ├── parameters:
- │ @ ParametersNode (location: (9,8)-(9,10))
- │ ├── requireds: (length: 0)
- │ ├── optionals: (length: 0)
- │ ├── rest: ∅
- │ ├── posts: (length: 0)
- │ ├── keywords: (length: 0)
- │ ├── keyword_rest:
- │ │ @ KeywordRestParameterNode (location: (9,8)-(9,10))
- │ │ ├── flags: ∅
- │ │ ├── name: ∅
- │ │ ├── name_loc: ∅
- │ │ └── operator_loc: (9,8)-(9,10) = "**"
- │ └── block: ∅
- ├── body:
- │ @ StatementsNode (location: (10,2)-(10,20))
- │ └── body: (length: 1)
- │ └── @ HashNode (location: (10,2)-(10,20))
- │ ├── opening_loc: (10,2)-(10,3) = "{"
- │ ├── elements: (length: 2)
- │ │ ├── @ AssocNode (location: (10,4)-(10,14))
- │ │ │ ├── key:
- │ │ │ │ @ SymbolNode (location: (10,4)-(10,12))
- │ │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── value_loc: (10,4)-(10,11) = "default"
- │ │ │ │ ├── closing_loc: (10,11)-(10,12) = ":"
- │ │ │ │ └── unescaped: "default"
- │ │ │ ├── value:
- │ │ │ │ @ IntegerNode (location: (10,13)-(10,14))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── operator_loc: ∅
- │ │ └── @ AssocSplatNode (location: (10,16)-(10,18))
- │ │ ├── value: ∅
- │ │ └── operator_loc: (10,16)-(10,18) = "**"
- │ └── closing_loc: (10,19)-(10,20) = "}"
- ├── locals: []
- ├── def_keyword_loc: (9,0)-(9,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: (9,7)-(9,8) = "("
- ├── rparen_loc: (9,10)-(9,11) = ")"
- ├── equal_loc: ∅
- └── end_keyword_loc: (11,0)-(11,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/singletons.txt b/test/prism/snapshots/unparser/corpus/literal/singletons.txt
deleted file mode 100644
index 45c06f7b07..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/singletons.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@ ProgramNode (location: (1,0)-(4,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(4,4))
- └── body: (length: 4)
- ├── @ FalseNode (location: (1,0)-(1,5))
- ├── @ NilNode (location: (2,0)-(2,3))
- ├── @ SelfNode (location: (3,0)-(3,4))
- └── @ TrueNode (location: (4,0)-(4,4))
diff --git a/test/prism/snapshots/unparser/corpus/literal/super.txt b/test/prism/snapshots/unparser/corpus/literal/super.txt
deleted file mode 100644
index d5a7889919..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/super.txt
+++ /dev/null
@@ -1,277 +0,0 @@
-@ ProgramNode (location: (1,0)-(21,1))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(21,1))
- └── body: (length: 11)
- ├── @ ForwardingSuperNode (location: (1,0)-(1,5))
- │ └── block: ∅
- ├── @ SuperNode (location: (2,0)-(2,7))
- │ ├── keyword_loc: (2,0)-(2,5) = "super"
- │ ├── lparen_loc: (2,5)-(2,6) = "("
- │ ├── arguments: ∅
- │ ├── rparen_loc: (2,6)-(2,7) = ")"
- │ └── block: ∅
- ├── @ SuperNode (location: (3,0)-(3,8))
- │ ├── keyword_loc: (3,0)-(3,5) = "super"
- │ ├── lparen_loc: (3,5)-(3,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (3,6)-(3,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (3,6)-(3,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (3,6)-(3,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rparen_loc: (3,7)-(3,8) = ")"
- │ └── block: ∅
- ├── @ SuperNode (location: (4,0)-(4,11))
- │ ├── keyword_loc: (4,0)-(4,5) = "super"
- │ ├── lparen_loc: (4,5)-(4,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (4,6)-(4,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ CallNode (location: (4,6)-(4,7))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (4,6)-(4,7) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (4,9)-(4,10))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (4,9)-(4,10) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rparen_loc: (4,10)-(4,11) = ")"
- │ └── block: ∅
- ├── @ SuperNode (location: (5,0)-(5,13))
- │ ├── keyword_loc: (5,0)-(5,5) = "super"
- │ ├── lparen_loc: (5,5)-(5,6) = "("
- │ ├── arguments: ∅
- │ ├── rparen_loc: (5,12)-(5,13) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (5,6)-(5,12))
- │ ├── expression:
- │ │ @ CallNode (location: (5,7)-(5,12))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :block
- │ │ ├── message_loc: (5,7)-(5,12) = "block"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (5,6)-(5,7) = "&"
- ├── @ SuperNode (location: (6,0)-(6,16))
- │ ├── keyword_loc: (6,0)-(6,5) = "super"
- │ ├── lparen_loc: (6,5)-(6,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (6,6)-(6,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (6,6)-(6,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (6,6)-(6,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rparen_loc: (6,15)-(6,16) = ")"
- │ └── block:
- │ @ BlockArgumentNode (location: (6,9)-(6,15))
- │ ├── expression:
- │ │ @ CallNode (location: (6,10)-(6,15))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :block
- │ │ ├── message_loc: (6,10)-(6,15) = "block"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (6,9)-(6,10) = "&"
- ├── @ SuperNode (location: (7,0)-(9,2))
- │ ├── keyword_loc: (7,0)-(7,5) = "super"
- │ ├── lparen_loc: (7,5)-(7,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,6)-(9,1))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (7,6)-(9,1))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (7,6)-(7,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (7,8)-(9,1))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (8,2)-(8,5))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (8,2)-(8,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (8,2)-(8,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (7,8)-(7,9) = "{"
- │ │ └── closing_loc: (9,0)-(9,1) = "}"
- │ ├── rparen_loc: (9,1)-(9,2) = ")"
- │ └── block: ∅
- ├── @ ForwardingSuperNode (location: (10,0)-(12,1))
- │ └── block:
- │ @ BlockNode (location: (10,6)-(12,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (11,2)-(11,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (11,2)-(11,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (11,2)-(11,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (10,6)-(10,7) = "{"
- │ └── closing_loc: (12,0)-(12,1) = "}"
- ├── @ SuperNode (location: (13,0)-(15,1))
- │ ├── keyword_loc: (13,0)-(13,5) = "super"
- │ ├── lparen_loc: (13,5)-(13,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (13,6)-(13,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (13,6)-(13,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (13,6)-(13,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rparen_loc: (13,7)-(13,8) = ")"
- │ └── block:
- │ @ BlockNode (location: (13,9)-(15,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (14,2)-(14,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (14,2)-(14,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (14,2)-(14,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (13,9)-(13,10) = "{"
- │ └── closing_loc: (15,0)-(15,1) = "}"
- ├── @ SuperNode (location: (16,0)-(18,1))
- │ ├── keyword_loc: (16,0)-(16,5) = "super"
- │ ├── lparen_loc: (16,5)-(16,6) = "("
- │ ├── arguments: ∅
- │ ├── rparen_loc: (16,6)-(16,7) = ")"
- │ └── block:
- │ @ BlockNode (location: (16,8)-(18,1))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (17,2)-(17,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (17,2)-(17,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (17,2)-(17,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (16,8)-(16,9) = "{"
- │ └── closing_loc: (18,0)-(18,1) = "}"
- └── @ SuperNode (location: (19,0)-(21,1))
- ├── keyword_loc: (19,0)-(19,5) = "super"
- ├── lparen_loc: (19,5)-(19,6) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (19,6)-(19,10))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ CallNode (location: (19,6)-(19,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (19,6)-(19,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── @ CallNode (location: (19,9)-(19,10))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (19,9)-(19,10) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── rparen_loc: (19,10)-(19,11) = ")"
- └── block:
- @ BlockNode (location: (19,12)-(21,1))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (20,2)-(20,5))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (20,2)-(20,5))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (20,2)-(20,5) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (19,12)-(19,13) = "{"
- └── closing_loc: (21,0)-(21,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/unary.txt b/test/prism/snapshots/unparser/corpus/literal/unary.txt
deleted file mode 100644
index 5e9563d811..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/unary.txt
+++ /dev/null
@@ -1,248 +0,0 @@
-@ ProgramNode (location: (1,0)-(8,9))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(8,9))
- └── body: (length: 8)
- ├── @ CallNode (location: (1,0)-(1,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ IntegerNode (location: (1,1)-(1,2))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (1,0)-(1,1) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (2,0)-(2,5))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (2,1)-(2,5))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (2,2)-(2,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,2)-(2,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ IntegerNode (location: (2,3)-(2,4))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :!
- │ │ │ ├── message_loc: (2,2)-(2,3) = "!"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (2,1)-(2,2) = "("
- │ │ └── closing_loc: (2,4)-(2,5) = ")"
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (2,0)-(2,1) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (3,0)-(3,16))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (3,1)-(3,16))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (3,2)-(3,15))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (3,2)-(3,15))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ ParenthesesNode (location: (3,3)-(3,15))
- │ │ │ │ ├── body:
- │ │ │ │ │ @ StatementsNode (location: (3,4)-(3,14))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ OrNode (location: (3,4)-(3,14))
- │ │ │ │ │ ├── left:
- │ │ │ │ │ │ @ CallNode (location: (3,4)-(3,7))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :foo
- │ │ │ │ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ ├── right:
- │ │ │ │ │ │ @ CallNode (location: (3,11)-(3,14))
- │ │ │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ │ ├── name: :bar
- │ │ │ │ │ │ ├── message_loc: (3,11)-(3,14) = "bar"
- │ │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ │ └── block: ∅
- │ │ │ │ │ └── operator_loc: (3,8)-(3,10) = "||"
- │ │ │ │ ├── opening_loc: (3,3)-(3,4) = "("
- │ │ │ │ └── closing_loc: (3,14)-(3,15) = ")"
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :!
- │ │ │ ├── message_loc: (3,2)-(3,3) = "!"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (3,1)-(3,2) = "("
- │ │ └── closing_loc: (3,15)-(3,16) = ")"
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (3,0)-(3,1) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (4,0)-(4,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (4,1)-(4,9))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ ParenthesesNode (location: (4,1)-(4,5))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (4,2)-(4,4))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (4,2)-(4,4))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ ├── receiver:
- │ │ │ │ │ @ IntegerNode (location: (4,3)-(4,4))
- │ │ │ │ │ ├── flags: decimal
- │ │ │ │ │ └── value: 1
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :!
- │ │ │ │ ├── message_loc: (4,2)-(4,3) = "!"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── opening_loc: (4,1)-(4,2) = "("
- │ │ │ └── closing_loc: (4,4)-(4,5) = ")"
- │ │ ├── call_operator_loc: (4,5)-(4,6) = "."
- │ │ ├── name: :baz
- │ │ ├── message_loc: (4,6)-(4,9) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :!
- │ ├── message_loc: (4,0)-(4,1) = "!"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (5,0)-(5,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (5,1)-(5,2))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (5,1)-(5,2) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :~
- │ ├── message_loc: (5,0)-(5,1) = "~"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (6,0)-(6,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (6,1)-(6,2))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (6,1)-(6,2) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :-@
- │ ├── message_loc: (6,0)-(6,1) = "-"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (7,0)-(7,2))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (7,1)-(7,2))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (7,1)-(7,2) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :+@
- │ ├── message_loc: (7,0)-(7,1) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (8,0)-(8,9))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (8,1)-(8,9))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ ParenthesesNode (location: (8,1)-(8,5))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (8,2)-(8,4))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (8,2)-(8,4))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (8,3)-(8,4))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (8,3)-(8,4) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :-@
- │ │ │ ├── message_loc: (8,2)-(8,3) = "-"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (8,1)-(8,2) = "("
- │ │ └── closing_loc: (8,4)-(8,5) = ")"
- │ ├── call_operator_loc: (8,5)-(8,6) = "."
- │ ├── name: :foo
- │ ├── message_loc: (8,6)-(8,9) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :-@
- ├── message_loc: (8,0)-(8,1) = "-"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/undef.txt b/test/prism/snapshots/unparser/corpus/literal/undef.txt
deleted file mode 100644
index 282cbe8f87..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/undef.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,16))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,16))
- └── body: (length: 2)
- ├── @ UndefNode (location: (1,0)-(1,10))
- │ ├── names: (length: 1)
- │ │ └── @ SymbolNode (location: (1,6)-(1,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (1,6)-(1,7) = ":"
- │ │ ├── value_loc: (1,7)-(1,10) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── keyword_loc: (1,0)-(1,5) = "undef"
- └── @ UndefNode (location: (2,0)-(2,16))
- ├── names: (length: 2)
- │ ├── @ SymbolNode (location: (2,6)-(2,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (2,6)-(2,7) = ":"
- │ │ ├── value_loc: (2,7)-(2,10) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── @ SymbolNode (location: (2,12)-(2,16))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (2,12)-(2,13) = ":"
- │ ├── value_loc: (2,13)-(2,16) = "bar"
- │ ├── closing_loc: ∅
- │ └── unescaped: "bar"
- └── keyword_loc: (2,0)-(2,5) = "undef"
diff --git a/test/prism/snapshots/unparser/corpus/literal/variables.txt b/test/prism/snapshots/unparser/corpus/literal/variables.txt
deleted file mode 100644
index 9ae8ad1207..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/variables.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ ProgramNode (location: (1,0)-(10,17))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(10,17))
- └── body: (length: 10)
- ├── @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ InstanceVariableReadNode (location: (2,0)-(2,2))
- │ └── name: :@a
- ├── @ ClassVariableReadNode (location: (3,0)-(3,3))
- │ └── name: :@@a
- ├── @ GlobalVariableReadNode (location: (4,0)-(4,2))
- │ └── name: :$a
- ├── @ NumberedReferenceReadNode (location: (5,0)-(5,2))
- │ └── number: 1
- ├── @ BackReferenceReadNode (location: (6,0)-(6,2))
- │ └── name: :$`
- ├── @ ConstantReadNode (location: (7,0)-(7,5))
- │ └── name: :CONST
- ├── @ ConstantPathNode (location: (8,0)-(8,13))
- │ ├── parent:
- │ │ @ ConstantReadNode (location: (8,0)-(8,6))
- │ │ └── name: :SCOPED
- │ ├── name: :CONST
- │ ├── delimiter_loc: (8,6)-(8,8) = "::"
- │ └── name_loc: (8,8)-(8,13) = "CONST"
- ├── @ ConstantPathNode (location: (9,0)-(9,10))
- │ ├── parent: ∅
- │ ├── name: :TOPLEVEL
- │ ├── delimiter_loc: (9,0)-(9,2) = "::"
- │ └── name_loc: (9,2)-(9,10) = "TOPLEVEL"
- └── @ ConstantPathNode (location: (10,0)-(10,17))
- ├── parent:
- │ @ ConstantPathNode (location: (10,0)-(10,10))
- │ ├── parent: ∅
- │ ├── name: :TOPLEVEL
- │ ├── delimiter_loc: (10,0)-(10,2) = "::"
- │ └── name_loc: (10,2)-(10,10) = "TOPLEVEL"
- ├── name: :CONST
- ├── delimiter_loc: (10,10)-(10,12) = "::"
- └── name_loc: (10,12)-(10,17) = "CONST"
diff --git a/test/prism/snapshots/unparser/corpus/literal/while.txt b/test/prism/snapshots/unparser/corpus/literal/while.txt
deleted file mode 100644
index 0f752f3392..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/while.txt
+++ /dev/null
@@ -1,704 +0,0 @@
-@ ProgramNode (location: (1,0)-(73,3))
-├── locals: [:x]
-└── statements:
- @ StatementsNode (location: (1,0)-(73,3))
- └── body: (length: 17)
- ├── @ ModuleNode (location: (1,0)-(7,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (1,7)-(1,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (2,2)-(6,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (2,2)-(6,3))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (2,2)-(2,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (2,6)-(6,3))
- │ │ ├── locals: [:bar, :foo]
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (2,8)-(2,13))
- │ │ │ ├── parameters:
- │ │ │ │ @ ParametersNode (location: (2,9)-(2,12))
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (2,9)-(2,12))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :bar
- │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (2,8)-(2,9) = "|"
- │ │ │ └── closing_loc: (2,12)-(2,13) = "|"
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (3,4)-(5,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ WhileNode (location: (3,4)-(5,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── keyword_loc: (3,4)-(3,9) = "while"
- │ │ │ ├── closing_loc: (5,4)-(5,7) = "end"
- │ │ │ ├── predicate:
- │ │ │ │ @ CallNode (location: (3,10)-(3,13))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (3,10)-(3,13) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (4,6)-(4,15))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableWriteNode (location: (4,6)-(4,15))
- │ │ │ ├── name: :foo
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (4,6)-(4,9) = "foo"
- │ │ │ ├── value:
- │ │ │ │ @ LocalVariableReadNode (location: (4,12)-(4,15))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (4,10)-(4,11) = "="
- │ │ ├── opening_loc: (2,6)-(2,7) = "{"
- │ │ └── closing_loc: (6,2)-(6,3) = "}"
- │ ├── end_keyword_loc: (7,0)-(7,3) = "end"
- │ └── name: :A
- ├── @ DefNode (location: (9,0)-(11,3))
- │ ├── name: :foo
- │ ├── name_loc: (9,4)-(9,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (10,2)-(10,28))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (10,2)-(10,28))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (10,12)-(10,17) = "while"
- │ │ ├── closing_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (10,18)-(10,28))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ LocalVariableReadNode (location: (10,18)-(10,21))
- │ │ │ │ ├── name: :foo
- │ │ │ │ └── depth: 0
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :!=
- │ │ │ ├── message_loc: (10,22)-(10,24) = "!="
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (10,25)-(10,28))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (10,25)-(10,28))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (10,25)-(10,28) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (10,2)-(10,11))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (10,2)-(10,11))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (10,2)-(10,5) = "foo"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (10,8)-(10,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (10,8)-(10,11) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (10,6)-(10,7) = "="
- │ ├── locals: [:foo]
- │ ├── def_keyword_loc: (9,0)-(9,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (11,0)-(11,3) = "end"
- ├── @ ModuleNode (location: (13,0)-(15,3))
- │ ├── locals: [:foo]
- │ ├── module_keyword_loc: (13,0)-(13,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (13,7)-(13,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (14,2)-(14,21))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (14,2)-(14,21))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (14,12)-(14,17) = "while"
- │ │ ├── closing_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ LocalVariableReadNode (location: (14,18)-(14,21))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ └── statements:
- │ │ @ StatementsNode (location: (14,2)-(14,11))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (14,2)-(14,11))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (14,2)-(14,5) = "foo"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (14,8)-(14,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (14,8)-(14,11) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (14,6)-(14,7) = "="
- │ ├── end_keyword_loc: (15,0)-(15,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (17,0)-(19,3))
- │ ├── locals: [:foo]
- │ ├── module_keyword_loc: (17,0)-(17,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (17,7)-(17,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (18,2)-(18,21))
- │ │ └── body: (length: 1)
- │ │ └── @ UntilNode (location: (18,2)-(18,21))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (18,12)-(18,17) = "until"
- │ │ ├── closing_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ LocalVariableReadNode (location: (18,18)-(18,21))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ └── statements:
- │ │ @ StatementsNode (location: (18,2)-(18,11))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (18,2)-(18,11))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (18,2)-(18,5) = "foo"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (18,8)-(18,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (18,8)-(18,11) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (18,6)-(18,7) = "="
- │ ├── end_keyword_loc: (19,0)-(19,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (21,0)-(25,3))
- │ ├── locals: [:foo]
- │ ├── module_keyword_loc: (21,0)-(21,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (21,7)-(21,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (22,2)-(24,5))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (22,2)-(24,5))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (22,2)-(22,7) = "while"
- │ │ ├── closing_loc: (24,2)-(24,5) = "end"
- │ │ ├── predicate:
- │ │ │ @ CallNode (location: (22,8)-(22,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (22,8)-(22,11) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── statements:
- │ │ @ StatementsNode (location: (23,4)-(23,13))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (23,4)-(23,13))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (23,4)-(23,7) = "foo"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (23,10)-(23,13))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (23,10)-(23,13) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (23,8)-(23,9) = "="
- │ ├── end_keyword_loc: (25,0)-(25,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (27,0)-(33,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (27,0)-(27,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (27,7)-(27,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (28,2)-(32,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (28,2)-(32,3))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :each
- │ │ ├── message_loc: (28,2)-(28,6) = "each"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (28,7)-(32,3))
- │ │ ├── locals: [:baz, :foo]
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (28,9)-(28,14))
- │ │ │ ├── parameters:
- │ │ │ │ @ ParametersNode (location: (28,10)-(28,13))
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (28,10)-(28,13))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :baz
- │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (28,9)-(28,10) = "|"
- │ │ │ └── closing_loc: (28,13)-(28,14) = "|"
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (29,4)-(31,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ WhileNode (location: (29,4)-(31,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── keyword_loc: (29,4)-(29,9) = "while"
- │ │ │ ├── closing_loc: (31,4)-(31,7) = "end"
- │ │ │ ├── predicate:
- │ │ │ │ @ CallNode (location: (29,10)-(29,13))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (29,10)-(29,13) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (30,6)-(30,15))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableWriteNode (location: (30,6)-(30,15))
- │ │ │ ├── name: :foo
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (30,6)-(30,9) = "foo"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (30,12)-(30,15))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (30,12)-(30,15) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (30,10)-(30,11) = "="
- │ │ ├── opening_loc: (28,7)-(28,8) = "{"
- │ │ └── closing_loc: (32,2)-(32,3) = "}"
- │ ├── end_keyword_loc: (33,0)-(33,3) = "end"
- │ └── name: :A
- ├── @ ModuleNode (location: (35,0)-(41,3))
- │ ├── locals: []
- │ ├── module_keyword_loc: (35,0)-(35,6) = "module"
- │ ├── constant_path:
- │ │ @ ConstantReadNode (location: (35,7)-(35,8))
- │ │ └── name: :A
- │ ├── body:
- │ │ @ StatementsNode (location: (36,2)-(40,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (36,2)-(40,3))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :each
- │ │ ├── message_loc: (36,2)-(36,6) = "each"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (36,7)-(40,3))
- │ │ ├── locals: [:foo]
- │ │ ├── parameters:
- │ │ │ @ BlockParametersNode (location: (36,9)-(36,14))
- │ │ │ ├── parameters:
- │ │ │ │ @ ParametersNode (location: (36,10)-(36,13))
- │ │ │ │ ├── requireds: (length: 1)
- │ │ │ │ │ └── @ RequiredParameterNode (location: (36,10)-(36,13))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ └── name: :foo
- │ │ │ │ ├── optionals: (length: 0)
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── locals: (length: 0)
- │ │ │ ├── opening_loc: (36,9)-(36,10) = "|"
- │ │ │ └── closing_loc: (36,13)-(36,14) = "|"
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (37,4)-(39,7))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ WhileNode (location: (37,4)-(39,7))
- │ │ │ ├── flags: ∅
- │ │ │ ├── keyword_loc: (37,4)-(37,9) = "while"
- │ │ │ ├── closing_loc: (39,4)-(39,7) = "end"
- │ │ │ ├── predicate:
- │ │ │ │ @ LocalVariableReadNode (location: (37,10)-(37,13))
- │ │ │ │ ├── name: :foo
- │ │ │ │ └── depth: 0
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (38,6)-(38,15))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ LocalVariableWriteNode (location: (38,6)-(38,15))
- │ │ │ ├── name: :foo
- │ │ │ ├── depth: 0
- │ │ │ ├── name_loc: (38,6)-(38,9) = "foo"
- │ │ │ ├── value:
- │ │ │ │ @ CallNode (location: (38,12)-(38,15))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (38,12)-(38,15) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (38,10)-(38,11) = "="
- │ │ ├── opening_loc: (36,7)-(36,8) = "{"
- │ │ └── closing_loc: (40,2)-(40,3) = "}"
- │ ├── end_keyword_loc: (41,0)-(41,3) = "end"
- │ └── name: :A
- ├── @ LocalVariableWriteNode (location: (42,0)-(44,14))
- │ ├── name: :x
- │ ├── depth: 0
- │ ├── name_loc: (42,0)-(42,1) = "x"
- │ ├── value:
- │ │ @ ParenthesesNode (location: (42,4)-(44,14))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (42,5)-(44,13))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ WhileNode (location: (42,5)-(44,13))
- │ │ │ ├── flags: begin_modifier
- │ │ │ ├── keyword_loc: (44,4)-(44,9) = "while"
- │ │ │ ├── closing_loc: ∅
- │ │ │ ├── predicate:
- │ │ │ │ @ CallNode (location: (44,10)-(44,13))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :baz
- │ │ │ │ ├── message_loc: (44,10)-(44,13) = "baz"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── statements:
- │ │ │ @ StatementsNode (location: (42,5)-(44,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ BeginNode (location: (42,5)-(44,3))
- │ │ │ ├── begin_keyword_loc: (42,5)-(42,10) = "begin"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (43,2)-(43,5))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (43,2)-(43,5))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :foo
- │ │ │ │ ├── message_loc: (43,2)-(43,5) = "foo"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── rescue_clause: ∅
- │ │ │ ├── else_clause: ∅
- │ │ │ ├── ensure_clause: ∅
- │ │ │ └── end_keyword_loc: (44,0)-(44,3) = "end"
- │ │ ├── opening_loc: (42,4)-(42,5) = "("
- │ │ └── closing_loc: (44,13)-(44,14) = ")"
- │ └── operator_loc: (42,2)-(42,3) = "="
- ├── @ WhileNode (location: (45,0)-(47,13))
- │ ├── flags: begin_modifier
- │ ├── keyword_loc: (47,4)-(47,9) = "while"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (47,10)-(47,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (47,10)-(47,13) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── statements:
- │ @ StatementsNode (location: (45,0)-(47,3))
- │ └── body: (length: 1)
- │ └── @ BeginNode (location: (45,0)-(47,3))
- │ ├── begin_keyword_loc: (45,0)-(45,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (46,2)-(46,5))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (46,2)-(46,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (46,2)-(46,5) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (47,0)-(47,3) = "end"
- ├── @ UntilNode (location: (48,0)-(51,13))
- │ ├── flags: begin_modifier
- │ ├── keyword_loc: (51,4)-(51,9) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (51,10)-(51,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (51,10)-(51,13) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── statements:
- │ @ StatementsNode (location: (48,0)-(51,3))
- │ └── body: (length: 1)
- │ └── @ BeginNode (location: (48,0)-(51,3))
- │ ├── begin_keyword_loc: (48,0)-(48,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (49,2)-(50,5))
- │ │ └── body: (length: 2)
- │ │ ├── @ CallNode (location: (49,2)-(49,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (49,2)-(49,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (50,2)-(50,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (50,2)-(50,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (51,0)-(51,3) = "end"
- ├── @ WhileNode (location: (52,0)-(55,13))
- │ ├── flags: begin_modifier
- │ ├── keyword_loc: (55,4)-(55,9) = "while"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (55,10)-(55,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :baz
- │ │ ├── message_loc: (55,10)-(55,13) = "baz"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── statements:
- │ @ StatementsNode (location: (52,0)-(55,3))
- │ └── body: (length: 1)
- │ └── @ BeginNode (location: (52,0)-(55,3))
- │ ├── begin_keyword_loc: (52,0)-(52,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (53,2)-(54,5))
- │ │ └── body: (length: 2)
- │ │ ├── @ CallNode (location: (53,2)-(53,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (53,2)-(53,5) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (54,2)-(54,5))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (54,2)-(54,5) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (55,0)-(55,3) = "end"
- ├── @ WhileNode (location: (56,0)-(57,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (56,0)-(56,5) = "while"
- │ ├── closing_loc: (57,0)-(57,3) = "end"
- │ ├── predicate:
- │ │ @ FalseNode (location: (56,6)-(56,11))
- │ └── statements: ∅
- ├── @ WhileNode (location: (58,0)-(60,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (58,0)-(58,5) = "while"
- │ ├── closing_loc: (60,0)-(60,3) = "end"
- │ ├── predicate:
- │ │ @ FalseNode (location: (58,6)-(58,11))
- │ └── statements:
- │ @ StatementsNode (location: (59,2)-(59,3))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (59,2)-(59,3))
- │ ├── flags: decimal
- │ └── value: 3
- ├── @ WhileNode (location: (61,0)-(64,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (61,0)-(61,5) = "while"
- │ ├── closing_loc: (64,0)-(64,3) = "end"
- │ ├── predicate:
- │ │ @ ParenthesesNode (location: (61,6)-(62,2))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (61,7)-(62,1))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (61,7)-(62,1))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :foo
- │ │ │ ├── message_loc: (61,7)-(61,10) = "foo"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (61,11)-(62,1))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (61,11)-(61,12) = "{"
- │ │ │ └── closing_loc: (62,0)-(62,1) = "}"
- │ │ ├── opening_loc: (61,6)-(61,7) = "("
- │ │ └── closing_loc: (62,1)-(62,2) = ")"
- │ └── statements:
- │ @ StatementsNode (location: (63,2)-(63,7))
- │ └── body: (length: 1)
- │ └── @ SymbolNode (location: (63,2)-(63,7))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (63,2)-(63,3) = ":"
- │ ├── value_loc: (63,3)-(63,7) = "body"
- │ ├── closing_loc: ∅
- │ └── unescaped: "body"
- ├── @ UntilNode (location: (65,0)-(66,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (65,0)-(65,5) = "until"
- │ ├── closing_loc: (66,0)-(66,3) = "end"
- │ ├── predicate:
- │ │ @ FalseNode (location: (65,6)-(65,11))
- │ └── statements: ∅
- ├── @ UntilNode (location: (67,0)-(69,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (67,0)-(67,5) = "until"
- │ ├── closing_loc: (69,0)-(69,3) = "end"
- │ ├── predicate:
- │ │ @ FalseNode (location: (67,6)-(67,11))
- │ └── statements:
- │ @ StatementsNode (location: (68,2)-(68,3))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (68,2)-(68,3))
- │ ├── flags: decimal
- │ └── value: 3
- └── @ UntilNode (location: (70,0)-(73,3))
- ├── flags: ∅
- ├── keyword_loc: (70,0)-(70,5) = "until"
- ├── closing_loc: (73,0)-(73,3) = "end"
- ├── predicate:
- │ @ ParenthesesNode (location: (70,6)-(71,2))
- │ ├── body:
- │ │ @ StatementsNode (location: (70,7)-(71,1))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (70,7)-(71,1))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :foo
- │ │ ├── message_loc: (70,7)-(70,10) = "foo"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (70,11)-(71,1))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (70,11)-(70,12) = "{"
- │ │ └── closing_loc: (71,0)-(71,1) = "}"
- │ ├── opening_loc: (70,6)-(70,7) = "("
- │ └── closing_loc: (71,1)-(71,2) = ")"
- └── statements:
- @ StatementsNode (location: (72,2)-(72,7))
- └── body: (length: 1)
- └── @ SymbolNode (location: (72,2)-(72,7))
- ├── flags: forced_us_ascii_encoding
- ├── opening_loc: (72,2)-(72,3) = ":"
- ├── value_loc: (72,3)-(72,7) = "body"
- ├── closing_loc: ∅
- └── unescaped: "body"
diff --git a/test/prism/snapshots/unparser/corpus/literal/yield.txt b/test/prism/snapshots/unparser/corpus/literal/yield.txt
deleted file mode 100644
index 4d2b272e35..0000000000
--- a/test/prism/snapshots/unparser/corpus/literal/yield.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ ProgramNode (location: (1,0)-(3,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(3,11))
- └── body: (length: 3)
- ├── @ YieldNode (location: (1,0)-(1,5))
- │ ├── keyword_loc: (1,0)-(1,5) = "yield"
- │ ├── lparen_loc: ∅
- │ ├── arguments: ∅
- │ └── rparen_loc: ∅
- ├── @ YieldNode (location: (2,0)-(2,8))
- │ ├── keyword_loc: (2,0)-(2,5) = "yield"
- │ ├── lparen_loc: (2,5)-(2,6) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,6)-(2,7))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (2,6)-(2,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (2,6)-(2,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── rparen_loc: (2,7)-(2,8) = ")"
- └── @ YieldNode (location: (3,0)-(3,11))
- ├── keyword_loc: (3,0)-(3,5) = "yield"
- ├── lparen_loc: (3,5)-(3,6) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (3,6)-(3,10))
- │ ├── flags: ∅
- │ └── arguments: (length: 2)
- │ ├── @ CallNode (location: (3,6)-(3,7))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (3,6)-(3,7) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── @ CallNode (location: (3,9)-(3,10))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :b
- │ ├── message_loc: (3,9)-(3,10) = "b"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── rparen_loc: (3,10)-(3,11) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/and.txt b/test/prism/snapshots/unparser/corpus/semantic/and.txt
deleted file mode 100644
index bc9d674e44..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/and.txt
+++ /dev/null
@@ -1,235 +0,0 @@
-@ ProgramNode (location: (1,0)-(8,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(8,3))
- └── body: (length: 4)
- ├── @ OrNode (location: (1,0)-(1,14))
- │ ├── left:
- │ │ @ RangeNode (location: (1,0)-(1,5))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ CallNode (location: (1,0)-(1,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (1,0)-(1,1) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (1,4)-(1,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (1,4)-(1,5) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (1,1)-(1,4) = "..."
- │ ├── right:
- │ │ @ RangeNode (location: (1,9)-(1,14))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ CallNode (location: (1,9)-(1,10))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (1,9)-(1,10) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (1,13)-(1,14))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (1,13)-(1,14) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (1,10)-(1,13) = "..."
- │ └── operator_loc: (1,6)-(1,8) = "or"
- ├── @ AndNode (location: (2,0)-(2,15))
- │ ├── left:
- │ │ @ RangeNode (location: (2,0)-(2,5))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ CallNode (location: (2,0)-(2,1))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (2,0)-(2,1) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (2,4)-(2,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (2,4)-(2,5) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (2,1)-(2,4) = "..."
- │ ├── right:
- │ │ @ RangeNode (location: (2,10)-(2,15))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ CallNode (location: (2,10)-(2,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (2,10)-(2,11) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (2,14)-(2,15))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (2,14)-(2,15) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (2,11)-(2,14) = "..."
- │ └── operator_loc: (2,6)-(2,9) = "and"
- ├── @ IfNode (location: (4,0)-(5,3))
- │ ├── if_keyword_loc: (4,0)-(4,2) = "if"
- │ ├── predicate:
- │ │ @ OrNode (location: (4,3)-(4,17))
- │ │ ├── left:
- │ │ │ @ FlipFlopNode (location: (4,3)-(4,8))
- │ │ │ ├── flags: exclude_end
- │ │ │ ├── left:
- │ │ │ │ @ CallNode (location: (4,3)-(4,4))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (4,3)-(4,4) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── right:
- │ │ │ │ @ CallNode (location: (4,7)-(4,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (4,7)-(4,8) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (4,4)-(4,7) = "..."
- │ │ ├── right:
- │ │ │ @ FlipFlopNode (location: (4,12)-(4,17))
- │ │ │ ├── flags: exclude_end
- │ │ │ ├── left:
- │ │ │ │ @ CallNode (location: (4,12)-(4,13))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :c
- │ │ │ │ ├── message_loc: (4,12)-(4,13) = "c"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── right:
- │ │ │ │ @ CallNode (location: (4,16)-(4,17))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :d
- │ │ │ │ ├── message_loc: (4,16)-(4,17) = "d"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── operator_loc: (4,13)-(4,16) = "..."
- │ │ └── operator_loc: (4,9)-(4,11) = "or"
- │ ├── then_keyword_loc: ∅
- │ ├── statements: ∅
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (5,0)-(5,3) = "end"
- └── @ IfNode (location: (7,0)-(8,3))
- ├── if_keyword_loc: (7,0)-(7,2) = "if"
- ├── predicate:
- │ @ AndNode (location: (7,3)-(7,18))
- │ ├── left:
- │ │ @ FlipFlopNode (location: (7,3)-(7,8))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ CallNode (location: (7,3)-(7,4))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (7,3)-(7,4) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (7,7)-(7,8))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (7,7)-(7,8) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (7,4)-(7,7) = "..."
- │ ├── right:
- │ │ @ FlipFlopNode (location: (7,13)-(7,18))
- │ │ ├── flags: exclude_end
- │ │ ├── left:
- │ │ │ @ CallNode (location: (7,13)-(7,14))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (7,13)-(7,14) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (7,17)-(7,18))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (7,17)-(7,18) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (7,14)-(7,17) = "..."
- │ └── operator_loc: (7,9)-(7,12) = "and"
- ├── then_keyword_loc: ∅
- ├── statements: ∅
- ├── consequent: ∅
- └── end_keyword_loc: (8,0)-(8,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/block.txt b/test/prism/snapshots/unparser/corpus/semantic/block.txt
deleted file mode 100644
index b9aa6b2184..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/block.txt
+++ /dev/null
@@ -1,191 +0,0 @@
-@ ProgramNode (location: (1,0)-(26,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(26,3))
- └── body: (length: 6)
- ├── @ CallNode (location: (1,0)-(2,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (1,4)-(2,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body: ∅
- │ ├── opening_loc: (1,4)-(1,6) = "do"
- │ └── closing_loc: (2,0)-(2,3) = "end"
- ├── @ CallNode (location: (4,0)-(6,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (4,0)-(4,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (4,4)-(6,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ BeginNode (location: (4,4)-(6,3))
- │ │ ├── begin_keyword_loc: ∅
- │ │ ├── statements: ∅
- │ │ ├── rescue_clause:
- │ │ │ @ RescueNode (location: (5,0)-(5,6))
- │ │ │ ├── keyword_loc: (5,0)-(5,6) = "rescue"
- │ │ │ ├── exceptions: (length: 0)
- │ │ │ ├── operator_loc: ∅
- │ │ │ ├── reference: ∅
- │ │ │ ├── statements: ∅
- │ │ │ └── consequent: ∅
- │ │ ├── else_clause: ∅
- │ │ ├── ensure_clause: ∅
- │ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
- │ ├── opening_loc: (4,4)-(4,6) = "do"
- │ └── closing_loc: (6,0)-(6,3) = "end"
- ├── @ CallNode (location: (8,0)-(11,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (8,0)-(8,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (8,4)-(11,3))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (9,2)-(10,5))
- │ │ └── body: (length: 2)
- │ │ ├── @ RescueModifierNode (location: (9,2)-(9,16))
- │ │ │ ├── expression:
- │ │ │ │ @ NilNode (location: (9,2)-(9,5))
- │ │ │ ├── keyword_loc: (9,6)-(9,12) = "rescue"
- │ │ │ └── rescue_expression:
- │ │ │ @ NilNode (location: (9,13)-(9,16))
- │ │ └── @ NilNode (location: (10,2)-(10,5))
- │ ├── opening_loc: (8,4)-(8,6) = "do"
- │ └── closing_loc: (11,0)-(11,3) = "end"
- ├── @ CallNode (location: (13,0)-(14,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (13,0)-(13,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (13,4)-(14,3))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (13,7)-(13,10))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (13,8)-(13,9))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (13,8)-(13,9))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (13,7)-(13,8) = "|"
- │ │ └── closing_loc: (13,9)-(13,10) = "|"
- │ ├── body: ∅
- │ ├── opening_loc: (13,4)-(13,6) = "do"
- │ └── closing_loc: (14,0)-(14,3) = "end"
- ├── @ CallNode (location: (16,0)-(20,3))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (16,0)-(16,3) = "foo"
- │ ├── opening_loc: (16,3)-(16,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (16,4)-(16,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ StringNode (location: (16,4)-(16,10))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (16,4)-(16,10) = "<<-DOC"
- │ │ ├── content_loc: (17,0)-(18,0) = " b\n"
- │ │ ├── closing_loc: (18,0)-(19,0) = "DOC\n"
- │ │ └── unescaped: " b\n"
- │ ├── closing_loc: (16,10)-(16,11) = ")"
- │ └── block:
- │ @ BlockNode (location: (16,12)-(20,3))
- │ ├── locals: [:a]
- │ ├── parameters:
- │ │ @ BlockParametersNode (location: (16,15)-(16,18))
- │ │ ├── parameters:
- │ │ │ @ ParametersNode (location: (16,16)-(16,17))
- │ │ │ ├── requireds: (length: 1)
- │ │ │ │ └── @ RequiredParameterNode (location: (16,16)-(16,17))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── name: :a
- │ │ │ ├── optionals: (length: 0)
- │ │ │ ├── rest: ∅
- │ │ │ ├── posts: (length: 0)
- │ │ │ ├── keywords: (length: 0)
- │ │ │ ├── keyword_rest: ∅
- │ │ │ └── block: ∅
- │ │ ├── locals: (length: 0)
- │ │ ├── opening_loc: (16,15)-(16,16) = "|"
- │ │ └── closing_loc: (16,17)-(16,18) = "|"
- │ ├── body:
- │ │ @ StatementsNode (location: (19,2)-(19,3))
- │ │ └── body: (length: 1)
- │ │ └── @ LocalVariableReadNode (location: (19,2)-(19,3))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── opening_loc: (16,12)-(16,14) = "do"
- │ └── closing_loc: (20,0)-(20,3) = "end"
- └── @ CallNode (location: (22,0)-(26,3))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (22,0)-(22,3) = "foo"
- ├── opening_loc: (22,3)-(22,4) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (22,4)-(22,10))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ StringNode (location: (22,4)-(22,10))
- │ ├── flags: ∅
- │ ├── opening_loc: (22,4)-(22,10) = "<<-DOC"
- │ ├── content_loc: (23,0)-(24,0) = " b\n"
- │ ├── closing_loc: (24,0)-(25,0) = "DOC\n"
- │ └── unescaped: " b\n"
- ├── closing_loc: (22,10)-(22,11) = ")"
- └── block:
- @ BlockNode (location: (22,12)-(26,3))
- ├── locals: []
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (25,2)-(25,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (25,2)-(25,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (25,2)-(25,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── opening_loc: (22,12)-(22,14) = "do"
- └── closing_loc: (26,0)-(26,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/def.txt b/test/prism/snapshots/unparser/corpus/semantic/def.txt
deleted file mode 100644
index b44983c2f3..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/def.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,3))
- └── body: (length: 2)
- ├── @ DefNode (location: (1,0)-(3,3))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (2,2)-(2,9))
- │ │ └── body: (length: 1)
- │ │ └── @ ParenthesesNode (location: (2,2)-(2,9))
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (2,3)-(2,8))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (2,3)-(2,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (2,3)-(2,4))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (2,3)-(2,4) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :-
- │ │ │ ├── message_loc: (2,5)-(2,6) = "-"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (2,7)-(2,8))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (2,7)-(2,8))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (2,7)-(2,8) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (2,2)-(2,3) = "("
- │ │ └── closing_loc: (2,8)-(2,9) = ")"
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- └── @ DefNode (location: (5,0)-(7,3))
- ├── name: :foo
- ├── name_loc: (5,4)-(5,7) = "foo"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (6,2)-(6,20))
- │ └── body: (length: 1)
- │ └── @ RescueModifierNode (location: (6,2)-(6,20))
- │ ├── expression:
- │ │ @ CallNode (location: (6,2)-(6,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (6,2)-(6,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── keyword_loc: (6,4)-(6,10) = "rescue"
- │ └── rescue_expression:
- │ @ ConstantReadNode (location: (6,11)-(6,20))
- │ └── name: :Exception
- ├── locals: []
- ├── def_keyword_loc: (5,0)-(5,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (7,0)-(7,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/dstr.txt b/test/prism/snapshots/unparser/corpus/semantic/dstr.txt
deleted file mode 100644
index 499bf59d1a..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/dstr.txt
+++ /dev/null
@@ -1,598 +0,0 @@
-@ ProgramNode (location: (1,0)-(127,11))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(127,11))
- └── body: (length: 33)
- ├── @ StringNode (location: (1,0)-(1,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,5) = "<<DOC"
- │ ├── content_loc: (2,0)-(2,0) = ""
- │ ├── closing_loc: (2,0)-(3,0) = "DOC\n"
- │ └── unescaped: ""
- ├── @ StringNode (location: (4,0)-(4,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (4,0)-(4,7) = "<<'DOC'"
- │ ├── content_loc: (5,0)-(5,0) = ""
- │ ├── closing_loc: (5,0)-(6,0) = "DOC\n"
- │ └── unescaped: ""
- ├── @ StringNode (location: (7,0)-(7,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (7,0)-(7,6) = "<<~DOC"
- │ ├── content_loc: (8,0)-(8,0) = ""
- │ ├── closing_loc: (8,0)-(9,0) = "DOC\n"
- │ └── unescaped: ""
- ├── @ StringNode (location: (10,0)-(10,8))
- │ ├── flags: ∅
- │ ├── opening_loc: (10,0)-(10,8) = "<<~'DOC'"
- │ ├── content_loc: (11,0)-(11,0) = ""
- │ ├── closing_loc: (11,0)-(12,0) = "DOC\n"
- │ └── unescaped: ""
- ├── @ StringNode (location: (13,0)-(13,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (13,0)-(13,5) = "<<DOC"
- │ ├── content_loc: (14,0)-(15,0) = " a\n"
- │ ├── closing_loc: (15,0)-(16,0) = "DOC\n"
- │ └── unescaped: " a\n"
- ├── @ StringNode (location: (17,0)-(17,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (17,0)-(17,7) = "<<'DOC'"
- │ ├── content_loc: (18,0)-(19,0) = " a\n"
- │ ├── closing_loc: (19,0)-(20,0) = "DOC\n"
- │ └── unescaped: " a\n"
- ├── @ InterpolatedStringNode (location: (21,0)-(21,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (21,0)-(21,5) = "<<DOC"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (22,0)-(23,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (22,0)-(23,2) = " a\n "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a\n "
- │ │ ├── @ EmbeddedStatementsNode (location: (23,2)-(23,5))
- │ │ │ ├── opening_loc: (23,2)-(23,4) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (23,4)-(23,5) = "}"
- │ │ └── @ StringNode (location: (23,5)-(24,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (23,5)-(24,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (24,0)-(25,0) = "DOC\n"
- ├── @ InterpolatedStringNode (location: (26,0)-(26,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (26,0)-(26,6) = "<<~DOC"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (27,0)-(28,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (27,0)-(28,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (28,2)-(28,5))
- │ │ │ ├── opening_loc: (28,2)-(28,4) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (28,4)-(28,5) = "}"
- │ │ └── @ StringNode (location: (28,5)-(29,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (28,5)-(29,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (29,0)-(30,0) = "DOC\n"
- ├── @ InterpolatedStringNode (location: (31,0)-(31,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (31,0)-(31,6) = "<<~DOC"
- │ ├── parts: (length: 4)
- │ │ ├── @ StringNode (location: (32,0)-(33,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (32,0)-(33,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (33,2)-(33,5))
- │ │ │ ├── opening_loc: (33,2)-(33,4) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (33,4)-(33,5) = "}"
- │ │ ├── @ StringNode (location: (33,5)-(34,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (33,5)-(34,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── @ StringNode (location: (34,0)-(35,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (34,0)-(35,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n"
- │ └── closing_loc: (35,0)-(36,0) = "DOC\n"
- ├── @ InterpolatedStringNode (location: (37,0)-(37,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (37,0)-(37,6) = "<<~DOC"
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (38,0)-(39,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (38,0)-(39,0) = " a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── @ StringNode (location: (39,0)-(40,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (39,0)-(40,0) = " b\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " b\n"
- │ └── closing_loc: (40,0)-(41,0) = "DOC\n"
- ├── @ StringNode (location: (42,0)-(42,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (42,0)-(42,7) = "<<'DOC'"
- │ ├── content_loc: (43,0)-(46,0) = "a\n\nb\n"
- │ ├── closing_loc: (46,0)-(47,0) = "DOC\n"
- │ └── unescaped: "a\n\nb\n"
- ├── @ StringNode (location: (48,0)-(48,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (48,0)-(48,7) = "<<'DOC'"
- │ ├── content_loc: (49,0)-(52,0) = " a\n\n b\n"
- │ ├── closing_loc: (52,0)-(53,0) = "DOC\n"
- │ └── unescaped: " a\n\n b\n"
- ├── @ StringNode (location: (54,0)-(54,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (54,0)-(54,7) = "<<'DOC'"
- │ ├── content_loc: (55,0)-(56,0) = " a\\nb\n"
- │ ├── closing_loc: (56,0)-(57,0) = "DOC\n"
- │ └── unescaped: " a\\nb\n"
- ├── @ InterpolatedStringNode (location: (58,0)-(58,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (58,0)-(58,5) = "<<DOC"
- │ ├── parts: (length: 4)
- │ │ ├── @ EmbeddedStatementsNode (location: (59,0)-(59,3))
- │ │ │ ├── opening_loc: (59,0)-(59,2) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (59,2)-(59,3) = "}"
- │ │ ├── @ StringNode (location: (59,3)-(60,1))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (59,3)-(60,1) = "a\n "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n "
- │ │ ├── @ EmbeddedStatementsNode (location: (60,1)-(60,4))
- │ │ │ ├── opening_loc: (60,1)-(60,3) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (60,3)-(60,4) = "}"
- │ │ └── @ StringNode (location: (60,4)-(61,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (60,4)-(61,0) = "a\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a\n"
- │ └── closing_loc: (61,0)-(62,0) = "DOC\n"
- ├── @ InterpolatedStringNode (location: (63,0)-(63,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (63,0)-(63,5) = "<<DOC"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (64,0)-(64,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (64,0)-(64,2) = " "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " "
- │ │ ├── @ EmbeddedStatementsNode (location: (64,2)-(64,5))
- │ │ │ ├── opening_loc: (64,2)-(64,4) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (64,4)-(64,5) = "}"
- │ │ └── @ StringNode (location: (64,5)-(66,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (64,5)-(66,0) = "\n \\\#{}\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n \#{}\n"
- │ └── closing_loc: (66,0)-(67,0) = "DOC\n"
- ├── @ InterpolatedStringNode (location: (68,0)-(68,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (68,0)-(68,5) = "<<DOC"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (69,0)-(69,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (69,0)-(69,2) = " a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: " a"
- │ │ ├── @ EmbeddedStatementsNode (location: (69,2)-(69,5))
- │ │ │ ├── opening_loc: (69,2)-(69,4) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (69,4)-(69,5) = "}"
- │ │ └── @ StringNode (location: (69,5)-(71,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (69,5)-(71,0) = "b\n c\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b\n c\n"
- │ └── closing_loc: (71,0)-(72,0) = "DOC\n"
- ├── @ InterpolatedStringNode (location: (73,0)-(73,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (73,0)-(73,6) = "<<~DOC"
- │ ├── parts: (length: 2)
- │ │ ├── @ EmbeddedStatementsNode (location: (74,2)-(74,5))
- │ │ │ ├── opening_loc: (74,2)-(74,4) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (74,4)-(74,5) = "}"
- │ │ └── @ StringNode (location: (74,5)-(75,0))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (74,5)-(75,0) = "\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (75,0)-(76,0) = "DOC\n"
- ├── @ IfNode (location: (77,0)-(81,3))
- │ ├── if_keyword_loc: (77,0)-(77,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (77,3)-(77,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (78,2)-(78,8))
- │ │ └── body: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (78,2)-(78,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (78,2)-(78,8) = "<<~DOC"
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ EmbeddedStatementsNode (location: (79,4)-(79,7))
- │ │ │ │ ├── opening_loc: (79,4)-(79,6) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (79,6)-(79,7) = "}"
- │ │ │ └── @ StringNode (location: (79,7)-(80,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (79,7)-(80,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (80,0)-(81,0) = " DOC\n"
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (81,0)-(81,3) = "end"
- ├── @ IfNode (location: (83,0)-(87,3))
- │ ├── if_keyword_loc: (83,0)-(83,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (83,3)-(83,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (84,2)-(84,8))
- │ │ └── body: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (84,2)-(84,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (84,2)-(84,8) = "<<~DOC"
- │ │ ├── parts: (length: 3)
- │ │ │ ├── @ StringNode (location: (85,0)-(85,5))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (85,0)-(85,5) = " b"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "b"
- │ │ │ ├── @ EmbeddedStatementsNode (location: (85,5)-(85,8))
- │ │ │ │ ├── opening_loc: (85,5)-(85,7) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (85,7)-(85,8) = "}"
- │ │ │ └── @ StringNode (location: (85,8)-(86,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (85,8)-(86,0) = "\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n"
- │ │ └── closing_loc: (86,0)-(87,0) = " DOC\n"
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (87,0)-(87,3) = "end"
- ├── @ IfNode (location: (89,0)-(93,3))
- │ ├── if_keyword_loc: (89,0)-(89,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (89,3)-(89,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (90,2)-(90,8))
- │ │ └── body: (length: 1)
- │ │ └── @ InterpolatedStringNode (location: (90,2)-(90,8))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (90,2)-(90,8) = "<<~DOC"
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ EmbeddedStatementsNode (location: (91,4)-(91,7))
- │ │ │ │ ├── opening_loc: (91,4)-(91,6) = "\#{"
- │ │ │ │ ├── statements: ∅
- │ │ │ │ └── closing_loc: (91,6)-(91,7) = "}"
- │ │ │ └── @ StringNode (location: (91,7)-(92,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (91,7)-(92,0) = "a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ └── closing_loc: (92,0)-(93,0) = " DOC\n"
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (93,0)-(93,3) = "end"
- ├── @ IfNode (location: (95,0)-(101,3))
- │ ├── if_keyword_loc: (95,0)-(95,2) = "if"
- │ ├── predicate:
- │ │ @ TrueNode (location: (95,3)-(95,7))
- │ ├── then_keyword_loc: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (96,2)-(96,10))
- │ │ └── body: (length: 1)
- │ │ └── @ StringNode (location: (96,2)-(96,10))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (96,2)-(96,10) = "<<-'DOC'"
- │ │ ├── content_loc: (97,0)-(100,0) = " a\n\n b\n"
- │ │ ├── closing_loc: (100,0)-(101,0) = " DOC\n"
- │ │ └── unescaped: " a\n\n b\n"
- │ ├── consequent: ∅
- │ └── end_keyword_loc: (101,0)-(101,3) = "end"
- ├── @ InterpolatedStringNode (location: (103,0)-(103,6))
- │ ├── flags: ∅
- │ ├── opening_loc: (103,0)-(103,1) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ EmbeddedStatementsNode (location: (103,1)-(103,4))
- │ │ │ ├── opening_loc: (103,1)-(103,3) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (103,3)-(103,4) = "}"
- │ │ └── @ StringNode (location: (103,4)-(103,5))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (103,4)-(103,5) = "a"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "a"
- │ └── closing_loc: (103,5)-(103,6) = "\""
- ├── @ InterpolatedStringNode (location: (105,0)-(105,12))
- │ ├── flags: ∅
- │ ├── opening_loc: (105,0)-(105,2) = "%("
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (105,2)-(105,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (105,2)-(105,5) = "\\n\""
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "\n\""
- │ │ ├── @ EmbeddedStatementsNode (location: (105,5)-(105,8))
- │ │ │ ├── opening_loc: (105,5)-(105,7) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (105,7)-(105,8) = "}"
- │ │ └── @ StringNode (location: (105,8)-(105,11))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (105,8)-(105,11) = "\"\\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\"\n"
- │ └── closing_loc: (105,11)-(105,12) = ")"
- ├── @ InterpolatedStringNode (location: (107,0)-(107,14))
- │ ├── flags: ∅
- │ ├── opening_loc: (107,0)-(107,3) = "%Q("
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (107,3)-(107,7))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (107,3)-(107,7) = "-\\n\""
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "-\n\""
- │ │ ├── @ EmbeddedStatementsNode (location: (107,7)-(107,10))
- │ │ │ ├── opening_loc: (107,7)-(107,9) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (107,9)-(107,10) = "}"
- │ │ └── @ StringNode (location: (107,10)-(107,13))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (107,10)-(107,13) = "\"\\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\"\n"
- │ └── closing_loc: (107,13)-(107,14) = ")"
- ├── @ InterpolatedStringNode (location: (109,0)-(111,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (109,0)-(109,1) = "\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (109,1)-(110,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (109,1)-(110,0) = "a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (110,0)-(110,3))
- │ │ │ ├── opening_loc: (110,0)-(110,2) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (110,2)-(110,3) = "}"
- │ │ └── @ StringNode (location: (110,3)-(111,1))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (110,3)-(111,1) = "\nb"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\nb"
- │ └── closing_loc: (111,1)-(111,2) = "\""
- ├── @ InterpolatedStringNode (location: (113,0)-(114,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (113,0)-(113,1) = "\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (113,1)-(113,4))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (113,1)-(113,4) = "a\\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (113,4)-(113,7))
- │ │ │ ├── opening_loc: (113,4)-(113,6) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (113,6)-(113,7) = "}"
- │ │ └── @ StringNode (location: (113,7)-(114,1))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (113,7)-(114,1) = "\nb"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\nb"
- │ └── closing_loc: (114,1)-(114,2) = "\""
- ├── @ InterpolatedStringNode (location: (116,0)-(117,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (116,0)-(116,1) = "\""
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (116,1)-(117,0))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (116,1)-(117,0) = "a\n"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a\n"
- │ │ ├── @ EmbeddedStatementsNode (location: (117,0)-(117,3))
- │ │ │ ├── opening_loc: (117,0)-(117,2) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (117,2)-(117,3) = "}"
- │ │ └── @ StringNode (location: (117,3)-(117,6))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (117,3)-(117,6) = "\\nb"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\nb"
- │ └── closing_loc: (117,6)-(117,7) = "\""
- ├── @ InterpolatedStringNode (location: (119,0)-(120,5))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ StringNode (location: (119,0)-(119,3))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (119,0)-(119,1) = "'"
- │ │ │ ├── content_loc: (119,1)-(119,2) = "a"
- │ │ │ ├── closing_loc: (119,2)-(119,3) = "'"
- │ │ │ └── unescaped: "a"
- │ │ └── @ InterpolatedStringNode (location: (120,0)-(120,5))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (120,0)-(120,1) = "\""
- │ │ ├── parts: (length: 1)
- │ │ │ └── @ EmbeddedStatementsNode (location: (120,1)-(120,4))
- │ │ │ ├── opening_loc: (120,1)-(120,3) = "\#{"
- │ │ │ ├── statements: ∅
- │ │ │ └── closing_loc: (120,3)-(120,4) = "}"
- │ │ └── closing_loc: (120,4)-(120,5) = "\""
- │ └── closing_loc: ∅
- ├── @ InterpolatedStringNode (location: (122,0)-(122,8))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (122,0)-(122,2))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (122,0)-(122,1) = "\""
- │ │ │ ├── content_loc: (122,1)-(122,1) = ""
- │ │ │ ├── closing_loc: (122,1)-(122,2) = "\""
- │ │ │ └── unescaped: ""
- │ │ ├── @ StringNode (location: (122,3)-(122,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: (122,3)-(122,4) = "\""
- │ │ │ ├── content_loc: (122,4)-(122,4) = ""
- │ │ │ ├── closing_loc: (122,4)-(122,5) = "\""
- │ │ │ └── unescaped: ""
- │ │ └── @ StringNode (location: (122,6)-(122,8))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (122,6)-(122,7) = "\""
- │ │ ├── content_loc: (122,7)-(122,7) = ""
- │ │ ├── closing_loc: (122,7)-(122,8) = "\""
- │ │ └── unescaped: ""
- │ └── closing_loc: ∅
- ├── @ InterpolatedStringNode (location: (124,0)-(124,12))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ InterpolatedStringNode (location: (124,0)-(124,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (124,0)-(124,1) = "\""
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (124,1)-(124,2))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (124,1)-(124,2) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ └── @ EmbeddedStatementsNode (location: (124,2)-(124,7))
- │ │ │ │ ├── opening_loc: (124,2)-(124,4) = "\#{"
- │ │ │ │ ├── statements:
- │ │ │ │ │ @ StatementsNode (location: (124,4)-(124,6))
- │ │ │ │ │ └── body: (length: 1)
- │ │ │ │ │ └── @ InstanceVariableReadNode (location: (124,4)-(124,6))
- │ │ │ │ │ └── name: :@a
- │ │ │ │ └── closing_loc: (124,6)-(124,7) = "}"
- │ │ │ └── closing_loc: (124,7)-(124,8) = "\""
- │ │ └── @ StringNode (location: (124,9)-(124,12))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (124,9)-(124,10) = "\""
- │ │ ├── content_loc: (124,10)-(124,11) = "b"
- │ │ ├── closing_loc: (124,11)-(124,12) = "\""
- │ │ └── unescaped: "b"
- │ └── closing_loc: ∅
- ├── @ InterpolatedStringNode (location: (125,0)-(125,10))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ InterpolatedStringNode (location: (125,0)-(125,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (125,0)-(125,1) = "\""
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (125,1)-(125,2))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (125,1)-(125,2) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ └── @ EmbeddedVariableNode (location: (125,2)-(125,5))
- │ │ │ │ ├── operator_loc: (125,2)-(125,3) = "#"
- │ │ │ │ └── variable:
- │ │ │ │ @ InstanceVariableReadNode (location: (125,3)-(125,5))
- │ │ │ │ └── name: :@a
- │ │ │ └── closing_loc: (125,5)-(125,6) = "\""
- │ │ └── @ StringNode (location: (125,7)-(125,10))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (125,7)-(125,8) = "\""
- │ │ ├── content_loc: (125,8)-(125,9) = "b"
- │ │ ├── closing_loc: (125,9)-(125,10) = "\""
- │ │ └── unescaped: "b"
- │ └── closing_loc: ∅
- ├── @ InterpolatedStringNode (location: (126,0)-(126,10))
- │ ├── flags: ∅
- │ ├── opening_loc: ∅
- │ ├── parts: (length: 2)
- │ │ ├── @ InterpolatedStringNode (location: (126,0)-(126,6))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (126,0)-(126,1) = "\""
- │ │ │ ├── parts: (length: 2)
- │ │ │ │ ├── @ StringNode (location: (126,1)-(126,2))
- │ │ │ │ │ ├── flags: frozen
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── content_loc: (126,1)-(126,2) = "a"
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ └── @ EmbeddedVariableNode (location: (126,2)-(126,5))
- │ │ │ │ ├── operator_loc: (126,2)-(126,3) = "#"
- │ │ │ │ └── variable:
- │ │ │ │ @ GlobalVariableReadNode (location: (126,3)-(126,5))
- │ │ │ │ └── name: :$a
- │ │ │ └── closing_loc: (126,5)-(126,6) = "\""
- │ │ └── @ StringNode (location: (126,7)-(126,10))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: (126,7)-(126,8) = "\""
- │ │ ├── content_loc: (126,8)-(126,9) = "b"
- │ │ ├── closing_loc: (126,9)-(126,10) = "\""
- │ │ └── unescaped: "b"
- │ └── closing_loc: ∅
- └── @ InterpolatedStringNode (location: (127,0)-(127,11))
- ├── flags: ∅
- ├── opening_loc: ∅
- ├── parts: (length: 2)
- │ ├── @ InterpolatedStringNode (location: (127,0)-(127,7))
- │ │ ├── flags: ∅
- │ │ ├── opening_loc: (127,0)-(127,1) = "\""
- │ │ ├── parts: (length: 2)
- │ │ │ ├── @ StringNode (location: (127,1)-(127,2))
- │ │ │ │ ├── flags: frozen
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── content_loc: (127,1)-(127,2) = "a"
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── unescaped: "a"
- │ │ │ └── @ EmbeddedVariableNode (location: (127,2)-(127,6))
- │ │ │ ├── operator_loc: (127,2)-(127,3) = "#"
- │ │ │ └── variable:
- │ │ │ @ ClassVariableReadNode (location: (127,3)-(127,6))
- │ │ │ └── name: :@@a
- │ │ └── closing_loc: (127,6)-(127,7) = "\""
- │ └── @ StringNode (location: (127,8)-(127,11))
- │ ├── flags: frozen
- │ ├── opening_loc: (127,8)-(127,9) = "\""
- │ ├── content_loc: (127,9)-(127,10) = "b"
- │ ├── closing_loc: (127,10)-(127,11) = "\""
- │ └── unescaped: "b"
- └── closing_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt b/test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt
deleted file mode 100644
index 38486ddc12..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt
+++ /dev/null
@@ -1,259 +0,0 @@
-@ ProgramNode (location: (1,0)-(42,3))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(42,3))
- └── body: (length: 8)
- ├── @ BeginNode (location: (1,0)-(3,3))
- │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (2,0)-(2,6))
- │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (3,0)-(3,3) = "end"
- ├── @ BeginNode (location: (5,0)-(8,3))
- │ ├── begin_keyword_loc: (5,0)-(5,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (6,0)-(6,6))
- │ │ ├── keyword_loc: (6,0)-(6,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (7,0)-(8,3))
- │ │ ├── else_keyword_loc: (7,0)-(7,4) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (8,0)-(8,3) = "end"
- ├── @ BeginNode (location: (10,0)-(12,3))
- │ ├── begin_keyword_loc: (10,0)-(10,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (11,2)-(11,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (11,2)-(11,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (11,2)-(11,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (12,0)-(12,3) = "end"
- ├── @ BeginNode (location: (14,0)-(18,3))
- │ ├── begin_keyword_loc: (14,0)-(14,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (15,2)-(15,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (15,2)-(15,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :a
- │ │ ├── message_loc: (15,2)-(15,3) = "a"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (16,0)-(17,3))
- │ │ ├── keyword_loc: (16,0)-(16,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (17,2)-(17,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (17,2)-(17,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (17,2)-(17,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (18,0)-(18,3) = "end"
- ├── @ BeginNode (location: (20,0)-(25,3))
- │ ├── begin_keyword_loc: (20,0)-(20,5) = "begin"
- │ ├── statements:
- │ │ @ StatementsNode (location: (21,2)-(22,3))
- │ │ └── body: (length: 2)
- │ │ ├── @ CallNode (location: (21,2)-(21,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (21,2)-(21,3) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (22,2)-(22,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (22,2)-(22,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (23,0)-(24,3))
- │ │ ├── keyword_loc: (23,0)-(23,6) = "rescue"
- │ │ ├── exceptions: (length: 0)
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (24,2)-(24,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (24,2)-(24,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (24,2)-(24,3) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause: ∅
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (25,0)-(25,3) = "end"
- ├── @ BeginNode (location: (27,0)-(30,3))
- │ ├── begin_keyword_loc: (27,0)-(27,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (28,0)-(28,8))
- │ │ ├── keyword_loc: (28,0)-(28,6) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (28,7)-(28,8))
- │ │ │ └── name: :A
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (29,0)-(30,3))
- │ │ ├── else_keyword_loc: (29,0)-(29,4) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (30,0)-(30,3) = "end"
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (30,0)-(30,3) = "end"
- ├── @ BeginNode (location: (32,0)-(32,26))
- │ ├── begin_keyword_loc: (32,0)-(32,5) = "begin"
- │ ├── statements: ∅
- │ ├── rescue_clause:
- │ │ @ RescueNode (location: (32,7)-(32,15))
- │ │ ├── keyword_loc: (32,7)-(32,13) = "rescue"
- │ │ ├── exceptions: (length: 1)
- │ │ │ └── @ ConstantReadNode (location: (32,14)-(32,15))
- │ │ │ └── name: :A
- │ │ ├── operator_loc: ∅
- │ │ ├── reference: ∅
- │ │ ├── statements: ∅
- │ │ └── consequent: ∅
- │ ├── else_clause:
- │ │ @ ElseNode (location: (32,17)-(32,26))
- │ │ ├── else_keyword_loc: (32,17)-(32,21) = "else"
- │ │ ├── statements: ∅
- │ │ └── end_keyword_loc: (32,23)-(32,26) = "end"
- │ ├── ensure_clause: ∅
- │ └── end_keyword_loc: (32,23)-(32,26) = "end"
- └── @ BeginNode (location: (34,0)-(42,3))
- ├── begin_keyword_loc: (34,0)-(34,5) = "begin"
- ├── statements:
- │ @ StatementsNode (location: (35,2)-(35,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (35,2)-(35,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (35,2)-(35,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── rescue_clause:
- │ @ RescueNode (location: (36,0)-(39,3))
- │ ├── keyword_loc: (36,0)-(36,6) = "rescue"
- │ ├── exceptions: (length: 1)
- │ │ └── @ ConstantReadNode (location: (36,7)-(36,8))
- │ │ └── name: :A
- │ ├── operator_loc: ∅
- │ ├── reference: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (37,2)-(37,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (37,2)-(37,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (37,2)-(37,3) = "b"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── consequent:
- │ @ RescueNode (location: (38,0)-(39,3))
- │ ├── keyword_loc: (38,0)-(38,6) = "rescue"
- │ ├── exceptions: (length: 1)
- │ │ └── @ ConstantReadNode (location: (38,7)-(38,8))
- │ │ └── name: :B
- │ ├── operator_loc: ∅
- │ ├── reference: ∅
- │ ├── statements:
- │ │ @ StatementsNode (location: (39,2)-(39,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (39,2)-(39,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (39,2)-(39,3) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── consequent: ∅
- ├── else_clause: ∅
- ├── ensure_clause:
- │ @ EnsureNode (location: (40,0)-(42,3))
- │ ├── ensure_keyword_loc: (40,0)-(40,6) = "ensure"
- │ ├── statements:
- │ │ @ StatementsNode (location: (41,2)-(41,3))
- │ │ └── body: (length: 1)
- │ │ └── @ CallNode (location: (41,2)-(41,3))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (41,2)-(41,3) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── end_keyword_loc: (42,0)-(42,3) = "end"
- └── end_keyword_loc: (42,0)-(42,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/literal.txt b/test/prism/snapshots/unparser/corpus/semantic/literal.txt
deleted file mode 100644
index ef666890be..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/literal.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-@ ProgramNode (location: (1,0)-(14,10))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(14,10))
- └── body: (length: 14)
- ├── @ RationalNode (location: (1,0)-(1,4))
- │ └── numeric:
- │ @ FloatNode (location: (1,0)-(1,3))
- │ └── value: 1.0
- ├── @ RationalNode (location: (2,0)-(2,3))
- │ └── numeric:
- │ @ IntegerNode (location: (2,0)-(2,2))
- │ ├── flags: decimal
- │ └── value: 0
- ├── @ IntegerNode (location: (3,0)-(3,3))
- │ ├── flags: hexadecimal
- │ └── value: 1
- ├── @ IntegerNode (location: (4,0)-(4,5))
- │ ├── flags: decimal
- │ └── value: 1000
- ├── @ FloatNode (location: (5,0)-(5,4))
- │ └── value: 10000000000.0
- ├── @ FloatNode (location: (6,0)-(6,14))
- │ └── value: Infinity
- ├── @ FloatNode (location: (7,0)-(7,15))
- │ └── value: -Infinity
- ├── @ StringNode (location: (8,0)-(8,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (8,0)-(8,1) = "?"
- │ ├── content_loc: (8,1)-(8,2) = "c"
- │ ├── closing_loc: ∅
- │ └── unescaped: "c"
- ├── @ RegularExpressionNode (location: (9,0)-(9,5))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (9,0)-(9,3) = "%r("
- │ ├── content_loc: (9,3)-(9,4) = "/"
- │ ├── closing_loc: (9,4)-(9,5) = ")"
- │ └── unescaped: "/"
- ├── @ RegularExpressionNode (location: (10,0)-(10,6))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: (10,0)-(10,3) = "%r("
- │ ├── content_loc: (10,3)-(10,5) = "\\)"
- │ ├── closing_loc: (10,5)-(10,6) = ")"
- │ └── unescaped: "\\)"
- ├── @ InterpolatedRegularExpressionNode (location: (11,0)-(11,14))
- │ ├── flags: ∅
- │ ├── opening_loc: (11,0)-(11,3) = "%r("
- │ ├── parts: (length: 2)
- │ │ ├── @ EmbeddedStatementsNode (location: (11,3)-(11,10))
- │ │ │ ├── opening_loc: (11,3)-(11,5) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (11,5)-(11,9))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ InstanceVariableReadNode (location: (11,5)-(11,9))
- │ │ │ │ └── name: :@bar
- │ │ │ └── closing_loc: (11,9)-(11,10) = "}"
- │ │ └── @ StringNode (location: (11,10)-(11,13))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (11,10)-(11,13) = "baz"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "baz"
- │ └── closing_loc: (11,13)-(11,14) = ")"
- ├── @ FloatNode (location: (12,0)-(12,16))
- │ └── value: Infinity
- ├── @ FloatNode (location: (13,0)-(13,17))
- │ └── value: -Infinity
- └── @ CallNode (location: (14,0)-(14,10))
- ├── flags: ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :w
- ├── message_loc: (14,0)-(14,1) = "w"
- ├── opening_loc: (14,1)-(14,2) = "("
- ├── arguments:
- │ @ ArgumentsNode (location: (14,2)-(14,9))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (14,2)-(14,9))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (14,2)-(14,5) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (14,6)-(14,9))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (14,6)-(14,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (14,6)-(14,9) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── closing_loc: (14,9)-(14,10) = ")"
- └── block: ∅
diff --git a/test/prism/snapshots/unparser/corpus/semantic/opasgn.txt b/test/prism/snapshots/unparser/corpus/semantic/opasgn.txt
deleted file mode 100644
index 7dd26a38dc..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/opasgn.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,25))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,25))
- └── body: (length: 1)
- └── @ IndexOperatorWriteNode (location: (1,0)-(1,25))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :y
- │ ├── message_loc: (1,0)-(1,1) = "y"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── opening_loc: (1,1)-(1,2) = "["
- ├── arguments:
- │ @ ArgumentsNode (location: (1,2)-(1,11))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ InterpolatedStringNode (location: (1,2)-(1,11))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,2)-(1,3) = "\""
- │ ├── parts: (length: 2)
- │ │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,8))
- │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (1,5)-(1,7))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ IntegerNode (location: (1,5)-(1,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 42
- │ │ │ └── closing_loc: (1,7)-(1,8) = "}"
- │ │ └── @ StringNode (location: (1,8)-(1,10))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (1,8)-(1,10) = "\\n"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "\n"
- │ └── closing_loc: (1,10)-(1,11) = "\""
- ├── closing_loc: (1,11)-(1,12) = "]"
- ├── block: ∅
- ├── binary_operator: :+
- ├── binary_operator_loc: (1,13)-(1,15) = "+="
- └── value:
- @ InterpolatedStringNode (location: (1,16)-(1,25))
- ├── flags: ∅
- ├── opening_loc: (1,16)-(1,17) = "\""
- ├── parts: (length: 2)
- │ ├── @ EmbeddedStatementsNode (location: (1,17)-(1,22))
- │ │ ├── opening_loc: (1,17)-(1,19) = "\#{"
- │ │ ├── statements:
- │ │ │ @ StatementsNode (location: (1,19)-(1,21))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ IntegerNode (location: (1,19)-(1,21))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 42
- │ │ └── closing_loc: (1,21)-(1,22) = "}"
- │ └── @ StringNode (location: (1,22)-(1,24))
- │ ├── flags: frozen
- │ ├── opening_loc: ∅
- │ ├── content_loc: (1,22)-(1,24) = "\\n"
- │ ├── closing_loc: ∅
- │ └── unescaped: "\n"
- └── closing_loc: (1,24)-(1,25) = "\""
diff --git a/test/prism/snapshots/unparser/corpus/semantic/send.txt b/test/prism/snapshots/unparser/corpus/semantic/send.txt
deleted file mode 100644
index 7c152c3bfb..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/send.txt
+++ /dev/null
@@ -1,163 +0,0 @@
-@ ProgramNode (location: (1,0)-(6,15))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(6,15))
- └── body: (length: 4)
- ├── @ CallNode (location: (1,0)-(1,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (1,0)-(1,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (2,0)-(2,6))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (2,0)-(2,3) = "foo"
- │ ├── opening_loc: (2,3)-(2,4) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,4)-(2,5))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ IntegerNode (location: (2,4)-(2,5))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ ├── closing_loc: (2,5)-(2,6) = ")"
- │ └── block: ∅
- ├── @ CallNode (location: (4,0)-(4,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (4,0)-(4,10))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (4,0)-(4,8))
- │ │ │ ├── flags: ∅
- │ │ │ ├── receiver:
- │ │ │ │ @ CallNode (location: (4,0)-(4,1))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── message_loc: (4,0)-(4,1) = "a"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── call_operator_loc: (4,1)-(4,2) = "."
- │ │ │ ├── name: :===
- │ │ │ ├── message_loc: (4,2)-(4,5) = "==="
- │ │ │ ├── opening_loc: (4,5)-(4,6) = "("
- │ │ │ ├── arguments:
- │ │ │ │ @ ArgumentsNode (location: (4,6)-(4,7))
- │ │ │ │ ├── flags: ∅
- │ │ │ │ └── arguments: (length: 1)
- │ │ │ │ └── @ CallNode (location: (4,6)-(4,7))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :b
- │ │ │ │ ├── message_loc: (4,6)-(4,7) = "b"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── closing_loc: (4,7)-(4,8) = ")"
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (4,8)-(4,9) = "."
- │ │ ├── name: :c
- │ │ ├── message_loc: (4,9)-(4,10) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :==
- │ ├── message_loc: (4,11)-(4,13) = "=="
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (4,14)-(4,15))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (4,14)-(4,15))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :d
- │ │ ├── message_loc: (4,14)-(4,15) = "d"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ CallNode (location: (6,0)-(6,15))
- ├── flags: ∅
- ├── receiver:
- │ @ CallNode (location: (6,0)-(6,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (6,0)-(6,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── call_operator_loc: ∅
- ├── name: :==
- ├── message_loc: (6,2)-(6,4) = "=="
- ├── opening_loc: ∅
- ├── arguments:
- │ @ ArgumentsNode (location: (6,5)-(6,15))
- │ ├── flags: ∅
- │ └── arguments: (length: 1)
- │ └── @ CallNode (location: (6,5)-(6,15))
- │ ├── flags: ∅
- │ ├── receiver:
- │ │ @ CallNode (location: (6,5)-(6,8))
- │ │ ├── flags: ∅
- │ │ ├── receiver:
- │ │ │ @ CallNode (location: (6,5)-(6,6))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :d
- │ │ │ ├── message_loc: (6,5)-(6,6) = "d"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── call_operator_loc: (6,6)-(6,7) = "."
- │ │ ├── name: :c
- │ │ ├── message_loc: (6,7)-(6,8) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── call_operator_loc: (6,8)-(6,9) = "."
- │ ├── name: :===
- │ ├── message_loc: (6,9)-(6,12) = "==="
- │ ├── opening_loc: (6,12)-(6,13) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (6,13)-(6,14))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 1)
- │ │ └── @ CallNode (location: (6,13)-(6,14))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (6,13)-(6,14) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── closing_loc: (6,14)-(6,15) = ")"
- │ └── block: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/unparser/corpus/semantic/undef.txt b/test/prism/snapshots/unparser/corpus/semantic/undef.txt
deleted file mode 100644
index ecb073148d..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/undef.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ ProgramNode (location: (1,0)-(2,14))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(2,14))
- └── body: (length: 2)
- ├── @ UndefNode (location: (1,0)-(1,9))
- │ ├── names: (length: 1)
- │ │ └── @ SymbolNode (location: (1,6)-(1,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (1,6)-(1,9) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── keyword_loc: (1,0)-(1,5) = "undef"
- └── @ UndefNode (location: (2,0)-(2,14))
- ├── names: (length: 2)
- │ ├── @ SymbolNode (location: (2,6)-(2,9))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: ∅
- │ │ ├── value_loc: (2,6)-(2,9) = "foo"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "foo"
- │ └── @ SymbolNode (location: (2,11)-(2,14))
- │ ├── flags: forced_us_ascii_encoding
- │ ├── opening_loc: ∅
- │ ├── value_loc: (2,11)-(2,14) = "bar"
- │ ├── closing_loc: ∅
- │ └── unescaped: "bar"
- └── keyword_loc: (2,0)-(2,5) = "undef"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/while.txt b/test/prism/snapshots/unparser/corpus/semantic/while.txt
deleted file mode 100644
index 36bfba5be6..0000000000
--- a/test/prism/snapshots/unparser/corpus/semantic/while.txt
+++ /dev/null
@@ -1,277 +0,0 @@
-@ ProgramNode (location: (1,0)-(25,3))
-├── locals: [:foo, :a]
-└── statements:
- @ StatementsNode (location: (1,0)-(25,3))
- └── body: (length: 7)
- ├── @ UntilNode (location: (1,0)-(1,13))
- │ ├── flags: ∅
- │ ├── keyword_loc: (1,2)-(1,7) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (1,8)-(1,13))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b?
- │ │ ├── message_loc: (1,8)-(1,10) = "b?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (1,11)-(1,13))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (1,11)-(1,12) = "{"
- │ │ └── closing_loc: (1,12)-(1,13) = "}"
- │ └── statements:
- │ @ StatementsNode (location: (1,0)-(1,1))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (1,0)-(1,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (1,0)-(1,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ UntilNode (location: (3,0)-(5,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (3,0)-(3,5) = "until"
- │ ├── closing_loc: (5,0)-(5,3) = "end"
- │ ├── predicate:
- │ │ @ CallNode (location: (3,6)-(3,11))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b?
- │ │ ├── message_loc: (3,6)-(3,8) = "b?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block:
- │ │ @ BlockNode (location: (3,9)-(3,11))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body: ∅
- │ │ ├── opening_loc: (3,9)-(3,10) = "{"
- │ │ └── closing_loc: (3,10)-(3,11) = "}"
- │ └── statements:
- │ @ StatementsNode (location: (4,2)-(4,3))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (4,2)-(4,3))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (4,2)-(4,3) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ WhileNode (location: (7,0)-(7,19))
- │ ├── flags: ∅
- │ ├── keyword_loc: (7,10)-(7,15) = "while"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ LocalVariableReadNode (location: (7,16)-(7,19))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ └── statements:
- │ @ StatementsNode (location: (7,0)-(7,9))
- │ └── body: (length: 1)
- │ └── @ LocalVariableWriteNode (location: (7,0)-(7,9))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (7,0)-(7,3) = "foo"
- │ ├── value:
- │ │ @ CallNode (location: (7,6)-(7,9))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (7,6)-(7,9) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (7,4)-(7,5) = "="
- ├── @ UntilNode (location: (9,0)-(9,18))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,2)-(9,7) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ AndNode (location: (9,8)-(9,18))
- │ │ ├── left:
- │ │ │ @ CallNode (location: (9,8)-(9,9))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (9,8)-(9,9) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── right:
- │ │ │ @ CallNode (location: (9,13)-(9,18))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (9,13)-(9,14) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (9,15)-(9,18))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (9,15)-(9,16) = "{"
- │ │ │ └── closing_loc: (9,17)-(9,18) = "}"
- │ │ └── operator_loc: (9,10)-(9,12) = "&&"
- │ └── statements:
- │ @ StatementsNode (location: (9,0)-(9,1))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (9,0)-(9,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (9,0)-(9,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ WhileNode (location: (11,0)-(13,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (11,0)-(11,5) = "while"
- │ ├── closing_loc: (13,0)-(13,3) = "end"
- │ ├── predicate:
- │ │ @ LocalVariableWriteNode (location: (11,6)-(11,11))
- │ │ ├── name: :a
- │ │ ├── depth: 0
- │ │ ├── name_loc: (11,6)-(11,7) = "a"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (11,10)-(11,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (11,10)-(11,11) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (11,8)-(11,9) = "="
- │ └── statements:
- │ @ StatementsNode (location: (12,2)-(12,3))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (12,2)-(12,3))
- │ ├── name: :a
- │ └── depth: 0
- ├── @ UntilNode (location: (15,0)-(18,3))
- │ ├── flags: ∅
- │ ├── keyword_loc: (15,2)-(15,7) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (15,8)-(18,3))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :b
- │ │ ├── message_loc: (15,8)-(15,9) = "b"
- │ │ ├── opening_loc: (15,9)-(15,10) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (15,10)-(15,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ StringNode (location: (15,10)-(15,16))
- │ │ │ ├── flags: ∅
- │ │ │ ├── opening_loc: (15,10)-(15,16) = "<<-FOO"
- │ │ │ ├── content_loc: (16,0)-(16,0) = ""
- │ │ │ ├── closing_loc: (16,0)-(17,0) = "FOO\n"
- │ │ │ └── unescaped: ""
- │ │ ├── closing_loc: (15,16)-(15,17) = ")"
- │ │ └── block:
- │ │ @ BlockNode (location: (15,18)-(18,3))
- │ │ ├── locals: []
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (17,2)-(17,3))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (17,2)-(17,3))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :c
- │ │ │ ├── message_loc: (17,2)-(17,3) = "c"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── opening_loc: (15,18)-(15,20) = "do"
- │ │ └── closing_loc: (18,0)-(18,3) = "end"
- │ └── statements:
- │ @ StatementsNode (location: (15,0)-(15,1))
- │ └── body: (length: 1)
- │ └── @ LocalVariableReadNode (location: (15,0)-(15,1))
- │ ├── name: :a
- │ └── depth: 0
- └── @ ModuleNode (location: (20,0)-(25,3))
- ├── locals: [:foo]
- ├── module_keyword_loc: (20,0)-(20,6) = "module"
- ├── constant_path:
- │ @ ConstantReadNode (location: (20,7)-(20,8))
- │ └── name: :A
- ├── body:
- │ @ StatementsNode (location: (21,2)-(24,5))
- │ └── body: (length: 2)
- │ ├── @ LocalVariableWriteNode (location: (21,2)-(21,11))
- │ │ ├── name: :foo
- │ │ ├── depth: 0
- │ │ ├── name_loc: (21,2)-(21,5) = "foo"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (21,8)-(21,11))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :exp
- │ │ │ ├── message_loc: (21,8)-(21,11) = "exp"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── operator_loc: (21,6)-(21,7) = "="
- │ └── @ WhileNode (location: (22,2)-(24,5))
- │ ├── flags: ∅
- │ ├── keyword_loc: (22,2)-(22,7) = "while"
- │ ├── closing_loc: (24,2)-(24,5) = "end"
- │ ├── predicate:
- │ │ @ LocalVariableReadNode (location: (22,8)-(22,11))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ └── statements:
- │ @ StatementsNode (location: (23,4)-(23,13))
- │ └── body: (length: 1)
- │ └── @ LocalVariableWriteNode (location: (23,4)-(23,13))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (23,4)-(23,7) = "foo"
- │ ├── value:
- │ │ @ CallNode (location: (23,10)-(23,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (23,10)-(23,13) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── operator_loc: (23,8)-(23,9) = "="
- ├── end_keyword_loc: (25,0)-(25,3) = "end"
- └── name: :A
diff --git a/test/prism/snapshots/until.txt b/test/prism/snapshots/until.txt
deleted file mode 100644
index e855dc89f7..0000000000
--- a/test/prism/snapshots/until.txt
+++ /dev/null
@@ -1,180 +0,0 @@
-@ ProgramNode (location: (1,0)-(13,20))
-├── locals: [:baz]
-└── statements:
- @ StatementsNode (location: (1,0)-(13,20))
- └── body: (length: 7)
- ├── @ UntilNode (location: (1,0)-(1,18))
- │ ├── flags: ∅
- │ ├── keyword_loc: (1,0)-(1,5) = "until"
- │ ├── closing_loc: (1,15)-(1,18) = "end"
- │ ├── predicate:
- │ │ @ TrueNode (location: (1,6)-(1,10))
- │ └── statements:
- │ @ StatementsNode (location: (1,12)-(1,13))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,12)-(1,13))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ UntilNode (location: (3,0)-(3,12))
- │ ├── flags: ∅
- │ ├── keyword_loc: (3,2)-(3,7) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ TrueNode (location: (3,8)-(3,12))
- │ └── statements:
- │ @ StatementsNode (location: (3,0)-(3,1))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (3,0)-(3,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ CallNode (location: (5,0)-(5,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (5,0)-(5,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (5,4)-(5,24))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (5,6)-(5,22))
- │ │ └── body: (length: 1)
- │ │ └── @ UntilNode (location: (5,6)-(5,22))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (5,12)-(5,17) = "until"
- │ │ ├── closing_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (5,18)-(5,22))
- │ │ └── statements:
- │ │ @ StatementsNode (location: (5,6)-(5,11))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (5,6)-(5,11))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (5,6)-(5,11) = "break"
- │ ├── opening_loc: (5,4)-(5,5) = "{"
- │ └── closing_loc: (5,23)-(5,24) = "}"
- ├── @ CallNode (location: (7,0)-(7,23))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (7,0)-(7,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (7,4)-(7,23))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (7,6)-(7,21))
- │ │ └── body: (length: 1)
- │ │ └── @ UntilNode (location: (7,6)-(7,21))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (7,11)-(7,16) = "until"
- │ │ ├── closing_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (7,17)-(7,21))
- │ │ └── statements:
- │ │ @ StatementsNode (location: (7,6)-(7,10))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (7,6)-(7,10))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (7,6)-(7,10) = "next"
- │ ├── opening_loc: (7,4)-(7,5) = "{"
- │ └── closing_loc: (7,22)-(7,23) = "}"
- ├── @ UntilNode (location: (9,0)-(9,17))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,7)-(9,12) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ TrueNode (location: (9,13)-(9,17))
- │ └── statements:
- │ @ StatementsNode (location: (9,0)-(9,6))
- │ └── body: (length: 1)
- │ └── @ ReturnNode (location: (9,0)-(9,6))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,0)-(9,6) = "return"
- │ └── arguments: ∅
- ├── @ UntilNode (location: (11,0)-(11,21))
- │ ├── flags: ∅
- │ ├── keyword_loc: (11,11)-(11,16) = "until"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (11,17)-(11,21))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar?
- │ │ ├── message_loc: (11,17)-(11,21) = "bar?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── statements:
- │ @ StatementsNode (location: (11,0)-(11,10))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (11,0)-(11,10))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (11,0)-(11,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,4)-(11,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (11,4)-(11,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (11,4)-(11,5) = ":"
- │ │ │ ├── value_loc: (11,5)-(11,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (11,8)-(11,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (11,8)-(11,9) = ":"
- │ │ ├── value_loc: (11,9)-(11,10) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- └── @ WhileNode (location: (13,0)-(13,20))
- ├── flags: ∅
- ├── keyword_loc: (13,4)-(13,9) = "while"
- ├── closing_loc: ∅
- ├── predicate:
- │ @ MatchPredicateNode (location: (13,10)-(13,20))
- │ ├── value:
- │ │ @ CallNode (location: (13,10)-(13,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (13,10)-(13,13) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ LocalVariableTargetNode (location: (13,17)-(13,20))
- │ │ ├── name: :baz
- │ │ └── depth: 0
- │ └── operator_loc: (13,14)-(13,16) = "in"
- └── statements:
- @ StatementsNode (location: (13,0)-(13,3))
- └── body: (length: 1)
- └── @ CallNode (location: (13,0)-(13,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (13,0)-(13,3) = "foo"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/variables.txt b/test/prism/snapshots/variables.txt
deleted file mode 100644
index b79612f924..0000000000
--- a/test/prism/snapshots/variables.txt
+++ /dev/null
@@ -1,408 +0,0 @@
-@ ProgramNode (location: (1,0)-(47,17))
-├── locals: [:abc, :foo, :bar, :baz, :a, :b, :c, :d]
-└── statements:
- @ StatementsNode (location: (1,0)-(47,17))
- └── body: (length: 25)
- ├── @ ClassVariableReadNode (location: (1,0)-(1,5))
- │ └── name: :@@abc
- ├── @ ClassVariableWriteNode (location: (3,0)-(3,9))
- │ ├── name: :@@abc
- │ ├── name_loc: (3,0)-(3,5) = "@@abc"
- │ ├── value:
- │ │ @ IntegerNode (location: (3,8)-(3,9))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (3,6)-(3,7) = "="
- ├── @ MultiWriteNode (location: (5,0)-(5,16))
- │ ├── lefts: (length: 2)
- │ │ ├── @ ClassVariableTargetNode (location: (5,0)-(5,5))
- │ │ │ └── name: :@@foo
- │ │ └── @ ClassVariableTargetNode (location: (5,7)-(5,12))
- │ │ └── name: :@@bar
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (5,13)-(5,14) = "="
- │ └── value:
- │ @ IntegerNode (location: (5,15)-(5,16))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ ClassVariableWriteNode (location: (7,0)-(7,12))
- │ ├── name: :@@foo
- │ ├── name_loc: (7,0)-(7,5) = "@@foo"
- │ ├── value:
- │ │ @ ArrayNode (location: (7,8)-(7,12))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (7,8)-(7,9))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (7,11)-(7,12))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (7,6)-(7,7) = "="
- ├── @ GlobalVariableWriteNode (location: (9,0)-(9,8))
- │ ├── name: :$abc
- │ ├── name_loc: (9,0)-(9,4) = "$abc"
- │ ├── value:
- │ │ @ IntegerNode (location: (9,7)-(9,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (9,5)-(9,6) = "="
- ├── @ GlobalVariableReadNode (location: (11,0)-(11,4))
- │ └── name: :$abc
- ├── @ InstanceVariableReadNode (location: (13,0)-(13,4))
- │ └── name: :@abc
- ├── @ InstanceVariableWriteNode (location: (15,0)-(15,8))
- │ ├── name: :@abc
- │ ├── name_loc: (15,0)-(15,4) = "@abc"
- │ ├── value:
- │ │ @ IntegerNode (location: (15,7)-(15,8))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (15,5)-(15,6) = "="
- ├── @ CallNode (location: (17,0)-(17,1))
- │ ├── flags: variable_call, ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :a
- │ ├── message_loc: (17,0)-(17,1) = "a"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ LocalVariableWriteNode (location: (19,0)-(19,7))
- │ ├── name: :abc
- │ ├── depth: 0
- │ ├── name_loc: (19,0)-(19,3) = "abc"
- │ ├── value:
- │ │ @ IntegerNode (location: (19,6)-(19,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (19,4)-(19,5) = "="
- ├── @ MultiWriteNode (location: (21,0)-(21,14))
- │ ├── lefts: (length: 2)
- │ │ ├── @ GlobalVariableTargetNode (location: (21,0)-(21,4))
- │ │ │ └── name: :$foo
- │ │ └── @ GlobalVariableTargetNode (location: (21,6)-(21,10))
- │ │ └── name: :$bar
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (21,11)-(21,12) = "="
- │ └── value:
- │ @ IntegerNode (location: (21,13)-(21,14))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ GlobalVariableWriteNode (location: (23,0)-(23,11))
- │ ├── name: :$foo
- │ ├── name_loc: (23,0)-(23,4) = "$foo"
- │ ├── value:
- │ │ @ ArrayNode (location: (23,7)-(23,11))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (23,7)-(23,8))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (23,10)-(23,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (23,5)-(23,6) = "="
- ├── @ MultiWriteNode (location: (25,0)-(25,14))
- │ ├── lefts: (length: 2)
- │ │ ├── @ InstanceVariableTargetNode (location: (25,0)-(25,4))
- │ │ │ └── name: :@foo
- │ │ └── @ InstanceVariableTargetNode (location: (25,6)-(25,10))
- │ │ └── name: :@bar
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (25,11)-(25,12) = "="
- │ └── value:
- │ @ IntegerNode (location: (25,13)-(25,14))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ InstanceVariableWriteNode (location: (27,0)-(27,11))
- │ ├── name: :@foo
- │ ├── name_loc: (27,0)-(27,4) = "@foo"
- │ ├── value:
- │ │ @ ArrayNode (location: (27,7)-(27,11))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (27,7)-(27,8))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (27,10)-(27,11))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (27,5)-(27,6) = "="
- ├── @ LocalVariableWriteNode (location: (29,0)-(29,7))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (29,0)-(29,3) = "foo"
- │ ├── value:
- │ │ @ IntegerNode (location: (29,6)-(29,7))
- │ │ ├── flags: decimal
- │ │ └── value: 1
- │ └── operator_loc: (29,4)-(29,5) = "="
- ├── @ LocalVariableWriteNode (location: (29,9)-(29,19))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (29,9)-(29,12) = "foo"
- │ ├── value:
- │ │ @ ArrayNode (location: (29,15)-(29,19))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (29,15)-(29,16))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (29,18)-(29,19))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (29,13)-(29,14) = "="
- ├── @ LocalVariableWriteNode (location: (31,0)-(31,10))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (31,0)-(31,3) = "foo"
- │ ├── value:
- │ │ @ ArrayNode (location: (31,6)-(31,10))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (31,6)-(31,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (31,9)-(31,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (31,4)-(31,5) = "="
- ├── @ MultiWriteNode (location: (33,0)-(33,13))
- │ ├── lefts: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (33,0)-(33,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── rest:
- │ │ @ SplatNode (location: (33,5)-(33,6))
- │ │ ├── operator_loc: (33,5)-(33,6) = "*"
- │ │ └── expression: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (33,7)-(33,8) = "="
- │ └── value:
- │ @ ArrayNode (location: (33,9)-(33,13))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (33,9)-(33,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (33,12)-(33,13))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── @ MultiWriteNode (location: (35,0)-(35,11))
- │ ├── lefts: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (35,0)-(35,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── rest:
- │ │ @ ImplicitRestNode (location: (35,3)-(35,4))
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (35,5)-(35,6) = "="
- │ └── value:
- │ @ ArrayNode (location: (35,7)-(35,11))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (35,7)-(35,8))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (35,10)-(35,11))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── @ MultiWriteNode (location: (37,0)-(37,16))
- │ ├── lefts: (length: 1)
- │ │ └── @ LocalVariableTargetNode (location: (37,0)-(37,3))
- │ │ ├── name: :foo
- │ │ └── depth: 0
- │ ├── rest:
- │ │ @ SplatNode (location: (37,5)-(37,9))
- │ │ ├── operator_loc: (37,5)-(37,6) = "*"
- │ │ └── expression:
- │ │ @ LocalVariableTargetNode (location: (37,6)-(37,9))
- │ │ ├── name: :bar
- │ │ └── depth: 0
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (37,10)-(37,11) = "="
- │ └── value:
- │ @ ArrayNode (location: (37,12)-(37,16))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (37,12)-(37,13))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ IntegerNode (location: (37,15)-(37,16))
- │ │ ├── flags: decimal
- │ │ └── value: 2
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── @ MultiWriteNode (location: (39,0)-(39,27))
- │ ├── lefts: (length: 2)
- │ │ ├── @ LocalVariableTargetNode (location: (39,0)-(39,3))
- │ │ │ ├── name: :foo
- │ │ │ └── depth: 0
- │ │ └── @ MultiTargetNode (location: (39,5)-(39,15))
- │ │ ├── lefts: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (39,6)-(39,9))
- │ │ │ │ ├── name: :bar
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (39,11)-(39,14))
- │ │ │ ├── name: :baz
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── rights: (length: 0)
- │ │ ├── lparen_loc: (39,5)-(39,6) = "("
- │ │ └── rparen_loc: (39,14)-(39,15) = ")"
- │ ├── rest: ∅
- │ ├── rights: (length: 0)
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── operator_loc: (39,16)-(39,17) = "="
- │ └── value:
- │ @ ArrayNode (location: (39,18)-(39,27))
- │ ├── flags: ∅
- │ ├── elements: (length: 2)
- │ │ ├── @ IntegerNode (location: (39,18)-(39,19))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── @ ArrayNode (location: (39,21)-(39,27))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (39,22)-(39,23))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 2
- │ │ │ └── @ IntegerNode (location: (39,25)-(39,26))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 3
- │ │ ├── opening_loc: (39,21)-(39,22) = "["
- │ │ └── closing_loc: (39,26)-(39,27) = "]"
- │ ├── opening_loc: ∅
- │ └── closing_loc: ∅
- ├── @ LocalVariableWriteNode (location: (41,0)-(41,10))
- │ ├── name: :foo
- │ ├── depth: 0
- │ ├── name_loc: (41,0)-(41,3) = "foo"
- │ ├── value:
- │ │ @ ArrayNode (location: (41,6)-(41,10))
- │ │ ├── flags: contains_splat
- │ │ ├── elements: (length: 1)
- │ │ │ └── @ SplatNode (location: (41,6)-(41,10))
- │ │ │ ├── operator_loc: (41,6)-(41,7) = "*"
- │ │ │ └── expression:
- │ │ │ @ LocalVariableReadNode (location: (41,7)-(41,10))
- │ │ │ ├── name: :bar
- │ │ │ └── depth: 0
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (41,4)-(41,5) = "="
- ├── @ ConstantWriteNode (location: (43,0)-(43,10))
- │ ├── name: :Foo
- │ ├── name_loc: (43,0)-(43,3) = "Foo"
- │ ├── value:
- │ │ @ ArrayNode (location: (43,6)-(43,10))
- │ │ ├── flags: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ IntegerNode (location: (43,6)-(43,7))
- │ │ │ │ ├── flags: decimal
- │ │ │ │ └── value: 1
- │ │ │ └── @ IntegerNode (location: (43,9)-(43,10))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ ├── opening_loc: ∅
- │ │ └── closing_loc: ∅
- │ └── operator_loc: (43,4)-(43,5) = "="
- ├── @ ParenthesesNode (location: (45,0)-(45,9))
- │ ├── body:
- │ │ @ StatementsNode (location: (45,1)-(45,8))
- │ │ └── body: (length: 3)
- │ │ ├── @ CallNode (location: (45,1)-(45,2))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :a
- │ │ │ ├── message_loc: (45,1)-(45,2) = "a"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ ├── @ CallNode (location: (45,4)-(45,5))
- │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :b
- │ │ │ ├── message_loc: (45,4)-(45,5) = "b"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block: ∅
- │ │ └── @ CallNode (location: (45,7)-(45,8))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :c
- │ │ ├── message_loc: (45,7)-(45,8) = "c"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── opening_loc: (45,0)-(45,1) = "("
- │ └── closing_loc: (45,8)-(45,9) = ")"
- └── @ MultiWriteNode (location: (47,0)-(47,17))
- ├── lefts: (length: 3)
- │ ├── @ LocalVariableTargetNode (location: (47,0)-(47,1))
- │ │ ├── name: :a
- │ │ └── depth: 0
- │ ├── @ MultiTargetNode (location: (47,3)-(47,9))
- │ │ ├── lefts: (length: 2)
- │ │ │ ├── @ LocalVariableTargetNode (location: (47,4)-(47,5))
- │ │ │ │ ├── name: :b
- │ │ │ │ └── depth: 0
- │ │ │ └── @ LocalVariableTargetNode (location: (47,7)-(47,8))
- │ │ │ ├── name: :c
- │ │ │ └── depth: 0
- │ │ ├── rest: ∅
- │ │ ├── rights: (length: 0)
- │ │ ├── lparen_loc: (47,3)-(47,4) = "("
- │ │ └── rparen_loc: (47,8)-(47,9) = ")"
- │ └── @ LocalVariableTargetNode (location: (47,11)-(47,12))
- │ ├── name: :d
- │ └── depth: 0
- ├── rest: ∅
- ├── rights: (length: 0)
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── operator_loc: (47,13)-(47,14) = "="
- └── value:
- @ ArrayNode (location: (47,15)-(47,17))
- ├── flags: ∅
- ├── elements: (length: 0)
- ├── opening_loc: (47,15)-(47,16) = "["
- └── closing_loc: (47,16)-(47,17) = "]"
diff --git a/test/prism/snapshots/while.txt b/test/prism/snapshots/while.txt
deleted file mode 100644
index a2972face0..0000000000
--- a/test/prism/snapshots/while.txt
+++ /dev/null
@@ -1,470 +0,0 @@
-@ ProgramNode (location: (1,0)-(23,20))
-├── locals: [:baz]
-└── statements:
- @ StatementsNode (location: (1,0)-(23,20))
- └── body: (length: 12)
- ├── @ WhileNode (location: (1,0)-(1,18))
- │ ├── flags: ∅
- │ ├── keyword_loc: (1,0)-(1,5) = "while"
- │ ├── closing_loc: (1,15)-(1,18) = "end"
- │ ├── predicate:
- │ │ @ TrueNode (location: (1,6)-(1,10))
- │ └── statements:
- │ @ StatementsNode (location: (1,12)-(1,13))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (1,12)-(1,13))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ WhileNode (location: (3,0)-(3,12))
- │ ├── flags: ∅
- │ ├── keyword_loc: (3,2)-(3,7) = "while"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ TrueNode (location: (3,8)-(3,12))
- │ └── statements:
- │ @ StatementsNode (location: (3,0)-(3,1))
- │ └── body: (length: 1)
- │ └── @ IntegerNode (location: (3,0)-(3,1))
- │ ├── flags: decimal
- │ └── value: 1
- ├── @ CallNode (location: (5,0)-(5,24))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (5,0)-(5,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (5,4)-(5,24))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (5,6)-(5,22))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (5,6)-(5,22))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (5,12)-(5,17) = "while"
- │ │ ├── closing_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (5,18)-(5,22))
- │ │ └── statements:
- │ │ @ StatementsNode (location: (5,6)-(5,11))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (5,6)-(5,11))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (5,6)-(5,11) = "break"
- │ ├── opening_loc: (5,4)-(5,5) = "{"
- │ └── closing_loc: (5,23)-(5,24) = "}"
- ├── @ CallNode (location: (7,0)-(7,23))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (7,0)-(7,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (7,4)-(7,23))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (7,6)-(7,21))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (7,6)-(7,21))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (7,11)-(7,16) = "while"
- │ │ ├── closing_loc: ∅
- │ │ ├── predicate:
- │ │ │ @ TrueNode (location: (7,17)-(7,21))
- │ │ └── statements:
- │ │ @ StatementsNode (location: (7,6)-(7,10))
- │ │ └── body: (length: 1)
- │ │ └── @ NextNode (location: (7,6)-(7,10))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (7,6)-(7,10) = "next"
- │ ├── opening_loc: (7,4)-(7,5) = "{"
- │ └── closing_loc: (7,22)-(7,23) = "}"
- ├── @ WhileNode (location: (9,0)-(9,17))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,7)-(9,12) = "while"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ TrueNode (location: (9,13)-(9,17))
- │ └── statements:
- │ @ StatementsNode (location: (9,0)-(9,6))
- │ └── body: (length: 1)
- │ └── @ ReturnNode (location: (9,0)-(9,6))
- │ ├── flags: ∅
- │ ├── keyword_loc: (9,0)-(9,6) = "return"
- │ └── arguments: ∅
- ├── @ WhileNode (location: (11,0)-(11,21))
- │ ├── flags: ∅
- │ ├── keyword_loc: (11,11)-(11,16) = "while"
- │ ├── closing_loc: ∅
- │ ├── predicate:
- │ │ @ CallNode (location: (11,17)-(11,21))
- │ │ ├── flags: ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar?
- │ │ ├── message_loc: (11,17)-(11,21) = "bar?"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ └── statements:
- │ @ StatementsNode (location: (11,0)-(11,10))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (11,0)-(11,10))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :foo
- │ ├── message_loc: (11,0)-(11,3) = "foo"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (11,4)-(11,10))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 2)
- │ │ ├── @ SymbolNode (location: (11,4)-(11,6))
- │ │ │ ├── flags: forced_us_ascii_encoding
- │ │ │ ├── opening_loc: (11,4)-(11,5) = ":"
- │ │ │ ├── value_loc: (11,5)-(11,6) = "a"
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "a"
- │ │ └── @ SymbolNode (location: (11,8)-(11,10))
- │ │ ├── flags: forced_us_ascii_encoding
- │ │ ├── opening_loc: (11,8)-(11,9) = ":"
- │ │ ├── value_loc: (11,9)-(11,10) = "b"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: "b"
- │ ├── closing_loc: ∅
- │ └── block: ∅
- ├── @ CallNode (location: (13,0)-(13,58))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (13,0)-(13,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (13,4)-(13,58))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (13,6)-(13,56))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (13,6)-(13,56))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (13,6)-(13,11) = "while"
- │ │ ├── closing_loc: (13,53)-(13,56) = "end"
- │ │ ├── predicate:
- │ │ │ @ DefNode (location: (13,12)-(13,44))
- │ │ │ ├── name: :foo
- │ │ │ ├── name_loc: (13,21)-(13,24) = "foo"
- │ │ │ ├── receiver:
- │ │ │ │ @ SelfNode (location: (13,16)-(13,20))
- │ │ │ ├── parameters:
- │ │ │ │ @ ParametersNode (location: (13,25)-(13,39))
- │ │ │ │ ├── requireds: (length: 0)
- │ │ │ │ ├── optionals: (length: 1)
- │ │ │ │ │ └── @ OptionalParameterNode (location: (13,25)-(13,39))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── name: :a
- │ │ │ │ │ ├── name_loc: (13,25)-(13,26) = "a"
- │ │ │ │ │ ├── operator_loc: (13,27)-(13,28) = "="
- │ │ │ │ │ └── value:
- │ │ │ │ │ @ CallNode (location: (13,29)-(13,39))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :tap
- │ │ │ │ │ ├── message_loc: (13,29)-(13,32) = "tap"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block:
- │ │ │ │ │ @ BlockNode (location: (13,33)-(13,39))
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ ├── opening_loc: (13,33)-(13,35) = "do"
- │ │ │ │ │ └── closing_loc: (13,36)-(13,39) = "end"
- │ │ │ │ ├── rest: ∅
- │ │ │ │ ├── posts: (length: 0)
- │ │ │ │ ├── keywords: (length: 0)
- │ │ │ │ ├── keyword_rest: ∅
- │ │ │ │ └── block: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── locals: [:a]
- │ │ │ ├── def_keyword_loc: (13,12)-(13,15) = "def"
- │ │ │ ├── operator_loc: (13,20)-(13,21) = "."
- │ │ │ ├── lparen_loc: ∅
- │ │ │ ├── rparen_loc: ∅
- │ │ │ ├── equal_loc: ∅
- │ │ │ └── end_keyword_loc: (13,41)-(13,44) = "end"
- │ │ └── statements:
- │ │ @ StatementsNode (location: (13,46)-(13,51))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (13,46)-(13,51))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (13,46)-(13,51) = "break"
- │ ├── opening_loc: (13,4)-(13,5) = "{"
- │ └── closing_loc: (13,57)-(13,58) = "}"
- ├── @ CallNode (location: (15,0)-(15,55))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (15,0)-(15,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (15,4)-(15,55))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (15,6)-(15,53))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (15,6)-(15,53))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (15,6)-(15,11) = "while"
- │ │ ├── closing_loc: (15,50)-(15,53) = "end"
- │ │ ├── predicate:
- │ │ │ @ ClassNode (location: (15,12)-(15,41))
- │ │ │ ├── locals: [:a]
- │ │ │ ├── class_keyword_loc: (15,12)-(15,17) = "class"
- │ │ │ ├── constant_path:
- │ │ │ │ @ ConstantReadNode (location: (15,18)-(15,21))
- │ │ │ │ └── name: :Foo
- │ │ │ ├── inheritance_operator_loc: ∅
- │ │ │ ├── superclass: ∅
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (15,22)-(15,36))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableWriteNode (location: (15,22)-(15,36))
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── depth: 0
- │ │ │ │ ├── name_loc: (15,22)-(15,23) = "a"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CallNode (location: (15,26)-(15,36))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :tap
- │ │ │ │ │ ├── message_loc: (15,26)-(15,29) = "tap"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block:
- │ │ │ │ │ @ BlockNode (location: (15,30)-(15,36))
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ ├── opening_loc: (15,30)-(15,32) = "do"
- │ │ │ │ │ └── closing_loc: (15,33)-(15,36) = "end"
- │ │ │ │ └── operator_loc: (15,24)-(15,25) = "="
- │ │ │ ├── end_keyword_loc: (15,38)-(15,41) = "end"
- │ │ │ └── name: :Foo
- │ │ └── statements:
- │ │ @ StatementsNode (location: (15,43)-(15,48))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (15,43)-(15,48))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (15,43)-(15,48) = "break"
- │ ├── opening_loc: (15,4)-(15,5) = "{"
- │ └── closing_loc: (15,54)-(15,55) = "}"
- ├── @ CallNode (location: (17,0)-(17,56))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (17,0)-(17,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (17,4)-(17,56))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (17,6)-(17,54))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (17,6)-(17,54))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (17,6)-(17,11) = "while"
- │ │ ├── closing_loc: (17,51)-(17,54) = "end"
- │ │ ├── predicate:
- │ │ │ @ SingletonClassNode (location: (17,12)-(17,42))
- │ │ │ ├── locals: []
- │ │ │ ├── class_keyword_loc: (17,12)-(17,17) = "class"
- │ │ │ ├── operator_loc: (17,18)-(17,20) = "<<"
- │ │ │ ├── expression:
- │ │ │ │ @ SelfNode (location: (17,21)-(17,25))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (17,27)-(17,37))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (17,27)-(17,37))
- │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :tap
- │ │ │ │ ├── message_loc: (17,27)-(17,30) = "tap"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block:
- │ │ │ │ @ BlockNode (location: (17,31)-(17,37))
- │ │ │ │ ├── locals: []
- │ │ │ │ ├── parameters: ∅
- │ │ │ │ ├── body: ∅
- │ │ │ │ ├── opening_loc: (17,31)-(17,33) = "do"
- │ │ │ │ └── closing_loc: (17,34)-(17,37) = "end"
- │ │ │ └── end_keyword_loc: (17,39)-(17,42) = "end"
- │ │ └── statements:
- │ │ @ StatementsNode (location: (17,44)-(17,49))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (17,44)-(17,49))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (17,44)-(17,49) = "break"
- │ ├── opening_loc: (17,4)-(17,5) = "{"
- │ └── closing_loc: (17,55)-(17,56) = "}"
- ├── @ CallNode (location: (19,0)-(19,60))
- │ ├── flags: ignore_visibility
- │ ├── receiver: ∅
- │ ├── call_operator_loc: ∅
- │ ├── name: :tap
- │ ├── message_loc: (19,0)-(19,3) = "tap"
- │ ├── opening_loc: ∅
- │ ├── arguments: ∅
- │ ├── closing_loc: ∅
- │ └── block:
- │ @ BlockNode (location: (19,4)-(19,60))
- │ ├── locals: []
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (19,6)-(19,58))
- │ │ └── body: (length: 1)
- │ │ └── @ WhileNode (location: (19,6)-(19,58))
- │ │ ├── flags: ∅
- │ │ ├── keyword_loc: (19,6)-(19,11) = "while"
- │ │ ├── closing_loc: (19,55)-(19,58) = "end"
- │ │ ├── predicate:
- │ │ │ @ SingletonClassNode (location: (19,12)-(19,46))
- │ │ │ ├── locals: [:a]
- │ │ │ ├── class_keyword_loc: (19,12)-(19,17) = "class"
- │ │ │ ├── operator_loc: (19,18)-(19,20) = "<<"
- │ │ │ ├── expression:
- │ │ │ │ @ SelfNode (location: (19,21)-(19,25))
- │ │ │ ├── body:
- │ │ │ │ @ StatementsNode (location: (19,27)-(19,41))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ LocalVariableWriteNode (location: (19,27)-(19,41))
- │ │ │ │ ├── name: :a
- │ │ │ │ ├── depth: 0
- │ │ │ │ ├── name_loc: (19,27)-(19,28) = "a"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ CallNode (location: (19,31)-(19,41))
- │ │ │ │ │ ├── flags: ignore_visibility
- │ │ │ │ │ ├── receiver: ∅
- │ │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ │ ├── name: :tap
- │ │ │ │ │ ├── message_loc: (19,31)-(19,34) = "tap"
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── arguments: ∅
- │ │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ │ └── block:
- │ │ │ │ │ @ BlockNode (location: (19,35)-(19,41))
- │ │ │ │ │ ├── locals: []
- │ │ │ │ │ ├── parameters: ∅
- │ │ │ │ │ ├── body: ∅
- │ │ │ │ │ ├── opening_loc: (19,35)-(19,37) = "do"
- │ │ │ │ │ └── closing_loc: (19,38)-(19,41) = "end"
- │ │ │ │ └── operator_loc: (19,29)-(19,30) = "="
- │ │ │ └── end_keyword_loc: (19,43)-(19,46) = "end"
- │ │ └── statements:
- │ │ @ StatementsNode (location: (19,48)-(19,53))
- │ │ └── body: (length: 1)
- │ │ └── @ BreakNode (location: (19,48)-(19,53))
- │ │ ├── arguments: ∅
- │ │ └── keyword_loc: (19,48)-(19,53) = "break"
- │ ├── opening_loc: (19,4)-(19,5) = "{"
- │ └── closing_loc: (19,59)-(19,60) = "}"
- ├── @ WhileNode (location: (21,0)-(21,31))
- │ ├── flags: ∅
- │ ├── keyword_loc: (21,0)-(21,5) = "while"
- │ ├── closing_loc: (21,28)-(21,31) = "end"
- │ ├── predicate:
- │ │ @ DefNode (location: (21,6)-(21,26))
- │ │ ├── name: :foo
- │ │ ├── name_loc: (21,10)-(21,13) = "foo"
- │ │ ├── receiver: ∅
- │ │ ├── parameters: ∅
- │ │ ├── body:
- │ │ │ @ StatementsNode (location: (21,16)-(21,26))
- │ │ │ └── body: (length: 1)
- │ │ │ └── @ CallNode (location: (21,16)-(21,26))
- │ │ │ ├── flags: ignore_visibility
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── name: :bar
- │ │ │ ├── message_loc: (21,16)-(21,19) = "bar"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── block:
- │ │ │ @ BlockNode (location: (21,20)-(21,26))
- │ │ │ ├── locals: []
- │ │ │ ├── parameters: ∅
- │ │ │ ├── body: ∅
- │ │ │ ├── opening_loc: (21,20)-(21,22) = "do"
- │ │ │ └── closing_loc: (21,23)-(21,26) = "end"
- │ │ ├── locals: []
- │ │ ├── def_keyword_loc: (21,6)-(21,9) = "def"
- │ │ ├── operator_loc: ∅
- │ │ ├── lparen_loc: ∅
- │ │ ├── rparen_loc: ∅
- │ │ ├── equal_loc: (21,14)-(21,15) = "="
- │ │ └── end_keyword_loc: ∅
- │ └── statements: ∅
- └── @ WhileNode (location: (23,0)-(23,20))
- ├── flags: ∅
- ├── keyword_loc: (23,4)-(23,9) = "while"
- ├── closing_loc: ∅
- ├── predicate:
- │ @ MatchPredicateNode (location: (23,10)-(23,20))
- │ ├── value:
- │ │ @ CallNode (location: (23,10)-(23,13))
- │ │ ├── flags: variable_call, ignore_visibility
- │ │ ├── receiver: ∅
- │ │ ├── call_operator_loc: ∅
- │ │ ├── name: :bar
- │ │ ├── message_loc: (23,10)-(23,13) = "bar"
- │ │ ├── opening_loc: ∅
- │ │ ├── arguments: ∅
- │ │ ├── closing_loc: ∅
- │ │ └── block: ∅
- │ ├── pattern:
- │ │ @ LocalVariableTargetNode (location: (23,17)-(23,20))
- │ │ ├── name: :baz
- │ │ └── depth: 0
- │ └── operator_loc: (23,14)-(23,16) = "in"
- └── statements:
- @ StatementsNode (location: (23,0)-(23,3))
- └── body: (length: 1)
- └── @ CallNode (location: (23,0)-(23,3))
- ├── flags: variable_call, ignore_visibility
- ├── receiver: ∅
- ├── call_operator_loc: ∅
- ├── name: :foo
- ├── message_loc: (23,0)-(23,3) = "foo"
- ├── opening_loc: ∅
- ├── arguments: ∅
- ├── closing_loc: ∅
- └── block: ∅
diff --git a/test/prism/snapshots/whitequark/__ENCODING__.txt b/test/prism/snapshots/whitequark/__ENCODING__.txt
deleted file mode 100644
index 1b223bd8fe..0000000000
--- a/test/prism/snapshots/whitequark/__ENCODING__.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ 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
deleted file mode 100644
index 1b223bd8fe..0000000000
--- a/test/prism/snapshots/whitequark/__ENCODING___legacy_.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ 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
deleted file mode 100644
index 509ea2b633..0000000000
--- a/test/prism/snapshots/whitequark/alias.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ 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
deleted file mode 100644
index d13f816555..0000000000
--- a/test/prism/snapshots/whitequark/alias_gvar.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ 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
deleted file mode 100644
index c6a5c14934..0000000000
--- a/test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-@ 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
deleted file mode 100644
index d2e1b33c50..0000000000
--- a/test/prism/snapshots/whitequark/and.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-@ 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
deleted file mode 100644
index 5c7a9a2319..0000000000
--- a/test/prism/snapshots/whitequark/and_asgn.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index 05aff040cd..0000000000
--- a/test/prism/snapshots/whitequark/and_or_masgn.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-@ 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
deleted file mode 100644
index 92cf1504a9..0000000000
--- a/test/prism/snapshots/whitequark/anonymous_blockarg.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ 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
deleted file mode 100644
index 38fdb190f3..0000000000
--- a/test/prism/snapshots/whitequark/arg.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ 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
deleted file mode 100644
index 21dc1b7417..0000000000
--- a/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index b72ea59a5d..0000000000
--- a/test/prism/snapshots/whitequark/arg_label.txt
+++ /dev/null
@@ -1,115 +0,0 @@
-@ 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
deleted file mode 100644
index c04356b8ee..0000000000
--- a/test/prism/snapshots/whitequark/arg_scope.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index bc7ea8ad7d..0000000000
--- a/test/prism/snapshots/whitequark/args.txt
+++ /dev/null
@@ -1,1075 +0,0 @@
-@ 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
deleted file mode 100644
index d257a885ce..0000000000
--- a/test/prism/snapshots/whitequark/args_args_assocs.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-@ 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
deleted file mode 100644
index 2d986dd90a..0000000000
--- a/test/prism/snapshots/whitequark/args_args_assocs_comma.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ 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
deleted file mode 100644
index 09113a72b6..0000000000
--- a/test/prism/snapshots/whitequark/args_args_comma.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index 26c9e72da3..0000000000
--- a/test/prism/snapshots/whitequark/args_args_star.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-@ 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
deleted file mode 100644
index 47cb68d899..0000000000
--- a/test/prism/snapshots/whitequark/args_assocs.txt
+++ /dev/null
@@ -1,195 +0,0 @@
-@ 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
deleted file mode 100644
index 64a25bbc45..0000000000
--- a/test/prism/snapshots/whitequark/args_assocs_comma.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index 47cb68d899..0000000000
--- a/test/prism/snapshots/whitequark/args_assocs_legacy.txt
+++ /dev/null
@@ -1,195 +0,0 @@
-@ 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
deleted file mode 100644
index 99ffa81934..0000000000
--- a/test/prism/snapshots/whitequark/args_block_pass.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ 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
deleted file mode 100644
index 0089e56157..0000000000
--- a/test/prism/snapshots/whitequark/args_cmd.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ 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
deleted file mode 100644
index c19577f106..0000000000
--- a/test/prism/snapshots/whitequark/args_star.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-@ 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
deleted file mode 100644
index 3747e3f7d8..0000000000
--- a/test/prism/snapshots/whitequark/array_assocs.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index b183a7ac6b..0000000000
--- a/test/prism/snapshots/whitequark/array_plain.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ 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
deleted file mode 100644
index f76563e9f4..0000000000
--- a/test/prism/snapshots/whitequark/array_splat.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-@ 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
deleted file mode 100644
index 0662f01af1..0000000000
--- a/test/prism/snapshots/whitequark/array_symbols.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ 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
deleted file mode 100644
index 1068ba6d0e..0000000000
--- a/test/prism/snapshots/whitequark/array_symbols_empty.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ 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
deleted file mode 100644
index 2437486b43..0000000000
--- a/test/prism/snapshots/whitequark/array_symbols_interp.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ 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
deleted file mode 100644
index 84121de355..0000000000
--- a/test/prism/snapshots/whitequark/array_words.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ 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
deleted file mode 100644
index e4dba94cdf..0000000000
--- a/test/prism/snapshots/whitequark/array_words_empty.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ 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
deleted file mode 100644
index c3ae9a0cf8..0000000000
--- a/test/prism/snapshots/whitequark/array_words_interp.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-@ 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
deleted file mode 100644
index 4a3c36680b..0000000000
--- a/test/prism/snapshots/whitequark/asgn_cmd.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ 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
deleted file mode 100644
index 41d5bdc5bf..0000000000
--- a/test/prism/snapshots/whitequark/asgn_mrhs.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-@ 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
deleted file mode 100644
index ea6b76faf7..0000000000
--- a/test/prism/snapshots/whitequark/back_ref.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ 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
deleted file mode 100644
index 997a8718c5..0000000000
--- a/test/prism/snapshots/whitequark/bang.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ 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
deleted file mode 100644
index e487da5e57..0000000000
--- a/test/prism/snapshots/whitequark/bang_cmd.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index b0c03c1754..0000000000
--- a/test/prism/snapshots/whitequark/begin_cmdarg.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ 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
deleted file mode 100644
index 69db24a127..0000000000
--- a/test/prism/snapshots/whitequark/beginless_erange_after_newline.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-@ 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
deleted file mode 100644
index cbc11c83c1..0000000000
--- a/test/prism/snapshots/whitequark/beginless_irange_after_newline.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-@ 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
deleted file mode 100644
index 59e6f135ad..0000000000
--- a/test/prism/snapshots/whitequark/beginless_range.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-@ 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
deleted file mode 100644
index 70b054e073..0000000000
--- a/test/prism/snapshots/whitequark/blockarg.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 149c3765c9..0000000000
--- a/test/prism/snapshots/whitequark/blockargs.txt
+++ /dev/null
@@ -1,1339 +0,0 @@
-@ 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
deleted file mode 100644
index 42f9a49c5c..0000000000
--- a/test/prism/snapshots/whitequark/bug_435.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ 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
deleted file mode 100644
index 7291d01175..0000000000
--- a/test/prism/snapshots/whitequark/bug_447.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ 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
deleted file mode 100644
index e1ea52fbd1..0000000000
--- a/test/prism/snapshots/whitequark/bug_452.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-@ 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
deleted file mode 100644
index 4167c223f2..0000000000
--- a/test/prism/snapshots/whitequark/bug_466.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-@ 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
deleted file mode 100644
index 028b6a517c..0000000000
--- a/test/prism/snapshots/whitequark/bug_473.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index ed6ba40795..0000000000
--- a/test/prism/snapshots/whitequark/bug_480.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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
deleted file mode 100644
index 0b093d483c..0000000000
--- a/test/prism/snapshots/whitequark/bug_481.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ 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
deleted file mode 100644
index 7aa8694f66..0000000000
--- a/test/prism/snapshots/whitequark/bug_ascii_8bit_in_literal.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ 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
deleted file mode 100644
index 50c988fa1f..0000000000
--- a/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ 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
deleted file mode 100644
index 32d05746a7..0000000000
--- a/test/prism/snapshots/whitequark/bug_cmdarg.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-@ 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
deleted file mode 100644
index 1b45d0132b..0000000000
--- a/test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ 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
deleted file mode 100644
index 9b95adda35..0000000000
--- a/test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ 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
deleted file mode 100644
index 3946bc1a4a..0000000000
--- a/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ 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
deleted file mode 100644
index 183d465439..0000000000
--- a/test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt
+++ /dev/null
@@ -1,383 +0,0 @@
-@ 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
deleted file mode 100644
index bf4dd645fb..0000000000
--- a/test/prism/snapshots/whitequark/bug_heredoc_do.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ 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
deleted file mode 100644
index 74af8607e0..0000000000
--- a/test/prism/snapshots/whitequark/bug_interp_single.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index 7178345a22..0000000000
--- a/test/prism/snapshots/whitequark/bug_lambda_leakage.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index 4464b66e38..0000000000
--- a/test/prism/snapshots/whitequark/bug_regex_verification.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ 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
deleted file mode 100644
index 52734cc1e9..0000000000
--- a/test/prism/snapshots/whitequark/bug_rescue_empty_else.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ 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
deleted file mode 100644
index aa8aa11ccc..0000000000
--- a/test/prism/snapshots/whitequark/bug_while_not_parens_do.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ 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
deleted file mode 100644
index fbe17eaf8f..0000000000
--- a/test/prism/snapshots/whitequark/case_cond.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index b1aff2450e..0000000000
--- a/test/prism/snapshots/whitequark/case_cond_else.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-@ 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
deleted file mode 100644
index 23054ed132..0000000000
--- a/test/prism/snapshots/whitequark/case_expr.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index 0624d97c84..0000000000
--- a/test/prism/snapshots/whitequark/case_expr_else.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-@ 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
deleted file mode 100644
index 42b90be061..0000000000
--- a/test/prism/snapshots/whitequark/casgn_scoped.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-@ 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
deleted file mode 100644
index 070d90a46b..0000000000
--- a/test/prism/snapshots/whitequark/casgn_toplevel.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ 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
deleted file mode 100644
index f535cafdc6..0000000000
--- a/test/prism/snapshots/whitequark/casgn_unscoped.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ 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
deleted file mode 100644
index b70f05b544..0000000000
--- a/test/prism/snapshots/whitequark/character.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ 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
deleted file mode 100644
index e38bec6c47..0000000000
--- a/test/prism/snapshots/whitequark/class.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index ea8bbd70d9..0000000000
--- a/test/prism/snapshots/whitequark/class_super.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ 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
deleted file mode 100644
index c873ea0c12..0000000000
--- a/test/prism/snapshots/whitequark/class_super_label.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ 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
deleted file mode 100644
index e33f798ef5..0000000000
--- a/test/prism/snapshots/whitequark/comments_before_leading_dot__27.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-@ 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
deleted file mode 100644
index e688585a5f..0000000000
--- a/test/prism/snapshots/whitequark/complex.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index e349c198a5..0000000000
--- a/test/prism/snapshots/whitequark/cond_begin.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ 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
deleted file mode 100644
index b4e6d8682c..0000000000
--- a/test/prism/snapshots/whitequark/cond_begin_masgn.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ 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
deleted file mode 100644
index 18fee58492..0000000000
--- a/test/prism/snapshots/whitequark/cond_eflipflop.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-@ 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
deleted file mode 100644
index 05972521e8..0000000000
--- a/test/prism/snapshots/whitequark/cond_eflipflop_with_beginless_range.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index c85ff292a5..0000000000
--- a/test/prism/snapshots/whitequark/cond_eflipflop_with_endless_range.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index f76a6636f6..0000000000
--- a/test/prism/snapshots/whitequark/cond_iflipflop.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-@ 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
deleted file mode 100644
index 63b87ffd49..0000000000
--- a/test/prism/snapshots/whitequark/cond_iflipflop_with_beginless_range.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index 328a2da153..0000000000
--- a/test/prism/snapshots/whitequark/cond_iflipflop_with_endless_range.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index 700d0966f7..0000000000
--- a/test/prism/snapshots/whitequark/cond_match_current_line.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index 71df6208d2..0000000000
--- a/test/prism/snapshots/whitequark/const_op_asgn.txt
+++ /dev/null
@@ -1,97 +0,0 @@
-@ 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
deleted file mode 100644
index 83af4b187b..0000000000
--- a/test/prism/snapshots/whitequark/const_scoped.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-@ 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
deleted file mode 100644
index 3d7df5defc..0000000000
--- a/test/prism/snapshots/whitequark/const_toplevel.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@ 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
deleted file mode 100644
index 5e272e1775..0000000000
--- a/test/prism/snapshots/whitequark/const_unscoped.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ 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
deleted file mode 100644
index e801456bf7..0000000000
--- a/test/prism/snapshots/whitequark/cpath.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 7847ce4495..0000000000
--- a/test/prism/snapshots/whitequark/cvar.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ 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
deleted file mode 100644
index f3eceed4a4..0000000000
--- a/test/prism/snapshots/whitequark/cvasgn.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ 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
deleted file mode 100644
index 67896b2415..0000000000
--- a/test/prism/snapshots/whitequark/dedenting_heredoc.txt
+++ /dev/null
@@ -1,496 +0,0 @@
-@ 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
deleted file mode 100644
index 8d093fdab6..0000000000
--- a/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ 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
deleted file mode 100644
index d43d313e6b..0000000000
--- a/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ 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
deleted file mode 100644
index d5e1139c4d..0000000000
--- a/test/prism/snapshots/whitequark/def.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-@ 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
deleted file mode 100644
index 5e05870b21..0000000000
--- a/test/prism/snapshots/whitequark/defined.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ 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
deleted file mode 100644
index 616cca6155..0000000000
--- a/test/prism/snapshots/whitequark/defs.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-@ 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
deleted file mode 100644
index 3a21ce5559..0000000000
--- a/test/prism/snapshots/whitequark/empty_stmt.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-@ 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
deleted file mode 100644
index 28ec3843bb..0000000000
--- a/test/prism/snapshots/whitequark/endless_comparison_method.txt
+++ /dev/null
@@ -1,221 +0,0 @@
-@ 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
deleted file mode 100644
index 17d3873b66..0000000000
--- a/test/prism/snapshots/whitequark/endless_method.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-@ 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
deleted file mode 100644
index 4ec57ccd35..0000000000
--- a/test/prism/snapshots/whitequark/endless_method_command_syntax.txt
+++ /dev/null
@@ -1,394 +0,0 @@
-@ 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
deleted file mode 100644
index 64a3ffa252..0000000000
--- a/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ 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
deleted file mode 100644
index 2284b24354..0000000000
--- a/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ 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
deleted file mode 100644
index a7a9c93ef3..0000000000
--- a/test/prism/snapshots/whitequark/endless_method_without_args.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-@ 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
deleted file mode 100644
index a48d2370e8..0000000000
--- a/test/prism/snapshots/whitequark/ensure.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-@ 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
deleted file mode 100644
index 0bab5d80c3..0000000000
--- a/test/prism/snapshots/whitequark/ensure_empty.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ 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
deleted file mode 100644
index 00562f703a..0000000000
--- a/test/prism/snapshots/whitequark/false.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ 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
deleted file mode 100644
index 5e6a597db7..0000000000
--- a/test/prism/snapshots/whitequark/float.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@ 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
deleted file mode 100644
index fec8bdfd64..0000000000
--- a/test/prism/snapshots/whitequark/for.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-@ 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
deleted file mode 100644
index 42d8fa2258..0000000000
--- a/test/prism/snapshots/whitequark/for_mlhs.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ 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
deleted file mode 100644
index 17504c64e0..0000000000
--- a/test/prism/snapshots/whitequark/forward_arg.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ 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
deleted file mode 100644
index 7e58260b58..0000000000
--- a/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt
+++ /dev/null
@@ -1,404 +0,0 @@
-@ 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
deleted file mode 100644
index f46967ba50..0000000000
--- a/test/prism/snapshots/whitequark/forward_args_legacy.txt
+++ /dev/null
@@ -1,99 +0,0 @@
-@ 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
deleted file mode 100644
index acaf9c052d..0000000000
--- a/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ 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
deleted file mode 100644
index 367fad7fec..0000000000
--- a/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ 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
deleted file mode 100644
index b4235fb20a..0000000000
--- a/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-@ 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
deleted file mode 100644
index 33779abcc1..0000000000
--- a/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-@ 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
deleted file mode 100644
index 17ff8894af..0000000000
--- a/test/prism/snapshots/whitequark/forwarded_restarg.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ 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
deleted file mode 100644
index f4401c4389..0000000000
--- a/test/prism/snapshots/whitequark/gvar.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ 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
deleted file mode 100644
index fc044054d8..0000000000
--- a/test/prism/snapshots/whitequark/gvasgn.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ 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
deleted file mode 100644
index 38a2c15a9a..0000000000
--- a/test/prism/snapshots/whitequark/hash_empty.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@ 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
deleted file mode 100644
index e661a7b048..0000000000
--- a/test/prism/snapshots/whitequark/hash_hashrocket.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ 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
deleted file mode 100644
index a5d12174cc..0000000000
--- a/test/prism/snapshots/whitequark/hash_kwsplat.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ 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
deleted file mode 100644
index fdf7a21ed0..0000000000
--- a/test/prism/snapshots/whitequark/hash_label.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ 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
deleted file mode 100644
index 88b70d38e2..0000000000
--- a/test/prism/snapshots/whitequark/hash_label_end.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-@ 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
deleted file mode 100644
index 455ba48407..0000000000
--- a/test/prism/snapshots/whitequark/hash_pair_value_omission.txt
+++ /dev/null
@@ -1,97 +0,0 @@
-@ 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
deleted file mode 100644
index 86543097ee..0000000000
--- a/test/prism/snapshots/whitequark/heredoc.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-@ 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
deleted file mode 100644
index 809a100f8c..0000000000
--- a/test/prism/snapshots/whitequark/if.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-@ 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
deleted file mode 100644
index c7dab47f13..0000000000
--- a/test/prism/snapshots/whitequark/if_else.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-@ 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
deleted file mode 100644
index 1bd1ab7f42..0000000000
--- a/test/prism/snapshots/whitequark/if_elsif.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-@ 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
deleted file mode 100644
index c76a93574d..0000000000
--- a/test/prism/snapshots/whitequark/if_masgn__24.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ 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
deleted file mode 100644
index 241918f020..0000000000
--- a/test/prism/snapshots/whitequark/if_mod.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index fbbafe7390..0000000000
--- a/test/prism/snapshots/whitequark/if_nl_then.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index 6fee32f117..0000000000
--- a/test/prism/snapshots/whitequark/int.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ 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
deleted file mode 100644
index bf2ea47102..0000000000
--- a/test/prism/snapshots/whitequark/int___LINE__.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ 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
deleted file mode 100644
index 09d9098105..0000000000
--- a/test/prism/snapshots/whitequark/interp_digit_var.txt
+++ /dev/null
@@ -1,273 +0,0 @@
-@ 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
deleted file mode 100644
index 9c70e6e959..0000000000
--- a/test/prism/snapshots/whitequark/ivar.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ 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
deleted file mode 100644
index 2b57f39554..0000000000
--- a/test/prism/snapshots/whitequark/ivasgn.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@ 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
deleted file mode 100644
index 446b45b56b..0000000000
--- a/test/prism/snapshots/whitequark/keyword_argument_omission.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-@ 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
deleted file mode 100644
index 5969402356..0000000000
--- a/test/prism/snapshots/whitequark/kwarg.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-@ 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
deleted file mode 100644
index 376e628f8e..0000000000
--- a/test/prism/snapshots/whitequark/kwbegin_compstmt.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index 492f817696..0000000000
--- a/test/prism/snapshots/whitequark/kwnilarg.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-@ 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
deleted file mode 100644
index 9c2c4f9c4c..0000000000
--- a/test/prism/snapshots/whitequark/kwoptarg.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index db281e2f0d..0000000000
--- a/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ 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
deleted file mode 100644
index d24426aed5..0000000000
--- a/test/prism/snapshots/whitequark/kwrestarg_named.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index d471e5ab09..0000000000
--- a/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index f877fcd270..0000000000
--- a/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ 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
deleted file mode 100644
index afddc9cd3c..0000000000
--- a/test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ 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
deleted file mode 100644
index afceb6a1a4..0000000000
--- a/test/prism/snapshots/whitequark/lvar.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ 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
deleted file mode 100644
index 0d1df23d0d..0000000000
--- a/test/prism/snapshots/whitequark/lvar_injecting_match.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ 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
deleted file mode 100644
index be35c00587..0000000000
--- a/test/prism/snapshots/whitequark/lvasgn.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ 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
deleted file mode 100644
index 32e46bfdf7..0000000000
--- a/test/prism/snapshots/whitequark/masgn.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-@ 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
deleted file mode 100644
index f4f4276597..0000000000
--- a/test/prism/snapshots/whitequark/masgn_attr.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-@ 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
deleted file mode 100644
index 1c62658ab2..0000000000
--- a/test/prism/snapshots/whitequark/masgn_cmd.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ 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
deleted file mode 100644
index ddfccb0d8b..0000000000
--- a/test/prism/snapshots/whitequark/masgn_const.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index 3e4602472f..0000000000
--- a/test/prism/snapshots/whitequark/masgn_nested.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-@ 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
deleted file mode 100644
index 0db040a3ab..0000000000
--- a/test/prism/snapshots/whitequark/masgn_splat.txt
+++ /dev/null
@@ -1,284 +0,0 @@
-@ 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
deleted file mode 100644
index 87348c4ec9..0000000000
--- a/test/prism/snapshots/whitequark/module.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ 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
deleted file mode 100644
index afa3517e11..0000000000
--- a/test/prism/snapshots/whitequark/multiple_pattern_matches.txt
+++ /dev/null
@@ -1,173 +0,0 @@
-@ 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
deleted file mode 100644
index 7ef006645b..0000000000
--- a/test/prism/snapshots/whitequark/newline_in_hash_argument.txt
+++ /dev/null
@@ -1,163 +0,0 @@
-@ 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
deleted file mode 100644
index 15774c02fd..0000000000
--- a/test/prism/snapshots/whitequark/nil.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ 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
deleted file mode 100644
index 7421115611..0000000000
--- a/test/prism/snapshots/whitequark/nil_expression.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ 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
deleted file mode 100644
index 584e997df2..0000000000
--- a/test/prism/snapshots/whitequark/non_lvar_injecting_match.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index 0a6d60e502..0000000000
--- a/test/prism/snapshots/whitequark/not.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ 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
deleted file mode 100644
index 3b111272c6..0000000000
--- a/test/prism/snapshots/whitequark/not_cmd.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index 90124c3866..0000000000
--- a/test/prism/snapshots/whitequark/not_masgn__24.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-@ 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
deleted file mode 100644
index 1d386d518b..0000000000
--- a/test/prism/snapshots/whitequark/nth_ref.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ 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
deleted file mode 100644
index 56419adccd..0000000000
--- a/test/prism/snapshots/whitequark/numbered_args_after_27.txt
+++ /dev/null
@@ -1,143 +0,0 @@
-@ 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
deleted file mode 100644
index d79aedf7f9..0000000000
--- a/test/prism/snapshots/whitequark/numparam_outside_block.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-@ 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
deleted file mode 100644
index 396238cbbf..0000000000
--- a/test/prism/snapshots/whitequark/numparam_ruby_bug_19025.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ 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
deleted file mode 100644
index f726617904..0000000000
--- a/test/prism/snapshots/whitequark/op_asgn.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-@ 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
deleted file mode 100644
index d2d86b1bf9..0000000000
--- a/test/prism/snapshots/whitequark/op_asgn_cmd.txt
+++ /dev/null
@@ -1,177 +0,0 @@
-@ 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
deleted file mode 100644
index b302abdafe..0000000000
--- a/test/prism/snapshots/whitequark/op_asgn_index.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index 319ed1a51a..0000000000
--- a/test/prism/snapshots/whitequark/op_asgn_index_cmd.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-@ 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
deleted file mode 100644
index 695ed827ad..0000000000
--- a/test/prism/snapshots/whitequark/optarg.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-@ 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
deleted file mode 100644
index 439146b8db..0000000000
--- a/test/prism/snapshots/whitequark/or.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-@ 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
deleted file mode 100644
index c0ded24b93..0000000000
--- a/test/prism/snapshots/whitequark/or_asgn.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index f158f255b9..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_272.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ 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
deleted file mode 100644
index 9e4cd2bd15..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_490.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-@ 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
deleted file mode 100644
index 7e5fc9ee35..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_507.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ 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
deleted file mode 100644
index b63fbb8284..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_518.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-@ 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
deleted file mode 100644
index 3a31a97cdc..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_525.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-@ 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
deleted file mode 100644
index 2577e3bc55..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_604.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ 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
deleted file mode 100644
index 157576838b..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_640.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-@ 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
deleted file mode 100644
index 5700f3c3db..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_645.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ 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
deleted file mode 100644
index e52b291d6a..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_830.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ 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
deleted file mode 100644
index c241d6127f..0000000000
--- a/test/prism/snapshots/whitequark/parser_bug_989.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ 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
deleted file mode 100644
index 018d7916a6..0000000000
--- a/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-@ 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
deleted file mode 100644
index 080d4d0e7d..0000000000
--- a/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt
+++ /dev/null
@@ -1,139 +0,0 @@
-@ 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
deleted file mode 100644
index 6f315780ad..0000000000
--- a/test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-@ 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
deleted file mode 100644
index 6015c000a9..0000000000
--- a/test/prism/snapshots/whitequark/pattern_matching_blank_else.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 7f83aafe99..0000000000
--- a/test/prism/snapshots/whitequark/pattern_matching_else.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ 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
deleted file mode 100644
index 2396172dce..0000000000
--- a/test/prism/snapshots/whitequark/pattern_matching_single_line.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-@ 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
deleted file mode 100644
index 757a7780c2..0000000000
--- a/test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
+++ /dev/null
@@ -1,249 +0,0 @@
-@ 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
deleted file mode 100644
index 6f27327063..0000000000
--- a/test/prism/snapshots/whitequark/postexe.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ 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
deleted file mode 100644
index 5e4b88d096..0000000000
--- a/test/prism/snapshots/whitequark/preexe.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-@ 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
deleted file mode 100644
index 378c7e5b36..0000000000
--- a/test/prism/snapshots/whitequark/procarg0.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-@ 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
deleted file mode 100644
index f74077ce67..0000000000
--- a/test/prism/snapshots/whitequark/range_exclusive.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ 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
deleted file mode 100644
index 1836312033..0000000000
--- a/test/prism/snapshots/whitequark/range_inclusive.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-@ 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
deleted file mode 100644
index 90bbd17929..0000000000
--- a/test/prism/snapshots/whitequark/rational.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ 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
deleted file mode 100644
index 0a6db4cfdf..0000000000
--- a/test/prism/snapshots/whitequark/regex_interp.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index df771f7a21..0000000000
--- a/test/prism/snapshots/whitequark/regex_plain.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ 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
deleted file mode 100644
index 52fcfd02e0..0000000000
--- a/test/prism/snapshots/whitequark/resbody_list.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-@ 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
deleted file mode 100644
index d48ddb120d..0000000000
--- a/test/prism/snapshots/whitequark/resbody_list_mrhs.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ 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
deleted file mode 100644
index 85efb1a3de..0000000000
--- a/test/prism/snapshots/whitequark/resbody_list_var.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-@ 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
deleted file mode 100644
index e12d921c75..0000000000
--- a/test/prism/snapshots/whitequark/resbody_var.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-@ 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
deleted file mode 100644
index 28c4f11e67..0000000000
--- a/test/prism/snapshots/whitequark/rescue.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-@ 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
deleted file mode 100644
index 36b01a7ef6..0000000000
--- a/test/prism/snapshots/whitequark/rescue_else.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index d97821931b..0000000000
--- a/test/prism/snapshots/whitequark/rescue_else_ensure.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-@ 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
deleted file mode 100644
index f6cddbcc5e..0000000000
--- a/test/prism/snapshots/whitequark/rescue_ensure.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index 2ab854cdd7..0000000000
--- a/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-@ 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
deleted file mode 100644
index cd4f0fff45..0000000000
--- a/test/prism/snapshots/whitequark/rescue_mod.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-@ 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
deleted file mode 100644
index ee094138e5..0000000000
--- a/test/prism/snapshots/whitequark/rescue_mod_asgn.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ 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
deleted file mode 100644
index dbe289702f..0000000000
--- a/test/prism/snapshots/whitequark/rescue_mod_masgn.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index 840e5a4fc0..0000000000
--- a/test/prism/snapshots/whitequark/rescue_mod_op_assign.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ 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
deleted file mode 100644
index 4281442ab2..0000000000
--- a/test/prism/snapshots/whitequark/rescue_without_begin_end.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index fab9dd9a79..0000000000
--- a/test/prism/snapshots/whitequark/restarg_named.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 077230f7ba..0000000000
--- a/test/prism/snapshots/whitequark/restarg_unnamed.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 5c98259103..0000000000
--- a/test/prism/snapshots/whitequark/return.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-@ 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
deleted file mode 100644
index 36746a361b..0000000000
--- a/test/prism/snapshots/whitequark/return_block.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ 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
deleted file mode 100644
index 66684350a4..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_10279.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ 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
deleted file mode 100644
index 400a8c2861..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_10653.txt
+++ /dev/null
@@ -1,173 +0,0 @@
-@ 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
deleted file mode 100644
index 36ece50d88..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_11107.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ 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
deleted file mode 100644
index d5ec10b06c..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_11380.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ 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
deleted file mode 100644
index 2999662cc4..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_11873.txt
+++ /dev/null
@@ -1,767 +0,0 @@
-@ 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
deleted file mode 100644
index 93418e6448..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt
+++ /dev/null
@@ -1,1231 +0,0 @@
-@ 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
deleted file mode 100644
index 6aa8e55e54..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-@ 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
deleted file mode 100644
index fe17087e53..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_11989.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-@ 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
deleted file mode 100644
index 0a5fba1482..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_11990.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-@ 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
deleted file mode 100644
index 2b4d3eab2a..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_12073.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-@ 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
deleted file mode 100644
index 4935007f8a..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_12402.txt
+++ /dev/null
@@ -1,565 +0,0 @@
-@ 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
deleted file mode 100644
index 6151143ba8..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_12669.txt
+++ /dev/null
@@ -1,133 +0,0 @@
-@ 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
deleted file mode 100644
index 427c96bbe0..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_12686.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ 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
deleted file mode 100644
index eae9587ea0..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_13547.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 36629797db..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_14690.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index db8bc1401f..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_15789.txt
+++ /dev/null
@@ -1,120 +0,0 @@
-@ 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
deleted file mode 100644
index 910b08c3ef..0000000000
--- a/test/prism/snapshots/whitequark/ruby_bug_9669.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-@ 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
deleted file mode 100644
index 53188a7b8a..0000000000
--- a/test/prism/snapshots/whitequark/sclass.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ 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
deleted file mode 100644
index c69f8fa8c5..0000000000
--- a/test/prism/snapshots/whitequark/self.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ 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
deleted file mode 100644
index 1d09daa4a6..0000000000
--- a/test/prism/snapshots/whitequark/send_attr_asgn.txt
+++ /dev/null
@@ -1,105 +0,0 @@
-@ 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
deleted file mode 100644
index 3cec95ae7c..0000000000
--- a/test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 540a7681dc..0000000000
--- a/test/prism/snapshots/whitequark/send_binary_op.txt
+++ /dev/null
@@ -1,551 +0,0 @@
-@ 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
deleted file mode 100644
index 4013888882..0000000000
--- a/test/prism/snapshots/whitequark/send_block_chain_cmd.txt
+++ /dev/null
@@ -1,325 +0,0 @@
-@ 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
deleted file mode 100644
index 826d3c8464..0000000000
--- a/test/prism/snapshots/whitequark/send_block_conditional.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-@ 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
deleted file mode 100644
index 48063e0121..0000000000
--- a/test/prism/snapshots/whitequark/send_call.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ 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
deleted file mode 100644
index 7b402d9ef2..0000000000
--- a/test/prism/snapshots/whitequark/send_conditional.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-@ 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
deleted file mode 100644
index 6c9e08f2ea..0000000000
--- a/test/prism/snapshots/whitequark/send_index.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index 9d2e6efcb6..0000000000
--- a/test/prism/snapshots/whitequark/send_index_asgn.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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
deleted file mode 100644
index 9d2e6efcb6..0000000000
--- a/test/prism/snapshots/whitequark/send_index_asgn_legacy.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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
deleted file mode 100644
index 0a41fd051d..0000000000
--- a/test/prism/snapshots/whitequark/send_index_cmd.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ 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
deleted file mode 100644
index 6c9e08f2ea..0000000000
--- a/test/prism/snapshots/whitequark/send_index_legacy.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index bf21700539..0000000000
--- a/test/prism/snapshots/whitequark/send_lambda.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index f61f622bdd..0000000000
--- a/test/prism/snapshots/whitequark/send_lambda_args.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ 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
deleted file mode 100644
index 747656af6b..0000000000
--- a/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ 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
deleted file mode 100644
index 34a63ec503..0000000000
--- a/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index 3a64e941b6..0000000000
--- a/test/prism/snapshots/whitequark/send_lambda_legacy.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-@ 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
deleted file mode 100644
index 05966fc5a3..0000000000
--- a/test/prism/snapshots/whitequark/send_op_asgn_conditional.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index be57bee5a0..0000000000
--- a/test/prism/snapshots/whitequark/send_plain.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-@ 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
deleted file mode 100644
index 59236e114d..0000000000
--- a/test/prism/snapshots/whitequark/send_plain_cmd.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-@ 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
deleted file mode 100644
index 41fd822110..0000000000
--- a/test/prism/snapshots/whitequark/send_self.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-@ 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
deleted file mode 100644
index c92935603b..0000000000
--- a/test/prism/snapshots/whitequark/send_self_block.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-@ 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
deleted file mode 100644
index 8ca1de7968..0000000000
--- a/test/prism/snapshots/whitequark/send_unary_op.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-@ 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
deleted file mode 100644
index ba1fce0c68..0000000000
--- a/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index 55750d2b61..0000000000
--- a/test/prism/snapshots/whitequark/space_args_arg.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index a6224bcca1..0000000000
--- a/test/prism/snapshots/whitequark/space_args_arg_block.txt
+++ /dev/null
@@ -1,109 +0,0 @@
-@ 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
deleted file mode 100644
index 767b099a8b..0000000000
--- a/test/prism/snapshots/whitequark/space_args_arg_call.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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
deleted file mode 100644
index 7727a5ddd9..0000000000
--- a/test/prism/snapshots/whitequark/space_args_arg_newline.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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
deleted file mode 100644
index 62b549a674..0000000000
--- a/test/prism/snapshots/whitequark/space_args_block.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ 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
deleted file mode 100644
index 8a75bef6a8..0000000000
--- a/test/prism/snapshots/whitequark/space_args_cmd.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-@ 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
deleted file mode 100644
index a12499a631..0000000000
--- a/test/prism/snapshots/whitequark/string___FILE__.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-@ 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
deleted file mode 100644
index f7f7bf9723..0000000000
--- a/test/prism/snapshots/whitequark/string_concat.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-@ 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
deleted file mode 100644
index 9d04232580..0000000000
--- a/test/prism/snapshots/whitequark/string_dvar.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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
deleted file mode 100644
index 597e8c5d5b..0000000000
--- a/test/prism/snapshots/whitequark/string_interp.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-@ 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
deleted file mode 100644
index 7534ac1844..0000000000
--- a/test/prism/snapshots/whitequark/string_plain.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ 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
deleted file mode 100644
index 132b4912e4..0000000000
--- a/test/prism/snapshots/whitequark/super.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-@ 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
deleted file mode 100644
index d9ce7b86be..0000000000
--- a/test/prism/snapshots/whitequark/super_block.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-@ 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
deleted file mode 100644
index a9b8dfcb63..0000000000
--- a/test/prism/snapshots/whitequark/symbol_interp.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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
deleted file mode 100644
index a2466600f5..0000000000
--- a/test/prism/snapshots/whitequark/symbol_plain.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-@ 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
deleted file mode 100644
index fa637ffb4e..0000000000
--- a/test/prism/snapshots/whitequark/ternary.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-@ 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
deleted file mode 100644
index 833afcff42..0000000000
--- a/test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ 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
deleted file mode 100644
index e12dad132b..0000000000
--- a/test/prism/snapshots/whitequark/trailing_forward_arg.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-@ 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
deleted file mode 100644
index 3e1ceef586..0000000000
--- a/test/prism/snapshots/whitequark/true.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-@ 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
deleted file mode 100644
index e14b0567e7..0000000000
--- a/test/prism/snapshots/whitequark/unary_num_pow_precedence.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-@ 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
deleted file mode 100644
index 163cc2e867..0000000000
--- a/test/prism/snapshots/whitequark/undef.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-@ 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
deleted file mode 100644
index a3bbbe69c8..0000000000
--- a/test/prism/snapshots/whitequark/unless.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-@ 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
deleted file mode 100644
index f4f95379e5..0000000000
--- a/test/prism/snapshots/whitequark/unless_else.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-@ 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
deleted file mode 100644
index d4dfda6b2c..0000000000
--- a/test/prism/snapshots/whitequark/unless_mod.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-@ 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
deleted file mode 100644
index e5f60a2cf7..0000000000
--- a/test/prism/snapshots/whitequark/until.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-@ 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
deleted file mode 100644
index 0b7e2360b5..0000000000
--- a/test/prism/snapshots/whitequark/until_mod.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ 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
deleted file mode 100644
index 5b282c363b..0000000000
--- a/test/prism/snapshots/whitequark/until_post.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ 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
deleted file mode 100644
index a3c90f804c..0000000000
--- a/test/prism/snapshots/whitequark/var_and_asgn.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ 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
deleted file mode 100644
index f20f612fa2..0000000000
--- a/test/prism/snapshots/whitequark/var_op_asgn.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-@ 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
deleted file mode 100644
index 0bfa06d5b7..0000000000
--- a/test/prism/snapshots/whitequark/var_op_asgn_cmd.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-@ 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
deleted file mode 100644
index a0531d2c30..0000000000
--- a/test/prism/snapshots/whitequark/var_or_asgn.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@ 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
deleted file mode 100644
index 1c399b642d..0000000000
--- a/test/prism/snapshots/whitequark/when_multi.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-@ 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
deleted file mode 100644
index 351631714e..0000000000
--- a/test/prism/snapshots/whitequark/when_splat.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-@ 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
deleted file mode 100644
index eb6f261ba4..0000000000
--- a/test/prism/snapshots/whitequark/when_then.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-@ 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
deleted file mode 100644
index 72f9971fe5..0000000000
--- a/test/prism/snapshots/whitequark/while.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-@ 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
deleted file mode 100644
index 50a8f84d81..0000000000
--- a/test/prism/snapshots/whitequark/while_mod.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-@ 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
deleted file mode 100644
index 63c6c84a24..0000000000
--- a/test/prism/snapshots/whitequark/while_post.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-@ 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
deleted file mode 100644
index 0676ea9683..0000000000
--- a/test/prism/snapshots/whitequark/xstring_interp.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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
deleted file mode 100644
index 97084286d9..0000000000
--- a/test/prism/snapshots/whitequark/xstring_plain.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ 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
deleted file mode 100644
index 2b37dd479f..0000000000
--- a/test/prism/snapshots/whitequark/yield.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-@ 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
deleted file mode 100644
index 9c28128d06..0000000000
--- a/test/prism/snapshots/whitequark/zsuper.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,5))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,5))
- └── body: (length: 1)
- └── @ ForwardingSuperNode (location: (1,0)-(1,5))
- └── block: ∅
diff --git a/test/prism/snapshots/xstring.txt b/test/prism/snapshots/xstring.txt
deleted file mode 100644
index 1a177026db..0000000000
--- a/test/prism/snapshots/xstring.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-@ ProgramNode (location: (1,0)-(13,4))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(13,4))
- └── body: (length: 6)
- ├── @ XStringNode (location: (1,0)-(1,7))
- │ ├── flags: ∅
- │ ├── opening_loc: (1,0)-(1,3) = "%x["
- │ ├── content_loc: (1,3)-(1,6) = "foo"
- │ ├── closing_loc: (1,6)-(1,7) = "]"
- │ └── unescaped: "foo"
- ├── @ InterpolatedXStringNode (location: (3,0)-(3,16))
- │ ├── opening_loc: (3,0)-(3,1) = "`"
- │ ├── parts: (length: 3)
- │ │ ├── @ StringNode (location: (3,1)-(3,5))
- │ │ │ ├── flags: frozen
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── content_loc: (3,1)-(3,5) = "foo "
- │ │ │ ├── closing_loc: ∅
- │ │ │ └── unescaped: "foo "
- │ │ ├── @ EmbeddedStatementsNode (location: (3,5)-(3,11))
- │ │ │ ├── opening_loc: (3,5)-(3,7) = "\#{"
- │ │ │ ├── statements:
- │ │ │ │ @ StatementsNode (location: (3,7)-(3,10))
- │ │ │ │ └── body: (length: 1)
- │ │ │ │ └── @ CallNode (location: (3,7)-(3,10))
- │ │ │ │ ├── flags: variable_call, ignore_visibility
- │ │ │ │ ├── receiver: ∅
- │ │ │ │ ├── call_operator_loc: ∅
- │ │ │ │ ├── name: :bar
- │ │ │ │ ├── message_loc: (3,7)-(3,10) = "bar"
- │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ ├── arguments: ∅
- │ │ │ │ ├── closing_loc: ∅
- │ │ │ │ └── block: ∅
- │ │ │ └── closing_loc: (3,10)-(3,11) = "}"
- │ │ └── @ StringNode (location: (3,11)-(3,15))
- │ │ ├── flags: frozen
- │ │ ├── opening_loc: ∅
- │ │ ├── content_loc: (3,11)-(3,15) = " baz"
- │ │ ├── closing_loc: ∅
- │ │ └── unescaped: " baz"
- │ └── closing_loc: (3,15)-(3,16) = "`"
- ├── @ XStringNode (location: (5,0)-(5,5))
- │ ├── flags: ∅
- │ ├── opening_loc: (5,0)-(5,1) = "`"
- │ ├── content_loc: (5,1)-(5,4) = "foo"
- │ ├── closing_loc: (5,4)-(5,5) = "`"
- │ └── unescaped: "foo"
- ├── @ XStringNode (location: (7,0)-(9,1))
- │ ├── flags: ∅
- │ ├── opening_loc: (7,0)-(7,3) = "%x{"
- │ ├── content_loc: (7,3)-(9,0) = "\n foo\n"
- │ ├── closing_loc: (9,0)-(9,1) = "}"
- │ └── unescaped: "\n foo\n"
- ├── @ XStringNode (location: (11,0)-(11,2))
- │ ├── flags: ∅
- │ ├── opening_loc: (11,0)-(11,1) = "`"
- │ ├── content_loc: (11,1)-(11,1) = ""
- │ ├── closing_loc: (11,1)-(11,2) = "`"
- │ └── unescaped: ""
- └── @ XStringNode (location: (13,0)-(13,4))
- ├── flags: ∅
- ├── opening_loc: (13,0)-(13,3) = "%x{"
- ├── content_loc: (13,3)-(13,3) = ""
- ├── closing_loc: (13,3)-(13,4) = "}"
- └── unescaped: ""
diff --git a/test/prism/snapshots/xstring_with_backslash.txt b/test/prism/snapshots/xstring_with_backslash.txt
deleted file mode 100644
index 7e0fa1ab5f..0000000000
--- a/test/prism/snapshots/xstring_with_backslash.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@ ProgramNode (location: (1,0)-(1,6))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(1,6))
- └── body: (length: 1)
- └── @ XStringNode (location: (1,0)-(1,6))
- ├── flags: ∅
- ├── opening_loc: (1,0)-(1,1) = "`"
- ├── content_loc: (1,1)-(1,5) = "f\\oo"
- ├── closing_loc: (1,5)-(1,6) = "`"
- └── unescaped: "foo"
diff --git a/test/prism/snapshots/yield.txt b/test/prism/snapshots/yield.txt
deleted file mode 100644
index e9680c3b2d..0000000000
--- a/test/prism/snapshots/yield.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-@ ProgramNode (location: (1,0)-(7,28))
-├── locals: []
-└── statements:
- @ StatementsNode (location: (1,0)-(7,28))
- └── body: (length: 4)
- ├── @ DefNode (location: (1,0)-(1,19))
- │ ├── name: :foo
- │ ├── name_loc: (1,4)-(1,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (1,9)-(1,14))
- │ │ └── body: (length: 1)
- │ │ └── @ YieldNode (location: (1,9)-(1,14))
- │ │ ├── keyword_loc: (1,9)-(1,14) = "yield"
- │ │ ├── lparen_loc: ∅
- │ │ ├── arguments: ∅
- │ │ └── rparen_loc: ∅
- │ ├── locals: []
- │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (1,16)-(1,19) = "end"
- ├── @ DefNode (location: (3,0)-(3,21))
- │ ├── name: :foo
- │ ├── name_loc: (3,4)-(3,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (3,9)-(3,16))
- │ │ └── body: (length: 1)
- │ │ └── @ YieldNode (location: (3,9)-(3,16))
- │ │ ├── keyword_loc: (3,9)-(3,14) = "yield"
- │ │ ├── lparen_loc: (3,14)-(3,15) = "("
- │ │ ├── arguments: ∅
- │ │ └── rparen_loc: (3,15)-(3,16) = ")"
- │ ├── locals: []
- │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (3,18)-(3,21) = "end"
- ├── @ DefNode (location: (5,0)-(5,22))
- │ ├── name: :foo
- │ ├── name_loc: (5,4)-(5,7) = "foo"
- │ ├── receiver: ∅
- │ ├── parameters: ∅
- │ ├── body:
- │ │ @ StatementsNode (location: (5,9)-(5,17))
- │ │ └── body: (length: 1)
- │ │ └── @ YieldNode (location: (5,9)-(5,17))
- │ │ ├── keyword_loc: (5,9)-(5,14) = "yield"
- │ │ ├── lparen_loc: (5,14)-(5,15) = "("
- │ │ ├── arguments:
- │ │ │ @ ArgumentsNode (location: (5,15)-(5,16))
- │ │ │ ├── flags: ∅
- │ │ │ └── arguments: (length: 1)
- │ │ │ └── @ IntegerNode (location: (5,15)-(5,16))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ └── rparen_loc: (5,16)-(5,17) = ")"
- │ ├── locals: []
- │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
- │ ├── operator_loc: ∅
- │ ├── lparen_loc: ∅
- │ ├── rparen_loc: ∅
- │ ├── equal_loc: ∅
- │ └── end_keyword_loc: (5,19)-(5,22) = "end"
- └── @ DefNode (location: (7,0)-(7,28))
- ├── name: :foo
- ├── name_loc: (7,4)-(7,7) = "foo"
- ├── receiver: ∅
- ├── parameters: ∅
- ├── body:
- │ @ StatementsNode (location: (7,9)-(7,23))
- │ └── body: (length: 1)
- │ └── @ YieldNode (location: (7,9)-(7,23))
- │ ├── keyword_loc: (7,9)-(7,14) = "yield"
- │ ├── lparen_loc: (7,14)-(7,15) = "("
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (7,15)-(7,22))
- │ │ ├── flags: ∅
- │ │ └── arguments: (length: 3)
- │ │ ├── @ IntegerNode (location: (7,15)-(7,16))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 1
- │ │ ├── @ IntegerNode (location: (7,18)-(7,19))
- │ │ │ ├── flags: decimal
- │ │ │ └── value: 2
- │ │ └── @ IntegerNode (location: (7,21)-(7,22))
- │ │ ├── flags: decimal
- │ │ └── value: 3
- │ └── rparen_loc: (7,22)-(7,23) = ")"
- ├── locals: []
- ├── def_keyword_loc: (7,0)-(7,3) = "def"
- ├── operator_loc: ∅
- ├── lparen_loc: ∅
- ├── rparen_loc: ∅
- ├── equal_loc: ∅
- └── end_keyword_loc: (7,25)-(7,28) = "end"
diff --git a/test/prism/snippets_test.rb b/test/prism/snippets_test.rb
new file mode 100644
index 0000000000..26847da184
--- /dev/null
+++ b/test/prism/snippets_test.rb
@@ -0,0 +1,42 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class SnippetsTest < TestCase
+ except = [
+ "newline_terminated.txt",
+ "seattlerb/begin_rescue_else_ensure_no_bodies.txt",
+ "seattlerb/case_in.txt",
+ "seattlerb/parse_line_defn_no_parens.txt",
+ "seattlerb/pct_nl.txt",
+ "seattlerb/str_heredoc_interp.txt",
+ "spanning_heredoc_newlines.txt",
+ "unparser/corpus/semantic/dstr.txt",
+ "whitequark/dedenting_heredoc.txt",
+ "whitequark/multiple_pattern_matches.txt"
+ ]
+
+ Fixture.each(except: except) do |fixture|
+ define_method(fixture.test_name) { assert_snippets(fixture) }
+ end
+
+ private
+
+ # We test every snippet (separated by \n\n) in isolation to ensure the
+ # parser does not try to read bytes further than the end of each snippet.
+ def assert_snippets(fixture)
+ fixture.read.split(/(?<=\S)\n\n(?=\S)/).each do |snippet|
+ snippet = snippet.rstrip
+
+ result = Prism.parse(snippet, filepath: fixture.path)
+ assert result.success?
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ dumped = Prism.dump(snippet, filepath: fixture.path)
+ assert_equal_nodes(result.value, Prism.load(snippet, dumped).value)
+ end
+ end
+ end
+ end
+end
diff --git a/test/prism/static_inspect_test.rb b/test/prism/static_inspect_test.rb
deleted file mode 100644
index 8df2fd241e..0000000000
--- a/test/prism/static_inspect_test.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-return if Prism::BACKEND == :FFI
-
-module Prism
- class StaticInspectTest < TestCase
- def test_false
- assert_equal "false", static_inspect("false")
- end
-
- def test_float
- assert_equal "0.25", static_inspect("0.25")
- assert_equal "5.125", static_inspect("5.125")
-
- assert_equal "0.0", static_inspect("0.0")
- assert_equal "-0.0", static_inspect("-0.0")
-
- assert_equal "1.0e+100", static_inspect("1e100")
- assert_equal "-1.0e+100", static_inspect("-1e100")
-
- assert_equal "Infinity", static_inspect("1e1000")
- assert_equal "-Infinity", static_inspect("-1e1000")
- end
-
- def test_imaginary
- assert_equal "(0+1i)", static_inspect("1i")
- assert_equal "(0-1i)", static_inspect("-1i")
- end
-
- def test_integer
- assert_equal "1000", static_inspect("1_0_0_0")
- assert_equal "10000000000000000000000000000", static_inspect("1_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0")
- end
-
- def test_nil
- assert_equal "nil", static_inspect("nil")
- end
-
- def test_rational
- assert_equal "(0/1)", static_inspect("0r")
- assert_equal "(1/1)", static_inspect("1r")
- assert_equal "(1/1)", static_inspect("1.0r")
- assert_equal "(77777/1000)", static_inspect("77.777r")
- end
-
- def test_regular_expression
- assert_equal "/.*/", static_inspect("/.*/")
- assert_equal "/.*/i", static_inspect("/.*/i")
- assert_equal "/.*/", static_inspect("/.*/u")
- assert_equal "/.*/n", static_inspect("/.*/un")
- end
-
- def test_source_encoding
- assert_equal "#<Encoding:UTF-8>", static_inspect("__ENCODING__")
- assert_equal "#<Encoding:Windows-31J>", static_inspect("__ENCODING__", encoding: "Windows-31J")
- end
-
- def test_source_file
- assert_equal __FILE__.inspect, static_inspect("__FILE__", filepath: __FILE__, frozen_string_literal: true)
- end
-
- def test_source_line
- assert_equal "1", static_inspect("__LINE__")
- assert_equal "5", static_inspect("__LINE__", line: 5)
- end
-
- def test_string
- assert_equal "\"\"", static_inspect('""', frozen_string_literal: true)
- assert_equal "\"Hello, World!\"", static_inspect('"Hello, World!"', frozen_string_literal: true)
- assert_equal "\"\\a\"", static_inspect("\"\\a\"", frozen_string_literal: true)
- end
-
- def test_symbol
- assert_equal ":foo", static_inspect(":foo")
- assert_equal ":foo", static_inspect("%s[foo]")
- end
-
- def test_true
- assert_equal "true", static_inspect("true")
- end
-
- private
-
- def static_inspect(source, **options)
- Debug.static_inspect(source, **options)
- end
- end
-end
diff --git a/test/prism/static_literals_test.rb b/test/prism/static_literals_test.rb
deleted file mode 100644
index 31c802bf90..0000000000
--- a/test/prism/static_literals_test.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-# frozen_string_literal: true
-
-require_relative "test_helper"
-
-module Prism
- class StaticLiteralsTest < TestCase
- def test_static_literals
- assert_warning("1")
- assert_warning("0xA", "10", "10")
- assert_warning("0o10", "8", "8")
- assert_warning("0b10", "2", "2")
- assert_warning("1_000", "1000", "1000")
- assert_warning((2**32).to_s(10), "0x#{(2**32).to_s(16)}", (2**32).to_s(10))
- assert_warning((2**64).to_s(10), "0x#{(2**64).to_s(16)}", (2**64).to_s(10))
-
- refute_warning("1", "-1")
- refute_warning((2**32).to_s(10), "-0x#{(2**32).to_s(16)}")
- refute_warning((2**64).to_s(10), "-0x#{(2**64).to_s(16)}")
-
- assert_warning("__LINE__", "2", "2")
- assert_warning("3", "__LINE__", "3")
-
- assert_warning("1.0")
- assert_warning("1e2", "100.0", "100.0")
-
- assert_warning("1r", "1r", "(1/1)")
- assert_warning("1.0r", "1.0r", "(1/1)")
-
- assert_warning("1i", "1i", "(0+1i)")
- assert_warning("1.0i", "1.0i", "(0+1.0i)")
-
- assert_warning("1ri", "1ri", "(0+(1/1)*i)")
- assert_warning("1.0ri", "1.0ri", "(0+(1/1)*i)")
-
- assert_warning("__FILE__", "\"#{__FILE__}\"", __FILE__)
- assert_warning("\"#{__FILE__}\"")
- assert_warning("\"foo\"")
-
- assert_warning("/foo/")
-
- refute_warning("/foo/", "/foo/i")
-
- assert_warning(":foo")
- assert_warning("%s[foo]", ":foo", ":foo")
-
- assert_warning("true")
- assert_warning("false")
- assert_warning("nil")
- assert_warning("__ENCODING__", "__ENCODING__", "#<Encoding:UTF-8>")
- end
-
- private
-
- class NullWarning
- def message
- ""
- end
- end
-
- def parse_warnings(left, right)
- warnings = []
-
- warnings << (Prism.parse(<<~RUBY, filepath: __FILE__).warnings.first || NullWarning.new)
- {
- #{left} => 1,
- #{right} => 2
- }
- RUBY
-
- warnings << (Prism.parse(<<~RUBY, filepath: __FILE__).warnings.first || NullWarning.new)
- case foo
- when #{left}
- when #{right}
- end
- RUBY
-
- warnings
- end
-
- def assert_warning(left, right = left, message = left)
- hash_keys, when_clauses = parse_warnings(left, right)
-
- assert_include hash_keys.message, message
- assert_include hash_keys.message, "line 3"
- assert_include when_clauses.message, "line 3"
- end
-
- def refute_warning(left, right)
- assert_empty parse_warnings(left, right).grep_v(NullWarning)
- end
- end
-end
diff --git a/test/prism/test_helper.rb b/test/prism/test_helper.rb
index 77af7e7b45..b848500283 100644
--- a/test/prism/test_helper.rb
+++ b/test/prism/test_helper.rb
@@ -1,8 +1,9 @@
# frozen_string_literal: true
require "prism"
-require "ripper"
require "pp"
+require "ripper"
+require "stringio"
require "test/unit"
require "tempfile"
@@ -16,19 +17,202 @@ if defined?(Test::Unit::Assertions::AssertionMessage)
end
module Prism
+ # A convenience method for retrieving the first statement in the source string
+ # parsed by Prism.
+ def self.parse_statement(source, **options)
+ parse(source, **options).value.statements.body.first
+ end
+
+ class ParseResult < Result
+ # Returns the first statement in the body of the parsed source.
+ def statement
+ value.statements.body.first
+ end
+ end
+
class TestCase < ::Test::Unit::TestCase
+ # We have a set of fixtures that we use to test various aspects of the
+ # parser. They are all represented as .txt files under the
+ # test/prism/fixtures directory. Typically in test files you will find calls
+ # to Fixture.each which yields Fixture objects to the given block. These
+ # are used to define test methods that assert against each fixture in some
+ # way.
+ class Fixture
+ BASE = File.join(__dir__, "fixtures")
+
+ attr_reader :path
+
+ def initialize(path)
+ @path = path
+ end
+
+ def read
+ File.read(full_path, binmode: true, external_encoding: Encoding::UTF_8)
+ end
+
+ def full_path
+ File.join(BASE, path)
+ end
+
+ def snapshot_path
+ File.join(__dir__, "snapshots", path)
+ end
+
+ def test_name
+ :"test_#{path}"
+ end
+
+ def self.each(except: [], &block)
+ paths = Dir[ENV.fetch("FOCUS") { File.join("**", "*.txt") }, base: BASE] - except
+ paths.each { |path| yield Fixture.new(path) }
+ end
+ end
+
+ # Yield each encoding that we want to test, along with a range of the
+ # codepoints that should be tested.
+ def self.each_encoding
+ codepoints_1byte = 0...0x100
+
+ yield Encoding::ASCII_8BIT, codepoints_1byte
+ yield Encoding::US_ASCII, codepoints_1byte
+
+ if !ENV["PRISM_BUILD_MINIMAL"]
+ yield Encoding::Windows_1253, codepoints_1byte
+ end
+
+ # By default we don't test every codepoint in these encodings because it
+ # takes a very long time.
+ return unless ENV["PRISM_TEST_ALL_ENCODINGS"]
+
+ yield Encoding::CP850, codepoints_1byte
+ yield Encoding::CP852, codepoints_1byte
+ yield Encoding::CP855, codepoints_1byte
+ yield Encoding::GB1988, codepoints_1byte
+ yield Encoding::IBM437, codepoints_1byte
+ yield Encoding::IBM720, codepoints_1byte
+ yield Encoding::IBM737, codepoints_1byte
+ yield Encoding::IBM775, codepoints_1byte
+ yield Encoding::IBM852, codepoints_1byte
+ yield Encoding::IBM855, codepoints_1byte
+ yield Encoding::IBM857, codepoints_1byte
+ yield Encoding::IBM860, codepoints_1byte
+ yield Encoding::IBM861, codepoints_1byte
+ yield Encoding::IBM862, codepoints_1byte
+ yield Encoding::IBM863, codepoints_1byte
+ yield Encoding::IBM864, codepoints_1byte
+ yield Encoding::IBM865, codepoints_1byte
+ yield Encoding::IBM866, codepoints_1byte
+ yield Encoding::IBM869, codepoints_1byte
+ yield Encoding::ISO_8859_1, codepoints_1byte
+ yield Encoding::ISO_8859_2, codepoints_1byte
+ yield Encoding::ISO_8859_3, codepoints_1byte
+ yield Encoding::ISO_8859_4, codepoints_1byte
+ yield Encoding::ISO_8859_5, codepoints_1byte
+ yield Encoding::ISO_8859_6, codepoints_1byte
+ yield Encoding::ISO_8859_7, codepoints_1byte
+ yield Encoding::ISO_8859_8, codepoints_1byte
+ yield Encoding::ISO_8859_9, codepoints_1byte
+ yield Encoding::ISO_8859_10, codepoints_1byte
+ yield Encoding::ISO_8859_11, codepoints_1byte
+ yield Encoding::ISO_8859_13, codepoints_1byte
+ yield Encoding::ISO_8859_14, codepoints_1byte
+ yield Encoding::ISO_8859_15, codepoints_1byte
+ yield Encoding::ISO_8859_16, codepoints_1byte
+ yield Encoding::KOI8_R, codepoints_1byte
+ yield Encoding::KOI8_U, codepoints_1byte
+ yield Encoding::MACCENTEURO, codepoints_1byte
+ yield Encoding::MACCROATIAN, codepoints_1byte
+ yield Encoding::MACCYRILLIC, codepoints_1byte
+ yield Encoding::MACGREEK, codepoints_1byte
+ yield Encoding::MACICELAND, codepoints_1byte
+ yield Encoding::MACROMAN, codepoints_1byte
+ yield Encoding::MACROMANIA, codepoints_1byte
+ yield Encoding::MACTHAI, codepoints_1byte
+ yield Encoding::MACTURKISH, codepoints_1byte
+ yield Encoding::MACUKRAINE, codepoints_1byte
+ yield Encoding::TIS_620, codepoints_1byte
+ yield Encoding::Windows_1250, codepoints_1byte
+ yield Encoding::Windows_1251, codepoints_1byte
+ yield Encoding::Windows_1252, codepoints_1byte
+ yield Encoding::Windows_1254, codepoints_1byte
+ yield Encoding::Windows_1255, codepoints_1byte
+ yield Encoding::Windows_1256, codepoints_1byte
+ yield Encoding::Windows_1257, codepoints_1byte
+ yield Encoding::Windows_1258, codepoints_1byte
+ yield Encoding::Windows_874, codepoints_1byte
+
+ codepoints_2bytes = 0...0x10000
+
+ yield Encoding::Big5, codepoints_2bytes
+ yield Encoding::Big5_HKSCS, codepoints_2bytes
+ yield Encoding::Big5_UAO, codepoints_2bytes
+ yield Encoding::CP949, codepoints_2bytes
+ yield Encoding::CP950, codepoints_2bytes
+ yield Encoding::CP951, codepoints_2bytes
+ yield Encoding::EUC_KR, codepoints_2bytes
+ yield Encoding::GBK, codepoints_2bytes
+ yield Encoding::GB12345, codepoints_2bytes
+ yield Encoding::GB2312, codepoints_2bytes
+ yield Encoding::MACJAPANESE, codepoints_2bytes
+ yield Encoding::Shift_JIS, codepoints_2bytes
+ yield Encoding::SJIS_DoCoMo, codepoints_2bytes
+ yield Encoding::SJIS_KDDI, codepoints_2bytes
+ yield Encoding::SJIS_SoftBank, codepoints_2bytes
+ yield Encoding::Windows_31J, codepoints_2bytes
+
+ codepoints_unicode = (0...0x110000)
+
+ yield Encoding::UTF_8, codepoints_unicode
+ yield Encoding::UTF8_MAC, codepoints_unicode
+ yield Encoding::UTF8_DoCoMo, codepoints_unicode
+ yield Encoding::UTF8_KDDI, codepoints_unicode
+ yield Encoding::UTF8_SoftBank, codepoints_unicode
+ yield Encoding::CESU_8, codepoints_unicode
+
+ codepoints_eucjp = [
+ *(0...0x10000),
+ *(0...0x10000).map { |bytes| bytes | 0x8F0000 }
+ ]
+
+ yield Encoding::CP51932, codepoints_eucjp
+ yield Encoding::EUC_JP, codepoints_eucjp
+ yield Encoding::EUCJP_MS, codepoints_eucjp
+ yield Encoding::EUC_JIS_2004, codepoints_eucjp
+
+ codepoints_emacs_mule = [
+ *(0...0x80),
+ *((0x81...0x90).flat_map { |byte1| (0x90...0x100).map { |byte2| byte1 << 8 | byte2 } }),
+ *((0x90...0x9C).flat_map { |byte1| (0xA0...0x100).flat_map { |byte2| (0xA0...0x100).flat_map { |byte3| byte1 << 16 | byte2 << 8 | byte3 } } }),
+ *((0xF0...0xF5).flat_map { |byte2| (0xA0...0x100).flat_map { |byte3| (0xA0...0x100).flat_map { |byte4| 0x9C << 24 | byte3 << 16 | byte3 << 8 | byte4 } } }),
+ ]
+
+ yield Encoding::EMACS_MULE, codepoints_emacs_mule
+ yield Encoding::STATELESS_ISO_2022_JP, codepoints_emacs_mule
+ yield Encoding::STATELESS_ISO_2022_JP_KDDI, codepoints_emacs_mule
+
+ codepoints_gb18030 = [
+ *(0...0x80),
+ *((0x81..0xFE).flat_map { |byte1| (0x40...0x100).map { |byte2| byte1 << 8 | byte2 } }),
+ *((0x81..0xFE).flat_map { |byte1| (0x30...0x40).flat_map { |byte2| (0x81..0xFE).flat_map { |byte3| (0x2F...0x41).map { |byte4| byte1 << 24 | byte2 << 16 | byte3 << 8 | byte4 } } } }),
+ ]
+
+ yield Encoding::GB18030, codepoints_gb18030
+
+ codepoints_euc_tw = [
+ *(0..0x7F),
+ *(0xA1..0xFF).flat_map { |byte1| (0xA1..0xFF).map { |byte2| (byte1 << 8) | byte2 } },
+ *(0xA1..0xB0).flat_map { |byte2| (0xA1..0xFF).flat_map { |byte3| (0xA1..0xFF).flat_map { |byte4| 0x8E << 24 | byte2 << 16 | byte3 << 8 | byte4 } } }
+ ]
+
+ yield Encoding::EUC_TW, codepoints_euc_tw
+ end
+
private
- if RUBY_ENGINE == "ruby"
+ if RUBY_ENGINE == "ruby" && RubyVM::InstructionSequence.compile("").to_a[4][:parser] != :prism
# Check that the given source is valid syntax by compiling it with RubyVM.
def check_syntax(source)
- $VERBOSE, previous = nil, $VERBOSE
-
- begin
- RubyVM::InstructionSequence.compile(source)
- ensure
- $VERBOSE = previous
- end
+ ignore_warnings { RubyVM::InstructionSequence.compile(source) }
end
# Assert that the given source is valid Ruby syntax by attempting to
@@ -51,6 +235,8 @@ module Prism
end
end
+ # CRuby has this same method, so define it so that we don't accidentally
+ # break CRuby CI.
def assert_raises(*args, &block)
raise "Use assert_raise instead"
end
@@ -122,5 +308,16 @@ module Prism
assert_equal expected, actual
end
end
+
+ def ignore_warnings
+ previous = $VERBOSE
+ $VERBOSE = nil
+
+ begin
+ yield
+ ensure
+ $VERBOSE = previous
+ end
+ end
end
end
diff --git a/test/prism/unescape_test.rb b/test/prism/unescape_test.rb
index 3f78a59b11..f9e5a60e45 100644
--- a/test/prism/unescape_test.rb
+++ b/test/prism/unescape_test.rb
@@ -41,7 +41,7 @@ module Prism
result = Prism.parse(code(escape), encoding: "binary")
if result.success?
- yield result.value.statements.body.first
+ yield result.statement
else
:error
end
@@ -159,6 +159,11 @@ module Prism
# to validate backreferences so these are all going to fail.
next if (context.name == "//" || context.name.start_with?("%r")) && ord.chr.start_with?(/\d/)
+ # \u is passed directly on to the regular expression engine and it is
+ # responsible for handling syntax errors. In this case we do not check
+ # it because it would require going through the compiler.
+ next if context.is_a?(Context::RegExp) && ord.chr == "u"
+
# \a \b \c ...
assert_unescape(context, ord.chr)
end
diff --git a/test/prism/warnings_test.rb b/test/prism/warnings_test.rb
deleted file mode 100644
index b138a3cb43..0000000000
--- a/test/prism/warnings_test.rb
+++ /dev/null
@@ -1,246 +0,0 @@
-# frozen_string_literal: true
-
-return if RUBY_VERSION < "3.1"
-
-require_relative "test_helper"
-require "stringio"
-
-module Prism
- class WarningsTest < TestCase
- def test_ambiguous_uminus
- assert_warning("a -b", "ambiguous first argument")
- end
-
- def test_ambiguous_uplus
- assert_warning("a +b", "ambiguous first argument")
- end
-
- def test_ambiguous_ustar
- assert_warning("a *b", "argument prefix")
- end
-
- def test_ambiguous_regexp
- assert_warning("a /b/", "wrap regexp in parentheses")
- end
-
- def test_equal_in_conditional
- assert_warning("if a = 1; end; a = a", "should be ==")
- end
-
- def test_dot_dot_dot_eol
- assert_warning("_ = foo...", "... at EOL")
- assert_warning("def foo(...) = bar ...", "... at EOL")
-
- assert_warning("_ = foo... #", "... at EOL")
- assert_warning("_ = foo... \t\v\f\n", "... at EOL")
-
- refute_warning("p foo...bar")
- refute_warning("p foo... bar")
- end
-
- def test_END_in_method
- assert_warning("def foo; END {}; end", "END in method")
- end
-
- def test_duplicated_hash_key
- assert_warning("{ a: 1, a: 2 }", "duplicated and overwritten")
- assert_warning("{ a: 1, **{ a: 2 } }", "duplicated and overwritten")
- end
-
- def test_duplicated_when_clause
- assert_warning("case 1; when 1, 1; end", "clause with line")
- end
-
- def test_float_out_of_range
- assert_warning("_ = 1.0e100000", "out of range")
- end
-
- def test_integer_in_flip_flop
- assert_warning("1 if 2..foo", "integer")
- end
-
- def test_keyword_eol
- assert_warning("if\ntrue; end", "end of line")
- assert_warning("if true\nelsif\nfalse; end", "end of line")
- end
-
- def test_shareable_constant_value
- assert_warning("foo # shareable_constant_value: none", "ignored")
- assert_warning("\v # shareable_constant_value: none", "ignored")
-
- refute_warning("# shareable_constant_value: none")
- refute_warning(" # shareable_constant_value: none")
- refute_warning("\t\t# shareable_constant_value: none")
- end
-
- def test_string_in_predicate
- assert_warning("if 'foo'; end", "string")
- assert_warning("if \"\#{foo}\"; end", "string")
- assert_warning("if __FILE__; end", "string")
- end
-
- def test_symbol_in_predicate
- assert_warning("if :foo; end", "symbol")
- assert_warning("if :\"\#{foo}\"; end", "symbol")
- end
-
- def test_literal_in_predicate
- assert_warning("if __LINE__; end", "literal")
- assert_warning("if __ENCODING__; end", "literal")
- assert_warning("if 1; end", "literal")
- assert_warning("if 1.0; end", "literal")
- assert_warning("if 1r; end", "literal")
- assert_warning("if 1i; end", "literal")
- end
-
- def test_regexp_in_predicate
- assert_warning("if /foo/; end", "regex")
- assert_warning("if /foo\#{bar}/; end", "regex")
- end
-
- def test_unused_local_variables
- assert_warning("foo = 1", "unused")
-
- refute_warning("foo = 1", compare: false, command_line: "e")
- refute_warning("foo = 1", compare: false, scopes: [[]])
-
- assert_warning("def foo; bar = 1; end", "unused")
- assert_warning("def foo; bar, = 1; end", "unused")
-
- refute_warning("def foo; bar &&= 1; end")
- refute_warning("def foo; bar ||= 1; end")
- refute_warning("def foo; bar += 1; end")
-
- refute_warning("def foo; bar = bar; end")
- refute_warning("def foo; bar = bar = 1; end")
- refute_warning("def foo; bar = (bar = 1); end")
- refute_warning("def foo; bar = begin; bar = 1; end; end")
- refute_warning("def foo; bar = (qux; bar = 1); end")
- refute_warning("def foo; bar, = bar = 1; end")
- refute_warning("def foo; bar, = 1, bar = 1; end")
-
- refute_warning("def foo(bar); end")
- refute_warning("def foo(bar = 1); end")
- refute_warning("def foo((bar)); end")
- refute_warning("def foo(*bar); end")
- refute_warning("def foo(*, bar); end")
- refute_warning("def foo(*, (bar)); end")
- refute_warning("def foo(bar:); end")
- refute_warning("def foo(**bar); end")
- refute_warning("def foo(&bar); end")
- refute_warning("->(bar) {}")
- refute_warning("->(; bar) {}", compare: false)
-
- refute_warning("def foo; bar = 1; tap { bar }; end")
- refute_warning("def foo; bar = 1; tap { baz = bar; baz }; end")
- end
-
- def test_void_statements
- assert_warning("foo = 1; foo", "a variable in void")
- assert_warning("@foo", "a variable in void")
- assert_warning("@@foo", "a variable in void")
- assert_warning("$foo", "a variable in void")
- assert_warning("$+", "a variable in void")
- assert_warning("$1", "a variable in void")
-
- assert_warning("self", "self in void")
- assert_warning("nil", "nil in void")
- assert_warning("true", "true in void")
- assert_warning("false", "false in void")
-
- assert_warning("1", "literal in void")
- assert_warning("1.0", "literal in void")
- assert_warning("1r", "literal in void")
- assert_warning("1i", "literal in void")
- assert_warning(":foo", "literal in void")
- assert_warning("\"foo\"", "literal in void")
- assert_warning("\"foo\#{1}\"", "literal in void")
- assert_warning("/foo/", "literal in void")
- assert_warning("/foo\#{1}/", "literal in void")
-
- assert_warning("Foo", "constant in void")
- assert_warning("::Foo", ":: in void")
- assert_warning("Foo::Bar", ":: in void")
-
- assert_warning("1..2", ".. in void")
- assert_warning("1..", ".. in void")
- assert_warning("..2", ".. in void")
- assert_warning("1...2", "... in void")
- assert_warning("1...;", "... in void")
- assert_warning("...2", "... in void")
-
- assert_warning("defined?(foo)", "defined? in void")
-
- assert_warning("1 + 1", "+ in void")
- assert_warning("1 - 1", "- in void")
- assert_warning("1 * 1", "* in void")
- assert_warning("1 / 1", "/ in void")
- assert_warning("1 % 1", "% in void")
- assert_warning("1 | 1", "| in void")
- assert_warning("1 ^ 1", "^ in void")
- assert_warning("1 & 1", "& in void")
- assert_warning("1 > 1", "> in void")
- assert_warning("1 < 1", "< in void")
-
- assert_warning("1 ** 1", "** in void")
- assert_warning("1 <= 1", "<= in void")
- assert_warning("1 >= 1", ">= in void")
- assert_warning("1 != 1", "!= in void")
- assert_warning("1 == 1", "== in void")
- assert_warning("1 <=> 1", "<=> in void")
-
- assert_warning("+foo", "+@ in void")
- assert_warning("-foo", "-@ in void")
-
- assert_warning("def foo; @bar; @baz; end", "variable in void")
- refute_warning("def foo; @bar; end")
- refute_warning("@foo", compare: false, scopes: [[]])
- end
-
- def test_unreachable_statement
- assert_warning("begin; rescue; retry; foo; end", "statement not reached")
-
- assert_warning("return; foo", "statement not reached")
-
- assert_warning("tap { break; foo }", "statement not reached")
- assert_warning("tap { break 1; foo }", "statement not reached")
-
- assert_warning("tap { next; foo }", "statement not reached")
- assert_warning("tap { next 1; foo }", "statement not reached")
-
- assert_warning("tap { redo; foo }", "statement not reached")
- end
-
- private
-
- def assert_warning(source, message)
- warnings = Prism.parse(source).warnings
-
- assert_equal 1, warnings.length
- assert_include warnings.first.message, message
-
- if defined?(RubyVM::AbstractSyntaxTree)
- assert_include capture_warning { RubyVM::AbstractSyntaxTree.parse(source) }, message
- end
- end
-
- def refute_warning(source, compare: true, **options)
- assert_empty Prism.parse(source, **options).warnings
-
- if compare && defined?(RubyVM::AbstractSyntaxTree)
- assert_empty capture_warning { RubyVM::AbstractSyntaxTree.parse(source) }
- end
- end
-
- def capture_warning
- stderr, $stderr, verbose, $VERBOSE = $stderr, StringIO.new, $VERBOSE, true
-
- begin
- yield
- $stderr.string
- ensure
- $stderr, $VERBOSE = stderr, verbose
- end
- end
- end
-end
diff --git a/test/psych/test_scalar_scanner.rb b/test/psych/test_scalar_scanner.rb
index 02b923afe2..8907d1255a 100644
--- a/test/psych/test_scalar_scanner.rb
+++ b/test/psych/test_scalar_scanner.rb
@@ -126,6 +126,19 @@ module Psych
assert_equal '100_', ss.tokenize('100_')
end
+ def test_scan_strings_with_legacy_int_delimiters
+ assert_equal '0x_,_', ss.tokenize('0x_,_')
+ assert_equal '+0__,,', ss.tokenize('+0__,,')
+ assert_equal '-0b,_,', ss.tokenize('-0b,_,')
+ end
+
+ def test_scan_strings_with_strict_int_delimiters
+ scanner = Psych::ScalarScanner.new ClassLoader.new, strict_integer: true
+ assert_equal '0x___', scanner.tokenize('0x___')
+ assert_equal '+0____', scanner.tokenize('+0____')
+ assert_equal '-0b___', scanner.tokenize('-0b___')
+ end
+
def test_scan_int_commas_and_underscores
# NB: This test is to ensure backward compatibility with prior Psych versions,
# not to test against any actual YAML specification.
diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb
index cedec46cc7..812a15dfcc 100644
--- a/test/psych/test_yaml.rb
+++ b/test/psych/test_yaml.rb
@@ -1,8 +1,6 @@
# -*- coding: us-ascii; mode: ruby; ruby-indent-level: 4; tab-width: 4 -*-
# frozen_string_literal: true
-# vim:sw=4:ts=4
-# $Id$
-#
+
require_relative 'helper'
require 'ostruct'
@@ -36,30 +34,30 @@ class Psych_Unit_Tests < Psych::TestCase
def test_regexp_with_n
assert_cycle(Regexp.new('',Regexp::NOENCODING))
end
- #
- # Tests modified from 00basic.t in Psych.pm
- #
- def test_basic_map
- # Simple map
- assert_parse_only(
- { 'one' => 'foo', 'three' => 'baz', 'two' => 'bar' }, <<EOY
+ #
+ # Tests modified from 00basic.t in Psych.pm
+ #
+ def test_basic_map
+ # Simple map
+ assert_parse_only(
+ { 'one' => 'foo', 'three' => 'baz', 'two' => 'bar' }, <<EOY
one: foo
two: bar
three: baz
EOY
- )
- end
-
- def test_basic_strings
- # Common string types
- assert_cycle("x")
- assert_cycle(":x")
- assert_cycle(":")
- assert_parse_only(
- { 1 => 'simple string', 2 => 42, 3 => '1 Single Quoted String',
- 4 => 'Psych\'s Double "Quoted" String', 5 => "A block\n with several\n lines.\n",
- 6 => "A \"chomped\" block", 7 => "A folded\n string\n", 8 => ": started string" },
- <<EOY
+ )
+ end
+
+ def test_basic_strings
+ # Common string types
+ assert_cycle("x")
+ assert_cycle(":x")
+ assert_cycle(":")
+ assert_parse_only(
+ { 1 => 'simple string', 2 => 42, 3 => '1 Single Quoted String',
+ 4 => 'Psych\'s Double "Quoted" String', 5 => "A block\n with several\n lines.\n",
+ 6 => "A \"chomped\" block", 7 => "A folded\n string\n", 8 => ": started string" },
+ <<EOY
1: simple string
2: 42
3: '1 Single Quoted String'
@@ -76,44 +74,44 @@ EOY
string
8: ": started string"
EOY
- )
- end
-
- #
- # Test the specification examples
- # - Many examples have been changes because of whitespace problems that
- # caused the two to be inequivalent, or keys to be sorted wrong
- #
-
- def test_spec_simple_implicit_sequence
- # Simple implicit sequence
- assert_to_yaml(
- [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ], <<EOY
+ )
+ end
+
+ #
+ # Test the specification examples
+ # - Many examples have been changes because of whitespace problems that
+ # caused the two to be inequivalent, or keys to be sorted wrong
+ #
+
+ def test_spec_simple_implicit_sequence
+ # Simple implicit sequence
+ assert_to_yaml(
+ [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ], <<EOY
- Mark McGwire
- Sammy Sosa
- Ken Griffey
EOY
- )
- end
+ )
+ end
- def test_spec_simple_implicit_map
- # Simple implicit map
- assert_to_yaml(
- { 'hr' => 65, 'avg' => 0.278, 'rbi' => 147 }, <<EOY
+ def test_spec_simple_implicit_map
+ # Simple implicit map
+ assert_to_yaml(
+ { 'hr' => 65, 'avg' => 0.278, 'rbi' => 147 }, <<EOY
avg: 0.278
hr: 65
rbi: 147
EOY
- )
- end
-
- def test_spec_simple_map_with_nested_sequences
- # Simple mapping with nested sequences
- assert_to_yaml(
- { 'american' =>
- [ 'Boston Red Sox', 'Detroit Tigers', 'New York Yankees' ],
- 'national' =>
- [ 'New York Mets', 'Chicago Cubs', 'Atlanta Braves' ] }, <<EOY
+ )
+ end
+
+ def test_spec_simple_map_with_nested_sequences
+ # Simple mapping with nested sequences
+ assert_to_yaml(
+ { 'american' =>
+ [ 'Boston Red Sox', 'Detroit Tigers', 'New York Yankees' ],
+ 'national' =>
+ [ 'New York Mets', 'Chicago Cubs', 'Atlanta Braves' ] }, <<EOY
american:
- Boston Red Sox
- Detroit Tigers
@@ -123,16 +121,16 @@ national:
- Chicago Cubs
- Atlanta Braves
EOY
- )
- end
-
- def test_spec_simple_sequence_with_nested_map
- # Simple sequence with nested map
- assert_to_yaml(
- [
- {'name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278},
- {'name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288}
- ], <<EOY
+ )
+ end
+
+ def test_spec_simple_sequence_with_nested_map
+ # Simple sequence with nested map
+ assert_to_yaml(
+ [
+ {'name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278},
+ {'name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288}
+ ], <<EOY
-
avg: 0.278
hr: 65
@@ -142,38 +140,38 @@ EOY
hr: 63
name: Sammy Sosa
EOY
- )
- end
-
- def test_spec_sequence_of_sequences
- # Simple sequence with inline sequences
- assert_parse_only(
- [
- [ 'name', 'hr', 'avg' ],
- [ 'Mark McGwire', 65, 0.278 ],
- [ 'Sammy Sosa', 63, 0.288 ]
- ], <<EOY
+ )
+ end
+
+ def test_spec_sequence_of_sequences
+ # Simple sequence with inline sequences
+ assert_parse_only(
+ [
+ [ 'name', 'hr', 'avg' ],
+ [ 'Mark McGwire', 65, 0.278 ],
+ [ 'Sammy Sosa', 63, 0.288 ]
+ ], <<EOY
- [ name , hr , avg ]
- [ Mark McGwire , 65 , 0.278 ]
- [ Sammy Sosa , 63 , 0.288 ]
EOY
- )
- end
-
- def test_spec_mapping_of_mappings
- # Simple map with inline maps
- assert_parse_only(
- { 'Mark McGwire' =>
- { 'hr' => 65, 'avg' => 0.278 },
- 'Sammy Sosa' =>
- { 'hr' => 63, 'avg' => 0.288 }
- }, <<EOY
+ )
+ end
+
+ def test_spec_mapping_of_mappings
+ # Simple map with inline maps
+ assert_parse_only(
+ { 'Mark McGwire' =>
+ { 'hr' => 65, 'avg' => 0.278 },
+ 'Sammy Sosa' =>
+ { 'hr' => 63, 'avg' => 0.288 }
+ }, <<EOY
Mark McGwire: {hr: 65, avg: 0.278}
Sammy Sosa: {hr: 63,
avg: 0.288}
EOY
- )
- end
+ )
+ end
def test_ambiguous_comments
# [ruby-talk:88012]
@@ -182,11 +180,11 @@ EOY
EOY
end
- def test_spec_nested_comments
- # Map and sequences with comments
- assert_parse_only(
- { 'hr' => [ 'Mark McGwire', 'Sammy Sosa' ],
- 'rbi' => [ 'Sammy Sosa', 'Ken Griffey' ] }, <<EOY
+ def test_spec_nested_comments
+ # Map and sequences with comments
+ assert_parse_only(
+ { 'hr' => [ 'Mark McGwire', 'Sammy Sosa' ],
+ 'rbi' => [ 'Sammy Sosa', 'Ken Griffey' ] }, <<EOY
hr: # 1998 hr ranking
- Mark McGwire
- Sammy Sosa
@@ -195,16 +193,16 @@ rbi:
- Sammy Sosa
- Ken Griffey
EOY
- )
- end
-
- def test_spec_anchors_and_aliases
- # Anchors and aliases
- assert_parse_only(
- { 'hr' =>
- [ 'Mark McGwire', 'Sammy Sosa' ],
- 'rbi' =>
- [ 'Sammy Sosa', 'Ken Griffey' ] }, <<EOY
+ )
+ end
+
+ def test_spec_anchors_and_aliases
+ # Anchors and aliases
+ assert_parse_only(
+ { 'hr' =>
+ [ 'Mark McGwire', 'Sammy Sosa' ],
+ 'rbi' =>
+ [ 'Sammy Sosa', 'Ken Griffey' ] }, <<EOY
hr:
- Mark McGwire
# Name "Sammy Sosa" scalar SS
@@ -214,7 +212,7 @@ rbi:
- *SS
- Ken Griffey
EOY
- )
+ )
assert_to_yaml(
[{"arrival"=>"EDI", "departure"=>"LAX", "fareref"=>"DOGMA", "currency"=>"GBP"}, {"arrival"=>"MEL", "departure"=>"SYD", "fareref"=>"MADF", "currency"=>"AUD"}, {"arrival"=>"MCO", "departure"=>"JFK", "fareref"=>"DFSF", "currency"=>"USD"}], <<EOY
@@ -251,13 +249,13 @@ FARES:
EOY
)
- end
+ end
- def test_spec_mapping_between_sequences
- # Complex key #1
- assert_parse_only(
- { [ 'Detroit Tigers', 'Chicago Cubs' ] => [ Date.new( 2001, 7, 23 ) ],
- [ 'New York Yankees', 'Atlanta Braves' ] => [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ] }, <<EOY
+ def test_spec_mapping_between_sequences
+ # Complex key #1
+ assert_parse_only(
+ { [ 'Detroit Tigers', 'Chicago Cubs' ] => [ Date.new( 2001, 7, 23 ) ],
+ [ 'New York Yankees', 'Atlanta Braves' ] => [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ] }, <<EOY
? # PLAY SCHEDULE
- Detroit Tigers
- Chicago Cubs
@@ -269,16 +267,16 @@ EOY
: [ 2001-07-02, 2001-08-12,
2001-08-14 ]
EOY
- )
-
- # Complex key #2
- assert_parse_only(
- { [ 'New York Yankees', 'Atlanta Braves' ] =>
- [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ),
- Date.new( 2001, 8, 14 ) ],
- [ 'Detroit Tigers', 'Chicago Cubs' ] =>
- [ Date.new( 2001, 7, 23 ) ]
- }, <<EOY
+ )
+
+ # Complex key #2
+ assert_parse_only(
+ { [ 'New York Yankees', 'Atlanta Braves' ] =>
+ [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ),
+ Date.new( 2001, 8, 14 ) ],
+ [ 'Detroit Tigers', 'Chicago Cubs' ] =>
+ [ Date.new( 2001, 7, 23 ) ]
+ }, <<EOY
?
- New York Yankees
- Atlanta Braves
@@ -292,17 +290,17 @@ EOY
:
- 2001-07-23
EOY
- )
- end
-
- def test_spec_sequence_key_shortcut
- # Shortcut sequence map
- assert_parse_only(
- { 'invoice' => 34843, 'date' => Date.new( 2001, 1, 23 ),
- 'bill-to' => 'Chris Dumars', 'product' =>
- [ { 'item' => 'Super Hoop', 'quantity' => 1 },
- { 'item' => 'Basketball', 'quantity' => 4 },
- { 'item' => 'Big Shoes', 'quantity' => 1 } ] }, <<EOY
+ )
+ end
+
+ def test_spec_sequence_key_shortcut
+ # Shortcut sequence map
+ assert_parse_only(
+ { 'invoice' => 34843, 'date' => Date.new( 2001, 1, 23 ),
+ 'bill-to' => 'Chris Dumars', 'product' =>
+ [ { 'item' => 'Super Hoop', 'quantity' => 1 },
+ { 'item' => 'Basketball', 'quantity' => 4 },
+ { 'item' => 'Big Shoes', 'quantity' => 1 } ] }, <<EOY
invoice: 34843
date : 2001-01-23
bill-to: Chris Dumars
@@ -314,8 +312,8 @@ product:
- item : Big Shoes
quantity: 1
EOY
- )
- end
+ )
+ end
def test_spec_sequence_in_sequence_shortcut
# Seq-in-seq
@@ -351,31 +349,31 @@ EOY
EOY
end
- def test_spec_single_literal
- # Literal scalar block
- assert_parse_only( [ "\\/|\\/|\n/ | |_\n" ], <<EOY )
+ def test_spec_single_literal
+ # Literal scalar block
+ assert_parse_only( [ "\\/|\\/|\n/ | |_\n" ], <<EOY )
- |
\\/|\\/|
/ | |_
EOY
- end
+ end
- def test_spec_single_folded
- # Folded scalar block
- assert_parse_only(
- [ "Mark McGwire's year was crippled by a knee injury.\n" ], <<EOY
+ def test_spec_single_folded
+ # Folded scalar block
+ assert_parse_only(
+ [ "Mark McGwire's year was crippled by a knee injury.\n" ], <<EOY
- >
Mark McGwire\'s
year was crippled
by a knee injury.
EOY
- )
- end
+ )
+ end
- def test_spec_preserve_indent
- # Preserve indented spaces
- assert_parse_only(
- "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n", <<EOY
+ def test_spec_preserve_indent
+ # Preserve indented spaces
+ assert_parse_only(
+ "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n", <<EOY
--- >
Sammy Sosa completed another
fine season with great stats.
@@ -385,13 +383,13 @@ EOY
What a year!
EOY
- )
- end
+ )
+ end
- def test_spec_indentation_determines_scope
- assert_parse_only(
- { 'name' => 'Mark McGwire', 'accomplishment' => "Mark set a major league home run record in 1998.\n",
- 'stats' => "65 Home Runs\n0.278 Batting Average\n" }, <<EOY
+ def test_spec_indentation_determines_scope
+ assert_parse_only(
+ { 'name' => 'Mark McGwire', 'accomplishment' => "Mark set a major league home run record in 1998.\n",
+ 'stats' => "65 Home Runs\n0.278 Batting Average\n" }, <<EOY
name: Mark McGwire
accomplishment: >
Mark set a major league
@@ -400,14 +398,14 @@ stats: |
65 Home Runs
0.278 Batting Average
EOY
- )
- end
-
- def test_spec_multiline_scalars
- # Multiline flow scalars
- assert_parse_only(
- { 'plain' => 'This unquoted scalar spans many lines.',
- 'quoted' => "So does this quoted scalar.\n" }, <<EOY
+ )
+ end
+
+ def test_spec_multiline_scalars
+ # Multiline flow scalars
+ assert_parse_only(
+ { 'plain' => 'This unquoted scalar spans many lines.',
+ 'quoted' => "So does this quoted scalar.\n" }, <<EOY
plain: This unquoted
scalar spans
many lines.
@@ -415,19 +413,19 @@ quoted: "\\
So does this quoted
scalar.\\n"
EOY
- )
- end
+ )
+ end
- def test_spec_type_int
- assert_parse_only(
- { 'canonical' => 12345, 'decimal' => 12345, 'octal' => '014'.oct, 'hexadecimal' => '0xC'.hex }, <<EOY
+ def test_spec_type_int
+ assert_parse_only(
+ { 'canonical' => 12345, 'decimal' => 12345, 'octal' => '014'.oct, 'hexadecimal' => '0xC'.hex }, <<EOY
canonical: 12345
decimal: +12,345
octal: 014
hexadecimal: 0xC
EOY
- )
- assert_parse_only(
+ )
+ assert_parse_only(
{ 'canonical' => 685230, 'decimal' => 685230, 'octal' => 02472256, 'hexadecimal' => 0x0A74AE, 'sexagesimal' => 685230 }, <<EOY)
canonical: 685230
decimal: +685,230
@@ -435,48 +433,48 @@ octal: 02472256
hexadecimal: 0x0A,74,AE
sexagesimal: 190:20:30
EOY
- end
+ end
- def test_spec_type_float
- assert_parse_only(
- { 'canonical' => 1230.15, 'exponential' => 1230.15, 'fixed' => 1230.15,
- 'negative infinity' => -1.0/0.0 }, <<EOY)
+ def test_spec_type_float
+ assert_parse_only(
+ { 'canonical' => 1230.15, 'exponential' => 1230.15, 'fixed' => 1230.15,
+ 'negative infinity' => -1.0/0.0 }, <<EOY)
canonical: 1.23015e+3
exponential: 12.3015e+02
fixed: 1,230.15
negative infinity: -.inf
EOY
- nan = Psych::load( <<EOY )
+ nan = Psych::load( <<EOY )
not a number: .NaN
EOY
- assert( nan['not a number'].nan? )
- end
+ assert( nan['not a number'].nan? )
+ end
- def test_spec_type_misc
- assert_parse_only(
- { nil => nil, true => true, false => false, 'string' => '12345' }, <<EOY
+ def test_spec_type_misc
+ assert_parse_only(
+ { nil => nil, true => true, false => false, 'string' => '12345' }, <<EOY
null: ~
true: yes
false: no
string: '12345'
EOY
- )
- end
-
- def test_spec_complex_invoice
- # Complex invoice type
- id001 = { 'given' => 'Chris', 'family' => 'Dumars', 'address' =>
- { 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak',
- 'state' => 'MI', 'postal' => 48046 } }
- assert_parse_only(
- { 'invoice' => 34843, 'date' => Date.new( 2001, 1, 23 ),
- 'bill-to' => id001, 'ship-to' => id001, 'product' =>
- [ { 'sku' => 'BL394D', 'quantity' => 4,
- 'description' => 'Basketball', 'price' => 450.00 },
- { 'sku' => 'BL4438H', 'quantity' => 1,
- 'description' => 'Super Hoop', 'price' => 2392.00 } ],
- 'tax' => 251.42, 'total' => 4443.52,
- 'comments' => "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n" }, <<EOY
+ )
+ end
+
+ def test_spec_complex_invoice
+ # Complex invoice type
+ id001 = { 'given' => 'Chris', 'family' => 'Dumars', 'address' =>
+ { 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak',
+ 'state' => 'MI', 'postal' => 48046 } }
+ assert_parse_only(
+ { 'invoice' => 34843, 'date' => Date.new( 2001, 1, 23 ),
+ 'bill-to' => id001, 'ship-to' => id001, 'product' =>
+ [ { 'sku' => 'BL394D', 'quantity' => 4,
+ 'description' => 'Basketball', 'price' => 450.00 },
+ { 'sku' => 'BL4438H', 'quantity' => 1,
+ 'description' => 'Super Hoop', 'price' => 2392.00 } ],
+ 'tax' => 251.42, 'total' => 4443.52,
+ 'comments' => "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n" }, <<EOY
invoice: 34843
date : 2001-01-23
bill-to: &id001
@@ -507,12 +505,12 @@ comments: >
Backup contact is Nancy
Billsmer @ 338-4338.
EOY
- )
- end
+ )
+ end
- def test_spec_log_file
- doc_ct = 0
- Psych::load_stream( <<EOY
+ def test_spec_log_file
+ doc_ct = 0
+ Psych::load_stream( <<EOY
---
Time: 2001-11-23 15:01:42 -05:00
User: ed
@@ -540,52 +538,52 @@ Stack:
code: |-
foo = bar
EOY
- ) { |doc|
- case doc_ct
- when 0
- assert_equal( doc, { 'Time' => mktime( 2001, 11, 23, 15, 01, 42, 00, "-05:00" ),
- 'User' => 'ed', 'Warning' => "This is an error message for the log file\n" } )
- when 1
- assert_equal( doc, { 'Time' => mktime( 2001, 11, 23, 15, 02, 31, 00, "-05:00" ),
- 'User' => 'ed', 'Warning' => "A slightly different error message.\n" } )
- when 2
- assert_equal( doc, { 'Date' => mktime( 2001, 11, 23, 15, 03, 17, 00, "-05:00" ),
- 'User' => 'ed', 'Fatal' => "Unknown variable \"bar\"\n",
- 'Stack' => [
- { 'file' => 'TopClass.py', 'line' => 23, 'code' => "x = MoreObject(\"345\\n\")\n" },
- { 'file' => 'MoreClass.py', 'line' => 58, 'code' => "foo = bar" } ] } )
- end
- doc_ct += 1
- }
- assert_equal( doc_ct, 3 )
- end
-
- def test_spec_root_fold
- y = Psych::load( <<EOY
+ ) { |doc|
+ case doc_ct
+ when 0
+ assert_equal( doc, { 'Time' => mktime( 2001, 11, 23, 15, 01, 42, 00, "-05:00" ),
+ 'User' => 'ed', 'Warning' => "This is an error message for the log file\n" } )
+ when 1
+ assert_equal( doc, { 'Time' => mktime( 2001, 11, 23, 15, 02, 31, 00, "-05:00" ),
+ 'User' => 'ed', 'Warning' => "A slightly different error message.\n" } )
+ when 2
+ assert_equal( doc, { 'Date' => mktime( 2001, 11, 23, 15, 03, 17, 00, "-05:00" ),
+ 'User' => 'ed', 'Fatal' => "Unknown variable \"bar\"\n",
+ 'Stack' => [
+ { 'file' => 'TopClass.py', 'line' => 23, 'code' => "x = MoreObject(\"345\\n\")\n" },
+ { 'file' => 'MoreClass.py', 'line' => 58, 'code' => "foo = bar" } ] } )
+ end
+ doc_ct += 1
+ }
+ assert_equal( doc_ct, 3 )
+ end
+
+ def test_spec_root_fold
+ y = Psych::load( <<EOY
---
This Psych stream contains a single text value.
The next stream is a log file - a sequence of
log entries. Adding an entry to the log is a
simple matter of appending it at the end.
EOY
- )
- assert_equal( y, "This Psych stream contains a single text value. The next stream is a log file - a sequence of log entries. Adding an entry to the log is a simple matter of appending it at the end." )
- end
+ )
+ assert_equal( y, "This Psych stream contains a single text value. The next stream is a log file - a sequence of log entries. Adding an entry to the log is a simple matter of appending it at the end." )
+ end
- def test_spec_root_mapping
- y = Psych::unsafe_load( <<EOY
+ def test_spec_root_mapping
+ y = Psych::unsafe_load( <<EOY
# This stream is an example of a top-level mapping.
invoice : 34843
date : 2001-01-23
total : 4443.52
EOY
- )
- assert_equal( y, { 'invoice' => 34843, 'date' => Date.new( 2001, 1, 23 ), 'total' => 4443.52 } )
- end
+ )
+ assert_equal( y, { 'invoice' => 34843, 'date' => Date.new( 2001, 1, 23 ), 'total' => 4443.52 } )
+ end
- def test_spec_oneline_docs
- doc_ct = 0
- Psych::load_stream( <<EOY
+ def test_spec_oneline_docs
+ doc_ct = 0
+ Psych::load_stream( <<EOY
# The following is a sequence of three documents.
# The first contains an empty mapping, the second
# an empty sequence, and the last an empty string.
@@ -593,21 +591,21 @@ EOY
--- [ ]
--- ''
EOY
- ) { |doc|
- case doc_ct
- when 0
- assert_equal( doc, {} )
- when 1
- assert_equal( doc, [] )
- when 2
- assert_equal( doc, '' )
- end
- doc_ct += 1
- }
- assert_equal( doc_ct, 3 )
- end
-
- def test_spec_domain_prefix
+ ) { |doc|
+ case doc_ct
+ when 0
+ assert_equal( doc, {} )
+ when 1
+ assert_equal( doc, [] )
+ when 2
+ assert_equal( doc, '' )
+ end
+ doc_ct += 1
+ }
+ assert_equal( doc_ct, 3 )
+ end
+
+ def test_spec_domain_prefix
customer_proc = proc { |type, val|
if Hash === val
_, _, type = type.split( ':', 3 )
@@ -619,7 +617,7 @@ EOY
}
Psych.add_domain_type( "domain.tld/2002", 'invoice', &customer_proc )
Psych.add_domain_type( "domain.tld/2002", 'customer', &customer_proc )
- assert_parse_only( { "invoice"=> { "customers"=> [ { "given"=>"Chris", "type"=>"domain customer", "family"=>"Dumars" } ], "type"=>"domain invoice" } }, <<EOY
+ assert_parse_only( { "invoice"=> { "customers"=> [ { "given"=>"Chris", "type"=>"domain customer", "family"=>"Dumars" } ], "type"=>"domain invoice" } }, <<EOY
# 'http://domain.tld,2002/invoice' is some type family.
invoice: !domain.tld/2002:invoice
# 'seq' is shorthand for 'http://yaml.org/seq'.
@@ -632,12 +630,12 @@ invoice: !domain.tld/2002:invoice
given : Chris
family : Dumars
EOY
- )
- end
+ )
+ end
- def test_spec_throwaway
- assert_parse_only(
- {"this"=>"contains three lines of text.\nThe third one starts with a\n# character. This isn't a comment.\n"}, <<EOY
+ def test_spec_throwaway
+ assert_parse_only(
+ {"this"=>"contains three lines of text.\nThe third one starts with a\n# character. This isn't a comment.\n"}, <<EOY
### These are four throwaway comment ###
### lines (the second line is empty). ###
@@ -649,19 +647,19 @@ this: | # Comments may trail lines.
# These are three throwaway comment
# lines (the first line is empty).
EOY
- )
- end
+ )
+ end
- def test_spec_force_implicit
- # Force implicit
- assert_parse_only(
- { 'integer' => 12, 'also int' => 12, 'string' => '12' }, <<EOY
+ def test_spec_force_implicit
+ # Force implicit
+ assert_parse_only(
+ { 'integer' => 12, 'also int' => 12, 'string' => '12' }, <<EOY
integer: 12
also int: ! "12"
string: !str 12
EOY
- )
- end
+ )
+ end
###
# Commenting out this test. This line:
@@ -672,44 +670,44 @@ EOY
#
# http://yaml.org/spec/1.1/#id896876
#
-# def test_spec_url_escaping
-# Psych.add_domain_type( "domain.tld,2002", "type0" ) { |type, val|
-# "ONE: #{val}"
-# }
-# Psych.add_domain_type( "domain.tld,2002", "type%30" ) { |type, val|
-# "TWO: #{val}"
-# }
-# assert_parse_only(
-# { 'same' => [ 'ONE: value', 'ONE: value' ], 'different' => [ 'TWO: value' ] }, <<EOY
+# def test_spec_url_escaping
+# Psych.add_domain_type( "domain.tld,2002", "type0" ) { |type, val|
+# "ONE: #{val}"
+# }
+# Psych.add_domain_type( "domain.tld,2002", "type%30" ) { |type, val|
+# "TWO: #{val}"
+# }
+# assert_parse_only(
+# { 'same' => [ 'ONE: value', 'ONE: value' ], 'different' => [ 'TWO: value' ] }, <<EOY
#same:
# - !domain.tld,2002/type\\x30 value
# - !domain.tld,2002/type0 value
#different: # As far as the Psych parser is concerned
# - !domain.tld,2002/type%30 value
#EOY
-# )
-# end
-
- def test_spec_override_anchor
- # Override anchor
- a001 = "The alias node below is a repeated use of this value.\n"
- assert_parse_only(
- { 'anchor' => 'This scalar has an anchor.', 'override' => a001, 'alias' => a001 }, <<EOY
+# )
+# end
+
+ def test_spec_override_anchor
+ # Override anchor
+ a001 = "The alias node below is a repeated use of this value.\n"
+ assert_parse_only(
+ { 'anchor' => 'This scalar has an anchor.', 'override' => a001, 'alias' => a001 }, <<EOY
anchor : &A001 This scalar has an anchor.
override : &A001 >
The alias node below is a
repeated use of this value.
alias : *A001
EOY
- )
- end
+ )
+ end
- def test_spec_explicit_families
+ def test_spec_explicit_families
Psych.add_domain_type( "somewhere.com/2002", 'type' ) { |type, val|
"SOMEWHERE: #{val}"
}
- assert_parse_only(
- { 'not-date' => '2002-04-28', 'picture' => "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236i^\020' \202\n\001\000;", 'hmm' => "SOMEWHERE: family above is short for\nhttp://somewhere.com/type\n" }, <<EOY
+ assert_parse_only(
+ { 'not-date' => '2002-04-28', 'picture' => "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236i^\020' \202\n\001\000;", 'hmm' => "SOMEWHERE: family above is short for\nhttp://somewhere.com/type\n" }, <<EOY
not-date: !str 2002-04-28
picture: !binary |
R0lGODlhDAAMAIQAAP//9/X
@@ -721,34 +719,34 @@ hmm: !somewhere.com/2002:type |
family above is short for
http://somewhere.com/type
EOY
- )
- end
-
- def test_spec_application_family
- # Testing the clarkevans.com graphs
- Psych.add_domain_type( "clarkevans.com/2002", 'graph/shape' ) { |type, val|
- if Array === val
- val << "Shape Container"
- val
- else
- raise ArgumentError, "Invalid graph of type #{val.class}: " + val.inspect
- end
- }
- one_shape_proc = Proc.new { |type, val|
- if Hash === val
+ )
+ end
+
+ def test_spec_application_family
+ # Testing the clarkevans.com graphs
+ Psych.add_domain_type( "clarkevans.com/2002", 'graph/shape' ) { |type, val|
+ if Array === val
+ val << "Shape Container"
+ val
+ else
+ raise ArgumentError, "Invalid graph of type #{val.class}: " + val.inspect
+ end
+ }
+ one_shape_proc = Proc.new { |type, val|
+ if Hash === val
type = type.split( /:/ )
- val['TYPE'] = "Shape: #{type[2]}"
- val
- else
- raise ArgumentError, "Invalid graph of type #{val.class}: " + val.inspect
- end
- }
- Psych.add_domain_type( "clarkevans.com/2002", 'graph/circle', &one_shape_proc )
- Psych.add_domain_type( "clarkevans.com/2002", 'graph/line', &one_shape_proc )
- Psych.add_domain_type( "clarkevans.com/2002", 'graph/text', &one_shape_proc )
+ val['TYPE'] = "Shape: #{type[2]}"
+ val
+ else
+ raise ArgumentError, "Invalid graph of type #{val.class}: " + val.inspect
+ end
+ }
+ Psych.add_domain_type( "clarkevans.com/2002", 'graph/circle', &one_shape_proc )
+ Psych.add_domain_type( "clarkevans.com/2002", 'graph/line', &one_shape_proc )
+ Psych.add_domain_type( "clarkevans.com/2002", 'graph/text', &one_shape_proc )
# MODIFIED to remove invalid Psych
- assert_parse_only(
- [[{"radius"=>7, "center"=>{"x"=>73, "y"=>129}, "TYPE"=>"Shape: graph/circle"}, {"finish"=>{"x"=>89, "y"=>102}, "TYPE"=>"Shape: graph/line", "start"=>{"x"=>73, "y"=>129}}, {"TYPE"=>"Shape: graph/text", "value"=>"Pretty vector drawing.", "start"=>{"x"=>73, "y"=>129}, "color"=>16772795}, "Shape Container"]], <<EOY
+ assert_parse_only(
+ [[{"radius"=>7, "center"=>{"x"=>73, "y"=>129}, "TYPE"=>"Shape: graph/circle"}, {"finish"=>{"x"=>89, "y"=>102}, "TYPE"=>"Shape: graph/line", "start"=>{"x"=>73, "y"=>129}}, {"TYPE"=>"Shape: graph/text", "value"=>"Pretty vector drawing.", "start"=>{"x"=>73, "y"=>129}, "color"=>16772795}, "Shape Container"]], <<EOY
- !clarkevans.com/2002:graph/shape
- !/graph/circle
center: &ORIGIN {x: 73, y: 129}
@@ -761,12 +759,12 @@ EOY
color: 0xFFEEBB
value: Pretty vector drawing.
EOY
- )
- end
+ )
+ end
- def test_spec_float_explicit
- assert_parse_only(
- [ 10.0, 10.0, 10.0, 10.0 ], <<EOY
+ def test_spec_float_explicit
+ assert_parse_only(
+ [ 10.0, 10.0, 10.0, 10.0 ], <<EOY
# All entries in the sequence
# have the same type and value.
- 10.0
@@ -776,15 +774,15 @@ EOY
1\\
0"
EOY
- )
- end
-
- def test_spec_builtin_seq
- # Assortment of sequences
- assert_parse_only(
- { 'empty' => [], 'in-line' => [ 'one', 'two', 'three', 'four', 'five' ],
- 'nested' => [ 'First item in top sequence', [ 'Subordinate sequence entry' ],
- "A multi-line sequence entry\n", 'Sixth item in top sequence' ] }, <<EOY
+ )
+ end
+
+ def test_spec_builtin_seq
+ # Assortment of sequences
+ assert_parse_only(
+ { 'empty' => [], 'in-line' => [ 'one', 'two', 'three', 'four', 'five' ],
+ 'nested' => [ 'First item in top sequence', [ 'Subordinate sequence entry' ],
+ "A multi-line sequence entry\n", 'Sixth item in top sequence' ] }, <<EOY
empty: []
in-line: [ one, two, three # May span lines,
, four, # indentation is
@@ -798,24 +796,24 @@ nested:
sequence entry
- Sixth item in top sequence
EOY
- )
- end
-
- def test_spec_builtin_map
- # Assortment of mappings
- assert_parse_only(
- { 'empty' => {}, 'in-line' => { 'one' => 1, 'two' => 2 },
- 'spanning' => { 'one' => 1, 'two' => 2 },
- 'nested' => { 'first' => 'First entry', 'second' =>
- { 'key' => 'Subordinate mapping' }, 'third' =>
- [ 'Subordinate sequence', {}, 'Previous mapping is empty.',
- { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' },
- 'The previous entry is equal to the following one.',
- { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' } ],
- 12.0 => 'This key is a float.', "?\n" => 'This key had to be protected.',
- "\a" => 'This key had to be escaped.',
- "This is a multi-line folded key\n" => "Whose value is also multi-line.\n",
- [ 'This key', 'is a sequence' ] => [ 'With a sequence value.' ] } }, <<EOY
+ )
+ end
+
+ def test_spec_builtin_map
+ # Assortment of mappings
+ assert_parse_only(
+ { 'empty' => {}, 'in-line' => { 'one' => 1, 'two' => 2 },
+ 'spanning' => { 'one' => 1, 'two' => 2 },
+ 'nested' => { 'first' => 'First entry', 'second' =>
+ { 'key' => 'Subordinate mapping' }, 'third' =>
+ [ 'Subordinate sequence', {}, 'Previous mapping is empty.',
+ { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' },
+ 'The previous entry is equal to the following one.',
+ { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' } ],
+ 12.0 => 'This key is a float.', "?\n" => 'This key had to be protected.',
+ "\a" => 'This key had to be escaped.',
+ "This is a multi-line folded key\n" => "Whose value is also multi-line.\n",
+ [ 'This key', 'is a sequence' ] => [ 'With a sequence value.' ] } }, <<EOY
empty: {}
in-line: { one: 1, two: 2 }
@@ -860,13 +858,13 @@ nested:
# :
# with a: mapping value.
EOY
- )
- end
+ )
+ end
- def test_spec_builtin_literal_blocks
- # Assortment of literal scalar blocks
- assert_parse_only(
- {"both are equal to"=>" This has no newline.", "is equal to"=>"The \\ ' \" characters may be\nfreely used. Leading white\n space is significant.\n\nLine breaks are significant.\nThus this value contains one\nempty line and ends with a\nsingle line break, but does\nnot start with one.\n", "also written as"=>" This has no newline.", "indented and chomped"=>" This has no newline.", "empty"=>"", "literal"=>"The \\ ' \" characters may be\nfreely used. Leading white\n space is significant.\n\nLine breaks are significant.\nThus this value contains one\nempty line and ends with a\nsingle line break, but does\nnot start with one.\n"}, <<EOY
+ def test_spec_builtin_literal_blocks
+ # Assortment of literal scalar blocks
+ assert_parse_only(
+ {"both are equal to"=>" This has no newline.", "is equal to"=>"The \\ ' \" characters may be\nfreely used. Leading white\n space is significant.\n\nLine breaks are significant.\nThus this value contains one\nempty line and ends with a\nsingle line break, but does\nnot start with one.\n", "also written as"=>" This has no newline.", "indented and chomped"=>" This has no newline.", "empty"=>"", "literal"=>"The \\ ' \" characters may be\nfreely used. Leading white\n space is significant.\n\nLine breaks are significant.\nThus this value contains one\nempty line and ends with a\nsingle line break, but does\nnot start with one.\n"}, <<EOY
empty: |
literal: |
@@ -900,15 +898,15 @@ also written as: |-2
both are equal to: " This has no newline."
EOY
- )
-
- str1 = "This has one newline.\n"
- str2 = "This has no newline."
- str3 = "This has two newlines.\n\n"
- assert_parse_only(
- { 'clipped' => str1, 'same as "clipped" above' => str1,
- 'stripped' => str2, 'same as "stripped" above' => str2,
- 'kept' => str3, 'same as "kept" above' => str3 }, <<EOY
+ )
+
+ str1 = "This has one newline.\n"
+ str2 = "This has no newline."
+ str3 = "This has two newlines.\n\n"
+ assert_parse_only(
+ { 'clipped' => str1, 'same as "clipped" above' => str1,
+ 'stripped' => str2, 'same as "stripped" above' => str2,
+ 'kept' => str3, 'same as "kept" above' => str3 }, <<EOY
clipped: |
This has one newline.
@@ -925,11 +923,11 @@ kept: |+
same as "kept" above: "This has two newlines.\\n\\n"
EOY
- )
- end
+ )
+ end
- def test_spec_span_single_quote
- assert_parse_only( {"third"=>"a single quote ' must be escaped.", "second"=>"! : \\ etc. can be used freely.", "is same as"=>"this contains six spaces\nand one line break", "empty"=>"", "span"=>"this contains six spaces\nand one line break"}, <<EOY
+ def test_spec_span_single_quote
+ assert_parse_only( {"third"=>"a single quote ' must be escaped.", "second"=>"! : \\ etc. can be used freely.", "is same as"=>"this contains six spaces\nand one line break", "empty"=>"", "span"=>"this contains six spaces\nand one line break"}, <<EOY
empty: ''
second: '! : \\ etc. can be used freely.'
third: 'a single quote '' must be escaped.'
@@ -940,11 +938,11 @@ span: 'this contains
line break'
is same as: "this contains six spaces\\nand one line break"
EOY
- )
- end
+ )
+ end
- def test_spec_span_double_quote
- assert_parse_only( {"is equal to"=>"this contains four spaces", "third"=>"a \" or a \\ must be escaped.", "second"=>"! : etc. can be used freely.", "empty"=>"", "fourth"=>"this value ends with an LF.\n", "span"=>"this contains four spaces"}, <<EOY
+ def test_spec_span_double_quote
+ assert_parse_only( {"is equal to"=>"this contains four spaces", "third"=>"a \" or a \\ must be escaped.", "second"=>"! : etc. can be used freely.", "empty"=>"", "fourth"=>"this value ends with an LF.\n", "span"=>"this contains four spaces"}, <<EOY
empty: ""
second: "! : etc. can be used freely."
third: "a \\\" or a \\\\ must be escaped."
@@ -954,29 +952,29 @@ span: "this contains
spaces"
is equal to: "this contains four spaces"
EOY
- )
- end
-
- def test_spec_builtin_time
- # Time
- assert_parse_only(
- { "space separated" => mktime( 2001, 12, 14, 21, 59, 43, ".10", "-05:00" ),
- "canonical" => mktime( 2001, 12, 15, 2, 59, 43, ".10" ),
- "date (noon UTC)" => Date.new( 2002, 12, 14),
- "valid iso8601" => mktime( 2001, 12, 14, 21, 59, 43, ".10", "-05:00" ) }, <<EOY
+ )
+ end
+
+ def test_spec_builtin_time
+ # Time
+ assert_parse_only(
+ { "space separated" => mktime( 2001, 12, 14, 21, 59, 43, ".10", "-05:00" ),
+ "canonical" => mktime( 2001, 12, 15, 2, 59, 43, ".10" ),
+ "date (noon UTC)" => Date.new( 2002, 12, 14),
+ "valid iso8601" => mktime( 2001, 12, 14, 21, 59, 43, ".10", "-05:00" ) }, <<EOY
canonical: 2001-12-15T02:59:43.1Z
valid iso8601: 2001-12-14t21:59:43.10-05:00
space separated: 2001-12-14 21:59:43.10 -05:00
date (noon UTC): 2002-12-14
EOY
- )
- end
-
- def test_spec_builtin_binary
- arrow_gif = "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236iiiccc\243\243\243\204\204\204\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371!\376\016Made with GIMP\000,\000\000\000\000\f\000\f\000\000\005, \216\2010\236\343@\024\350i\020\304\321\212\010\034\317\200M$z\357\3770\205p\270\2601f\r\e\316\001\303\001\036\020' \202\n\001\000;"
- assert_parse_only(
- { 'canonical' => arrow_gif, 'base64' => arrow_gif,
- 'description' => "The binary value above is a tiny arrow encoded as a gif image.\n" }, <<EOY
+ )
+ end
+
+ def test_spec_builtin_binary
+ arrow_gif = "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236iiiccc\243\243\243\204\204\204\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371!\376\016Made with GIMP\000,\000\000\000\000\f\000\f\000\000\005, \216\2010\236\343@\024\350i\020\304\321\212\010\034\317\200M$z\357\3770\205p\270\2601f\r\e\316\001\303\001\036\020' \202\n\001\000;"
+ assert_parse_only(
+ { 'canonical' => arrow_gif, 'base64' => arrow_gif,
+ 'description' => "The binary value above is a tiny arrow encoded as a gif image.\n" }, <<EOY
canonical: !binary "\\
R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOf\\
n515eXvPz7Y6OjuDg4J+fn5OTk6enp56enmlpaW\\
@@ -997,19 +995,19 @@ description: >
The binary value above is a tiny arrow
encoded as a gif image.
EOY
- )
- end
- def test_ruby_regexp
- # Test Ruby regular expressions
- assert_to_yaml(
- { 'simple' => /a.b/, 'complex' => %r'\A"((?:[^"]|\")+)"',
- 'case-insensitive' => /George McFly/i }, <<EOY
+ )
+ end
+ def test_ruby_regexp
+ # Test Ruby regular expressions
+ assert_to_yaml(
+ { 'simple' => /a.b/, 'complex' => %r'\A"((?:[^"]|\")+)"',
+ 'case-insensitive' => /George McFly/i }, <<EOY
case-insensitive: !ruby/regexp "/George McFly/i"
complex: !ruby/regexp "/\\\\A\\"((?:[^\\"]|\\\\\\")+)\\"/"
simple: !ruby/regexp "/a.b/"
EOY
- )
- end
+ )
+ end
#
# Test of Ranges
@@ -1033,15 +1031,15 @@ EOY
end
- def test_ruby_struct
- Struct.send(:remove_const, :MyBookStruct) if Struct.const_defined?(:MyBookStruct)
- # Ruby structures
- book_struct = Struct::new( "MyBookStruct", :author, :title, :year, :isbn )
- assert_to_yaml(
- [ book_struct.new( "Yukihiro Matsumoto", "Ruby in a Nutshell", 2002, "0-596-00214-9" ),
- book_struct.new( [ 'Dave Thomas', 'Andy Hunt' ], "The Pickaxe", 2002,
- book_struct.new( "This should be the ISBN", "but I have another struct here", 2002, "None" )
- ) ], <<EOY
+ def test_ruby_struct
+ Struct.send(:remove_const, :MyBookStruct) if Struct.const_defined?(:MyBookStruct)
+ # Ruby structures
+ book_struct = Struct::new( "MyBookStruct", :author, :title, :year, :isbn )
+ assert_to_yaml(
+ [ book_struct.new( "Yukihiro Matsumoto", "Ruby in a Nutshell", 2002, "0-596-00214-9" ),
+ book_struct.new( [ 'Dave Thomas', 'Andy Hunt' ], "The Pickaxe", 2002,
+ book_struct.new( "This should be the ISBN", "but I have another struct here", 2002, "None" )
+ ) ], <<EOY
- !ruby/struct:MyBookStruct
author: Yukihiro Matsumoto
title: Ruby in a Nutshell
@@ -1059,64 +1057,64 @@ EOY
year: 2002
isbn: None
EOY
- )
+ )
assert_to_yaml( Psych_Tests::StructTest.new( 123 ), <<EOY )
--- !ruby/struct:Psych_Tests::StructTest
c: 123
EOY
- end
+ end
- def test_ruby_rational
- assert_to_yaml( Rational(1, 2), <<EOY )
+ def test_ruby_rational
+ assert_to_yaml( Rational(1, 2), <<EOY )
--- !ruby/object:Rational
numerator: 1
denominator: 2
EOY
- # Read Psych dumped by the ruby 1.8.3.
- assert_to_yaml( Rational(1, 2), "!ruby/object:Rational 1/2\n" )
- assert_raise( ArgumentError ) { Psych.unsafe_load("!ruby/object:Rational INVALID/RATIONAL\n") }
- end
+ # Read Psych dumped by the ruby 1.8.3.
+ assert_to_yaml( Rational(1, 2), "!ruby/object:Rational 1/2\n" )
+ assert_raise( ArgumentError ) { Psych.unsafe_load("!ruby/object:Rational INVALID/RATIONAL\n") }
+ end
- def test_ruby_complex
- assert_to_yaml( Complex(3, 4), <<EOY )
+ def test_ruby_complex
+ assert_to_yaml( Complex(3, 4), <<EOY )
--- !ruby/object:Complex
image: 4
real: 3
EOY
- # Read Psych dumped by the ruby 1.8.3.
- assert_to_yaml( Complex(3, 4), "!ruby/object:Complex 3+4i\n" )
- assert_raise( ArgumentError ) { Psych.unsafe_load("!ruby/object:Complex INVALID+COMPLEXi\n") }
- end
+ # Read Psych dumped by the ruby 1.8.3.
+ assert_to_yaml( Complex(3, 4), "!ruby/object:Complex 3+4i\n" )
+ assert_raise( ArgumentError ) { Psych.unsafe_load("!ruby/object:Complex INVALID+COMPLEXi\n") }
+ end
- def test_emitting_indicators
- assert_to_yaml( "Hi, from Object 1. You passed: please, pretty please", <<EOY
+ def test_emitting_indicators
+ assert_to_yaml( "Hi, from Object 1. You passed: please, pretty please", <<EOY
--- "Hi, from Object 1. You passed: please, pretty please"
EOY
- )
- end
-
- ##
- ## Test the Psych::Stream class -- INACTIVE at the moment
- ##
- #def test_document
- # y = Psych::Stream.new( :Indent => 2, :UseVersion => 0 )
- # y.add(
- # { 'hi' => 'hello', 'map' =>
- # { 'good' => 'two' },
- # 'time' => Time.now,
- # 'try' => /^po(.*)$/,
- # 'bye' => 'goodbye'
- # }
- # )
- # y.add( { 'po' => 'nil', 'oper' => 90 } )
- # y.add( { 'hi' => 'wow!', 'bye' => 'wow!' } )
- # y.add( { [ 'Red Socks', 'Boston' ] => [ 'One', 'Two', 'Three' ] } )
- # y.add( [ true, false, false ] )
- #end
+ )
+ end
+
+ ##
+ ## Test the Psych::Stream class -- INACTIVE at the moment
+ ##
+ #def test_document
+ # y = Psych::Stream.new( :Indent => 2, :UseVersion => 0 )
+ # y.add(
+ # { 'hi' => 'hello', 'map' =>
+ # { 'good' => 'two' },
+ # 'time' => Time.now,
+ # 'try' => /^po(.*)$/,
+ # 'bye' => 'goodbye'
+ # }
+ # )
+ # y.add( { 'po' => 'nil', 'oper' => 90 } )
+ # y.add( { 'hi' => 'wow!', 'bye' => 'wow!' } )
+ # y.add( { [ 'Red Socks', 'Boston' ] => [ 'One', 'Two', 'Three' ] } )
+ # y.add( [ true, false, false ] )
+ #end
#
# Test YPath choices parsing
diff --git a/test/rdoc/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text b/test/rdoc/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text
index 184018a5ac..2fe1e3f00e 100644
--- a/test/rdoc/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text
+++ b/test/rdoc/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text
@@ -608,7 +608,7 @@ or tabs for padding, which tends to look better with longer URLs:
Link definitions are only used for creating links during Markdown
processing, and are stripped from your document in the HTML output.
-Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are *not* case sensitive. E.g. these two links:
+Link definition names may consist of letters, numbers, spaces, and punctuation -- but they are *not* case sensitive. E.g. these two links:
[link text][a]
[link text][A]
diff --git a/test/rdoc/MarkdownTest_1.0.3/Tidyness.text b/test/rdoc/MarkdownTest_1.0.3/Tidiness.text
index 5f18b8da21..5f18b8da21 100644
--- a/test/rdoc/MarkdownTest_1.0.3/Tidyness.text
+++ b/test/rdoc/MarkdownTest_1.0.3/Tidiness.text
diff --git a/test/rdoc/test_rdoc_generator_darkfish.rb b/test/rdoc/test_rdoc_generator_darkfish.rb
index 96319bb4f7..899e697de6 100644
--- a/test/rdoc/test_rdoc_generator_darkfish.rb
+++ b/test/rdoc/test_rdoc_generator_darkfish.rb
@@ -115,7 +115,7 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase
assert_match(%r[Klass/Inner\.html".*>Inner<], summary)
klass = File.binread('Klass.html')
- klassnav = klass[%r[<div class="nav-section">.*<div id="class-metadata">]m]
+ klassnav = klass[%r[<div class="nav-section">.*]m]
assert_match(
%r[<li>\s*<details open>\s*<summary>\s*<a href=\S+>Heading 1</a>\s*</summary>\s*<ul]m,
klassnav
diff --git a/test/rdoc/test_rdoc_markdown.rb b/test/rdoc/test_rdoc_markdown.rb
index 31d5b068f9..72587caf46 100644
--- a/test/rdoc/test_rdoc_markdown.rb
+++ b/test/rdoc/test_rdoc_markdown.rb
@@ -414,10 +414,23 @@ two
end
def test_parse_heading_atx
- doc = parse "# heading\n"
+ # CommonMark Example 62
+ (1..6).each do |level|
+ doc = parse "#{"#" * level} heading\n"
+
+ expected = @RM::Document.new(
+ @RM::Heading.new(level, "heading"))
+
+ assert_equal expected, doc
+ end
+
+ # CommonMark Example 64
+ doc = parse "#5 bolt\n\n#hashtag\n"
expected = @RM::Document.new(
- @RM::Heading.new(1, "heading"))
+ para("#5 bolt"),
+ para("#hashtag"),
+ )
assert_equal expected, doc
end
diff --git a/test/rdoc/test_rdoc_markdown_test.rb b/test/rdoc/test_rdoc_markdown_test.rb
index d4f894c924..193d648253 100644
--- a/test/rdoc/test_rdoc_markdown_test.rb
+++ b/test/rdoc/test_rdoc_markdown_test.rb
@@ -1401,7 +1401,7 @@ foo
para("Link definitions are only used for creating links during Markdown\n" +
"processing, and are stripped from your document in the HTML output."),
- para("Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are _not_ case sensitive. E.g. these two links:"),
+ para("Link definition names may consist of letters, numbers, spaces, and punctuation -- but they are _not_ case sensitive. E.g. these two links:"),
verb("[link text][a]\n",
"[link text][A]\n"),
@@ -1863,8 +1863,8 @@ foo
assert_equal expected, doc
end
- def test_tidyness
- input = File.read "#{MARKDOWN_TEST_PATH}/Tidyness.text"
+ def test_tidiness
+ input = File.read "#{MARKDOWN_TEST_PATH}/Tidiness.text"
doc = @parser.parse input
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index fa6443f3d3..51a16ce361 100644
--- a/test/rdoc/test_rdoc_parser.rb
+++ b/test/rdoc/test_rdoc_parser.rb
@@ -3,16 +3,12 @@
require_relative 'helper'
-class TestRDocParser < RDoc::TestCase
-
+class RDocParserTest < RDoc::TestCase
def setup
super
@RP = RDoc::Parser
- @binary_dat = File.expand_path '../binary.dat', __FILE__
-
- @fn = 'file.rb'
- @top_level = RDoc::TopLevel.new @fn
+ @binary_dat_fixture_path = File.expand_path '../binary.dat', __FILE__
@options = RDoc::Options.new
end
@@ -71,7 +67,7 @@ class TestRDocParser < RDoc::TestCase
assert_equal @RP::Simple, @RP.can_parse(readme_file_name)
- assert_equal @RP::Simple, @RP.can_parse(@binary_dat)
+ assert_equal @RP::Simple, @RP.can_parse(@binary_dat_fixture_path)
jtest_file_name = File.expand_path '../test.ja.txt', __FILE__
assert_equal @RP::Simple, @RP.can_parse(jtest_file_name)
@@ -90,16 +86,12 @@ class TestRDocParser < RDoc::TestCase
end
def test_class_for_executable
- temp_dir do
- content = "#!/usr/bin/env ruby -w\n"
- File.open 'app', 'w' do |io| io.write content end
- app = @store.add_file 'app'
-
- parser = @RP.for app, 'app', content, @options, :stats
+ with_top_level("app", "#!/usr/bin/env ruby -w\n") do |top_level, content|
+ parser = @RP.for top_level, content, @options, :stats
assert_kind_of RDoc::Parser::Ruby, parser
- assert_equal 'app', parser.file_name
+ assert_equal top_level.absolute_name, parser.file_name
end
end
@@ -111,7 +103,7 @@ class TestRDocParser < RDoc::TestCase
File.chmod 0000, io.path
forbidden = @store.add_file io.path
- parser = @RP.for forbidden, 'forbidden', '', @options, :stats
+ parser = @RP.for forbidden, '', @options, :stats
assert_nil parser
ensure
@@ -123,13 +115,8 @@ class TestRDocParser < RDoc::TestCase
end
def test_class_for_modeline
- temp_dir do
- content = "# -*- rdoc -*-\n= NEWS\n"
-
- File.open 'NEWS', 'w' do |io| io.write content end
- app = @store.add_file 'NEWS'
-
- parser = @RP.for app, 'NEWS', content, @options, :stats
+ with_top_level("NEWS", "# -*- rdoc -*-\n= NEWS\n") do |top_level, content|
+ parser = @RP.for top_level, content, @options, :stats
assert_kind_of RDoc::Parser::Simple, parser
@@ -226,25 +213,18 @@ class TestRDocParser < RDoc::TestCase
end
def test_class_for_binary
- rp = @RP.dup
-
- class << rp
- alias old_can_parse can_parse
+ dat_fixture = File.read(@binary_dat_fixture_path)
+ with_top_level("binary.dat", dat_fixture) do |top_level, content|
+ assert_nil @RP.for(top_level, content, @options, nil)
end
-
- def rp.can_parse(*args) nil end
-
- assert_nil @RP.for(nil, @binary_dat, nil, nil, nil)
end
def test_class_for_markup
- content = <<-CONTENT
-# coding: utf-8 markup: rd
- CONTENT
+ with_top_level("file.rb", "# coding: utf-8 markup: rd") do |top_level, content|
+ parser = @RP.for top_level, content, @options, nil
- parser = @RP.for @top_level, __FILE__, content, @options, nil
-
- assert_kind_of @RP::RD, parser
+ assert_kind_of @RP::RD, parser
+ end
end
def test_class_use_markup
@@ -329,9 +309,26 @@ class TestRDocParser < RDoc::TestCase
end
def test_initialize
- @RP.new @top_level, @fn, '', @options, nil
+ with_top_level("file.rb", "") do |top_level, content|
+ @RP.new top_level, top_level.absolute_name, content, @options, nil
+
+ assert_equal @RP, top_level.parser
+ end
+ end
- assert_equal @RP, @top_level.parser
+ private
+
+ def with_top_level(filename, content, &block)
+ absoluate_filename = File.join Dir.tmpdir, filename
+ File.open absoluate_filename, 'w' do |io|
+ io.write content
+ end
+
+ top_level = RDoc::TopLevel.new absoluate_filename
+
+ yield(top_level, content)
+ ensure
+ File.unlink absoluate_filename
end
end
diff --git a/test/rdoc/test_rdoc_parser_prism_ruby.rb b/test/rdoc/test_rdoc_parser_prism_ruby.rb
new file mode 100644
index 0000000000..2ff11bb1a7
--- /dev/null
+++ b/test/rdoc/test_rdoc_parser_prism_ruby.rb
@@ -0,0 +1,1997 @@
+# frozen_string_literal: true
+
+require_relative 'helper'
+require 'rdoc/parser'
+require 'rdoc/parser/prism_ruby'
+
+module RDocParserPrismTestCases
+ def setup
+ super
+
+ @tempfile = Tempfile.new self.class.name
+ @filename = @tempfile.path
+
+ @top_level = @store.add_file @filename
+
+ @options = RDoc::Options.new
+ @options.quiet = true
+ @options.option_parser = OptionParser.new
+
+ @comment = RDoc::Comment.new '', @top_level
+
+ @stats = RDoc::Stats.new @store, 0
+ end
+
+ def teardown
+ super
+
+ @tempfile.close!
+ end
+
+ def test_look_for_directives_in_section
+ util_parser <<~RUBY
+ # :section: new section
+ RUBY
+ section = @top_level.current_section
+ assert_equal 'new section', section.title
+ end
+
+ def test_look_for_directives_in_commented
+ util_parser <<~RUBY
+ # how to make a section:
+ # # :section: new section
+ RUBY
+ section = @top_level.current_section
+ assert_nil section.title
+ end
+
+ def test_look_for_directives_in_unhandled
+ util_parser <<~RUBY
+ # :unhandled: blah
+ RUBY
+ assert_equal 'blah', @top_level.metadata['unhandled']
+ end
+
+ def test_block_comment
+ util_parser <<~RUBY
+ =begin rdoc
+ foo
+ =end
+ class A
+ =begin
+ bar
+ baz
+ =end
+ def f; end
+ end
+ RUBY
+ klass = @top_level.classes.first
+ meth = klass.method_list.first
+ assert_equal 'foo', klass.comment.text.strip
+ assert_equal "bar\nbaz", meth.comment.text.strip
+ end
+
+ def test_module
+ util_parser <<~RUBY
+ # my module
+ module Foo
+ end
+ RUBY
+ mod = @top_level.modules.first
+ assert_equal 'Foo', mod.full_name
+ assert_equal 'my module', mod.comment.text
+ assert_equal [@top_level], mod.in_files
+ end
+
+ def test_nested_module_with_colon
+ util_parser <<~RUBY
+ module Foo
+ module Bar; end
+ module Bar::Baz1; end
+ module ::Foo
+ module Bar2; end
+ end
+ end
+ module ::Baz; end
+ module Foo::Bar::Baz2
+ module ::Foo2
+ module Bar; end
+ end
+ module Blah; end
+ end
+ RUBY
+ module_names = @store.all_modules.map(&:full_name)
+ expected = %w[
+ Foo Foo::Bar Foo::Bar::Baz1 Foo::Bar2 Baz Foo::Bar::Baz2 Foo2 Foo2::Bar Foo::Bar::Baz2::Blah
+ ]
+ assert_equal expected.sort, module_names.sort
+ end
+
+ def test_class
+ util_parser <<~RUBY
+ # my class
+ class Foo
+ end
+ RUBY
+ klass = @top_level.classes.first
+ assert_equal 'Foo', klass.full_name
+ assert_equal 'my class', klass.comment.text
+ assert_equal [@top_level], klass.in_files
+ assert_equal 2, klass.line
+ end
+
+ def test_nested_class_with_colon
+ util_parser <<~RUBY
+ class Foo
+ class Bar; end
+ class Bar::Baz1; end
+ class ::Foo
+ class Bar2; end
+ end
+ end
+ class ::Baz; end
+ class Foo::Bar::Baz2
+ class ::Foo2
+ class Bar; end
+ end
+ class Blah; end
+ end
+ RUBY
+ class_names = @store.all_classes.map(&:full_name)
+ expected = %w[
+ Foo Foo::Bar Foo::Bar::Baz1 Foo::Bar2 Baz Foo::Bar::Baz2 Foo2 Foo2::Bar Foo::Bar::Baz2::Blah
+ ]
+ assert_equal expected.sort, class_names.sort
+ end
+
+ def test_open_class_with_superclass
+ util_parser <<~RUBY
+ class A; end
+
+ class B < A
+ def m1; end
+ end
+
+ class B < A
+ def m2; end
+ end
+
+ class C < String
+ def m1; end
+ end
+
+ class C < String
+ def m2; end
+ end
+ RUBY
+ classes = @top_level.classes
+ assert_equal 3, classes.size
+ _a, b, c = classes
+ assert_equal 'A', b.superclass.full_name
+ assert_equal 'String', c.superclass
+ assert_equal ['m1', 'm2'], b.method_list.map(&:name)
+ assert_equal ['m1', 'm2'], c.method_list.map(&:name)
+ end
+
+ def test_confusing_superclass
+ util_parser <<~RUBY
+ module A
+ class B; end
+ end
+
+ module A
+ class C1 < A::B; end
+ end
+
+ class A::C2 < A::B; end
+
+ module A::A
+ class B; end
+ end
+
+ module A
+ class C3 < A::B; end
+ end
+
+ class A::C4 < A::B; end
+ RUBY
+ mod = @top_level.modules.first
+ classes = mod.classes
+ assert_equal ['A::B', 'A::C1', 'A::C2', 'A::C3', 'A::C4'], classes.map(&:full_name)
+ assert_equal ['A::B', 'A::B', 'A::A::B', 'A::B'], classes.drop(1).map(&:superclass).map(&:full_name)
+ end
+
+ def test_class_module_nodoc
+ util_parser <<~RUBY
+ class Foo # :nodoc:
+ end
+
+ class Bar
+ end # :nodoc:
+
+ class Baz; end
+
+ class Baz::A; end # :nodoc:
+
+ module MFoo # :nodoc:
+ end
+
+ module MBar
+ end # :nodoc:
+
+ module MBaz; end
+
+ module MBaz::M; end; # :nodoc:
+ RUBY
+ documentables = @store.all_classes_and_modules.select(&:document_self)
+ assert_equal ['Baz', 'MBaz'], documentables.map(&:full_name) unless accept_legacy_bug?
+ end
+
+ def test_class_module_stopdoc
+ util_parser <<~RUBY
+ # comment
+ class Foo
+ class A; end
+ # :stopdoc:
+ class B; end
+ end
+
+ # comment
+ module Bar
+ module A; end
+ # :stopdoc:
+ module B; end
+ end
+ RUBY
+ klass = @top_level.classes.first
+ mod = @top_level.modules.first
+ assert_equal 'comment', klass.comment.text.strip
+ assert_equal 'comment', mod.comment.text.strip
+ assert_equal ['Foo::A'], klass.classes.select(&:document_self).map(&:full_name)
+ assert_equal ['Bar::A'], mod.modules.select(&:document_self).map(&:full_name)
+ end
+
+ def test_class_superclass
+ util_parser <<~RUBY
+ class Foo; end
+ class Bar < Foo
+ end
+ class Baz < (any expression)
+ end
+ RUBY
+ assert_equal ['Foo', 'Bar', 'Baz'], @top_level.classes.map(&:full_name)
+ foo, bar, baz = @top_level.classes
+ assert_equal foo, bar.superclass
+ assert_equal 'Object', baz.superclass unless accept_legacy_bug?
+ end
+
+ def test_class_new_notnew
+ util_parser <<~RUBY
+ class A
+ def initialize(*args); end
+ end
+
+ class B
+ ##
+ # :args: a, b, c
+ def initialize(*args); end
+ end
+
+ class C
+ def self.initialize(*args); end
+ end
+
+ class D
+ ##
+ # :args: a, b, c
+ def initialize(*args); end # :notnew:
+ end
+
+ class E
+ def initialize(*args); end # :not-new:
+ end
+
+ class F
+ def initialize(*args); end # :not_new:
+ end
+
+ class G
+ def initialize(*args)
+ end # :notnew:
+ end
+ RUBY
+
+ expected = [
+ 'new(*args)', 'new(a, b, c)',
+ 'initialize(*args)', 'initialize(a, b, c)',
+ 'initialize(*args)', 'initialize(*args)',
+ 'initialize(*args)'
+ ]
+ arglists = @top_level.classes.map { |c| c.method_list.first.arglists }
+ assert_equal expected, arglists
+ end
+
+ def test_class_mistaken_for_module
+ util_parser <<~RUBY
+ class A::Foo; end
+ class B::Foo; end
+ module C::Bar; end
+ module D::Baz; end
+ class A; end
+ class X < C; end
+ RUBY
+ assert_equal ['A', 'C', 'X'], @top_level.classes.map(&:full_name)
+ assert_equal ['B', 'D'], @top_level.modules.map(&:full_name)
+ end
+
+ def test_parenthesized_cdecl
+ util_parser <<~RUBY
+ module DidYouMean
+ # Not a module, but creates a dummy module for document
+ class << (NameErrorCheckers = Object.new)
+ def new; end
+ end
+ end
+ RUBY
+
+ mod = @store.find_class_or_module('DidYouMean').modules.first
+ assert_equal 'DidYouMean::NameErrorCheckers', mod.full_name
+ assert_equal ['DidYouMean::NameErrorCheckers::new'], mod.method_list.map(&:full_name)
+ end
+
+
+ def test_ghost_method
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # :method: one
+ #
+ # my method one
+
+ ##
+ # :method:
+ # :call-seq:
+ # two(name)
+ #
+ # my method two
+
+ ##
+ # :method: three
+ # :args: a, b
+ #
+ # my method three
+
+ # :stopdoc:
+
+ ##
+ # :method: hidden1
+ #
+ # comment
+
+ ##
+ # :method:
+ # :call-seq:
+ # hidden2(name)
+ #
+ # comment
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ assert_equal 3, klass.method_list.size
+ one, two, three = klass.method_list
+ assert_equal 'Foo#one', one.full_name
+ assert_equal 'Foo#two', two.full_name
+ assert_equal 'Foo#three', three.full_name
+ assert_equal 'two(name)', two.call_seq.chomp
+ assert_equal 'three(a, b)', three.arglists
+ assert_equal 'my method one', one.comment.text.strip
+ assert_equal 'my method two', two.comment.text.strip
+ assert_equal 'my method three', three.comment.text.strip
+ assert_equal 3, one.line
+ assert_equal 8, two.line
+ assert_equal 15, three.line
+ assert_equal @top_level, one.file
+ assert_equal @top_level, two.file
+ assert_equal @top_level, three.file
+ end
+
+ def test_invalid_meta_method
+ util_parser <<~RUBY
+ class Foo
+ # These are invalid meta method comments
+ # because meta method comment should start with `##`
+ # but rdoc accepts them as meta method comments for now.
+
+ # :method: m1
+
+ # :singleton-method: sm1
+
+ # :attr: a1
+
+ # :attr_reader: ar1
+
+ # :attr_writer: aw1
+
+ # :attr_accessor: arw1
+
+ # If there is a node following meta-like normal comment, it is not a meta method comment
+
+ # :method: m2
+ add_my_method(name)
+
+ # :singleton-method: sm2
+ add_my_singleton_method(name)
+
+ # :method:
+ add_my_method(:m3)
+
+ # :singleton-method:
+ add_my_singleton_method(:sm3)
+
+ # :attr:
+ add_my_attribute(:a2)
+
+ # :attr-reader:
+ add_my_attribute(:ar2)
+
+ # :attr-writer:
+ add_my_attribute(:aw2)
+
+ # :attr-accessor:
+ add_my_attribute(:arw2)
+
+ # :attr: a3
+ add_my_attribute_a3
+
+ # :attr-reader: ar3
+ add_my_attribute_ar3
+
+ # :attr-writer: aw3
+ add_my_attribute_aw2
+
+ # :attr-accessor: arw3
+ add_my_attribute_arw3
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ assert_equal ['m1', 'sm1'], klass.method_list.map(&:name)
+ assert_equal ['a1', 'ar1', 'aw1', 'arw1'], klass.attributes.map(&:name)
+ end
+
+ def test_unknown_meta_method
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # :call-seq:
+ # two(name)
+ #
+ # method or singleton-method directive is missing
+ end
+
+ class Bar
+ ##
+ # unknown meta method
+ add_my_method("foo" + "bar")
+ end
+ RUBY
+
+ foo = @store.find_class_named 'Foo'
+ bar = @store.find_class_named 'Bar'
+ assert_equal [], foo.method_list.map(&:name)
+ assert_equal ['unknown'], bar.method_list.map(&:name)
+ end
+
+ def test_method
+ util_parser <<~RUBY
+ class Foo
+ # my method one
+ def one; end
+ # my method two
+ def two(x); end
+ # my method three
+ def three x; end
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ assert_equal 3, klass.method_list.size
+ one, two, three = klass.method_list
+ assert_equal 'Foo#one', one.full_name
+ assert_equal 'Foo#two', two.full_name
+ assert_equal 'Foo#three', three.full_name
+ assert_equal 'one()', one.arglists
+ assert_equal 'two(x)', two.arglists
+ assert_equal 'three(x)', three.arglists unless accept_legacy_bug?
+ assert_equal 'my method one', one.comment.text.strip
+ assert_equal 'my method two', two.comment.text.strip
+ assert_equal 'my method three', three.comment.text.strip
+ assert_equal 3, one.line
+ assert_equal 5, two.line
+ assert_equal 7, three.line
+ assert_equal @top_level, one.file
+ assert_equal @top_level, two.file
+ assert_equal @top_level, three.file
+ end
+
+ def test_method_toplevel
+ util_parser <<~RUBY
+ # comment
+ def foo; end
+ RUBY
+
+ object = @store.find_class_named 'Object'
+ foo = object.method_list.first
+ assert_equal 'Object#foo', foo.full_name
+ assert_equal 'comment', foo.comment.text.strip
+ assert_equal @top_level, foo.file
+ end
+
+ def test_meta_method
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # my method
+ add_my_method :method_foo, :arg
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ assert_equal 1, klass.method_list.size
+ method = klass.method_list.first
+ assert_equal 'Foo#method_foo', method.full_name
+ assert_equal 'my method', method.comment.text.strip
+ assert_equal 4, method.line
+ assert_equal @top_level, method.file
+ end
+
+ def test_first_comment_is_not_a_meta_method
+ util_parser <<~RUBY
+ ##
+ # first comment is not a meta method
+ add_my_method :foo
+
+ ##
+ # this is a meta method
+ add_my_method :bar
+ RUBY
+
+ object = @store.find_class_named 'Object'
+ assert_equal ['bar'], object.method_list.map(&:name)
+ end
+
+ def test_meta_method_unknown
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # my method
+ add_my_method (:foo), :bar
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ assert_equal 1, klass.method_list.size
+ method = klass.method_list.first
+ assert_equal 'Foo#unknown', method.full_name
+ assert_equal 'my method', method.comment.text.strip
+ assert_equal 4, method.line
+ assert_equal @top_level, method.file
+ end
+
+ def test_meta_define_method
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # comment 1
+ define_method :foo do end
+ ##
+ # comment 2
+ define_method :bar, ->{}
+ # not a meta comment, not a meta method
+ define_method :ignored do end
+ class << self
+ ##
+ # comment 3
+ define_method :baz do end
+ end
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ klass.method_list.last.singleton = true if accept_legacy_bug?
+ assert_equal 3, klass.method_list.size
+ assert_equal ['Foo#foo', 'Foo#bar', 'Foo::baz'], klass.method_list.map(&:full_name)
+ assert_equal [false, false, true], klass.method_list.map(&:singleton)
+ assert_equal ['comment 1', 'comment 2', 'comment 3'], klass.method_list.map { |m| m.comment.text.strip }
+ assert_equal [4, 7, 13], klass.method_list.map(&:line)
+ assert_equal [@top_level] * 3, klass.method_list.map(&:file)
+ end
+
+ def test_method_definition_nested_inside_block
+ util_parser <<~RUBY
+ module A
+ extend ActiveSupport::Concern
+ included do
+ ##
+ # :singleton-method:
+ # comment foo
+ mattr_accessor :foo
+
+ ##
+ # :method: bar
+ # comment bar
+ add_my_method :bar
+ end
+
+ tap do
+ # comment baz1
+ def baz1; end
+ end
+
+ self.tap do
+ # comment baz2
+ def baz2; end
+ end
+
+ my_decorator def self.baz3; end
+
+ self.my_decorator def baz4; end
+ end
+ RUBY
+ mod = @store.find_module_named 'A'
+ methods = mod.method_list
+ assert_equal ['A::foo', 'A#bar', 'A#baz1', 'A#baz2', 'A::baz3', 'A#baz4'], methods.map(&:full_name)
+ assert_equal ['comment foo', 'comment bar', 'comment baz1', 'comment baz2'], methods.take(4).map { |m| m.comment.text.strip }
+ end
+
+ def test_method_yields_directive
+ util_parser <<~RUBY
+ class Foo
+ def f1(a, &b); end
+
+ def f2
+ def o.foo
+ yield :dummy
+ end
+ yield
+ end
+
+ def f3(&b)
+ yield a, *b, c: 1
+ yield 1, 2, 3
+ end
+
+ def f4(a, &b) # :yields: d, e
+ yields 1, 2
+ end
+
+ def f5 # :yield: f
+ yields 1, 2
+ end
+
+ def f6; end # :yields:
+
+ ##
+ # :yields: g, h
+ add_my_method :f7
+ end
+ RUBY
+
+ klass = @top_level.classes.first
+ methods = klass.method_list
+ expected = [
+ 'f1(a, &b)',
+ 'f2() { || ... }',
+ 'f3() { |a, *b, c: 1| ... }',
+ 'f4(a) { |d, e| ... }',
+ 'f5() { |f| ... }',
+ 'f6() { || ... }',
+ 'f7() { |g, h| ... }'
+ ]
+ assert_equal expected, methods.map(&:arglists)
+ end
+
+ def test_calls_super
+ util_parser <<~RUBY
+ class A
+ def m1; foo; bar; end
+ def m2; if cond; super(a); end; end # SuperNode
+ def m3; tap do; super; end; end # ForwardingSuperNode
+ def m4; def a.b; super; end; end # super inside another method
+ end
+ RUBY
+
+ klass = @store.find_class_named 'A'
+ methods = klass.method_list
+ assert_equal ['m1', 'm2', 'm3', 'm4'], methods.map(&:name)
+ assert_equal [false, true, true, false], methods.map(&:calls_super)
+ end
+
+ def test_method_args_directive
+ util_parser <<~RUBY
+ class Foo
+ def method1 # :args: a, b, c
+ end
+
+ ##
+ # :args: d, e, f
+ def method2(*args); end
+
+ ##
+ # :args: g, h
+ add_my_method :method3
+ end
+ RUBY
+
+ klass = @top_level.classes.first
+ methods = klass.method_list
+ assert_equal ['method1(a, b, c)', 'method2(d, e, f)', 'method3(g, h)'], methods.map(&:arglists)
+ end
+
+ def test_class_repeatedly
+ util_parser <<~RUBY
+ class Foo
+ def foo; end
+ end
+ class Foo
+ def bar; end
+ end
+ RUBY
+ util_parser <<~RUBY
+ class Foo
+ def baz; end
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ assert_equal ['Foo#foo', 'Foo#bar', 'Foo#baz'], klass.method_list.map(&:full_name)
+ end
+
+ def test_undefined_singleton_class_defines_module
+ util_parser <<~RUBY
+ class << Foo
+ end
+ class << ::Bar
+ end
+ RUBY
+
+ modules = @store.all_modules
+ assert_equal ['Foo', 'Bar'], modules.map(&:name)
+ end
+
+ def test_singleton_class
+ util_parser <<~RUBY
+ class A; end
+ class Foo
+ def self.m1; end
+ def (any expression).dummy1; end
+ class << self
+ def m2; end
+ def self.dummy2; end
+ end
+ class << A
+ def dummy3; end
+ end
+ class << Foo
+ def m3; end
+ def self.dummy4; end
+ end
+ class << ::Foo
+ def m4; end
+ end
+ class << (any expression)
+ def dummy5; end
+ end
+ end
+ class << Foo
+ def m5; end
+ end
+ class << ::Foo
+ def m6; end
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ methods = klass.method_list
+ methods = methods.reject {|m| m.name =~ /dummy2|dummy4/ } if accept_legacy_bug?
+ assert_equal ['m1', 'm2', 'm3', 'm4', 'm5', 'm6'], methods.map(&:name)
+ assert_equal [true] * 6, methods.map(&:singleton)
+ end
+
+ def test_singleton_class_meta_method
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # :singleton-method: m1
+
+ ##
+ # :singleton-method:
+ add_my_smethod :m2, :arg
+
+ ##
+ # :singleton-method:
+ add_my_smethod 'm3', :arg
+
+ # comment
+ class << self
+ ##
+ # method of a singleton class is a singleton method
+ # :method: m4
+
+ ##
+ # :singleton-method: m5
+ end
+ end
+ RUBY
+
+ klass = @store.find_class_named 'Foo'
+ assert_equal ['m1', 'm2', 'm3', 'm4', 'm5'], klass.method_list.map(&:name)
+ klass.method_list[3].singleton = true if accept_legacy_bug?
+ assert_equal [true] * 5, klass.method_list.map(&:singleton)
+ end
+
+ def test_method_nested_visibility
+ util_parser <<~RUBY
+ class A
+ def pub1; end
+ private
+ def pri1; end
+ class B
+ def pub_b1; end
+ private
+ def pri_b1; end
+ public
+ def pub_b2; end
+ end
+ def pri2; end
+ end
+ class A
+ def pub2; end
+ private
+ def pri2; end
+ end
+ RUBY
+ klass_a = @store.find_class_named 'A'
+ klass_b = klass_a.find_class_named 'B'
+ public_a = klass_a.method_list.select { |m| m.visibility == :public }.map(&:name)
+ public_b = klass_b.method_list.select { |m| m.visibility == :public }.map(&:name)
+ assert_equal ['pub1', 'pub2'], public_a
+ assert_equal ['pub_b1', 'pub_b2'], public_b
+ end
+
+ def test_attributes_visibility
+ util_parser <<~RUBY
+ class A
+ attr :pub_a
+ attr_reader :pub_r
+ attr_writer :pub_w
+ attr_accessor :pub_rw
+ private
+ attr :pri_a
+ attr_reader :pri_r
+ attr_writer :pri_w
+ attr_accessor :pri_rw
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ assert_equal ['pub_a', 'pub_r', 'pub_w', 'pub_rw', 'pri_a', 'pri_r', 'pri_w', 'pri_rw'], klass.attributes.map(&:name)
+ assert_equal [:public] * 4 + [:private] * 4, klass.attributes.map(&:visibility)
+ end
+
+ def test_method_singleton_class_visibility
+ util_parser <<~RUBY
+ class A
+ def self.pub1; end
+ private
+ def self.pub2; end
+ class << self
+ def pub3; end
+ private
+ def pri1; end
+ public
+ def pub4; end
+ private
+ end
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ public_singleton_methods = klass.method_list.select { |m| m.singleton && m.visibility == :public }
+ assert_equal ['pub1', 'pub2', 'pub3', 'pub4'], public_singleton_methods.map(&:name)
+ end
+
+ def test_private_def_public_def
+ util_parser <<~RUBY
+ class A
+ private def m1; end
+ public def m2; end
+ private
+ public def m3; end
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ public_methods = klass.method_list.select { |m| m.visibility == :public }
+ assert_equal ['m2', 'm3'], public_methods.map(&:name)
+ end
+
+ def test_define_method_visibility
+ util_parser <<~RUBY
+ class A
+ private
+ ##
+ # my private method
+ define_method :m1 do end
+ public
+ ##
+ # my public method
+ define_method :m2 do end
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ methods = klass.method_list
+ assert_equal ['m1', 'm2'], methods.map(&:name)
+ assert_equal [:private, :public], methods.map(&:visibility)
+ end
+
+ def test_module_function
+ util_parser <<~RUBY
+ class A
+ def m1; end
+ def m2; end
+ def m3; end
+ module_function :m1, :m3
+ module_function def m4; end
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ instance_methods = klass.method_list.reject(&:singleton)
+ singleton_methods = klass.method_list.select(&:singleton)
+ if accept_legacy_bug?
+ instance_methods.last.visibility = :private
+ singleton_methods << singleton_methods.last.dup
+ singleton_methods.last.name = 'm4'
+ end
+ assert_equal ['m1', 'm2', 'm3', 'm4'], instance_methods.map(&:name)
+ assert_equal [:private, :public, :private, :private], instance_methods.map(&:visibility)
+ assert_equal ['m1', 'm3', 'm4'], singleton_methods.map(&:name)
+ assert_equal [:public, :public, :public], singleton_methods.map(&:visibility)
+ end
+
+ def test_class_method_visibility
+ util_parser <<~RUBY
+ class A
+ def self.m1; end
+ def self.m2; end
+ def self.m3; end
+ private_class_method :m1, :m2
+ public_class_method :m1, :m3
+ private_class_method def self.m4; end
+ public_class_method def self.m5; end
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ public_methods = klass.method_list.select { |m| m.visibility == :public }
+ assert_equal ['m1', 'm3', 'm5'], public_methods.map(&:name) unless accept_legacy_bug?
+ end
+
+ def test_method_change_visibility
+ util_parser <<~RUBY
+ class A
+ def m1; end
+ def m2; end
+ def m3; end
+ def m4; end
+ def m5; end
+ private :m2, :m3, :m4
+ public :m1, :m3
+ end
+ class << A
+ def m1; end
+ def m2; end
+ def m3; end
+ def m4; end
+ def m5; end
+ private :m1, :m2, :m3
+ public :m2, :m4
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ public_methods = klass.method_list.select { |m| !m.singleton && m.visibility == :public }
+ public_singleton_methods = klass.method_list.select { |m| m.singleton && m.visibility == :public }
+ assert_equal ['m1', 'm3', 'm5'], public_methods.map(&:name)
+ assert_equal ['m2', 'm4', 'm5'], public_singleton_methods.map(&:name)
+ end
+
+ def test_undocumentable_change_visibility
+ pend if accept_legacy_bug?
+ util_parser <<~RUBY
+ class A
+ def m1; end
+ def self.m2; end
+ private 42, :m # maybe not Module#private
+ # ignore all non-standard `private def` and `private_class_method def`
+ private def self.m1; end
+ private_class_method def m2; end
+ private def to_s.m1; end
+ private_class_method def to_s.m2; end
+ end
+ RUBY
+ klass = @store.find_class_named 'A'
+ assert_equal [:public] * 4, klass.method_list.map(&:visibility)
+ end
+
+ def test_method_visibility_change_in_subclass
+ pend 'not implemented' if accept_legacy_bug?
+ util_parser <<~RUBY
+ class A
+ def m1; end
+ def m2; end
+ private :m2
+ end
+ class B < A
+ private :m1
+ public :m2
+ end
+ RUBY
+
+ superclass = @store.find_class_named('A')
+ klass = @store.find_class_named('B')
+ assert_equal ['m1', 'm2'], superclass.method_list.map(&:name)
+ assert_equal ['m1', 'm2'], klass.method_list.map(&:name)
+ assert_equal [:public, :private], superclass.method_list.map(&:visibility)
+ assert_equal [:private, :public], klass.method_list.map(&:visibility)
+ end
+
+ def test_singleton_method_visibility_change_in_subclass
+ util_parser <<~RUBY
+ class A
+ def self.m1; end
+ def self.m2; end
+ private_class_method :m2
+ end
+ class B < A
+ private_class_method :m1
+ public_class_method :m2
+ end
+ RUBY
+
+ superclass = @store.find_class_named('A')
+ klass = @store.find_class_named('B')
+ assert_equal ['m1', 'm2'], superclass.method_list.map(&:name)
+ assert_equal ['m1', 'm2'], klass.method_list.map(&:name)
+ assert_equal [:public, :private], superclass.method_list.map(&:visibility)
+ assert_equal [:private, :public], klass.method_list.map(&:visibility)
+ end
+
+ def test_alias
+ util_parser <<~RUBY
+ class Foo
+ def bar; end
+ def bar2; alias :dummy :bar; end
+ # comment
+ alias :baz1 :bar # :nodoc:
+ alias :baz2 :bar
+ # :stopdoc:
+ alias :baz3 :bar
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ assert_equal ['Foo#bar', 'Foo#bar2', 'Foo#baz2'], klass.method_list.map(&:full_name)
+ m = klass.method_list.last
+ assert_equal 'Foo#bar', m.is_alias_for.full_name
+ assert_equal 'Foo#baz2', m.full_name
+ assert_equal klass, m.parent
+ end
+
+ def test_alias_singleton
+ util_parser <<~RUBY
+ class Foo
+ class << self
+ def bar; end
+ # comment
+ alias :baz :bar
+ # :stopdoc:
+ alias :baz2 :bar
+ end
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ m = klass.class_method_list.last
+ assert_equal 'Foo::bar', m.is_alias_for.full_name
+ assert_equal 'Foo::baz', m.full_name
+ assert_equal 'comment', m.comment.text
+ assert_equal klass, m.parent
+ end
+
+ def test_alias_method
+ util_parser <<~RUBY
+ class Foo
+ def foo; end
+ private
+ alias_method :foo2, :foo
+ def bar; end
+ public
+ alias_method :bar2, :bar
+ private :foo
+ public :bar
+ end
+ RUBY
+ foo, foo2, bar, bar2 = @top_level.classes.first.method_list
+ assert_equal 'foo', foo.name
+ assert_equal 'bar', bar.name
+ assert_equal 'foo2', foo2.name
+ assert_equal 'bar2', bar2.name
+ assert_equal 'foo', foo2.is_alias_for.name
+ assert_equal 'bar', bar2.is_alias_for.name
+ unless accept_legacy_bug?
+ assert_equal :private, foo.visibility
+ assert_equal :public, foo2.visibility
+ assert_equal :public, bar.visibility
+ assert_equal :private, bar2.visibility
+ end
+ end
+
+ def test_invalid_alias_method
+ pend if accept_legacy_bug?
+ util_parser <<~RUBY
+ class Foo
+ def foo; end
+ alias_method
+ alias_method :foo
+ alias_method :foo, :bar, :baz
+ alias_method 42, :foo
+ end
+ RUBY
+ assert_equal ['foo'], @top_level.classes.first.method_list.map(&:name)
+ end
+
+ def test_alias_method_stopdoc_nodoc
+ util_parser <<~RUBY
+ class Foo
+ def foo; end
+ # :stopdoc:
+ alias_method :foo2, :foo
+ # :startdoc:
+ alias_method :foo3, :foo # :nodoc:
+ alias_method :foo4, :foo
+ end
+ RUBY
+ assert_equal ['foo', 'foo4'], @top_level.classes.first.method_list.map(&:name)
+ end
+
+ def test_attributes
+ util_parser <<~RUBY
+ class Foo
+ # attrs
+ attr :attr1, :attr2
+ # readers
+ attr_reader :reader1, :reader2
+ # writers
+ attr_writer :writer1, :writer2
+ # accessors
+ attr_accessor :accessor1, :accessor2
+ # :stopdoc:
+ attr :attr3, :attr4
+ attr_reader :reader3, :reader4
+ attr_writer :write3, :writer4
+ attr_accessor :accessor3, :accessor4
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ if accept_legacy_bug?
+ a, r1, r2, w1, w2, rw1, rw2 = klass.attributes
+ a1 = a.dup
+ a2 = a.dup
+ a1.rw = a2.rw = 'R'
+ a2.name = 'attr2'
+ else
+ assert_equal 8, klass.attributes.size
+ a1, a2, r1, r2, w1, w2, rw1, rw2 = klass.attributes
+ end
+ assert_equal ['attr1', 'attr2'], [a1.name, a2.name]
+ assert_equal ['reader1', 'reader2'], [r1.name, r2.name]
+ assert_equal ['writer1', 'writer2'], [w1.name, w2.name]
+ assert_equal ['accessor1', 'accessor2'], [rw1.name, rw2.name]
+ assert_equal ['R', 'R'], [a1.rw, a2.rw]
+ assert_equal ['R', 'R'], [r1.rw, r2.rw]
+ assert_equal ['W', 'W'], [w1.rw, w2.rw]
+ assert_equal ['RW', 'RW'], [rw1.rw, rw2.rw]
+ assert_equal ['attrs', 'attrs'], [a1.comment.text, a2.comment.text]
+ assert_equal ['readers', 'readers'], [r1.comment.text, r2.comment.text]
+ assert_equal ['writers', 'writers'], [w1.comment.text, w2.comment.text]
+ assert_equal ['accessors', 'accessors'], [rw1.comment.text, rw2.comment.text]
+ assert_equal [3, 3], [a1.line, a2.line]
+ assert_equal [5, 5], [r1.line, r2.line]
+ assert_equal [7, 7], [w1.line, w2.line]
+ assert_equal [9, 9], [rw1.line, rw2.line]
+ assert_equal [@top_level] * 8, [a1, a2, r1, r2, w1, w2, rw1, rw2].map(&:file)
+ end
+
+ def test_undocumentable_attributes
+ util_parser <<~RUBY
+ class Foo
+ attr
+ attr 42, :foo
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ assert_empty klass.method_list
+ assert_empty klass.attributes
+ end
+
+ def test_singleton_class_attributes
+ util_parser <<~RUBY
+ class Foo
+ class << self
+ attr :a
+ attr_reader :r
+ attr_writer :w
+ attr_accessor :rw
+ end
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ attributes = klass.attributes
+ assert_equal ['a', 'r', 'w', 'rw'], attributes.map(&:name)
+ assert_equal [true] * 4, attributes.map(&:singleton)
+ end
+
+ def test_attributes_nodoc
+ util_parser <<~RUBY
+ class Foo
+ attr :attr1, :attr2 # :nodoc:
+ attr :attr3
+ attr_reader :reader1, :reader2 # :nodoc:
+ attr_reader :reader3
+ attr_writer :writer1, :writer2 # :nodoc:
+ attr_writer :writer3
+ attr_accessor :accessor1, :accessor2 # :nodoc:
+ attr_accessor :accessor3
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ unless accept_legacy_bug?
+ assert_equal 4, klass.attributes.size
+ end
+ end
+
+ def test_attributes_nodoc_track
+ @options.visibility = :nodoc
+ util_parser <<~RUBY
+ class Foo
+ attr :attr1, :attr2 # :nodoc:
+ attr :attr3
+ attr_reader :reader1, :reader2 # :nodoc:
+ attr_reader :reader3
+ attr_writer :writer1, :writer2 # :nodoc:
+ attr_writer :writer3
+ attr_accessor :accessor1, :accessor2 # :nodoc:
+ attr_accessor :accessor3
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ unless accept_legacy_bug?
+ assert_equal 12, klass.attributes.size
+ end
+ end
+
+ def test_method_nodoc_stopdoc
+ util_parser <<~RUBY
+ class Foo
+ def doc1; end
+ def nodoc1; end # :nodoc:
+ def doc2; end
+ def nodoc2 # :nodoc:
+ end
+ def doc3; end
+ def nodoc3
+ end # :nodoc:
+ def doc4; end
+ # :stopdoc:
+ def nodoc4; end
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ assert_equal ['doc1', 'doc2', 'doc3', 'doc4'], klass.method_list.map(&:name)
+ end
+
+ def test_method_nodoc_track
+ @options.visibility = :nodoc
+ util_parser <<~RUBY
+ class Foo
+ def doc1; end
+ def nodoc1; end # :nodoc:
+ def doc2; end
+ def nodoc2 # :nodoc:
+ end
+ def doc3; end
+ def nodoc3
+ end # :nodoc:
+ def doc4; end
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ assert_equal ['doc1', 'nodoc1', 'doc2', 'nodoc2', 'doc3', 'nodoc3', 'doc4'], klass.method_list.map(&:name)
+ assert_equal [true, nil, true, nil, true, nil, true], klass.method_list.map(&:document_self)
+ end
+
+ def test_meta_attributes
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # :attr:
+ # attrs
+ add_my_method :attr1, :attr2
+ ##
+ # :attr_reader:
+ # readers
+ add_my_method :reader1, :reader2
+ ##
+ # :attr_writer:
+ # writers
+ add_my_method :writer1, :writer2
+ ##
+ # :attr_accessor:
+ # accessors
+ add_my_method :accessor1, :accessor2
+
+ # :stopdoc:
+
+ ##
+ # :attr:
+ add_my_method :attr3
+ ##
+ # :attr_reader:
+ add_my_method :reader3
+ ##
+ # :attr_writer:
+ add_my_method :writer3
+ ##
+ # :attr_accessor:
+ add_my_method :accessor3
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ assert_equal 8, klass.attributes.size
+ a1, a2, r1, r2, w1, w2, rw1, rw2 = klass.attributes
+ assert_equal ['attr1', 'attr2'], [a1.name, a2.name]
+ assert_equal ['reader1', 'reader2'], [r1.name, r2.name]
+ assert_equal ['writer1', 'writer2'], [w1.name, w2.name]
+ assert_equal ['accessor1', 'accessor2'], [rw1.name, rw2.name]
+ a1.rw = a2.rw = 'R' if accept_legacy_bug?
+ assert_equal ['R', 'R'], [a1.rw, a2.rw]
+ assert_equal ['R', 'R'], [r1.rw, r2.rw]
+ assert_equal ['W', 'W'], [w1.rw, w2.rw]
+ assert_equal ['RW', 'RW'], [rw1.rw, rw2.rw]
+ assert_equal ['attrs', 'attrs'], [a1.comment.text, a2.comment.text]
+ assert_equal ['readers', 'readers'], [r1.comment.text, r2.comment.text]
+ assert_equal ['writers', 'writers'], [w1.comment.text, w2.comment.text]
+ assert_equal ['accessors', 'accessors'], [rw1.comment.text, rw2.comment.text]
+ assert_equal [@top_level] * 8, [a1, a2, r1, r2, w1, w2, rw1, rw2].map(&:file)
+ end
+
+ def test_meta_attributes_named
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # comment a
+ # :attr: attr1
+ add_my_method :a1
+ ##
+ # comment r
+ # :attr_reader: reader1
+ add_my_method :r1
+ ##
+ # comment w
+ # :attr_writer: writer1
+ add_my_method :w1
+ ##
+ # comment rw
+ # :attr_accessor: accessor1
+ add_my_method :rw1
+
+ # :stopdoc:
+
+ ##
+ # :attr: attr2
+ add_my_method :a2
+ ##
+ # :attr_reader: reader2
+ add_my_method :r2
+ ##
+ # :attr_writer: writer2
+ add_my_method :w2
+ ##
+ # :attr_accessor: accessor2
+ add_my_method :rw2
+ end
+ RUBY
+ klass = @store.find_class_named 'Foo'
+ assert_equal 4, klass.attributes.size
+ a, r, w, rw = klass.attributes
+ assert_equal 'attr1', a.name
+ assert_equal 'reader1', r.name
+ assert_equal 'writer1', w.name
+ assert_equal 'accessor1', rw.name
+ a.rw = 'R' if accept_legacy_bug?
+ assert_equal 'R', a.rw
+ assert_equal 'R', r.rw
+ assert_equal 'W', w.rw
+ assert_equal 'RW', rw.rw
+ assert_equal 'comment a', a.comment.text
+ assert_equal 'comment r', r.comment.text
+ assert_equal 'comment w', w.comment.text
+ assert_equal 'comment rw', rw.comment.text
+ assert_equal [@top_level] * 4, [a, r, w, rw].map(&:file)
+ end
+
+ def test_constant
+ util_parser <<~RUBY
+ class Foo
+ A = (any expression 1)
+ def f
+ DUMMY1 = (any expression 2)
+ end
+ class Bar; end
+ Bar::B = (any expression 3)
+ ::C = (any expression 4)
+ # :stopdoc:
+ DUMMY2 = 1
+ # :startdoc:
+ D = (any expression 5)
+ E = (any expression 6) # :nodoc:
+ F = (
+ any expression 7
+ ) # :nodoc:
+ end
+ G = (any expression 8)
+ RUBY
+ foo = @top_level.classes.first
+ bar = foo.classes.first
+ object = @top_level.find_class_or_module('Object')
+ assert_equal ['A', 'D', 'E', 'F'], foo.constants.map(&:name) unless accept_legacy_bug?
+ assert_equal '(any expression 1)', foo.constants.first.value
+ assert_equal ['B'], bar.constants.map(&:name)
+ assert_equal ['C', 'G'], object.constants.map(&:name) unless accept_legacy_bug?
+ all_constants = foo.constants + bar.constants + object.constants
+ assert_equal [@top_level] * 7, all_constants.map(&:file) unless accept_legacy_bug?
+ assert_equal [2, 12, 13, 14, 7, 8, 18], all_constants.map(&:line) unless accept_legacy_bug?
+ end
+
+ def test_nodoc_constant_assigned_without_nodoc_comment
+ util_parser <<~RUBY
+ module Foo
+ A = 1
+ B = 1 # :nodoc:
+ begin
+ C = 1 # :nodoc:
+ rescue
+ C = 2
+ end
+ end
+ Foo::B = 2
+ Foo::D = 2
+ RUBY
+ mod = @top_level.modules.first
+ assert_equal ['A', 'B', 'C', 'D'], mod.constants.map(&:name)
+ assert_equal [false, true, true, false], mod.constants.map(&:received_nodoc)
+ end
+
+ def test_constant_visibility
+ util_parser <<~RUBY
+ class C
+ A = 1
+ B = 2
+ C = 3
+ private_constant
+ private_constant foo
+ private_constant :A
+ private_constant :B, :C
+ public_constant :B
+ end
+ RUBY
+ klass = @store.find_class_named 'C'
+ const_a, const_b, const_c = klass.constants.sort_by(&:name)
+
+ assert_equal 'A', const_a.name
+ assert_equal :private, const_a.visibility
+
+ assert_equal 'B', const_b.name
+ assert_equal :public, const_b.visibility
+
+ assert_equal 'C', const_c.name
+ assert_equal :private, const_c.visibility
+ end
+
+ def test_constant_assignment_to_undefined_module_path
+ util_parser <<~RUBY
+ A::B::C = 1
+ RUBY
+ a = @top_level.find_module_named 'A'
+ b = a.find_module_named 'B'
+ c = b.constants.first
+ assert_equal 'A::B::C', c.full_name
+ end
+
+ def test_constant_alias
+ util_parser <<~RUBY
+ class Foo
+ class Bar; end
+ A = Bar
+ # B = ::Foo # master branch has bug
+ C = Foo::Bar
+ end
+ RUBY
+ klass = @top_level.classes.first
+ assert_equal [], klass.modules.map(&:full_name)
+ assert_equal ['Foo::Bar', 'Foo::A', 'Foo::C'], klass.classes.map(&:full_name)
+ assert_equal ['Foo::A', 'Foo::C'], klass.constants.map(&:full_name)
+ assert_equal 'Foo::A', klass.find_module_named('A').full_name
+ assert_equal 'Foo::C', klass.find_module_named('C').full_name
+ end
+
+ def test_constant_method
+ util_parser <<~RUBY
+ def Object.foo; end
+ class A
+ class B
+ class C
+ def B.bar; end
+ end
+ end
+ end
+ def UNKNOWN.baz; end
+ RUBY
+
+ object = @store.find_class_named 'Object'
+ klass = @store.find_class_named 'A::B'
+ unknown = @store.find_module_named('UNKNOWN')
+ assert_equal 'Object::foo', object.method_list.first.full_name
+ assert_equal 'A::B::bar', klass.method_list.first.full_name
+ assert_equal 'UNKNOWN::baz', unknown.method_list.first.full_name
+ end
+
+ def test_true_false_nil_method
+ util_parser <<~RUBY
+ def nil.foo; end
+ def true.bar; end
+ def false.baz; end
+ RUBY
+ sep = accept_legacy_bug? ? '::' : '#'
+ assert_equal "NilClass#{sep}foo", @store.find_class_named('NilClass').method_list.first.full_name
+ assert_equal "TrueClass#{sep}bar", @store.find_class_named('TrueClass').method_list.first.full_name
+ assert_equal "FalseClass#{sep}baz", @store.find_class_named('FalseClass').method_list.first.full_name
+ end
+
+ def test_include_extend
+ util_parser <<~RUBY
+ module I; end
+ module E; end
+ class C
+ # my include
+ include I
+ # my extend
+ extend E
+ end
+ module M
+ include I
+ extend E
+ end
+ RUBY
+ klass = @store.find_class_named 'C'
+ mod = @store.find_module_named 'M'
+ assert_equal ['I'], klass.includes.map(&:name)
+ assert_equal ['E'], klass.extends.map(&:name)
+ assert_equal ['I'], mod.includes.map(&:name)
+ assert_equal ['E'], mod.extends.map(&:name)
+ assert_equal 'my include', klass.includes.first.comment.text.strip
+ assert_equal 'my extend', klass.extends.first.comment.text.strip
+ end
+
+ def test_include_extend_to_singleton_class
+ pend 'not implemented' if accept_legacy_bug?
+ util_parser <<~RUBY
+ class Foo
+ class << self
+ # include to singleton class is extend
+ include I
+ # extend to singleton class is not documentable
+ extend E
+ end
+ end
+ RUBY
+
+ klass = @top_level.classes.first
+ assert_equal [], klass.includes.map(&:name)
+ assert_equal ['I'], klass.extends.map(&:name)
+ end
+
+ def test_include_with_module_nesting
+ util_parser <<~RUBY
+ module A
+ module M; end
+ module B
+ module M; end
+ module C
+ module M; end
+ module D
+ module M; end
+ end
+ end
+ end
+ end
+
+ module A::B
+ class C::D::Foo
+ include M
+ end
+ end
+ # TODO: make test pass with the following code appended
+ # module A::B::C
+ # class D::Foo
+ # include M
+ # end
+ # end
+ RUBY
+ klass = @store.find_class_named 'A::B::C::D::Foo'
+ assert_equal 'A::B::M', klass.includes.first.module.full_name
+ end
+
+ def test_various_argument_include
+ pend 'not implemented' if accept_legacy_bug?
+ util_parser <<~RUBY
+ module A; end
+ module B; end
+ module C; end
+ class A
+ include
+ include A, B
+ include 42, C # Maybe not Module#include
+ end
+ RUBY
+ klass = @top_level.classes.first
+ assert_equal ['A', 'B'], klass.includes.map(&:name)
+ end
+
+ def test_require
+ util_parser <<~RUBY
+ require
+ require 'foo/bar'
+ require_relative 'is/not/supported/yet'
+ require "\#{embed}"
+ require (any expression)
+ RUBY
+ assert_equal ['foo/bar'], @top_level.requires.map(&:name)
+ end
+
+ def test_statements_identifier_alias_method_before_original_method
+ # This is not strictly legal Ruby code, but it simulates finding an alias
+ # for a method before finding the original method, which might happen
+ # to rdoc if the alias is in a different file than the original method
+ # and rdoc processes the alias' file first.
+ util_parser <<~RUBY
+ class Foo
+ alias_method :foo2, :foo
+ alias_method :foo3, :foo
+ end
+
+ class Foo
+ def foo(); end
+ alias_method :foo4, :foo
+ alias_method :foo5, :unknown
+ end
+ RUBY
+
+ foo = @top_level.classes.first.method_list[0]
+ assert_equal 'foo', foo.name
+
+ foo2 = @top_level.classes.first.method_list[1]
+ assert_equal 'foo2', foo2.name
+ assert_equal 'foo', foo2.is_alias_for.name
+
+ foo3 = @top_level.classes.first.method_list[2]
+ assert_equal 'foo3', foo3.name
+ assert_equal 'foo', foo3.is_alias_for.name
+
+ foo4 = @top_level.classes.first.method_list.last
+ assert_equal 'foo4', foo4.name
+ assert_equal 'foo', foo4.is_alias_for.name
+
+ assert_equal 'unknown', @top_level.classes.first.external_aliases[0].old_name
+ end
+
+ def test_class_definition_encountered_after_class_reference
+ # The code below is not legal Ruby (Foo must have been defined before
+ # Foo.bar is encountered), but RDoc might encounter Foo.bar before Foo if
+ # they live in different files.
+
+ util_parser <<-RUBY
+ def Foo.bar
+ end
+
+ class Foo < IO
+ end
+ RUBY
+
+ assert_empty @store.modules_hash
+ assert_empty @store.all_modules
+
+ klass = @top_level.classes.first
+ assert_equal 'Foo', klass.full_name
+ assert_equal 'IO', klass.superclass
+
+ assert_equal 'bar', klass.method_list.first.name
+ end
+
+ def test_scan_duplicate_module
+ util_parser <<~RUBY
+ # comment a
+ module Foo
+ end
+
+ # comment b
+ module Foo
+ end
+ RUBY
+
+ mod = @top_level.modules.first
+
+ expected = [
+ RDoc::Comment.new('comment a', @top_level),
+ RDoc::Comment.new('comment b', @top_level)
+ ]
+
+ assert_equal expected, mod.comment_location.map { |c, _l| c }
+ end
+
+ def test_enddoc
+ util_parser <<~RUBY
+ class A
+ class B; end
+ # :enddoc:
+ # :startdoc:
+ class C; end
+ end
+ class D; end
+ # :enddoc:
+ # :startdoc:
+ class E; end
+ RUBY
+
+ assert_equal ['A', 'A::B', 'D'], @store.all_classes.reject(&:ignored?).map(&:full_name)
+ end
+
+ def test_top_level_enddoc
+ util_parser <<~RUBY
+ class A; end
+ # :enddoc:
+ class B; end
+ # :startdoc:
+ class C; end
+ RUBY
+
+ assert_equal ['A'], @top_level.classes.reject(&:ignored?).map(&:name)
+ end
+
+ def test_section
+ util_parser <<~RUBY
+ class Foo
+ # :section: section1
+ attr :a1
+ def m1; end
+ # :section:
+ def m2; end
+ attr :a2
+ # :section: section2
+ def m3; end
+ attr :a3
+ module Bar
+ def m4; end
+ attr :a4
+ # :section: section3
+ def m5; end
+ attr :a5
+ end
+ attr :a6
+ def m6; end
+ end
+ RUBY
+ foo = @top_level.classes.first
+ bar = foo.modules.first
+ assert_equal ['section1', nil, 'section2', 'section2'], foo.attributes.map { |m| m.section.title }
+ assert_equal ['section1', nil, 'section2', 'section2'], foo.method_list.map { |m| m.section.title }
+ assert_equal [nil, 'section3'], bar.attributes.map { |m| m.section.title }
+ assert_equal [nil, 'section3'], bar.method_list.map { |m| m.section.title }
+ end
+
+ def test_category
+ util_parser <<~RUBY
+ class A
+ # :category: cat1
+
+ # comment
+ attr :a1
+ attr :a2
+ def m1; end
+ # :category: cat2
+
+ # comment
+ def m2; end
+ def m3; end
+ attr :a3
+
+ # :category:
+ attr :a4
+ # :category:
+ def m4; end
+
+ ##
+ # :category: cat3
+ def m5; end
+
+ ##
+ # :category: cat4
+ # :method: m6
+ end
+ RUBY
+ klass = @top_level.classes.first
+ assert_equal ['cat1', nil, nil, nil], klass.attributes.map { |m| m.section.title }
+ assert_equal [nil, 'cat2', nil, nil, 'cat3', 'cat4'], klass.method_list.map { |m| m.section.title }
+ end
+
+ def test_ignore_constant_assign_rhs
+ # Struct is not supported yet. Right hand side of constant assignment should be ignored.
+ util_parser <<~RUBY
+ module Foo
+ def a; end
+ Bar = Struct.new do
+ def b; end
+ ##
+ # :method: c
+ end
+ Bar::Baz = Struct.new do
+ def d; end
+ ##
+ # :method: e
+ end
+ ##
+ # :method: f
+ end
+ RUBY
+ mod = @top_level.modules.first
+ assert_equal ['a', 'f'], mod.method_list.map(&:name)
+ end
+
+ def test_multibyte_method_name
+ content = <<~RUBY
+ class Foo
+ # comment ω
+ def ω() end
+ end
+ RUBY
+ util_parser content
+ assert_equal Encoding::UTF_8, content.encoding
+ method = @top_level.classes.first.method_list.first
+ assert_equal 'comment ω', method.comment.text.strip
+ assert_equal 'ω', method.name
+ end
+
+ def test_options_encoding
+ @options.encoding = Encoding::CP852
+ util_parser <<~RUBY
+ class Foo
+ ##
+ # this is my method
+ add_my_method :foo
+ end
+ RUBY
+ foo = @top_level.classes.first.method_list.first
+ assert_equal 'foo', foo.name
+ assert_equal 'this is my method', foo.comment.text
+ assert_equal Encoding::CP852, foo.comment.text.encoding
+ end
+
+ def test_read_directive_linear_performance
+ assert_linear_performance((1..5).map{|i|10**i}) do |i|
+ util_parser '# ' + '0'*i + '=000:' + "\n def f; end"
+ end
+ end
+
+
+ def test_markup_first_comment
+ util_parser <<~RUBY
+ # :markup: rd
+
+ # ((*awesome*))
+ class C
+ # ((*radical*))
+ def m
+ end
+ end
+ RUBY
+
+ c = @top_level.classes.first
+ assert_equal 'rd', c.comment.format
+ assert_equal 'rd', c.method_list.first.comment.format
+ end
+
+ def test_markup_override
+ util_parser <<~RUBY
+ # *awesome*
+ class C
+ # :markup: rd
+ # ((*radical*))
+ def m1; end
+
+ # *awesome*
+ def m2; end
+ end
+ RUBY
+
+ c = @top_level.classes.first
+
+ assert_equal 'rdoc', c.comment.format
+
+ assert_equal ['rd', 'rdoc'], c.method_list.map { |m| m.comment.format }
+ end
+
+ def test_tomdoc_meta
+ util_parser <<~RUBY
+ # :markup: tomdoc
+
+ class C
+
+ # Signature
+ #
+ # find_by_<field>[_and_<field>...](args)
+ #
+ # field - A field name.
+
+ end
+ RUBY
+
+ c = @top_level.classes.first
+
+ m = c.method_list.first
+
+ assert_equal "find_by_<field>[_and_<field>...]", m.name
+ assert_equal "find_by_<field>[_and_<field>...](args)\n", m.call_seq
+
+ expected =
+ doc(
+ head(3, 'Signature'),
+ list(:NOTE,
+ item(%w[field],
+ para('A field name.'))))
+ expected.file = @top_level
+
+ assert_equal expected, m.comment.parse
+ end
+end
+
+class TestRDocParserPrismRuby < RDoc::TestCase
+ include RDocParserPrismTestCases
+
+ def accept_legacy_bug?
+ false
+ end
+
+ def util_parser(content)
+ @parser = RDoc::Parser::PrismRuby.new @top_level, @filename, content, @options, @stats
+ @parser.scan
+ end
+end
+
+# Run the same test with the original RDoc::Parser::Ruby
+class TestRDocParserRubyWithPrismRubyTestCases < RDoc::TestCase
+ include RDocParserPrismTestCases
+
+ def accept_legacy_bug?
+ true
+ end
+
+ def util_parser(content)
+ @parser = RDoc::Parser::Ruby.new @top_level, @filename, content, @options, @stats
+ @parser.scan
+ end
+end unless ENV['RDOC_USE_PRISM_PARSER']
diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb
index 3e2a85ffba..cf02a035a6 100644
--- a/test/rdoc/test_rdoc_parser_ruby.rb
+++ b/test/rdoc/test_rdoc_parser_ruby.rb
@@ -2,6 +2,8 @@
require_relative 'helper'
+return if ENV['RDOC_USE_PRISM_PARSER']
+
class TestRDocParserRuby < RDoc::TestCase
def setup
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index 5168932430..9c94988ffd 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -194,7 +194,7 @@ class TestRDocRDoc < RDoc::TestCase
File.write('.document', "a.rb\n""b.rb\n")
expected_files << a
- @rdoc.options.exclude = Regexp.new(['b.rb'].join('|'))
+ @rdoc.options.exclude = /b\.rb$/
@rdoc.normalized_file_list [File.realpath(dir)]
end
diff --git a/test/reline/helper.rb b/test/reline/helper.rb
index 26fe834482..3d7dc7d812 100644
--- a/test/reline/helper.rb
+++ b/test/reline/helper.rb
@@ -22,29 +22,36 @@ module Reline
class <<self
def test_mode(ansi: false)
@original_iogate = IOGate
- remove_const('IOGate')
- const_set('IOGate', ansi ? Reline::ANSI : Reline::GeneralIO)
+
if ENV['RELINE_TEST_ENCODING']
encoding = Encoding.find(ENV['RELINE_TEST_ENCODING'])
else
encoding = Encoding::UTF_8
end
- @original_get_screen_size = IOGate.method(:get_screen_size)
- IOGate.singleton_class.remove_method(:get_screen_size)
- def IOGate.get_screen_size
- [24, 80]
+
+ if ansi
+ new_io_gate = ANSI.new
+ # Setting ANSI gate's screen size through set_screen_size will also change the tester's stdin's screen size
+ # Let's avoid that side-effect by stubbing the get_screen_size method
+ new_io_gate.define_singleton_method(:get_screen_size) do
+ [24, 80]
+ end
+ new_io_gate.define_singleton_method(:encoding) do
+ encoding
+ end
+ else
+ new_io_gate = Dumb.new(encoding: encoding)
end
- Reline::GeneralIO.reset(encoding: encoding) unless ansi
+
+ remove_const('IOGate')
+ const_set('IOGate', new_io_gate)
core.config.instance_variable_set(:@test_mode, true)
core.config.reset
end
def test_reset
- IOGate.singleton_class.remove_method(:get_screen_size)
- IOGate.define_singleton_method(:get_screen_size, @original_get_screen_size)
remove_const('IOGate')
const_set('IOGate', @original_iogate)
- Reline::GeneralIO.reset
Reline.instance_variable_set(:@core, nil)
end
@@ -89,7 +96,7 @@ class Reline::TestCase < Test::Unit::TestCase
end
}.join
rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError
- input.unicode_normalize!(:nfc)
+ input = input.unicode_normalize(:nfc)
if normalized
options[:undef] = :replace
options[:replace] = '?'
@@ -146,7 +153,7 @@ class Reline::TestCase < Test::Unit::TestCase
expected.bytesize, byte_pointer,
<<~EOM)
<#{expected.inspect} (#{expected.encoding.inspect})> expected but was
- <#{chunk.inspect} (#{chunk.encoding.inspect})> in <Terminal #{Reline::GeneralIO.encoding.inspect}>
+ <#{chunk.inspect} (#{chunk.encoding.inspect})> in <Terminal #{Reline::Dumb.new.encoding.inspect}>
EOM
end
@@ -161,7 +168,7 @@ class Reline::TestCase < Test::Unit::TestCase
def assert_key_binding(input, method_symbol, editing_modes = [:emacs, :vi_insert, :vi_command])
editing_modes.each do |editing_mode|
@config.editing_mode = editing_mode
- assert_equal(method_symbol, @config.editing_mode.default_key_bindings[input.bytes])
+ assert_equal(method_symbol, @config.editing_mode.get(input.bytes))
end
end
end
diff --git a/test/reline/test_ansi_with_terminfo.rb b/test/reline/test_ansi_with_terminfo.rb
index e1c56b9ee1..3adda10716 100644
--- a/test/reline/test_ansi_with_terminfo.rb
+++ b/test/reline/test_ansi_with_terminfo.rb
@@ -1,7 +1,7 @@
require_relative 'helper'
-require 'reline/ansi'
+require 'reline'
-class Reline::ANSI::TestWithTerminfo < Reline::TestCase
+class Reline::ANSI::WithTerminfoTest < Reline::TestCase
def setup
Reline.send(:test_mode, ansi: true)
@config = Reline::Config.new
diff --git a/test/reline/test_ansi_without_terminfo.rb b/test/reline/test_ansi_without_terminfo.rb
index 3d153514f3..2db14cf0a0 100644
--- a/test/reline/test_ansi_without_terminfo.rb
+++ b/test/reline/test_ansi_without_terminfo.rb
@@ -1,7 +1,7 @@
require_relative 'helper'
-require 'reline/ansi'
+require 'reline'
-class Reline::ANSI::TestWithoutTerminfo < Reline::TestCase
+class Reline::ANSI::WithoutTerminfoTest < Reline::TestCase
def setup
Reline.send(:test_mode, ansi: true)
@config = Reline::Config.new
diff --git a/test/reline/test_config.rb b/test/reline/test_config.rb
index 6068292847..68a102a599 100644
--- a/test/reline/test_config.rb
+++ b/test/reline/test_config.rb
@@ -13,6 +13,7 @@ class Reline::Config::Test < Reline::TestCase
Dir.chdir(@tmpdir)
Reline.test_mode
@config = Reline::Config.new
+ @inputrc_backup = ENV['INPUTRC']
end
def teardown
@@ -20,14 +21,28 @@ class Reline::Config::Test < Reline::TestCase
FileUtils.rm_rf(@tmpdir)
Reline.test_reset
@config.reset
+ ENV['INPUTRC'] = @inputrc_backup
+ end
+
+ def get_config_variable(variable)
+ @config.instance_variable_get(variable)
+ end
+
+ def additional_key_bindings(keymap_label)
+ get_config_variable(:@additional_key_bindings)[keymap_label].instance_variable_get(:@key_bindings)
+ end
+
+ def registered_key_bindings(keys)
+ key_bindings = @config.key_bindings
+ keys.to_h { |key| [key, key_bindings.get(key)] }
end
def test_read_lines
@config.read_lines(<<~LINES.lines)
- set bell-style on
+ set show-mode-in-prompt on
LINES
- assert_equal :audible, @config.instance_variable_get(:@bell_style)
+ assert_equal true, get_config_variable(:@show_mode_in_prompt)
end
def test_read_lines_with_variable
@@ -35,7 +50,7 @@ class Reline::Config::Test < Reline::TestCase
set disable-completion on
LINES
- assert_equal true, @config.instance_variable_get(:@disable_completion)
+ assert_equal true, get_config_variable(:@disable_completion)
end
def test_string_value
@@ -44,7 +59,7 @@ class Reline::Config::Test < Reline::TestCase
set emacs-mode-string Emacs
LINES
- assert_equal 'Emacs', @config.instance_variable_get(:@emacs_mode_string)
+ assert_equal 'Emacs', get_config_variable(:@emacs_mode_string)
end
def test_string_value_with_brackets
@@ -53,7 +68,7 @@ class Reline::Config::Test < Reline::TestCase
set emacs-mode-string [Emacs]
LINES
- assert_equal '[Emacs]', @config.instance_variable_get(:@emacs_mode_string)
+ assert_equal '[Emacs]', get_config_variable(:@emacs_mode_string)
end
def test_string_value_with_brackets_and_quotes
@@ -62,7 +77,7 @@ class Reline::Config::Test < Reline::TestCase
set emacs-mode-string "[Emacs]"
LINES
- assert_equal '[Emacs]', @config.instance_variable_get(:@emacs_mode_string)
+ assert_equal '[Emacs]', get_config_variable(:@emacs_mode_string)
end
def test_string_value_with_parens
@@ -71,7 +86,7 @@ class Reline::Config::Test < Reline::TestCase
set emacs-mode-string (Emacs)
LINES
- assert_equal '(Emacs)', @config.instance_variable_get(:@emacs_mode_string)
+ assert_equal '(Emacs)', get_config_variable(:@emacs_mode_string)
end
def test_string_value_with_parens_and_quotes
@@ -80,33 +95,34 @@ class Reline::Config::Test < Reline::TestCase
set emacs-mode-string "(Emacs)"
LINES
- assert_equal '(Emacs)', @config.instance_variable_get(:@emacs_mode_string)
+ assert_equal '(Emacs)', get_config_variable(:@emacs_mode_string)
end
def test_encoding_is_ascii
@config.reset
- Reline.core.io_gate.reset(encoding: Encoding::US_ASCII)
+ Reline.core.io_gate.instance_variable_set(:@encoding, Encoding::US_ASCII)
@config = Reline::Config.new
assert_equal true, @config.convert_meta
end
def test_encoding_is_not_ascii
- @config.reset
- Reline.core.io_gate.reset(encoding: Encoding::UTF_8)
@config = Reline::Config.new
- assert_equal nil, @config.convert_meta
- end
-
- def test_comment_line
- @config.read_lines([" #a: error\n"])
- assert_not_include @config.key_bindings, nil
+ assert_equal false, @config.convert_meta
end
def test_invalid_keystroke
- @config.read_lines(["a: error\n"])
- assert_not_include @config.key_bindings, nil
+ @config.read_lines(<<~LINES.lines)
+ #"a": comment
+ a: error
+ "b": no-error
+ LINES
+ key_bindings = additional_key_bindings(:emacs)
+ assert_not_include key_bindings, 'a'.bytes
+ assert_not_include key_bindings, nil
+ assert_not_include key_bindings, []
+ assert_include key_bindings, 'b'.bytes
end
def test_bind_key
@@ -150,21 +166,21 @@ class Reline::Config::Test < Reline::TestCase
def test_include
File.open('included_partial', 'wt') do |f|
f.write(<<~PARTIAL_LINES)
- set bell-style on
+ set show-mode-in-prompt on
PARTIAL_LINES
end
@config.read_lines(<<~LINES.lines)
$include included_partial
LINES
- assert_equal :audible, @config.instance_variable_get(:@bell_style)
+ assert_equal true, get_config_variable(:@show_mode_in_prompt)
end
def test_include_expand_path
home_backup = ENV['HOME']
File.open('included_partial', 'wt') do |f|
f.write(<<~PARTIAL_LINES)
- set bell-style on
+ set show-mode-in-prompt on
PARTIAL_LINES
end
ENV['HOME'] = Dir.pwd
@@ -172,7 +188,7 @@ class Reline::Config::Test < Reline::TestCase
$include ~/included_partial
LINES
- assert_equal :audible, @config.instance_variable_get(:@bell_style)
+ assert_equal true, get_config_variable(:@show_mode_in_prompt)
ensure
ENV['HOME'] = home_backup
end
@@ -180,39 +196,39 @@ class Reline::Config::Test < Reline::TestCase
def test_if
@config.read_lines(<<~LINES.lines)
$if Ruby
- set bell-style audible
+ set vi-cmd-mode-string (cmd)
$else
- set bell-style visible
+ set vi-cmd-mode-string [cmd]
$endif
LINES
- assert_equal :audible, @config.instance_variable_get(:@bell_style)
+ assert_equal '(cmd)', get_config_variable(:@vi_cmd_mode_string)
end
def test_if_with_false
@config.read_lines(<<~LINES.lines)
$if Python
- set bell-style audible
+ set vi-cmd-mode-string (cmd)
$else
- set bell-style visible
+ set vi-cmd-mode-string [cmd]
$endif
LINES
- assert_equal :visible, @config.instance_variable_get(:@bell_style)
+ assert_equal '[cmd]', get_config_variable(:@vi_cmd_mode_string)
end
def test_if_with_indent
%w[Ruby Reline].each do |cond|
@config.read_lines(<<~LINES.lines)
- set bell-style none
+ set vi-cmd-mode-string {cmd}
$if #{cond}
- set bell-style audible
+ set vi-cmd-mode-string (cmd)
$else
- set bell-style visible
+ set vi-cmd-mode-string [cmd]
$endif
LINES
- assert_equal :audible, @config.instance_variable_get(:@bell_style)
+ assert_equal '(cmd)', get_config_variable(:@vi_cmd_mode_string)
end
end
@@ -244,8 +260,8 @@ class Reline::Config::Test < Reline::TestCase
"\xC": "O"
LINES
keys = [0x1, 0x3, 0x4, 0x6, 0x7, 0xC]
- key_bindings = keys.to_h { |k| [[k.ord], ['O'.ord]] }
- assert_equal(key_bindings, @config.instance_variable_get(:@additional_key_bindings)[:emacs])
+ key_bindings = keys.to_h { |k| [[k], ['O'.ord]] }
+ assert_equal(key_bindings, additional_key_bindings(:emacs))
end
def test_unclosed_if
@@ -284,9 +300,9 @@ class Reline::Config::Test < Reline::TestCase
$endif
LINES
- assert_equal({[5] => :history_search_backward}, @config.instance_variable_get(:@additional_key_bindings)[:emacs])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_insert])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_command])
+ assert_equal({[5] => :history_search_backward}, additional_key_bindings(:emacs))
+ assert_equal({}, additional_key_bindings(:vi_insert))
+ assert_equal({}, additional_key_bindings(:vi_command))
end
def test_else
@@ -298,9 +314,9 @@ class Reline::Config::Test < Reline::TestCase
$endif
LINES
- assert_equal({[6] => :history_search_forward}, @config.instance_variable_get(:@additional_key_bindings)[:emacs])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_insert])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_command])
+ assert_equal({[6] => :history_search_forward}, additional_key_bindings(:emacs))
+ assert_equal({}, additional_key_bindings(:vi_insert))
+ assert_equal({}, additional_key_bindings(:vi_command))
end
def test_if_with_invalid_mode
@@ -312,9 +328,9 @@ class Reline::Config::Test < Reline::TestCase
$endif
LINES
- assert_equal({[6] => :history_search_forward}, @config.instance_variable_get(:@additional_key_bindings)[:emacs])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_insert])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_command])
+ assert_equal({[6] => :history_search_forward}, additional_key_bindings(:emacs))
+ assert_equal({}, additional_key_bindings(:vi_insert))
+ assert_equal({}, additional_key_bindings(:vi_command))
end
def test_mode_label_differs_from_keymap_label
@@ -329,9 +345,9 @@ class Reline::Config::Test < Reline::TestCase
"\C-e": history-search-backward
$endif
LINES
- assert_equal({[5] => :history_search_backward}, @config.instance_variable_get(:@additional_key_bindings)[:emacs])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_insert])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_command])
+ assert_equal({[5] => :history_search_backward}, additional_key_bindings(:emacs))
+ assert_equal({}, additional_key_bindings(:vi_insert))
+ assert_equal({}, additional_key_bindings(:vi_command))
end
def test_if_without_else_condition
@@ -342,9 +358,9 @@ class Reline::Config::Test < Reline::TestCase
$endif
LINES
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:emacs])
- assert_equal({[5] => :history_search_backward}, @config.instance_variable_get(:@additional_key_bindings)[:vi_insert])
- assert_equal({}, @config.instance_variable_get(:@additional_key_bindings)[:vi_command])
+ assert_equal({}, additional_key_bindings(:emacs))
+ assert_equal({[5] => :history_search_backward}, additional_key_bindings(:vi_insert))
+ assert_equal({}, additional_key_bindings(:vi_command))
end
def test_default_key_bindings
@@ -355,7 +371,7 @@ class Reline::Config::Test < Reline::TestCase
LINES
expected = { 'abcd'.bytes => 'ABCD'.bytes, 'ijkl'.bytes => 'IJKL'.bytes }
- assert_equal expected, @config.key_bindings
+ assert_equal expected, registered_key_bindings(expected.keys)
end
def test_additional_key_bindings
@@ -365,7 +381,7 @@ class Reline::Config::Test < Reline::TestCase
LINES
expected = { 'ef'.bytes => 'EF'.bytes, 'gh'.bytes => 'GH'.bytes }
- assert_equal expected, @config.key_bindings
+ assert_equal expected, registered_key_bindings(expected.keys)
end
def test_additional_key_bindings_with_nesting_and_comment_out
@@ -377,7 +393,7 @@ class Reline::Config::Test < Reline::TestCase
LINES
expected = { 'ef'.bytes => 'EF'.bytes, 'gh'.bytes => 'GH'.bytes }
- assert_equal expected, @config.key_bindings
+ assert_equal expected, registered_key_bindings(expected.keys)
end
def test_additional_key_bindings_for_other_keymap
@@ -392,7 +408,7 @@ class Reline::Config::Test < Reline::TestCase
LINES
expected = { 'cd'.bytes => 'CD'.bytes }
- assert_equal expected, @config.key_bindings
+ assert_equal expected, registered_key_bindings(expected.keys)
end
def test_additional_key_bindings_for_auxiliary_emacs_keymaps
@@ -414,7 +430,7 @@ class Reline::Config::Test < Reline::TestCase
"\C-xef".bytes => 'EF'.bytes,
"\egh".bytes => 'GH'.bytes,
}
- assert_equal expected, @config.key_bindings
+ assert_equal expected, registered_key_bindings(expected.keys)
end
def test_key_bindings_with_reset
@@ -426,7 +442,7 @@ class Reline::Config::Test < Reline::TestCase
LINES
@config.reset
expected = { 'default'.bytes => 'DEFAULT'.bytes, 'additional'.bytes => 'ADDITIONAL'.bytes }
- assert_equal expected, @config.key_bindings
+ assert_equal expected, registered_key_bindings(expected.keys)
end
def test_history_size
@@ -434,7 +450,7 @@ class Reline::Config::Test < Reline::TestCase
set history-size 5000
LINES
- assert_equal 5000, @config.instance_variable_get(:@history_size)
+ assert_equal 5000, get_config_variable(:@history_size)
history = Reline::History.new(@config)
history << "a\n"
assert_equal 1, history.size
@@ -459,6 +475,17 @@ class Reline::Config::Test < Reline::TestCase
ENV['INPUTRC'] = inputrc_backup
end
+ def test_inputrc_raw_value
+ @config.read_lines(<<~'LINES'.lines)
+ set editing-mode vi ignored-string
+ set vi-ins-mode-string aaa aaa
+ set vi-cmd-mode-string bbb ccc # comment
+ LINES
+ assert_equal :vi_insert, get_config_variable(:@editing_mode_label)
+ assert_equal 'aaa aaa', @config.vi_ins_mode_string
+ assert_equal 'bbb ccc # comment', @config.vi_cmd_mode_string
+ end
+
def test_inputrc_with_utf8
# This file is encoded by UTF-8 so this heredoc string is also UTF-8.
@config.read_lines(<<~'LINES'.lines)
@@ -541,5 +568,21 @@ class Reline::Config::Test < Reline::TestCase
ENV['XDG_CONFIG_HOME'] = xdg_config_home_backup
ENV['HOME'] = home_backup
end
-end
+ def test_reload
+ inputrc = "#{@tmpdir}/inputrc"
+ ENV['INPUTRC'] = inputrc
+
+ File.write(inputrc, "set emacs-mode-string !")
+ @config.read
+ assert_equal '!', @config.emacs_mode_string
+
+ File.write(inputrc, "set emacs-mode-string ?")
+ @config.reload
+ assert_equal '?', @config.emacs_mode_string
+
+ File.write(inputrc, "")
+ @config.reload
+ assert_equal '@', @config.emacs_mode_string
+ end
+end
diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb
index 409a7334cb..4dddf9c890 100644
--- a/test/reline/test_key_actor_emacs.rb
+++ b/test/reline/test_key_actor_emacs.rb
@@ -1,6 +1,6 @@
require_relative 'helper'
-class Reline::KeyActor::Emacs::Test < Reline::TestCase
+class Reline::KeyActor::EmacsTest < Reline::TestCase
def setup
Reline.send(:test_mode)
@prompt = '> '
@@ -1242,14 +1242,22 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
'12345' # new
])
# The ed_search_prev_history doesn't have default binding
- @line_editor.__send__(:ed_search_prev_history, "\C-p".ord)
- assert_line_around_cursor('', '12345')
- @line_editor.__send__(:ed_search_prev_history, "\C-p".ord)
- assert_line_around_cursor('', '12aaa')
- @line_editor.__send__(:ed_search_prev_history, "\C-p".ord)
- assert_line_around_cursor('', '12356')
- @line_editor.__send__(:ed_search_prev_history, "\C-p".ord)
- assert_line_around_cursor('', '12356')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12345', '')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12aaa', '')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12356', '')
+ input_key_by_symbol(:ed_search_next_history)
+ assert_line_around_cursor('12aaa', '')
+ input_key_by_symbol(:ed_prev_char)
+ input_key_by_symbol(:ed_next_char)
+ assert_line_around_cursor('12aaa', '')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12aaa', '')
+ 3.times { input_key_by_symbol(:ed_prev_char) }
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12', '356')
end
def test_ed_search_prev_history_without_match
@@ -1291,18 +1299,25 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
'12345' # new
])
# The ed_search_prev_history and ed_search_next_history doesn't have default binding
- @line_editor.__send__(:ed_search_prev_history, "\C-p".ord)
- assert_line_around_cursor('', '12345')
- @line_editor.__send__(:ed_search_prev_history, "\C-p".ord)
- assert_line_around_cursor('', '12aaa')
- @line_editor.__send__(:ed_search_prev_history, "\C-p".ord)
- assert_line_around_cursor('', '12356')
- @line_editor.__send__(:ed_search_next_history, "\C-n".ord)
- assert_line_around_cursor('', '12aaa')
- @line_editor.__send__(:ed_search_next_history, "\C-n".ord)
- assert_line_around_cursor('', '12345')
- @line_editor.__send__(:ed_search_next_history, "\C-n".ord)
- assert_line_around_cursor('', '')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12345', '')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12aaa', '')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12356', '')
+ input_key_by_symbol(:ed_search_next_history)
+ assert_line_around_cursor('12aaa', '')
+ input_key_by_symbol(:ed_search_next_history)
+ assert_line_around_cursor('12345', '')
+ input_key_by_symbol(:ed_search_prev_history)
+ assert_line_around_cursor('12aaa', '')
+ input_key_by_symbol(:ed_prev_char)
+ input_key_by_symbol(:ed_next_char)
+ input_key_by_symbol(:ed_search_next_history)
+ assert_line_around_cursor('12aaa', '')
+ 3.times { input_key_by_symbol(:ed_prev_char) }
+ input_key_by_symbol(:ed_search_next_history)
+ assert_line_around_cursor('12', '345')
end
def test_incremental_search_history_cancel_by_symbol_key
@@ -1437,4 +1452,176 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
@line_editor.__send__(:vi_editing_mode, nil)
assert(@config.editing_mode_is?(:vi_insert))
end
+
+ def test_undo
+ input_keys("\C-_", false)
+ assert_line_around_cursor('', '')
+ input_keys("aã‚b\C-h\C-h\C-h", false)
+ assert_line_around_cursor('', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('a', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('aã‚', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('aã‚b', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('aã‚', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('a', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('', '')
+ end
+
+ def test_undo_with_cursor_position
+ input_keys("abc\C-b\C-h", false)
+ assert_line_around_cursor('a', 'c')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('ab', 'c')
+ input_keys("ã‚ã„ã†\C-b\C-h", false)
+ assert_line_around_cursor('abã‚', 'ã†c')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('abã‚ã„', 'ã†c')
+ end
+
+ def test_undo_with_multiline
+ @line_editor.multiline_on
+ @line_editor.confirm_multiline_termination_proc = proc {}
+ input_keys("1\n2\n3", false)
+ assert_whole_lines(["1", "2", "3"])
+ assert_line_index(2)
+ assert_line_around_cursor('3', '')
+ input_keys("\C-p\C-h\C-h", false)
+ assert_whole_lines(["1", "3"])
+ assert_line_index(0)
+ assert_line_around_cursor('1', '')
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "", "3"])
+ assert_line_index(1)
+ assert_line_around_cursor('', '')
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "2", "3"])
+ assert_line_index(1)
+ assert_line_around_cursor('2', '')
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "2", ""])
+ assert_line_index(2)
+ assert_line_around_cursor('', '')
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "2"])
+ assert_line_index(1)
+ assert_line_around_cursor('2', '')
+ end
+
+ def test_undo_with_many_times
+ str = "a" + "b" * 99
+ input_keys(str, false)
+ 100.times { input_keys("\C-_", false) }
+ assert_line_around_cursor('a', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('a', '')
+ end
+
+ def test_redo
+ input_keys("aã‚b", false)
+ assert_line_around_cursor('aã‚b', '')
+ input_keys("\M-\C-_", false)
+ assert_line_around_cursor('aã‚b', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('aã‚', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('a', '')
+ input_keys("\M-\C-_", false)
+ assert_line_around_cursor('aã‚', '')
+ input_keys("\M-\C-_", false)
+ assert_line_around_cursor('aã‚b', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('aã‚', '')
+ input_keys("c", false)
+ assert_line_around_cursor('aã‚c', '')
+ input_keys("\M-\C-_", false)
+ assert_line_around_cursor('aã‚c', '')
+ end
+
+ def test_redo_with_cursor_position
+ input_keys("abc\C-b\C-h", false)
+ assert_line_around_cursor('a', 'c')
+ input_keys("\M-\C-_", false)
+ assert_line_around_cursor('a', 'c')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('ab', 'c')
+ input_keys("\M-\C-_", false)
+ assert_line_around_cursor('a', 'c')
+ end
+
+ def test_redo_with_multiline
+ @line_editor.multiline_on
+ @line_editor.confirm_multiline_termination_proc = proc {}
+ input_keys("1\n2\n3", false)
+ assert_whole_lines(["1", "2", "3"])
+ assert_line_index(2)
+ assert_line_around_cursor('3', '')
+
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "2", ""])
+ assert_line_index(2)
+ assert_line_around_cursor('', '')
+
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "2"])
+ assert_line_index(1)
+ assert_line_around_cursor('2', '')
+
+ input_keys("\M-\C-_", false)
+ assert_whole_lines(["1", "2", ""])
+ assert_line_index(2)
+ assert_line_around_cursor('', '')
+
+ input_keys("\M-\C-_", false)
+ assert_whole_lines(["1", "2", "3"])
+ assert_line_index(2)
+ assert_line_around_cursor('3', '')
+
+ input_keys("\C-p\C-h\C-h", false)
+ assert_whole_lines(["1", "3"])
+ assert_line_index(0)
+ assert_line_around_cursor('1', '')
+
+ input_keys("\C-n", false)
+ assert_whole_lines(["1", "3"])
+ assert_line_index(1)
+ assert_line_around_cursor('3', '')
+
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "", "3"])
+ assert_line_index(1)
+ assert_line_around_cursor('', '')
+
+ input_keys("\C-_", false)
+ assert_whole_lines(["1", "2", "3"])
+ assert_line_index(1)
+ assert_line_around_cursor('2', '')
+
+ input_keys("\M-\C-_", false)
+ assert_whole_lines(["1", "", "3"])
+ assert_line_index(1)
+ assert_line_around_cursor('', '')
+
+ input_keys("\M-\C-_", false)
+ assert_whole_lines(["1", "3"])
+ assert_line_index(1)
+ assert_line_around_cursor('3', '')
+ end
+
+ def test_redo_with_many_times
+ str = "a" + "b" * 98 + "c"
+ input_keys(str, false)
+ 100.times { input_keys("\C-_", false) }
+ assert_line_around_cursor('a', '')
+ input_keys("\C-_", false)
+ assert_line_around_cursor('a', '')
+ 100.times { input_keys("\M-\C-_", false) }
+ assert_line_around_cursor(str, '')
+ input_keys("\M-\C-_", false)
+ assert_line_around_cursor(str, '')
+ end
end
diff --git a/test/reline/test_key_actor_vi.rb b/test/reline/test_key_actor_vi.rb
index 4deae2dd83..07ca873ce3 100644
--- a/test/reline/test_key_actor_vi.rb
+++ b/test/reline/test_key_actor_vi.rb
@@ -1,6 +1,6 @@
require_relative 'helper'
-class Reline::KeyActor::ViInsert::Test < Reline::TestCase
+class Reline::ViInsertTest < Reline::TestCase
def setup
Reline.send(:test_mode)
@prompt = '> '
@@ -13,69 +13,73 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
@line_editor.reset(@prompt, encoding: @encoding)
end
+ def editing_mode_label
+ @config.instance_variable_get(:@editing_mode_label)
+ end
+
def teardown
Reline.test_reset
end
def test_vi_command_mode
input_keys("\C-[")
- assert_instance_of(Reline::KeyActor::ViCommand, @config.editing_mode)
+ assert_equal(:vi_command, editing_mode_label)
end
def test_vi_command_mode_with_input
input_keys("abc\C-[")
- assert_instance_of(Reline::KeyActor::ViCommand, @config.editing_mode)
+ assert_equal(:vi_command, editing_mode_label)
assert_line_around_cursor('ab', 'c')
end
def test_vi_insert
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
input_keys('i')
assert_line_around_cursor('i', '')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
input_keys("\C-[")
assert_line_around_cursor('', 'i')
- assert_instance_of(Reline::KeyActor::ViCommand, @config.editing_mode)
+ assert_equal(:vi_command, editing_mode_label)
input_keys('i')
assert_line_around_cursor('', 'i')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
end
def test_vi_add
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
input_keys('a')
assert_line_around_cursor('a', '')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
input_keys("\C-[")
assert_line_around_cursor('', 'a')
- assert_instance_of(Reline::KeyActor::ViCommand, @config.editing_mode)
+ assert_equal(:vi_command, editing_mode_label)
input_keys('a')
assert_line_around_cursor('a', '')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
end
def test_vi_insert_at_bol
input_keys('I')
assert_line_around_cursor('I', '')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
input_keys("12345\C-[hh")
assert_line_around_cursor('I12', '345')
- assert_instance_of(Reline::KeyActor::ViCommand, @config.editing_mode)
+ assert_equal(:vi_command, editing_mode_label)
input_keys('I')
assert_line_around_cursor('', 'I12345')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
end
def test_vi_add_at_eol
input_keys('A')
assert_line_around_cursor('A', '')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
input_keys("12345\C-[hh")
assert_line_around_cursor('A12', '345')
- assert_instance_of(Reline::KeyActor::ViCommand, @config.editing_mode)
+ assert_equal(:vi_command, editing_mode_label)
input_keys('A')
assert_line_around_cursor('A12345', '')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
end
def test_ed_insert_one
@@ -734,6 +738,13 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
assert_line_around_cursor('aaa ', 'ddd eee')
end
+ def test_vi_delete_meta_nothing
+ input_keys("foo\C-[0")
+ assert_line_around_cursor('', 'foo')
+ input_keys('dhp')
+ assert_line_around_cursor('', 'foo')
+ end
+
def test_vi_delete_meta_with_vi_next_word_at_eol
input_keys("foo bar\C-[0w")
assert_line_around_cursor('foo ', 'bar')
@@ -844,6 +855,13 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
assert_line_around_cursor('foofofoofoo barba', 'ro barbar')
end
+ def test_vi_yank_nothing
+ input_keys("foo\C-[0")
+ assert_line_around_cursor('', 'foo')
+ input_keys('yhp')
+ assert_line_around_cursor('', 'foo')
+ end
+
def test_vi_end_word_with_operator
input_keys("foo bar\C-[0")
assert_line_around_cursor('', 'foo bar')
@@ -901,11 +919,11 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
assert_line_around_cursor('abc', '')
input_keys("\C-[0C")
assert_line_around_cursor('', '')
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
end
def test_vi_motion_operators
- assert_instance_of(Reline::KeyActor::ViInsert, @config.editing_mode)
+ assert_equal(:vi_insert, editing_mode_label)
assert_nothing_raised do
input_keys("test = { foo: bar }\C-[BBBldt}b")
diff --git a/test/reline/test_key_stroke.rb b/test/reline/test_key_stroke.rb
index cd205c7d9e..ec70a05957 100644
--- a/test/reline/test_key_stroke.rb
+++ b/test/reline/test_key_stroke.rb
@@ -24,16 +24,14 @@ class Reline::KeyStroke::Test < Reline::TestCase
config.add_default_key_binding(key.bytes, func.bytes)
end
stroke = Reline::KeyStroke.new(config)
- assert_equal(:matching, stroke.match_status("a".bytes))
- assert_equal(:matching, stroke.match_status("ab".bytes))
- assert_equal(:matched, stroke.match_status("abc".bytes))
- assert_equal(:matched, stroke.match_status("abz".bytes))
- assert_equal(:matched, stroke.match_status("abx".bytes))
- assert_equal(:matched, stroke.match_status("ac".bytes))
- assert_equal(:matched, stroke.match_status("aa".bytes))
- assert_equal(:matched, stroke.match_status("x".bytes))
- assert_equal(:unmatched, stroke.match_status("m".bytes))
- assert_equal(:matched, stroke.match_status("abzwabk".bytes))
+ assert_equal(Reline::KeyStroke::MATCHING_MATCHED, stroke.match_status("a".bytes))
+ assert_equal(Reline::KeyStroke::MATCHING_MATCHED, stroke.match_status("ab".bytes))
+ assert_equal(Reline::KeyStroke::MATCHED, stroke.match_status("abc".bytes))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status("abz".bytes))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status("abcx".bytes))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status("aa".bytes))
+ assert_equal(Reline::KeyStroke::MATCHED, stroke.match_status("x".bytes))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status("xa".bytes))
end
def test_match_unknown
@@ -47,12 +45,15 @@ class Reline::KeyStroke::Test < Reline::TestCase
"\e[1;1R", # Cursor position report
"\e[15~", # F5
"\eOP", # F1
- "\e\e[A" # Option+Up
+ "\e\e[A", # Option+Up
+ "\eX",
+ "\e\eX"
]
sequences.each do |seq|
- assert_equal(:matched, stroke.match_status(seq.bytes))
- (1...seq.size).each do |i|
- assert_equal(:matching, stroke.match_status(seq.bytes.take(i)))
+ assert_equal(Reline::KeyStroke::MATCHED, stroke.match_status(seq.bytes))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status(seq.bytes + [32]))
+ (2...seq.size).each do |i|
+ assert_equal(Reline::KeyStroke::MATCHING, stroke.match_status(seq.bytes.take(i)))
end
end
end
@@ -61,16 +62,18 @@ class Reline::KeyStroke::Test < Reline::TestCase
config = Reline::Config.new
{
'abc' => '123',
+ 'ab' => '456'
}.each_pair do |key, func|
config.add_default_key_binding(key.bytes, func.bytes)
end
stroke = Reline::KeyStroke.new(config)
- assert_equal('123'.bytes, stroke.expand('abc'.bytes))
+ assert_equal(['123'.bytes.map { |c| Reline::Key.new(c, c, false) }, 'de'.bytes], stroke.expand('abcde'.bytes))
+ assert_equal(['456'.bytes.map { |c| Reline::Key.new(c, c, false) }, 'de'.bytes], stroke.expand('abde'.bytes))
# CSI sequence
- assert_equal([:ed_unassigned] + 'bc'.bytes, stroke.expand("\e[1;2;3;4;5abc".bytes))
- assert_equal([:ed_unassigned] + 'BC'.bytes, stroke.expand("\e\e[ABC".bytes))
+ assert_equal([[], 'bc'.bytes], stroke.expand("\e[1;2;3;4;5abc".bytes))
+ assert_equal([[], 'BC'.bytes], stroke.expand("\e\e[ABC".bytes))
# SS3 sequence
- assert_equal([:ed_unassigned] + 'QR'.bytes, stroke.expand("\eOPQR".bytes))
+ assert_equal([[], 'QR'.bytes], stroke.expand("\eOPQR".bytes))
end
def test_oneshot_key_bindings
@@ -81,25 +84,22 @@ class Reline::KeyStroke::Test < Reline::TestCase
config.add_default_key_binding(key.bytes, func.bytes)
end
stroke = Reline::KeyStroke.new(config)
- assert_equal(:unmatched, stroke.match_status('zzz'.bytes))
- assert_equal(:matched, stroke.match_status('abc'.bytes))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status('zzz'.bytes))
+ assert_equal(Reline::KeyStroke::MATCHED, stroke.match_status('abc'.bytes))
end
def test_with_reline_key
config = Reline::Config.new
{
- [
- Reline::Key.new(100, 228, true), # Alt+d
- Reline::Key.new(97, 97, false) # a
- ] => 'abc',
+ "\eda".bytes => 'abc', # Alt+d a
[195, 164] => 'def'
}.each_pair do |key, func|
config.add_oneshot_key_binding(key, func.bytes)
end
stroke = Reline::KeyStroke.new(config)
- assert_equal(:unmatched, stroke.match_status('da'.bytes))
- assert_equal(:matched, stroke.match_status("\M-da".bytes))
- assert_equal(:unmatched, stroke.match_status([32, 195, 164]))
- assert_equal(:matched, stroke.match_status([195, 164]))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status('da'.bytes))
+ assert_equal(Reline::KeyStroke::MATCHED, stroke.match_status("\eda".bytes))
+ assert_equal(Reline::KeyStroke::UNMATCHED, stroke.match_status([32, 195, 164]))
+ assert_equal(Reline::KeyStroke::MATCHED, stroke.match_status([195, 164]))
end
end
diff --git a/test/reline/test_line_editor.rb b/test/reline/test_line_editor.rb
index 7a38ecd596..1859da8199 100644
--- a/test/reline/test_line_editor.rb
+++ b/test/reline/test_line_editor.rb
@@ -4,14 +4,12 @@ require 'stringio'
class Reline::LineEditor
class RenderLineDifferentialTest < Reline::TestCase
- module TestIO
- RESET_COLOR = "\e[0m"
-
- def self.move_cursor_column(col)
+ class TestIO < Reline::IO
+ def move_cursor_column(col)
@output << "[COL_#{col}]"
end
- def self.erase_after_cursor
+ def erase_after_cursor
@output << '[ERASE]'
end
end
@@ -24,7 +22,7 @@ class Reline::LineEditor
@line_editor.instance_variable_set(:@screen_size, [24, 80])
@line_editor.instance_variable_set(:@output, @output)
Reline.send(:remove_const, :IOGate)
- Reline.const_set(:IOGate, TestIO)
+ Reline.const_set(:IOGate, TestIO.new)
Reline::IOGate.instance_variable_set(:@output, @output)
ensure
$VERBOSE = verbose
diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb
index a20a5c9f44..515805467d 100644
--- a/test/reline/test_reline.rb
+++ b/test/reline/test_reline.rb
@@ -303,12 +303,12 @@ class Reline::Test < Reline::TestCase
def test_vi_editing_mode
Reline.vi_editing_mode
- assert_equal(Reline::KeyActor::ViInsert, Reline.core.config.editing_mode.class)
+ assert_equal(:vi_insert, Reline.core.config.instance_variable_get(:@editing_mode_label))
end
def test_emacs_editing_mode
Reline.emacs_editing_mode
- assert_equal(Reline::KeyActor::Emacs, Reline.core.config.editing_mode.class)
+ assert_equal(:emacs, Reline.core.config.instance_variable_get(:@editing_mode_label))
end
def test_add_dialog_proc
@@ -375,7 +375,43 @@ class Reline::Test < Reline::TestCase
def test_dumb_terminal
lib = File.expand_path("../../lib", __dir__)
out = IO.popen([{"TERM"=>"dumb"}, Reline.test_rubybin, "-I#{lib}", "-rreline", "-e", "p Reline.core.io_gate"], &:read)
- assert_equal("Reline::GeneralIO", out.chomp)
+ assert_match(/#<Reline::Dumb/, out.chomp)
+ end
+
+ def test_print_prompt_before_everything_else
+ pend if win?
+ lib = File.expand_path("../../lib", __dir__)
+ code = "p Reline::IOGate.class; p Reline.readline 'prompt> '"
+ out = IO.popen([Reline.test_rubybin, "-I#{lib}", "-rreline", "-e", code], "r+") do |io|
+ io.write "abc\n"
+ io.close_write
+ io.read
+ end
+ assert_match(/\AReline::ANSI\nprompt> /, out)
+ end
+
+ def test_read_eof_returns_input
+ pend if win?
+ lib = File.expand_path("../../lib", __dir__)
+ code = "p result: Reline.readline"
+ out = IO.popen([Reline.test_rubybin, "-I#{lib}", "-rreline", "-e", code], "r+") do |io|
+ io.write "a\C-a"
+ io.close_write
+ io.read
+ end
+ assert_include(out, { result: 'a' }.inspect)
+ end
+
+ def test_read_eof_returns_nil_if_empty
+ pend if win?
+ lib = File.expand_path("../../lib", __dir__)
+ code = "p result: Reline.readline"
+ out = IO.popen([Reline.test_rubybin, "-I#{lib}", "-rreline", "-e", code], "r+") do |io|
+ io.write "a\C-h"
+ io.close_write
+ io.read
+ end
+ assert_include(out, { result: nil }.inspect)
end
def test_require_reline_should_not_trigger_winsize
@@ -389,7 +425,7 @@ class Reline::Test < Reline::TestCase
require("reline") && p(Reline.core.io_gate)
RUBY
out = IO.popen([{}, Reline.test_rubybin, "-I#{lib}", "-e", code], &:read)
- assert_equal("Reline::ANSI", out.chomp)
+ assert_include(out.chomp, "Reline::ANSI")
end
def win?
diff --git a/test/reline/test_reline_key.rb b/test/reline/test_reline_key.rb
index 7f9a11394a..1e6b9fcb6c 100644
--- a/test/reline/test_reline_key.rb
+++ b/test/reline/test_reline_key.rb
@@ -2,53 +2,10 @@ require_relative 'helper'
require "reline"
class Reline::TestKey < Reline::TestCase
- def setup
- Reline.test_mode
- end
-
- def teardown
- Reline.test_reset
- end
-
- def test_match_key
- assert(Reline::Key.new(1, 2, false).match?(Reline::Key.new(1, 2, false)))
- assert(Reline::Key.new(1, 2, false).match?(Reline::Key.new(nil, 2, false)))
- assert(Reline::Key.new(1, 2, false).match?(Reline::Key.new(1, 2, nil)))
-
- assert(Reline::Key.new(nil, 2, false).match?(Reline::Key.new(nil, 2, false)))
- assert(Reline::Key.new(1, nil, false).match?(Reline::Key.new(1, nil, false)))
- assert(Reline::Key.new(1, 2, nil).match?(Reline::Key.new(1, 2, nil)))
-
- assert(Reline::Key.new(nil, 2, false).match?(Reline::Key.new(nil, 2, false)))
- assert(Reline::Key.new(1, nil, false).match?(Reline::Key.new(1, nil, false)))
- assert(Reline::Key.new(1, 2, nil).match?(Reline::Key.new(1, 2, nil)))
-
- assert(!Reline::Key.new(1, 2, false).match?(Reline::Key.new(3, 1, false)))
- assert(!Reline::Key.new(1, 2, false).match?(Reline::Key.new(1, 3, false)))
- assert(!Reline::Key.new(1, 2, false).match?(Reline::Key.new(1, 3, true)))
- end
-
- def test_match_integer
- assert(Reline::Key.new(1, 2, false).match?(2))
- assert(Reline::Key.new(nil, 2, false).match?(2))
- assert(Reline::Key.new(1, nil, false).match?(1))
-
- assert(!Reline::Key.new(1, 2, false).match?(1))
- assert(!Reline::Key.new(1, nil, false).match?(2))
- assert(!Reline::Key.new(nil, nil, false).match?(1))
- end
-
def test_match_symbol
- assert(Reline::Key.new(:key1, :key2, false).match?(:key2))
- assert(Reline::Key.new(:key1, nil, false).match?(:key1))
-
- assert(!Reline::Key.new(:key1, :key2, false).match?(:key1))
- assert(!Reline::Key.new(:key1, nil, false).match?(:key2))
- assert(!Reline::Key.new(nil, nil, false).match?(:key1))
- end
-
- def test_match_other
- assert(!Reline::Key.new(:key1, 2, false).match?("key1"))
- assert(!Reline::Key.new(nil, nil, false).match?(nil))
+ assert(Reline::Key.new(:key1, :key1, false).match?(:key1))
+ refute(Reline::Key.new(:key1, :key1, false).match?(:key2))
+ refute(Reline::Key.new(:key1, :key1, false).match?(nil))
+ refute(Reline::Key.new(1, 1, false).match?(:key1))
end
end
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index 9e8d7da78f..c90d3d6a7f 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -556,6 +556,35 @@ begin
EOC
end
+ def test_bracketed_paste_with_undo
+ omit if Reline.core.io_gate.win?
+ start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
+ write("abc")
+ write("\e[200~def hoge\r\t3\rend\e[201~")
+ write("\C-_")
+ close
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ prompt> abc
+ EOC
+ end
+
+ def test_bracketed_paste_with_redo
+ omit if Reline.core.io_gate.win?
+ start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
+ write("abc")
+ write("\e[200~def hoge\r\t3\rend\e[201~")
+ write("\C-_")
+ write("\M-\C-_")
+ close
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ prompt> abcdef hoge
+ prompt> 3
+ prompt> end
+ EOC
+ end
+
def test_backspace_until_returns_to_initial
start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
write("ABC")
@@ -940,6 +969,18 @@ begin
EOC
end
+ def test_nontty
+ omit if Reline.core.io_gate.win?
+ cmd = %Q{ruby -e 'puts(%Q{ello\C-ah\C-e})' | ruby -I#{@pwd}/lib -rreline -e 'p Reline.readline(%{> })' | ruby -e 'print STDIN.read'}
+ start_terminal(40, 50, ['bash', '-c', cmd])
+ sleep 1
+ close rescue nil
+ assert_screen(<<~'EOC')
+ > hello
+ "hello"
+ EOC
+ end
+
def test_eof_with_newline
omit if Reline.core.io_gate.win?
cmd = %Q{ruby -e 'print(%Q{abc def \\e\\r})' | ruby -I#{@pwd}/lib -rreline -e 'p Reline.readline(%{> })'}
@@ -1782,6 +1823,58 @@ begin
EOC
end
+ def test_print_before_readline
+ code = <<~RUBY
+ puts 'Multiline REPL.'
+ 2.times do
+ print 'a' * 10
+ Reline.readline '>'
+ end
+ RUBY
+ start_terminal(6, 30, ['ruby', "-I#{@pwd}/lib", '-rreline', '-e', code], startup_message: 'Multiline REPL.')
+ write "x\n"
+ close
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ >x
+ >
+ EOC
+ end
+
+ def test_pre_input_hook_with_redisplay
+ code = <<~'RUBY'
+ puts 'Multiline REPL.'
+ Reline.pre_input_hook = -> do
+ Reline.insert_text 'abc'
+ Reline.redisplay # Reline doesn't need this but Readline requires calling redisplay
+ end
+ Reline.readline('prompt> ')
+ RUBY
+ start_terminal(6, 30, ['ruby', "-I#{@pwd}/lib", '-rreline', '-e', code], startup_message: 'Multiline REPL.')
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ prompt> abc
+ EOC
+ end
+
+ def test_pre_input_hook_with_multiline_text_insert
+ # Frequently used pattern of pre_input_hook
+ code = <<~'RUBY'
+ puts 'Multiline REPL.'
+ Reline.pre_input_hook = -> do
+ Reline.insert_text "abc\nef"
+ end
+ Reline.readline('>')
+ RUBY
+ start_terminal(6, 30, ['ruby', "-I#{@pwd}/lib", '-rreline', '-e', code], startup_message: 'Multiline REPL.')
+ write("\C-ad")
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ >abc
+ def
+ EOC
+ end
+
def test_thread_safe
start_terminal(6, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --auto-indent}, startup_message: 'Multiline REPL.')
write("[Thread.new{Reline.readline'>'},Thread.new{Reline.readmultiline('>'){true}}].map(&:join).size\n")
@@ -1799,6 +1892,25 @@ begin
EOC
end
+ def test_stop_continue
+ pidfile = Tempfile.create('pidfile')
+ rubyfile = Tempfile.create('rubyfile')
+ rubyfile.write <<~RUBY
+ File.write(#{pidfile.path.inspect}, Process.pid)
+ p Reline.readmultiline('>'){false}
+ RUBY
+ rubyfile.close
+ start_terminal(40, 50, ['bash'])
+ write "ruby -I#{@pwd}/lib -rreline #{rubyfile.path}\n"
+ write "abc\ndef\nhi"
+ pid = pidfile.tap(&:rewind).read.to_i
+ Process.kill(:STOP, pid) unless pid.zero?
+ write "fg\n"
+ write "\ebg"
+ close
+ assert_include result.join("\n"), ">abc\n>def\n>ghi\n"
+ end
+
def write_inputrc(content)
File.open(@inputrc_file, 'w') do |f|
f.write content
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb
index 40c5406db8..03d997d5b9 100644
--- a/test/resolv/test_dns.rb
+++ b/test/resolv/test_dns.rb
@@ -67,7 +67,7 @@ class TestResolvDNS < Test::Unit::TestCase
def with_udp_and_tcp(host, port)
if port == 0
# Automatic port; we might need to retry until we find a port which is free on both UDP _and_ TCP.
- retries_remaining = 5
+ retries_remaining = 10
t = nil
u = nil
begin
@@ -698,4 +698,123 @@ class TestResolvDNS < Test::Unit::TestCase
ensure
sock&.close
end
+
+ def test_multiple_servers_with_timeout_and_truncated_tcp_fallback
+ begin
+ OpenSSL
+ rescue LoadError
+ skip 'autoload problem. see [ruby-dev:45021][Bug #5786]'
+ end if defined?(OpenSSL)
+
+ num_records = 50
+
+ with_udp_and_tcp('127.0.0.1', 0) do |u1, t1|
+ with_udp_and_tcp('127.0.0.1', 0) do |u2,t2|
+ u2.close # XXX: u2 UDP socket is not used, but using #with_udp_and_tcp to enable Windows EACCES workaround
+ _, server1_port, _, server1_address = u1.addr
+ _, server2_port, _, server2_address = t2.addr
+
+ client_thread = Thread.new do
+ Resolv::DNS.open(nameserver_port: [[server1_address, server1_port], [server2_address, server2_port]]) do |dns|
+ dns.timeouts = [0.1, 0.2]
+ dns.getresources('foo.example.org', Resolv::DNS::Resource::IN::A)
+ end
+ end
+
+ udp_server1_thread = Thread.new do
+ msg, (_, client_port, _, client_address) = Timeout.timeout(5) { u1.recvfrom(4096) }
+ id, word2, _qdcount, _ancount, _nscount, _arcount = msg.unpack('nnnnnn')
+ opcode = (word2 & 0x7800) >> 11
+ rd = (word2 & 0x0100) >> 8
+ name = [3, 'foo', 7, 'example', 3, 'org', 0].pack('Ca*Ca*Ca*C')
+ qr = 1
+ aa = 0
+ tc = 1
+ ra = 1
+ z = 0
+ rcode = 0
+ qdcount = 0
+ ancount = num_records
+ nscount = 0
+ arcount = 0
+ word2 = (qr << 15) |
+ (opcode << 11) |
+ (aa << 10) |
+ (tc << 9) |
+ (rd << 8) |
+ (ra << 7) |
+ (z << 4) |
+ rcode
+ msg = [id, word2, qdcount, ancount, nscount, arcount].pack('nnnnnn')
+ type = 1
+ klass = 1
+ ttl = 3600
+ rdlength = 4
+ num_records.times do |i|
+ rdata = [192, 0, 2, i].pack('CCCC') # 192.0.2.x (TEST-NET address) RFC 3330
+ rr = [name, type, klass, ttl, rdlength, rdata].pack('a*nnNna*')
+ msg << rr
+ end
+ u1.send(msg[0...512], 0, client_address, client_port)
+ end
+
+ tcp_server1_thread = Thread.new do
+ # Keep this socket open so that the client experiences a timeout
+ t1.accept
+ end
+
+ tcp_server2_thread = Thread.new do
+ ct = t2.accept
+ msg = ct.recv(512)
+ msg.slice!(0..1) # Size (only for TCP)
+ id, word2, _qdcount, _ancount, _nscount, _arcount = msg.unpack('nnnnnn')
+ rd = (word2 & 0x0100) >> 8
+ opcode = (word2 & 0x7800) >> 11
+ name = [3, 'foo', 7, 'example', 3, 'org', 0].pack('Ca*Ca*Ca*C')
+ qr = 1
+ aa = 0
+ tc = 0
+ ra = 1
+ z = 0
+ rcode = 0
+ qdcount = 0
+ ancount = num_records
+ nscount = 0
+ arcount = 0
+ word2 = (qr << 15) |
+ (opcode << 11) |
+ (aa << 10) |
+ (tc << 9) |
+ (rd << 8) |
+ (ra << 7) |
+ (z << 4) |
+ rcode
+ msg = [id, word2, qdcount, ancount, nscount, arcount].pack('nnnnnn')
+ type = 1
+ klass = 1
+ ttl = 3600
+ rdlength = 4
+ num_records.times do |i|
+ rdata = [192, 0, 2, i].pack('CCCC') # 192.0.2.x (TEST-NET address) RFC 3330
+ rr = [name, type, klass, ttl, rdlength, rdata].pack('a*nnNna*')
+ msg << rr
+ end
+ msg = "#{[msg.bytesize].pack('n')}#{msg}" # Prefix with size
+ ct.send(msg, 0)
+ ct.close
+ end
+ result, _, tcp_server1_socket, = assert_join_threads([client_thread, udp_server1_thread, tcp_server1_thread, tcp_server2_thread])
+ assert_instance_of(Array, result)
+ assert_equal(50, result.length)
+ result.each_with_index do |rr, i|
+ assert_instance_of(Resolv::DNS::Resource::IN::A, rr)
+ assert_instance_of(Resolv::IPv4, rr.address)
+ assert_equal("192.0.2.#{i}", rr.address.to_s)
+ assert_equal(3600, rr.ttl)
+ end
+ ensure
+ tcp_server1_socket&.close
+ end
+ end
+ end
end
diff --git a/test/ripper/test_lexer.rb b/test/ripper/test_lexer.rb
index 7d62a7ee28..4e8c0003db 100644
--- a/test/ripper/test_lexer.rb
+++ b/test/ripper/test_lexer.rb
@@ -253,18 +253,31 @@ world"
assert_equal(code, Ripper.tokenize(code).join(""), bug)
end
+ InvalidHeredocInsideBlockParam = <<~CODE
+ a do |b
+ <<-C
+ C
+ |
+ end
+ CODE
+
def test_heredoc_inside_block_param
bug = '[Bug #19399]'
- code = <<~CODE
- a do |b
- <<-C
- C
- |
- end
- CODE
+ code = InvalidHeredocInsideBlockParam
assert_equal(code, Ripper.tokenize(code).join(""), bug)
end
+ def test_heredoc_no_memory_leak
+ assert_no_memory_leak([], "#{<<-"begin;"}", "#{<<-'end;'}", rss: true)
+ require "ripper"
+ source = "" #{InvalidHeredocInsideBlockParam.dump}
+ begin;
+ 400_000.times do
+ Ripper.new(source).parse
+ end
+ end;
+ end
+
def test_heredoc_unterminated_interpolation
code = <<~'HEREDOC'
<<A+1
@@ -302,9 +315,8 @@ world"
[[6, 2], :on_tstring_content, "3\n", state(:EXPR_BEG)],
[[7, 0], :on_heredoc_end, "H1\n", state(:EXPR_BEG)],
]
- assert_equal(code, Ripper.tokenize(code).join(""))
- assert_equal(expected, result = Ripper.lex(code),
- proc {expected.zip(result) {|e, r| break diff(e, r) unless e == r}})
+
+ assert_lexer(expected, code)
code = <<~'HEREDOC'
<<-H1
@@ -330,6 +342,174 @@ world"
[[6, 0], :on_tstring_content, " 3\n", state(:EXPR_BEG)],
[[7, 0], :on_heredoc_end, "H1\n", state(:EXPR_BEG)],
]
+
+ assert_lexer(expected, code)
+ end
+
+ def test_invalid_escape_ctrl_mbchar
+ code = %["\\C-\u{3042}"]
+ expected = [
+ [[1, 0], :on_tstring_beg, '"', state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\\C-\u{3042}", state(:EXPR_BEG)],
+ [[1, 7], :on_tstring_end, '"', state(:EXPR_END)],
+ ]
+
+ assert_lexer(expected, code)
+ end
+
+ def test_invalid_escape_meta_mbchar
+ code = %["\\M-\u{3042}"]
+ expected = [
+ [[1, 0], :on_tstring_beg, '"', state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\\M-\u{3042}", state(:EXPR_BEG)],
+ [[1, 7], :on_tstring_end, '"', state(:EXPR_END)],
+ ]
+
+ assert_lexer(expected, code)
+ end
+
+ def test_invalid_escape_meta_ctrl_mbchar
+ code = %["\\M-\\C-\u{3042}"]
+ expected = [
+ [[1, 0], :on_tstring_beg, '"', state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\\M-\\C-\u{3042}", state(:EXPR_BEG)],
+ [[1, 10], :on_tstring_end, '"', state(:EXPR_END)],
+ ]
+
+ assert_lexer(expected, code)
+ end
+
+ def test_invalid_escape_ctrl_meta_mbchar
+ code = %["\\C-\\M-\u{3042}"]
+ expected = [
+ [[1, 0], :on_tstring_beg, '"', state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\\C-\\M-\u{3042}", state(:EXPR_BEG)],
+ [[1, 10], :on_tstring_end, '"', state(:EXPR_END)],
+ ]
+
+ assert_lexer(expected, code)
+ end
+
+ def test_invalid_escape_string
+ code = "\"hello\\x world"
+ expected = [
+ [[1, 0], :on_tstring_beg, "\"", state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "hello", state(:EXPR_BEG)],
+ [[1, 5], :on_tstring_content, "\\x", state(:EXPR_BEG)],
+ [[1, 7], :on_tstring_content, " world", state(:EXPR_BEG)],
+ ]
+
+ code = "\"\nhello\\x world"
+ expected = [
+ [[1, 0], :on_tstring_beg, "\"", state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\n" "hello", state(:EXPR_BEG)],
+ [[2, 5], :on_tstring_content, "\\x", state(:EXPR_BEG)],
+ [[2, 7], :on_tstring_content, " world", state(:EXPR_BEG)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "\"\n\\Cxx\""
+ expected = [
+ [[1, 0], :on_tstring_beg, "\"", state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\\Cx", state(:EXPR_BEG)],
+ [[2, 3], :on_tstring_content, "x", state(:EXPR_BEG)],
+ [[2, 4], :on_tstring_end, "\"", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "\"\n\\Mxx\""
+ expected = [
+ [[1, 0], :on_tstring_beg, "\"", state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\\Mx", state(:EXPR_BEG)],
+ [[2, 3], :on_tstring_content, "x", state(:EXPR_BEG)],
+ [[2, 4], :on_tstring_end, "\"", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "\"\n\\c\\cx\""
+ expected = [
+ [[1, 0], :on_tstring_beg, "\"", state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\\c\\c", state(:EXPR_BEG)],
+ [[2, 4], :on_tstring_content, "x", state(:EXPR_BEG)],
+ [[2, 5], :on_tstring_end, "\"", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "\"\n\\ux\""
+ expected = [
+ [[1, 0], :on_tstring_beg, "\"", state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\\u", state(:EXPR_BEG)],
+ [[2, 2], :on_tstring_content, "x", state(:EXPR_BEG)],
+ [[2, 3], :on_tstring_end, "\"", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "\"\n\\xx\""
+ expected = [
+ [[1, 0], :on_tstring_beg, "\"", state(:EXPR_BEG)],
+ [[1, 1], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\\x", state(:EXPR_BEG)],
+ [[2, 2], :on_tstring_content, "x", state(:EXPR_BEG)],
+ [[2, 3], :on_tstring_end, "\"", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "<<A\n\n\\xyz"
+ expected = [
+ [[1, 0], :on_heredoc_beg, "<<A", state(:EXPR_BEG)],
+ [[1, 3], :on_nl, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[3, 0], :on_tstring_content, "\\x", state(:EXPR_BEG)],
+ [[3, 2], :on_tstring_content, "yz", state(:EXPR_BEG)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "%(\n\\xyz)"
+ expected = [
+ [[1, 0], :on_tstring_beg, "%(", state(:EXPR_BEG)],
+ [[1, 2], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\\x", state(:EXPR_BEG)],
+ [[2, 2], :on_tstring_content, "yz", state(:EXPR_BEG)],
+ [[2, 4], :on_tstring_end, ")", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+
+ code = "%Q(\n\\xyz)"
+ expected = [
+ [[1, 0], :on_tstring_beg, "%Q(", state(:EXPR_BEG)],
+ [[1, 3], :on_tstring_content, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_tstring_content, "\\x", state(:EXPR_BEG)],
+ [[2, 2], :on_tstring_content, "yz", state(:EXPR_BEG)],
+ [[2, 4], :on_tstring_end, ")", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+
+ code = ":\"\n\\xyz\""
+ expected = [
+ [[1, 0], :on_symbeg, ":\"", state(:EXPR_FNAME)],
+ [[1, 2], :on_tstring_content, "\n", state(:EXPR_FNAME)],
+ [[2, 0], :on_tstring_content, "\\x", state(:EXPR_FNAME)],
+ [[2, 2], :on_tstring_content, "yz", state(:EXPR_FNAME)],
+ [[2, 4], :on_tstring_end, "\"", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+ end
+
+ def test_spaces_at_eof
+ code = "1\n\t \t"
+ expected = [
+ [[1, 0], :on_int, "1", state(:EXPR_END)],
+ [[1, 1], :on_nl, "\n", state(:EXPR_BEG)],
+ [[2, 0], :on_sp, "\t \t", state(:EXPR_END)],
+ ]
+ assert_lexer(expected, code)
+ end
+
+ def assert_lexer(expected, code)
assert_equal(code, Ripper.tokenize(code).join(""))
assert_equal(expected, result = Ripper.lex(code),
proc {expected.zip(result) {|e, r| break diff(e, r) unless e == r}})
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index dc94da01ee..aa7434c083 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -267,28 +267,28 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
end
def test_assign_error_backref
- thru_assign_error = false
+ errors = []
result =
- parse('$& = 1', :on_assign_error) {thru_assign_error = true}
- assert_equal true, thru_assign_error
+ parse('$& = 1', %i[on_assign_error compile_error]) {|e, *| errors << e}
+ assert_equal %i[on_assign_error], errors
assert_equal '[assign(assign_error(var_field($&)),1)]', result
- thru_assign_error = false
+ errors = []
result =
- parse('$&, _ = 1', :on_assign_error) {thru_assign_error = true}
- assert_equal true, thru_assign_error
+ parse('$&, _ = 1', %i[on_assign_error compile_error]) {|e, *| errors << e}
+ assert_equal %i[on_assign_error], errors
assert_equal '[massign([assign_error(var_field($&)),var_field(_)],1)]', result
- thru_assign_error = false
+ errors = []
result =
- parse('$& += 1', :on_assign_error) {thru_assign_error = true}
- assert_equal true, thru_assign_error
+ parse('$& += 1', %i[on_assign_error compile_error]) {|e, *| errors << e}
+ assert_equal %i[on_assign_error], errors
assert_equal '[assign_error(opassign(var_field($&),+=,1))]', result
- thru_assign_error = false
+ errors = []
result =
- parse('$& += cmd 1, 2', :on_assign_error) {thru_assign_error = true}
- assert_equal true, thru_assign_error
+ parse('$& += cmd 1, 2', %i[on_assign_error compile_error]) {|e, *| errors << e}
+ assert_equal %i[on_assign_error], errors
assert_equal '[assign_error(opassign(var_field($&),+=,command(cmd,[1,2])))]', result
end
@@ -1694,8 +1694,8 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
else
end
STR
- assert_match(/duplicated 'when' clause/, fmt)
- assert_equal([3], args)
+ assert_match(/duplicates 'when' clause/, fmt)
+ assert_equal([4, 3], args)
end
def test_warn_duplicated_hash_keys
@@ -1743,4 +1743,69 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
parse('case 0; in {a:}; end', :on_hshptn) {thru_hshptn = true}
assert_equal true, thru_hshptn
end
+
+ def test_return_out_of_compile_error_no_memory_leak
+ assert_no_memory_leak(%w(-rripper), "#{<<~'begin;'}", "#{<<~'end;'}", rss: true)
+ class MyRipper < Ripper
+ def initialize(src, &blk)
+ super(src)
+ @blk = blk
+ end
+
+ def compile_error(msg) = @blk.call(msg)
+ end
+
+ def call_parse = MyRipper.new("/") { |msg| return msg }.parse
+
+ # Check that call_parse does return a syntax error
+ raise "call_parse should return a syntax error" unless call_parse
+ begin;
+ 100_000.times do
+ call_parse
+ end
+ end;
+ end
+
+ def test_return_out_of_warn_no_memory_leak
+ assert_no_memory_leak(%w(-rripper), "#{<<~'begin;'}", "#{<<~'end;'}", rss: true)
+ class MyRipper < Ripper
+ def initialize(src, &blk)
+ super(src)
+ @blk = blk
+ end
+
+ def warn(msg, *args) = @blk.call(msg)
+ end
+
+ def call_parse = MyRipper.new("{ a: 1, a: 2 }") { |msg| return msg }.parse
+
+ # Check that call_parse does warn
+ raise "call_parse should warn" unless call_parse
+ begin;
+ 500_000.times do
+ call_parse
+ end
+ end;
+
+ assert_no_memory_leak(%w(-rripper), "#{<<~'begin;'}", "#{<<~'end;'}", rss: true)
+ class MyRipper < Ripper
+ def initialize(src, &blk)
+ super(src)
+ @blk = blk
+ end
+
+ def warn(msg, *args) = @blk.call(msg)
+ end
+
+ $VERBOSE = true
+ def call_parse = MyRipper.new("if true\n end\n") { |msg| return msg }.parse
+
+ # Check that call_parse does warn
+ raise "call_parse should warn" unless call_parse
+ begin;
+ 1_000_000.times do
+ call_parse
+ end
+ end;
+ end
end if ripper_test
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index 792f19ef1a..261e259889 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -53,6 +53,8 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
Ripper.tokenize("1 .foo\n")
assert_equal ["1", "\n", " ", ".", "foo", "\n"],
Ripper.tokenize("1\n .foo\n")
+ assert_equal ["def", " ", "f", ";", " ", "(", "x", ")", "::", "A", " ", "="],
+ Ripper.tokenize("def f; (x)::A =")
end
def test_lex
diff --git a/test/ruby/test_allocation.rb b/test/ruby/test_allocation.rb
index 48348c0fbd..9ba01dfcf9 100644
--- a/test/ruby/test_allocation.rb
+++ b/test/ruby/test_allocation.rb
@@ -2,7 +2,16 @@
require 'test/unit'
class TestAllocation < Test::Unit::TestCase
+ def munge_checks(checks)
+ checks
+ end
+
def check_allocations(checks)
+ dups = checks.split("\n").reject(&:empty?).tally.select{|_,v| v > 1}
+ raise "duplicate checks:\n#{dups.keys.join("\n")}" unless dups.empty?
+
+ checks = munge_checks(checks)
+
assert_separately([], <<~RUBY)
$allocations = [0, 0]
$counts = {}
@@ -25,6 +34,10 @@ class TestAllocation < Test::Unit::TestCase
empty_array = empty_array = []
empty_hash = empty_hash = {}
array1 = array1 = [1]
+ r2k_array = r2k_array = [Hash.ruby2_keywords_hash(a: 3)]
+ r2k_array1 = r2k_array1 = [1, Hash.ruby2_keywords_hash(a: 3)]
+ r2k_empty_array = r2k_empty_array = [Hash.ruby2_keywords_hash({})]
+ r2k_empty_array1 = r2k_empty_array1 = [1, Hash.ruby2_keywords_hash({})]
hash1 = hash1 = {a: 2}
nill = nill = nil
block = block = lambda{}
@@ -95,6 +108,8 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 0, "none(*empty_array, *empty_array#{block})")
check_allocations(0, 1, "none(**empty_hash, **empty_hash#{block})")
check_allocations(1, 1, "none(*empty_array, *empty_array, **empty_hash, **empty_hash#{block})")
+
+ check_allocations(0, 0, "none(*r2k_empty_array#{block})")
RUBY
end
@@ -114,8 +129,10 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(0, 1, "required(**hash1, **empty_hash#{block})")
check_allocations(1, 0, "required(*array1, *empty_array, **empty_hash#{block})")
- # Currently allocates 1 array unnecessarily due to splatarray true
- check_allocations(1, 1, "required(*empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "required(*r2k_empty_array1#{block})")
+ check_allocations(0, 1, "required(*r2k_array#{block})")
+
+ check_allocations(0, 1, "required(*empty_array, **hash1, **empty_hash#{block})")
RUBY
end
@@ -135,8 +152,11 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(0, 1, "optional(**hash1, **empty_hash#{block})")
check_allocations(1, 0, "optional(*array1, *empty_array, **empty_hash#{block})")
- # Currently allocates 1 array unnecessarily due to splatarray true
- check_allocations(1, 1, "optional(*empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "optional(*r2k_empty_array#{block})")
+ check_allocations(0, 0, "optional(*r2k_empty_array1#{block})")
+ check_allocations(0, 1, "optional(*r2k_array#{block})")
+
+ check_allocations(0, 1, "optional(*empty_array, **hash1, **empty_hash#{block})")
RUBY
end
@@ -159,13 +179,15 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 0, "splat(1, *array1, **empty_hash#{block})")
check_allocations(1, 0, "splat(1, *array1, *empty_array, **empty_hash#{block})")
- check_allocations(1, 0, "splat(*array1#{block})")
check_allocations(1, 1, "splat(**hash1#{block})")
- check_allocations(1, 0, "splat(*array1, *empty_array#{block})")
check_allocations(1, 1, "splat(**hash1, **empty_hash#{block})")
- check_allocations(1, 0, "splat(*array1, *empty_array, **empty_hash#{block})")
check_allocations(1, 1, "splat(*empty_array, **hash1, **empty_hash#{block})")
+
+ check_allocations(1, 0, "splat(*r2k_empty_array#{block})")
+ check_allocations(1, 0, "splat(*r2k_empty_array1#{block})")
+ check_allocations(1, 1, "splat(*r2k_array#{block})")
+ check_allocations(1, 1, "splat(*r2k_array1#{block})")
RUBY
end
@@ -188,13 +210,14 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 0, "req_splat(1, *array1, **empty_hash#{block})")
check_allocations(1, 0, "req_splat(1, *array1, *empty_array, **empty_hash#{block})")
- check_allocations(1, 0, "req_splat(*array1#{block})")
check_allocations(1, 1, "req_splat(**hash1#{block})")
- check_allocations(1, 0, "req_splat(*array1, *empty_array#{block})")
check_allocations(1, 1, "req_splat(**hash1, **empty_hash#{block})")
- check_allocations(1, 0, "req_splat(*array1, *empty_array, **empty_hash#{block})")
check_allocations(1, 1, "req_splat(*empty_array, **hash1, **empty_hash#{block})")
+
+ check_allocations(1, 0, "req_splat(*r2k_empty_array1#{block})")
+ check_allocations(1, 1, "req_splat(*r2k_array#{block})")
+ check_allocations(1, 1, "req_splat(*r2k_array1#{block})")
RUBY
end
@@ -217,13 +240,14 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 0, "splat_post(1, *array1, **empty_hash#{block})")
check_allocations(1, 0, "splat_post(1, *array1, *empty_array, **empty_hash#{block})")
- check_allocations(1, 0, "splat_post(*array1#{block})")
check_allocations(1, 1, "splat_post(**hash1#{block})")
- check_allocations(1, 0, "splat_post(*array1, *empty_array#{block})")
check_allocations(1, 1, "splat_post(**hash1, **empty_hash#{block})")
- check_allocations(1, 0, "splat_post(*array1, *empty_array, **empty_hash#{block})")
check_allocations(1, 1, "splat_post(*empty_array, **hash1, **empty_hash#{block})")
+
+ check_allocations(1, 0, "splat_post(*r2k_empty_array1#{block})")
+ check_allocations(1, 1, "splat_post(*r2k_array#{block})")
+ check_allocations(1, 1, "splat_post(*r2k_array1#{block})")
RUBY
end
@@ -244,16 +268,13 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(0, 1, "keyword(**empty_hash, **hash1#{block})")
check_allocations(0, 0, "keyword(*empty_array#{block})")
- check_allocations(0, 1, "keyword(**hash1, **empty_hash#{block})")
check_allocations(1, 0, "keyword(*empty_array, *empty_array, **empty_hash#{block})")
- check_allocations(0, 0, "keyword(*empty_array#{block})")
- check_allocations(0, 1, "keyword(**hash1, **empty_hash#{block})")
- check_allocations(1, 0, "keyword(*empty_array, *empty_array, **empty_hash#{block})")
+ check_allocations(0, 0, "keyword(*r2k_empty_array#{block})")
+ check_allocations(0, 0, "keyword(*r2k_array#{block})")
- # Currently allocates 1 array unnecessarily due to splatarray true
- check_allocations(1, 1, "keyword(*empty_array, a: 2, **empty_hash#{block})")
- check_allocations(1, 1, "keyword(*empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword(*empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword(*empty_array, **hash1, **empty_hash#{block})")
RUBY
end
@@ -274,16 +295,13 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(0, 1, "keyword_splat(**empty_hash, **hash1#{block})")
check_allocations(0, 1, "keyword_splat(*empty_array#{block})")
- check_allocations(0, 1, "keyword_splat(**hash1, **empty_hash#{block})")
check_allocations(1, 1, "keyword_splat(*empty_array, *empty_array, **empty_hash#{block})")
- check_allocations(0, 1, "keyword_splat(*empty_array#{block})")
- check_allocations(0, 1, "keyword_splat(**hash1, **empty_hash#{block})")
- check_allocations(1, 1, "keyword_splat(*empty_array, *empty_array, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword_splat(*r2k_empty_array#{block})")
+ check_allocations(0, 1, "keyword_splat(*r2k_array#{block})")
- # Currently allocates 1 array unnecessarily due to splatarray true
- check_allocations(1, 1, "keyword_splat(*empty_array, a: 2, **empty_hash#{block})")
- check_allocations(1, 1, "keyword_splat(*empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword_splat(*empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword_splat(*empty_array, **hash1, **empty_hash#{block})")
RUBY
end
@@ -304,16 +322,13 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(0, 1, "keyword_and_keyword_splat(**empty_hash, **hash1#{block})")
check_allocations(0, 1, "keyword_and_keyword_splat(*empty_array#{block})")
- check_allocations(0, 1, "keyword_and_keyword_splat(**hash1, **empty_hash#{block})")
check_allocations(1, 1, "keyword_and_keyword_splat(*empty_array, *empty_array, **empty_hash#{block})")
- check_allocations(0, 1, "keyword_and_keyword_splat(*empty_array#{block})")
- check_allocations(0, 1, "keyword_and_keyword_splat(**hash1, **empty_hash#{block})")
- check_allocations(1, 1, "keyword_and_keyword_splat(*empty_array, *empty_array, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword_and_keyword_splat(*r2k_empty_array#{block})")
+ check_allocations(0, 1, "keyword_and_keyword_splat(*r2k_array#{block})")
- # Currently allocates 1 array unnecessarily due to splatarray true
- check_allocations(1, 1, "keyword_and_keyword_splat(*empty_array, a: 2, **empty_hash#{block})")
- check_allocations(1, 1, "keyword_and_keyword_splat(*empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword_and_keyword_splat(*empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(0, 1, "keyword_and_keyword_splat(*empty_array, **hash1, **empty_hash#{block})")
RUBY
end
@@ -334,7 +349,6 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(0, 1, "required_and_keyword(1, **empty_hash, **hash1#{block})")
check_allocations(0, 0, "required_and_keyword(1, *empty_array#{block})")
- check_allocations(0, 1, "required_and_keyword(1, **hash1, **empty_hash#{block})")
check_allocations(1, 0, "required_and_keyword(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(0, 0, "required_and_keyword(*array1, a: 2#{block})")
@@ -350,12 +364,14 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "required_and_keyword(*array1, *empty_array, a: 2, **empty_hash#{block})")
check_allocations(1, 1, "required_and_keyword(*array1, *empty_array, **hash1, **empty_hash#{block})")
- # Currently allocates 1 array unnecessarily due to splatarray true
- check_allocations(1, 1, "required_and_keyword(1, *empty_array, a: 2, **empty_hash#{block})")
- check_allocations(1, 1, "required_and_keyword(1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "required_and_keyword(*array1, **empty_hash, a: 2#{block})")
- check_allocations(1, 1, "required_and_keyword(*array1, **hash1, **empty_hash#{block})")
- check_allocations(1, 0, "required_and_keyword(*array1, **nil#{block})")
+ check_allocations(0, 0, "required_and_keyword(*r2k_empty_array1#{block})")
+ check_allocations(0, 0, "required_and_keyword(*r2k_array1#{block})")
+
+ check_allocations(0, 1, "required_and_keyword(1, *empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(0, 1, "required_and_keyword(1, *empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "required_and_keyword(*array1, **empty_hash, a: 2#{block})")
+ check_allocations(0, 1, "required_and_keyword(*array1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "required_and_keyword(*array1, **nil#{block})")
RUBY
end
@@ -376,7 +392,6 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "splat_and_keyword(1, **empty_hash, **hash1#{block})")
check_allocations(1, 0, "splat_and_keyword(1, *empty_array#{block})")
- check_allocations(1, 1, "splat_and_keyword(1, **hash1, **empty_hash#{block})")
check_allocations(1, 0, "splat_and_keyword(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(1, 0, "splat_and_keyword(*array1, a: 2#{block})")
@@ -397,6 +412,11 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "splat_and_keyword(*array1, **empty_hash, a: 2#{block})")
check_allocations(1, 1, "splat_and_keyword(*array1, **hash1, **empty_hash#{block})")
check_allocations(1, 0, "splat_and_keyword(*array1, **nil#{block})")
+
+ check_allocations(1, 0, "splat_and_keyword(*r2k_empty_array#{block})")
+ check_allocations(1, 0, "splat_and_keyword(*r2k_array#{block})")
+ check_allocations(1, 0, "splat_and_keyword(*r2k_empty_array1#{block})")
+ check_allocations(1, 0, "splat_and_keyword(*r2k_array1#{block})")
RUBY
end
@@ -417,7 +437,6 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(0, 1, "required_and_keyword_splat(1, **empty_hash, **hash1#{block})")
check_allocations(0, 1, "required_and_keyword_splat(1, *empty_array#{block})")
- check_allocations(0, 1, "required_and_keyword_splat(1, **hash1, **empty_hash#{block})")
check_allocations(1, 1, "required_and_keyword_splat(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(0, 1, "required_and_keyword_splat(*array1, a: 2#{block})")
@@ -433,12 +452,14 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "required_and_keyword_splat(*array1, *empty_array, a: 2, **empty_hash#{block})")
check_allocations(1, 1, "required_and_keyword_splat(*array1, *empty_array, **hash1, **empty_hash#{block})")
- # Currently allocates 1 array unnecessarily due to splatarray true
- check_allocations(1, 1, "required_and_keyword_splat(1, *empty_array, a: 2, **empty_hash#{block})")
- check_allocations(1, 1, "required_and_keyword_splat(1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "required_and_keyword_splat(*array1, **empty_hash, a: 2#{block})")
- check_allocations(1, 1, "required_and_keyword_splat(*array1, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "required_and_keyword_splat(*array1, **nil#{block})")
+ check_allocations(0, 1, "required_and_keyword_splat(*r2k_empty_array1#{block})")
+ check_allocations(0, 1, "required_and_keyword_splat(*r2k_array1#{block})")
+
+ check_allocations(0, 1, "required_and_keyword_splat(1, *empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(0, 1, "required_and_keyword_splat(1, *empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "required_and_keyword_splat(*array1, **empty_hash, a: 2#{block})")
+ check_allocations(0, 1, "required_and_keyword_splat(*array1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "required_and_keyword_splat(*array1, **nil#{block})")
RUBY
end
@@ -459,7 +480,6 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "splat_and_keyword_splat(1, **empty_hash, **hash1#{block})")
check_allocations(1, 1, "splat_and_keyword_splat(1, *empty_array#{block})")
- check_allocations(1, 1, "splat_and_keyword_splat(1, **hash1, **empty_hash#{block})")
check_allocations(1, 1, "splat_and_keyword_splat(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(1, 1, "splat_and_keyword_splat(*array1, a: 2#{block})")
@@ -480,6 +500,11 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "splat_and_keyword_splat(*array1, **empty_hash, a: 2#{block})")
check_allocations(1, 1, "splat_and_keyword_splat(*array1, **hash1, **empty_hash#{block})")
check_allocations(1, 1, "splat_and_keyword_splat(*array1, **nil#{block})")
+
+ check_allocations(1, 1, "splat_and_keyword_splat(*r2k_empty_array#{block})")
+ check_allocations(1, 1, "splat_and_keyword_splat(*r2k_array#{block})")
+ check_allocations(1, 1, "splat_and_keyword_splat(*r2k_empty_array1#{block})")
+ check_allocations(1, 1, "splat_and_keyword_splat(*r2k_array1#{block})")
RUBY
end
@@ -500,7 +525,6 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, **empty_hash, **hash1#{block})")
check_allocations(1, 0, "anon_splat_and_anon_keyword_splat(1, *empty_array#{block})")
- check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, **hash1, **empty_hash#{block})")
check_allocations(1, 0, "anon_splat_and_anon_keyword_splat(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(0, 0, "anon_splat_and_anon_keyword_splat(*array1, a: 2#{block})")
@@ -518,15 +542,21 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, *empty_array, a: 2, **empty_hash#{block})")
check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*array1, **empty_hash, a: 2#{block})")
- check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*array1, **hash1, **empty_hash#{block})")
- check_allocations(1, 0, "anon_splat_and_anon_keyword_splat(*array1, **nil#{block})")
+ check_allocations(0, 1, "anon_splat_and_anon_keyword_splat(*array1, **empty_hash, a: 2#{block})")
+ check_allocations(0, 1, "anon_splat_and_anon_keyword_splat(*array1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "anon_splat_and_anon_keyword_splat(*array1, **nil#{block})")
+
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_empty_array#{block})")
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_array#{block})")
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_empty_array1#{block})")
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_array1#{block})")
RUBY
end
def test_nested_anonymous_splat_and_anonymous_keyword_splat_parameters
check_allocations(<<~RUBY)
- def self.anon_splat_and_anon_keyword_splat(*, **#{block}); t(*, **) end; def self.t(*, **#{block}); end
+ def self.t(*, **#{block}); end
+ def self.anon_splat_and_anon_keyword_splat(*, **#{block}); t(*, **) end
check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, a: 2#{block})")
check_allocations(1, 0, "anon_splat_and_anon_keyword_splat(1, *empty_array, a: 2#{block})")
@@ -541,7 +571,6 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, **empty_hash, **hash1#{block})")
check_allocations(1, 0, "anon_splat_and_anon_keyword_splat(1, *empty_array#{block})")
- check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, **hash1, **empty_hash#{block})")
check_allocations(1, 0, "anon_splat_and_anon_keyword_splat(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(0, 0, "anon_splat_and_anon_keyword_splat(*array1, a: 2#{block})")
@@ -559,9 +588,14 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, *empty_array, a: 2, **empty_hash#{block})")
check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*array1, **empty_hash, a: 2#{block})")
- check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*array1, **hash1, **empty_hash#{block})")
- check_allocations(1, 0, "anon_splat_and_anon_keyword_splat(*array1, **nil#{block})")
+ check_allocations(0, 1, "anon_splat_and_anon_keyword_splat(*array1, **empty_hash, a: 2#{block})")
+ check_allocations(0, 1, "anon_splat_and_anon_keyword_splat(*array1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "anon_splat_and_anon_keyword_splat(*array1, **nil#{block})")
+
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_empty_array#{block})")
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_array#{block})")
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_empty_array1#{block})")
+ check_allocations(1, 1, "anon_splat_and_anon_keyword_splat(*r2k_array1#{block})")
RUBY
end
@@ -569,20 +603,19 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(<<~RUBY)
def self.argument_forwarding(...); end
- check_allocations(1, 1, "argument_forwarding(1, a: 2#{block})")
- check_allocations(1, 0, "argument_forwarding(1, *empty_array, a: 2#{block})")
- check_allocations(1, 1, "argument_forwarding(1, a:2, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **empty_hash, a: 2#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, a: 2#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, *empty_array, a: 2#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, a:2, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, **empty_hash, a: 2#{block})")
- check_allocations(1, 0, "argument_forwarding(1, **nil#{block})")
- check_allocations(1, 0, "argument_forwarding(1, **empty_hash#{block})")
- check_allocations(1, 0, "argument_forwarding(1, **hash1#{block})")
- check_allocations(1, 0, "argument_forwarding(1, *empty_array, **hash1#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **empty_hash, **hash1#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, **nil#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, **empty_hash#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, **hash1#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, *empty_array, **hash1#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, **empty_hash, **hash1#{block})")
- check_allocations(1, 0, "argument_forwarding(1, *empty_array#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, *empty_array#{block})")
check_allocations(1, 0, "argument_forwarding(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(0, 0, "argument_forwarding(*array1, a: 2#{block})")
@@ -598,32 +631,37 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "argument_forwarding(*array1, *empty_array, a: 2, **empty_hash#{block})")
check_allocations(1, 1, "argument_forwarding(*array1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, *empty_array, a: 2, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(*array1, **empty_hash, a: 2#{block})")
- check_allocations(1, 1, "argument_forwarding(*array1, **hash1, **empty_hash#{block})")
- check_allocations(1, 0, "argument_forwarding(*array1, **nil#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, *empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, *empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(*array1, **empty_hash, a: 2#{block})")
+ check_allocations(0, 1, "argument_forwarding(*array1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "argument_forwarding(*array1, **nil#{block})")
+
+ check_allocations(0, 0, "argument_forwarding(*r2k_empty_array#{block})")
+ check_allocations(0, 0, "argument_forwarding(*r2k_array#{block})")
+ check_allocations(0, 0, "argument_forwarding(*r2k_empty_array1#{block})")
+ check_allocations(0, 0, "argument_forwarding(*r2k_array1#{block})")
RUBY
end
def test_nested_argument_forwarding
check_allocations(<<~RUBY)
- def self.argument_forwarding(...); t(...) end; def self.t(...) end
-
- check_allocations(1, 1, "argument_forwarding(1, a: 2#{block})")
- check_allocations(1, 0, "argument_forwarding(1, *empty_array, a: 2#{block})")
- check_allocations(1, 1, "argument_forwarding(1, a:2, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **empty_hash, a: 2#{block})")
-
- check_allocations(1, 0, "argument_forwarding(1, **nil#{block})")
- check_allocations(1, 0, "argument_forwarding(1, **empty_hash#{block})")
- check_allocations(1, 0, "argument_forwarding(1, **hash1#{block})")
- check_allocations(1, 0, "argument_forwarding(1, *empty_array, **hash1#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **empty_hash, **hash1#{block})")
-
- check_allocations(1, 0, "argument_forwarding(1, *empty_array#{block})")
- check_allocations(1, 1, "argument_forwarding(1, **hash1, **empty_hash#{block})")
+ def self.t(...) end
+ def self.argument_forwarding(...); t(...) end
+
+ check_allocations(0, 0, "argument_forwarding(1, a: 2#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, *empty_array, a: 2#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, a:2, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, **empty_hash, a: 2#{block})")
+
+ check_allocations(0, 0, "argument_forwarding(1, **nil#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, **empty_hash#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, **hash1#{block})")
+ check_allocations(0, 0, "argument_forwarding(1, *empty_array, **hash1#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, **empty_hash, **hash1#{block})")
+
+ check_allocations(0, 0, "argument_forwarding(1, *empty_array#{block})")
check_allocations(1, 0, "argument_forwarding(1, *empty_array, *empty_array, **empty_hash#{block})")
check_allocations(0, 0, "argument_forwarding(*array1, a: 2#{block})")
@@ -639,11 +677,159 @@ class TestAllocation < Test::Unit::TestCase
check_allocations(1, 1, "argument_forwarding(*array1, *empty_array, a: 2, **empty_hash#{block})")
check_allocations(1, 1, "argument_forwarding(*array1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, *empty_array, a: 2, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(1, *empty_array, **hash1, **empty_hash#{block})")
- check_allocations(1, 1, "argument_forwarding(*array1, **empty_hash, a: 2#{block})")
- check_allocations(1, 1, "argument_forwarding(*array1, **hash1, **empty_hash#{block})")
- check_allocations(1, 0, "argument_forwarding(*array1, **nil#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, *empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(1, *empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(0, 1, "argument_forwarding(*array1, **empty_hash, a: 2#{block})")
+ check_allocations(0, 1, "argument_forwarding(*array1, **hash1, **empty_hash#{block})")
+ check_allocations(0, 0, "argument_forwarding(*array1, **nil#{block})")
+
+ check_allocations(0, 0, "argument_forwarding(*r2k_empty_array#{block})")
+ check_allocations(0, 0, "argument_forwarding(*r2k_array#{block})")
+ check_allocations(0, 0, "argument_forwarding(*r2k_empty_array1#{block})")
+ check_allocations(0, 0, "argument_forwarding(*r2k_array1#{block})")
+ RUBY
+ end
+
+ def test_ruby2_keywords
+ check_allocations(<<~RUBY)
+ def self.r2k(*a#{block}); end
+ singleton_class.send(:ruby2_keywords, :r2k)
+
+ check_allocations(1, 1, "r2k(1, a: 2#{block})")
+ check_allocations(1, 1, "r2k(1, *empty_array, a: 2#{block})")
+ check_allocations(1, 1, "r2k(1, a:2, **empty_hash#{block})")
+ check_allocations(1, 1, "r2k(1, **empty_hash, a: 2#{block})")
+
+ check_allocations(1, 0, "r2k(1, **nil#{block})")
+ check_allocations(1, 0, "r2k(1, **empty_hash#{block})")
+ check_allocations(1, 1, "r2k(1, **hash1#{block})")
+ check_allocations(1, 1, "r2k(1, *empty_array, **hash1#{block})")
+ check_allocations(1, 1, "r2k(1, **hash1, **empty_hash#{block})")
+ check_allocations(1, 1, "r2k(1, **empty_hash, **hash1#{block})")
+
+ check_allocations(1, 0, "r2k(1, *empty_array#{block})")
+ check_allocations(1, 0, "r2k(1, *empty_array, *empty_array, **empty_hash#{block})")
+
+ check_allocations(1, 1, "r2k(*array1, a: 2#{block})")
+
+ check_allocations(1, 0, "r2k(*array1, **nill#{block})")
+ check_allocations(1, 0, "r2k(*array1, **empty_hash#{block})")
+ check_allocations(1, 1, "r2k(*array1, **hash1#{block})")
+ check_allocations(1, 1, "r2k(*array1, *empty_array, **hash1#{block})")
+
+ check_allocations(1, 0, "r2k(*array1, *empty_array#{block})")
+ check_allocations(1, 0, "r2k(*array1, *empty_array, **empty_hash#{block})")
+
+ check_allocations(1, 1, "r2k(*array1, *empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(1, 1, "r2k(*array1, *empty_array, **hash1, **empty_hash#{block})")
+
+ check_allocations(1, 1, "r2k(1, *empty_array, a: 2, **empty_hash#{block})")
+ check_allocations(1, 1, "r2k(1, *empty_array, **hash1, **empty_hash#{block})")
+ check_allocations(1, 1, "r2k(*array1, **empty_hash, a: 2#{block})")
+ check_allocations(1, 1, "r2k(*array1, **hash1, **empty_hash#{block})")
+ check_allocations(1, 0, "r2k(*array1, **nil#{block})")
+
+ check_allocations(1, 0, "r2k(*r2k_empty_array#{block})")
+ check_allocations(1, 1, "r2k(*r2k_array#{block})")
+ unless defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled?
+ # YJIT may or may not allocate depending on arch?
+ check_allocations(1, 0, "r2k(*r2k_empty_array1#{block})")
+ check_allocations(1, 1, "r2k(*r2k_array1#{block})")
+ end
+ RUBY
+ end
+
+ def test_no_array_allocation_with_splat_and_nonstatic_keywords
+ check_allocations(<<~RUBY)
+ def self.keyword(a: nil, b: nil#{block}); end
+
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array#{block})") # LVAR
+ check_allocations(0, 1, "->{keyword(*empty_array, a: empty_array#{block})}.call") # DVAR
+ check_allocations(0, 1, "$x = empty_array; keyword(*empty_array, a: $x#{block})") # GVAR
+ check_allocations(0, 1, "@x = empty_array; keyword(*empty_array, a: @x#{block})") # IVAR
+ check_allocations(0, 1, "self.class.const_set(:X, empty_array); keyword(*empty_array, a: X#{block})") # CONST
+ check_allocations(0, 1, "keyword(*empty_array, a: Object::X#{block})") # COLON2
+ check_allocations(0, 1, "keyword(*empty_array, a: ::X#{block})") # COLON3
+ check_allocations(0, 1, "T = self; #{'B = block' unless block.empty?}; class Object; @@x = X; T.keyword(*X, a: @@x#{', &B' unless block.empty?}) end") # CVAR
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: 1#{block})") # INTEGER
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: 1.0#{block})") # FLOAT
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: 1.0r#{block})") # RATIONAL
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: 1.0i#{block})") # IMAGINARY
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: 'a'#{block})") # STR
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: :b#{block})") # SYM
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: /a/#{block})") # REGX
+ check_allocations(0, 1, "keyword(*empty_array, a: self#{block})") # SELF
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: nil#{block})") # NIL
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: true#{block})") # TRUE
+ check_allocations(0, 1, "keyword(*empty_array, a: empty_array, b: false#{block})") # FALSE
+ check_allocations(0, 1, "keyword(*empty_array, a: ->{}#{block})") # LAMBDA
+ check_allocations(0, 1, "keyword(*empty_array, a: $1#{block})") # NTH_REF
+ check_allocations(0, 1, "keyword(*empty_array, a: $`#{block})") # BACK_REF
+ RUBY
+ end
+
+ class WithBlock < self
+ def block
+ ', &block'
+ end
+ end
+ end
+
+ class ProcCall < MethodCall
+ def munge_checks(checks)
+ return checks if @no_munge
+ sub = rep = nil
+ checks.split("\n").map do |line|
+ case line
+ when "singleton_class.send(:ruby2_keywords, :r2k)"
+ "r2k.ruby2_keywords"
+ when /\Adef self.([a-z0-9_]+)\((.*)\);(.*)end\z/
+ sub = $1 + '('
+ rep = $1 + '.('
+ "#{$1} = #{$1} = proc{ |#{$2}| #{$3} }"
+ when /check_allocations/
+ line.gsub(sub, rep)
+ else
+ line
+ end
+ end.join("\n")
+ end
+
+ # Generic argument forwarding not supported in proc definitions
+ undef_method :test_argument_forwarding
+ undef_method :test_nested_argument_forwarding
+
+ # Proc anonymous arguments cannot be used directly
+ undef_method :test_nested_anonymous_splat_and_anonymous_keyword_splat_parameters
+
+ def test_no_array_allocation_with_splat_and_nonstatic_keywords
+ @no_munge = true
+
+ check_allocations(<<~RUBY)
+ keyword = keyword = proc{ |a: nil, b: nil #{block}| }
+
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array#{block})") # LVAR
+ check_allocations(0, 1, "->{keyword.(*empty_array, a: empty_array#{block})}.call") # DVAR
+ check_allocations(0, 1, "$x = empty_array; keyword.(*empty_array, a: $x#{block})") # GVAR
+ check_allocations(0, 1, "@x = empty_array; keyword.(*empty_array, a: @x#{block})") # IVAR
+ check_allocations(0, 1, "self.class.const_set(:X, empty_array); keyword.(*empty_array, a: X#{block})") # CONST
+ check_allocations(0, 1, "keyword.(*empty_array, a: Object::X#{block})") # COLON2
+ check_allocations(0, 1, "keyword.(*empty_array, a: ::X#{block})") # COLON3
+ check_allocations(0, 1, "T = keyword; #{'B = block' unless block.empty?}; class Object; @@x = X; T.(*X, a: @@x#{', &B' unless block.empty?}) end") # CVAR
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: 1#{block})") # INTEGER
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: 1.0#{block})") # FLOAT
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: 1.0r#{block})") # RATIONAL
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: 1.0i#{block})") # IMAGINARY
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: 'a'#{block})") # STR
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: :b#{block})") # SYM
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: /a/#{block})") # REGX
+ check_allocations(0, 1, "keyword.(*empty_array, a: self#{block})") # SELF
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: nil#{block})") # NIL
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: true#{block})") # TRUE
+ check_allocations(0, 1, "keyword.(*empty_array, a: empty_array, b: false#{block})") # FALSE
+ check_allocations(0, 1, "keyword.(*empty_array, a: ->{}#{block})") # LAMBDA
+ check_allocations(0, 1, "keyword.(*empty_array, a: $1#{block})") # NTH_REF
+ check_allocations(0, 1, "keyword.(*empty_array, a: $`#{block})") # BACK_REF
RUBY
end
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 9560fca958..66251b9fb0 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1215,6 +1215,17 @@ class TestArray < Test::Unit::TestCase
assert_equal(@cls[], a)
end
+ def test_pack_format_mutation
+ ary = [Object.new]
+ fmt = "c" * 0x20000
+ class << ary[0]; self end.send(:define_method, :to_int) {
+ fmt.replace ""
+ 1
+ }
+ e = assert_raise(RuntimeError) { ary.pack(fmt) }
+ assert_equal "format string modified", e.message
+ end
+
def test_pack
a = @cls[*%w( cat wombat x yy)]
assert_equal("catwomx yy ", a.pack("A3A3A3A3"))
@@ -3482,6 +3493,17 @@ class TestArray < Test::Unit::TestCase
assert_typed_equal(e, v, Complex, msg)
end
+ def test_shrink_shared_array
+ assert_normal_exit(<<~'RUBY', '[Feature #20589]')
+ array = []
+ # Make sure the array is allocated
+ 10.times { |i| array << i }
+ # Simulate a C extension using OBJ_FREEZE
+ Object.instance_method(:freeze).bind_call(array)
+ array.dup
+ RUBY
+ end
+
def test_sum
assert_int_equal(0, [].sum)
assert_int_equal(3, [3].sum)
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb
index 45c6b63963..79077603e4 100644
--- a/test/ruby/test_ast.rb
+++ b/test/ruby/test_ast.rb
@@ -2,6 +2,7 @@
require 'test/unit'
require 'tempfile'
require 'pp'
+require_relative '../lib/parser_support'
class RubyVM
module AbstractSyntaxTree
@@ -272,7 +273,7 @@ class TestAst < Test::Unit::TestCase
assert_parse("def m; defined?(retry); end")
assert_parse("!begin defined?(retry); end")
assert_parse("begin rescue; else; defined?(retry); end")
- assert_parse("begin rescue; ensure; defined?(retry); end")
+ assert_parse("begin rescue; ensure; p defined?(retry); end")
assert_parse("END {defined?(retry)}")
assert_parse("begin rescue; END {defined?(retry)}; end")
assert_parse("!defined? retry")
@@ -280,7 +281,7 @@ class TestAst < Test::Unit::TestCase
assert_parse("def m; defined? retry; end")
assert_parse("!begin defined? retry; end")
assert_parse("begin rescue; else; defined? retry; end")
- assert_parse("begin rescue; ensure; defined? retry; end")
+ assert_parse("begin rescue; ensure; p defined? retry; end")
assert_parse("END {defined? retry}")
assert_parse("begin rescue; END {defined? retry}; end")
@@ -337,7 +338,7 @@ class TestAst < Test::Unit::TestCase
end
def test_node_id_for_location
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
exception = begin
raise
@@ -358,7 +359,7 @@ class TestAst < Test::Unit::TestCase
end
def test_of_proc_and_method
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled? || ParserSupport.prism_enabled_in_subprocess?
proc = Proc.new { 1 + 2 }
method = self.method(__method__)
@@ -389,7 +390,7 @@ class TestAst < Test::Unit::TestCase
end
def test_of_backtrace_location
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
backtrace_location, lineno = sample_backtrace_location
node = RubyVM::AbstractSyntaxTree.of(backtrace_location)
@@ -402,7 +403,7 @@ class TestAst < Test::Unit::TestCase
end
def test_of_proc_and_method_under_eval
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
keep_script_lines_back = RubyVM.keep_script_lines
RubyVM.keep_script_lines = false
@@ -433,7 +434,7 @@ class TestAst < Test::Unit::TestCase
end
def test_of_proc_and_method_under_eval_with_keep_script_lines
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
pend if ENV['RUBY_ISEQ_DUMP_DEBUG'] # TODO
keep_script_lines_back = RubyVM.keep_script_lines
@@ -465,7 +466,7 @@ class TestAst < Test::Unit::TestCase
end
def test_of_backtrace_location_under_eval
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
keep_script_lines_back = RubyVM.keep_script_lines
RubyVM.keep_script_lines = false
@@ -485,7 +486,7 @@ class TestAst < Test::Unit::TestCase
end
def test_of_backtrace_location_under_eval_with_keep_script_lines
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
pend if ENV['RUBY_ISEQ_DUMP_DEBUG'] # TODO
keep_script_lines_back = RubyVM.keep_script_lines
@@ -708,6 +709,37 @@ class TestAst < Test::Unit::TestCase
assert_equal(:a, args.children[rest])
end
+ def test_return
+ assert_ast_eqaul(<<~STR, <<~EXP)
+ def m(a)
+ return a
+ end
+ STR
+ (SCOPE@1:0-3:3
+ tbl: []
+ args: nil
+ body:
+ (DEFN@1:0-3:3
+ mid: :m
+ body:
+ (SCOPE@1:0-3:3
+ tbl: [:a]
+ args:
+ (ARGS@1:6-1:7
+ pre_num: 1
+ pre_init: nil
+ opt: nil
+ first_post: nil
+ post_num: 0
+ post_init: nil
+ rest: nil
+ kw: nil
+ kwrest: nil
+ block: nil)
+ body: (RETURN@2:2-2:10 (LVAR@2:9-2:10 :a)))))
+ EXP
+ end
+
def test_keep_script_lines_for_parse
node = RubyVM::AbstractSyntaxTree.parse(<<~END, keep_script_lines: true)
1.times do
@@ -748,7 +780,7 @@ dummy
end
def test_keep_script_lines_for_of
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
proc = Proc.new { 1 + 2 }
method = self.method(__method__)
@@ -761,6 +793,8 @@ dummy
end
def test_keep_script_lines_for_of_with_existing_SCRIPT_LINES__that_has__FILE__as_a_key
+ omit if ParserSupport.prism_enabled? || ParserSupport.prism_enabled_in_subprocess?
+
# This test confirms that the bug that previously occurred because of
# `AbstractSyntaxTree.of`s unnecessary dependence on SCRIPT_LINES__ does not reproduce.
# The bug occurred only if SCRIPT_LINES__ included __FILE__ as a key.
@@ -828,6 +862,8 @@ dummy
end
def test_e_option
+ omit if ParserSupport.prism_enabled? || ParserSupport.prism_enabled_in_subprocess?
+
assert_in_out_err(["-e", "def foo; end; pp RubyVM::AbstractSyntaxTree.of(method(:foo)).type"],
"", [":SCOPE"], [])
end
@@ -1261,19 +1297,28 @@ dummy
end;
end
- private
+ def test_locations
+ begin
+ verbose_bak, $VERBOSE = $VERBOSE, false
+ node = RubyVM::AbstractSyntaxTree.parse("1 + 2")
+ ensure
+ $VERBOSE = verbose_bak
+ end
+ locations = node.locations
- # We can't revisit instruction sequences to find node ids if the prism
- # compiler was used instead of the parse.y compiler. In that case, we'll omit
- # some tests.
- def compiling_with_prism?
- RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism
+ assert_equal(RubyVM::AbstractSyntaxTree::Location, locations[0].class)
end
+ private
+
def assert_error_tolerant(src, expected, keep_tokens: false)
+ assert_ast_eqaul(src, expected, error_tolerant: true, keep_tokens: keep_tokens)
+ end
+
+ def assert_ast_eqaul(src, expected, **options)
begin
verbose_bak, $VERBOSE = $VERBOSE, false
- node = RubyVM::AbstractSyntaxTree.parse(src, error_tolerant: true, keep_tokens: keep_tokens)
+ node = RubyVM::AbstractSyntaxTree.parse(src, **options)
ensure
$VERBOSE = verbose_bak
end
@@ -1283,4 +1328,108 @@ dummy
assert_equal(expected, str)
node
end
+
+ class TestLocation < Test::Unit::TestCase
+ def test_lineno_and_column
+ node = ast_parse("1 + 2")
+ assert_locations(node.locations, [[1, 0, 1, 5]])
+ end
+
+ def test_alias_locations
+ node = ast_parse("alias foo bar")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
+ end
+
+ def test_and_locations
+ node = ast_parse("1 and 2")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 7], [1, 2, 1, 5]])
+
+ node = ast_parse("1 && 2")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 6], [1, 2, 1, 4]])
+ end
+
+ def test_break_locations
+ node = ast_parse("loop { break 1 }")
+ assert_locations(node.children[-1].children[-1].children[-1].locations, [[1, 7, 1, 14], [1, 7, 1, 12]])
+ end
+
+ def test_next_locations
+ node = ast_parse("loop { next 1 }")
+ assert_locations(node.children[-1].children[-1].children[-1].locations, [[1, 7, 1, 13], [1, 7, 1, 11]])
+ end
+
+ def test_or_locations
+ node = ast_parse("1 or 2")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 6], [1, 2, 1, 4]])
+
+ node = ast_parse("1 || 2")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 6], [1, 2, 1, 4]])
+ end
+
+ def test_redo_locations
+ node = ast_parse("loop { redo }")
+ assert_locations(node.children[-1].children[-1].children[-1].locations, [[1, 7, 1, 11], [1, 7, 1, 11]])
+ end
+
+ def test_unless_locations
+ node = ast_parse("unless cond then 1 else 2 end")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 29], [1, 0, 1, 6], [1, 12, 1, 16], [1, 26, 1, 29]])
+
+ node = ast_parse("1 unless 2")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 10], [1, 2, 1, 8], nil, nil])
+ end
+
+ def test_undef_locations
+ node = ast_parse("undef foo")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 9], [1, 0, 1, 5]])
+
+ node = ast_parse("undef foo, bar")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 14], [1, 0, 1, 5]])
+ end
+
+ def test_valias_locations
+ node = ast_parse("alias $foo $bar")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 15], [1, 0, 1, 5]])
+
+ node = ast_parse("alias $foo $&")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
+ end
+
+ def test_when_locations
+ node = ast_parse("case a; when 1 then 2; end")
+ assert_locations(node.children[-1].children[1].locations, [[1, 8, 1, 22], [1, 8, 1, 12], [1, 15, 1, 19]])
+ end
+
+ def test_while_locations
+ node = ast_parse("while cond do 1 end")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 19], [1, 0, 1, 5], [1, 16, 1, 19]])
+
+ node = ast_parse("1 while 2")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 9], [1, 2, 1, 7], nil])
+ end
+
+ def test_until_locations
+ node = ast_parse("until cond do 1 end")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 19], [1, 0, 1, 5], [1, 16, 1, 19]])
+
+ node = ast_parse("1 until 2")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 9], [1, 2, 1, 7], nil])
+ end
+
+ private
+ def ast_parse(src, **options)
+ begin
+ verbose_bak, $VERBOSE = $VERBOSE, false
+ RubyVM::AbstractSyntaxTree.parse(src, **options)
+ ensure
+ $VERBOSE = verbose_bak
+ end
+ end
+
+ def assert_locations(locations, expected)
+ ary = locations.map {|loc| loc && [loc.first_lineno, loc.first_column, loc.last_lineno, loc.last_column] }
+
+ assert_equal(ary, expected)
+ end
+ end
end
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb
index 1eb3551e57..ca3e3d5f7f 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -277,7 +277,6 @@ p Foo::Bar
# Skip this on macOS 10.13 because of the following error:
# http://rubyci.s3.amazonaws.com/osx1013/ruby-master/log/20231011T014505Z.fail.html.gz
require "rbconfig"
- omit if RbConfig::CONFIG["target_os"] == "darwin17"
script = File.join(__dir__, 'bug-13526.rb')
assert_ruby_status([script], '', '[ruby-core:81016] [Bug #13526]')
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb
index 1f882c6cb9..1858793952 100644
--- a/test/ruby/test_bignum.rb
+++ b/test/ruby/test_bignum.rb
@@ -821,5 +821,11 @@ class TestBignum < Test::Unit::TestCase
assert_nil(T1024P.infinite?)
assert_nil((-T1024P).infinite?)
end
+
+ def test_gmp_version
+ if RbConfig::CONFIG.fetch('configure_args').include?("'--with-gmp'")
+ assert_kind_of(String, Integer::GMP_VERSION)
+ end
+ end if ENV['GITHUB_WORKFLOW'] == 'Compilations'
end
end
diff --git a/test/ruby/test_call.rb b/test/ruby/test_call.rb
index a52b75c267..ffbda1fdb9 100644
--- a/test/ruby/test_call.rb
+++ b/test/ruby/test_call.rb
@@ -3,7 +3,24 @@ require 'test/unit'
require '-test-/iter'
class TestCall < Test::Unit::TestCase
- def aaa(a, b=100, *rest)
+ # These dummy method definitions prevent warnings "the block passed to 'a'..."
+ def a(&) = nil
+ def b(&) = nil
+ def c(&) = nil
+ def d(&) = nil
+ def e(&) = nil
+ def f(&) = nil
+ def g(&) = nil
+ def h(&) = nil
+ def i(&) = nil
+ def j(&) = nil
+ def k(&) = nil
+ def l(&) = nil
+ def m(&) = nil
+ def n(&) = nil
+ def o(&) = nil
+
+ def aaa(a, b=100, *rest, &)
res = [a, b]
res += rest if rest
return res
@@ -136,7 +153,7 @@ class TestCall < Test::Unit::TestCase
# Prevent "assigned but unused variable" warnings
_ = [h, a, kw, b]
- message = /keyword arg given in index/
+ message = /keyword arg given in index assignment/
# +=, without block, non-popped
assert_syntax_error(%q{h[**kw] += 1}, message)
@@ -270,7 +287,7 @@ class TestCall < Test::Unit::TestCase
def o.[](...) 2 end
def o.[]=(...) end
- message = /keyword arg given in index/
+ message = /keyword arg given in index assignment/
assert_syntax_error(%q{o[kw: 1] += 1}, message)
assert_syntax_error(%q{o[**o] += 1}, message)
@@ -292,7 +309,7 @@ class TestCall < Test::Unit::TestCase
def []=(*a, **b) @set = [a, b] end
end.new
- message = /keyword arg given in index/
+ message = /keyword arg given in index assignment/
a = []
kw = {}
@@ -303,7 +320,7 @@ class TestCall < Test::Unit::TestCase
assert_syntax_error(%q{h[*a, 2, b: 5, **kw] += 1}, message)
end
- def test_call_splat_order
+ def test_call_splat_post_order
bug12860 = '[ruby-core:77701] [Bug# 12860]'
ary = [1, 2]
assert_equal([1, 2, 1], aaa(*ary, ary.shift), bug12860)
@@ -311,7 +328,7 @@ class TestCall < Test::Unit::TestCase
assert_equal([0, 1, 2, 1], aaa(0, *ary, ary.shift), bug12860)
end
- def test_call_block_order
+ def test_call_splat_block_order
bug16504 = '[ruby-core:96769] [Bug# 16504]'
b = proc{}
ary = [1, 2, b]
@@ -320,6 +337,22 @@ class TestCall < Test::Unit::TestCase
assert_equal([0, 1, 2, b], aaa(0, *ary, &ary.pop), bug16504)
end
+ def test_call_splat_kw_order
+ b = {}
+ ary = [1, 2, b]
+ assert_equal([1, 2, b, {a: b}], aaa(*ary, a: ary.pop))
+ ary = [1, 2, b]
+ assert_equal([0, 1, 2, b, {a: b}], aaa(0, *ary, a: ary.pop))
+ end
+
+ def test_call_splat_kw_splat_order
+ b = {}
+ ary = [1, 2, b]
+ assert_equal([1, 2, b], aaa(*ary, **ary.pop))
+ ary = [1, 2, b]
+ assert_equal([0, 1, 2, b], aaa(0, *ary, **ary.pop))
+ end
+
def test_call_args_splat_with_nonhash_keyword_splat
o = Object.new
def o.to_hash; {a: 1} end
@@ -329,6 +362,33 @@ class TestCall < Test::Unit::TestCase
assert_equal Hash, f(*[], **o).class
end
+ def test_call_args_splat_with_pos_arg_kw_splat_is_not_mutable
+ o = Object.new
+ def o.foo(a, **h)= h[:splat_modified] = true
+
+ a = []
+ b = {splat_modified: false}
+
+ o.foo(*a, :x, **b)
+
+ assert_equal({splat_modified: false}, b)
+ end
+
+ def test_kwsplat_block_eval_order
+ def self.t(**kw, &b) [kw, b] end
+
+ pr = ->{}
+ h = {a: pr}
+ a = []
+
+ ary = t(**h, &h.delete(:a))
+ assert_equal([{a: pr}, pr], ary)
+
+ h = {a: pr}
+ ary = t(*a, **h, &h.delete(:a))
+ assert_equal([{a: pr}, pr], ary)
+ end
+
def test_kwsplat_block_order
o = Object.new
ary = []
diff --git a/test/ruby/test_case.rb b/test/ruby/test_case.rb
index 4a0f1bf78d..9e8502fb27 100644
--- a/test/ruby/test_case.rb
+++ b/test/ruby/test_case.rb
@@ -68,10 +68,13 @@ class TestCase < Test::Unit::TestCase
assert(false)
end
- assert_raise(NameError) do
- case
- when false, *x, false
+ begin
+ verbose_bak, $VERBOSE = $VERBOSE, nil
+ assert_raise(NameError) do
+ eval("case; when false, *x, false; end")
end
+ ensure
+ $VERBOSE = verbose_bak
end
end
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 710b8a6f7b..456362ef21 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -316,6 +316,7 @@ class TestClass < Test::Unit::TestCase
def test_invalid_return_from_class_definition
assert_syntax_error("class C; return; end", /Invalid return/)
+ assert_syntax_error("class << Object; return; end", /Invalid return/)
end
def test_invalid_yield_from_class_definition
@@ -720,9 +721,13 @@ class TestClass < Test::Unit::TestCase
assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}")
begin;
- Date = (class C\u{1f5ff}; self; end).new
+ module Bug
+ module Class
+ TestClassDefinedInC = (class C\u{1f5ff}; self; end).new
+ end
+ end
assert_raise_with_message(TypeError, /C\u{1f5ff}/) {
- require 'date'
+ require '-test-/class'
}
end;
end
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index d13b150f93..66986af827 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -1972,40 +1972,6 @@ end
end
test_prism_call_node
CODE
-
- # Test opt_str_freeze instruction when calling #freeze on a string literal
- assert_prism_eval(<<~RUBY)
- "foo".freeze.equal?("foo".freeze)
- RUBY
- # Test encoding in opt_str_freeze
- assert_prism_eval(<<~'RUBY', raw: true)
- # -*- coding: us-ascii -*-
- "\xff".freeze.encoding
- RUBY
-
- # Test opt_aref_with instruction when calling [] with a string
- assert_prism_eval(<<~RUBY)
- ObjectSpace.count_objects
-
- h = {"abc" => 1}
- before = ObjectSpace.count_objects[:T_STRING]
- 5.times{ h["abc"] }
- after = ObjectSpace.count_objects[:T_STRING]
-
- before == after
- RUBY
-
- # Test opt_aset_with instruction when calling []= with a string key
- assert_prism_eval(<<~RUBY)
- ObjectSpace.count_objects
-
- h = {"abc" => 1}
- before = ObjectSpace.count_objects[:T_STRING]
- 5.times{ h["abc"] = 2}
- after = ObjectSpace.count_objects[:T_STRING]
-
- before == after
- RUBY
end
def test_CallAndWriteNode
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index c0cfb73235..bb131cee91 100644
--- a/test/ruby/test_complex.rb
+++ b/test/ruby/test_complex.rb
@@ -741,6 +741,17 @@ class Complex_Test < Test::Unit::TestCase
assert_equal('(1+2i)', c.inspect)
end
+ def test_inspect_to_s_frozen_bug_20337
+ assert_separately([], <<~'RUBY')
+ class Numeric
+ def inspect = super.freeze
+ end
+ c = Complex(Numeric.new, 1)
+ assert_match(/\A\(#<Numeric:/, c.inspect)
+ assert_match(/\A#<Numeric:/, c.to_s)
+ RUBY
+ end
+
def test_marshal
c = Complex(1,2)
diff --git a/test/ruby/test_defined.rb b/test/ruby/test_defined.rb
index 0505bdada6..3a8065d959 100644
--- a/test/ruby/test_defined.rb
+++ b/test/ruby/test_defined.rb
@@ -139,6 +139,41 @@ class TestDefined < Test::Unit::TestCase
assert_equal("assignment", eval('defined?(A::B &&= 1)'))
end
+ def test_defined_splat
+ assert_nil(defined?([*a]))
+ assert_nil(defined?(itself(*a)))
+ assert_equal("expression", defined?([*itself]))
+ assert_equal("method", defined?(itself(*itself)))
+ end
+
+ def test_defined_hash
+ assert_nil(defined?({a: a}))
+ assert_nil(defined?({a => 1}))
+ assert_nil(defined?({a => a}))
+ assert_nil(defined?({**a}))
+ assert_nil(defined?(itself(a: a)))
+ assert_nil(defined?(itself(a => 1)))
+ assert_nil(defined?(itself(a => a)))
+ assert_nil(defined?(itself(**a)))
+ assert_nil(defined?(itself({a: a})))
+ assert_nil(defined?(itself({a => 1})))
+ assert_nil(defined?(itself({a => a})))
+ assert_nil(defined?(itself({**a})))
+
+ assert_equal("expression", defined?({a: itself}))
+ assert_equal("expression", defined?({itself => 1}))
+ assert_equal("expression", defined?({itself => itself}))
+ assert_equal("expression", defined?({**itself}))
+ assert_equal("method", defined?(itself(a: itself)))
+ assert_equal("method", defined?(itself(itself => 1)))
+ assert_equal("method", defined?(itself(itself => itself)))
+ assert_equal("method", defined?(itself(**itself)))
+ assert_equal("method", defined?(itself({a: itself})))
+ assert_equal("method", defined?(itself({itself => 1})))
+ assert_equal("method", defined?(itself({itself => itself})))
+ assert_equal("method", defined?(itself({**itself})))
+ end
+
def test_defined_literal
assert_equal("nil", defined?(nil))
assert_equal("true", defined?(true))
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index 2cc1c3ef4a..78371a096b 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -256,7 +256,7 @@ class TestDir < Test::Unit::TestCase
Dir.glob(@root, sort: nil)
end
- assert_equal(("a".."z").step(2).map {|f| File.join(File.join(@root, f), "") },
+ assert_equal(("a".."z").each_slice(2).map {|f,_| File.join(File.join(@root, f), "") },
Dir.glob(File.join(@root, "*/")))
assert_equal([File.join(@root, '//a')], Dir.glob(@root + '//a'))
@@ -710,7 +710,9 @@ class TestDir < Test::Unit::TestCase
assert_equal(new_dir.chdir{Dir.pwd}, for_fd_dir.chdir{Dir.pwd})
ensure
new_dir&.close
- for_fd_dir&.close
+ if for_fd_dir
+ assert_raise(Errno::EBADF) { for_fd_dir.close }
+ end
end
else
assert_raise(NotImplementedError) { Dir.for_fd(0) }
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb
index 7503e06272..237bdc8a4d 100644
--- a/test/ruby/test_enum.rb
+++ b/test/ruby/test_enum.rb
@@ -1348,4 +1348,12 @@ class TestEnumerable < Test::Unit::TestCase
klass.new.grep(/(b.)/) { svars << $1 }
assert_equal(["ba", "ba"], svars)
end
+
+ def test_all_fast
+ data = { "key" => { "key2" => 1 } }
+ kk = vv = nil
+ data.all? { |(k, v)| kk, vv = k, v }
+ assert_equal(kk, "key")
+ assert_equal(vv, { "key2" => 1 })
+ end
end
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb
index 082d1dc03c..cf1c2bb2f6 100644
--- a/test/ruby/test_eval.rb
+++ b/test/ruby/test_eval.rb
@@ -535,6 +535,12 @@ class TestEval < Test::Unit::TestCase
assert_equal(fname, eval("__FILE__", nil, fname, 1))
end
+ def test_eval_invalid_block_exit_bug_20597
+ assert_raise(SyntaxError){eval("break if false")}
+ assert_raise(SyntaxError){eval("next if false")}
+ assert_raise(SyntaxError){eval("redo if false")}
+ end
+
def test_eval_location_fstring
o = Object.new
o.instance_eval "def foo() end", "generated code"
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 4b7d709906..09df1b5dcb 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -1498,7 +1498,7 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
assert_not_empty(stderr.grep(pattern))
error, = stderr.grep(/unexpected end-of-input/)
assert_not_nil(error)
- assert_match(/<.*unexpected end-of-input.*>/, error)
+ assert_match(/<.*unexpected end-of-input.*>|\^ unexpected end-of-input,/, error)
end
end
end
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index aa10566bfa..eae9a8e7b0 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -358,6 +358,19 @@ class TestFile < Test::Unit::TestCase
assert_equal(mod_time_contents, stats.mtime, bug6385)
end
+ def measure_time
+ log = []
+ 30.times do
+ t1 = Process.clock_gettime(Process::CLOCK_REALTIME)
+ yield
+ t2 = Process.clock_gettime(Process::CLOCK_REALTIME)
+ log << (t2 - t1)
+ return (t1 + t2) / 2 if t2 - t1 < 1
+ sleep 1
+ end
+ omit "failed to setup; the machine is stupidly slow #{log.inspect}"
+ end
+
def test_stat
tb = Process.clock_gettime(Process::CLOCK_REALTIME)
Tempfile.create("stat") {|file|
@@ -365,26 +378,39 @@ class TestFile < Test::Unit::TestCase
file.close
path = file.path
- t0 = Process.clock_gettime(Process::CLOCK_REALTIME)
- File.write(path, "foo")
+ measure_time do
+ File.write(path, "foo")
+ end
+
sleep 2
- File.write(path, "bar")
+
+ t1 = measure_time do
+ File.write(path, "bar")
+ end
+
sleep 2
- File.read(path)
- File.chmod(0644, path)
+
+ t2 = measure_time do
+ File.read(path)
+ File.chmod(0644, path)
+ end
+
sleep 2
- File.read(path)
+
+ t3 = measure_time do
+ File.read(path)
+ end
delta = 1
stat = File.stat(path)
- assert_in_delta tb, stat.birthtime.to_f, delta
- assert_in_delta t0+2, stat.mtime.to_f, delta
+ assert_in_delta tb, stat.birthtime.to_f, delta
+ assert_in_delta t1, stat.mtime.to_f, delta
if stat.birthtime != stat.ctime
- assert_in_delta t0+4, stat.ctime.to_f, delta
+ assert_in_delta t2, stat.ctime.to_f, delta
end
if /mswin|mingw/ !~ RUBY_PLATFORM && !Bug::File::Fs.noatime?(path)
# Windows delays updating atime
- assert_in_delta t0+6, stat.atime.to_f, delta
+ assert_in_delta t3, stat.atime.to_f, delta
end
}
rescue NotImplementedError
@@ -460,6 +486,39 @@ class TestFile < Test::Unit::TestCase
end
end
+ def test_initialize
+ Dir.mktmpdir(__method__.to_s) do |tmpdir|
+ path = File.join(tmpdir, "foo")
+
+ assert_raise(Errno::ENOENT) {File.new(path)}
+ f = File.new(path, "w")
+ f.write("FOO\n")
+ f.close
+ f = File.new(path)
+ data = f.read
+ f.close
+ assert_equal("FOO\n", data)
+
+ f = File.new(path, File::WRONLY)
+ f.write("BAR\n")
+ f.close
+ f = File.new(path, File::RDONLY)
+ data = f.read
+ f.close
+ assert_equal("BAR\n", data)
+
+ data = File.open(path) {|file|
+ File.new(file.fileno, mode: File::RDONLY, autoclose: false).read
+ }
+ assert_equal("BAR\n", data)
+
+ data = File.open(path) {|file|
+ File.new(file.fileno, File::RDONLY, autoclose: false).read
+ }
+ assert_equal("BAR\n", data)
+ end
+ end
+
def test_file_open_newline_option
Dir.mktmpdir(__method__.to_s) do |tmpdir|
path = File.join(tmpdir, "foo")
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index fbb18f07f9..f3068cb189 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -186,6 +186,12 @@ class TestFileExhaustive < Test::Unit::TestCase
@blockdev
end
+ def root_without_capabilities?
+ return false unless Process.uid == 0
+ return false unless system('command', '-v', 'capsh', out: File::NULL)
+ !system('capsh', '--has-p=CAP_DAC_OVERRIDE', out: File::NULL, err: File::NULL)
+ end
+
def test_path
[regular_file, utf8_file].each do |file|
assert_equal(file, File.open(file) {|f| f.path})
@@ -1409,7 +1415,7 @@ class TestFileExhaustive < Test::Unit::TestCase
def test_flock_exclusive
omit "[Bug #18613]" if /freebsd/ =~ RUBY_PLATFORM
- timeout = EnvUtil.apply_timeout_scale(0.1).to_s
+ timeout = EnvUtil.apply_timeout_scale(1).to_s
File.open(regular_file, "r+") do |f|
f.flock(File::LOCK_EX)
assert_separately(["-rtimeout", "-", regular_file, timeout], "#{<<-"begin;"}\n#{<<-'end;'}")
@@ -1440,7 +1446,7 @@ class TestFileExhaustive < Test::Unit::TestCase
def test_flock_shared
omit "[Bug #18613]" if /freebsd/ =~ RUBY_PLATFORM
- timeout = EnvUtil.apply_timeout_scale(0.1).to_s
+ timeout = EnvUtil.apply_timeout_scale(1).to_s
File.open(regular_file, "r+") do |f|
f.flock(File::LOCK_SH)
assert_separately(["-rtimeout", "-", regular_file, timeout], "#{<<-"begin;"}\n#{<<-'end;'}")
@@ -1538,8 +1544,17 @@ class TestFileExhaustive < Test::Unit::TestCase
assert_equal(stat.size?, File.size?(f), f)
assert_bool_equal(stat.socket?, File.socket?(f), f)
assert_bool_equal(stat.setuid?, File.setuid?(f), f)
- assert_bool_equal(stat.writable?, File.writable?(f), f)
- assert_bool_equal(stat.writable_real?, File.writable_real?(f), f)
+ # It's possible in Linux to be uid 0, but not to have the CAP_DAC_OVERRIDE
+ # capability that allows skipping file permissions checks (e.g. some kinds
+ # of "rootless" container setups). In these cases, stat.writable? will be
+ # true (because it always returns true if Process.uid == 0), but
+ # File.writeable? will be false (because it actually asks the kernel to do
+ # an access check).
+ # Skip these two assertions in that case.
+ unless root_without_capabilities?
+ assert_bool_equal(stat.writable?, File.writable?(f), f)
+ assert_bool_equal(stat.writable_real?, File.writable_real?(f), f)
+ end
assert_bool_equal(stat.executable?, File.executable?(f), f)
assert_bool_equal(stat.executable_real?, File.executable_real?(f), f)
assert_bool_equal(stat.zero?, File.zero?(f), f)
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index b91b904d1e..9f522c32bf 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -530,6 +530,10 @@ class TestFloat < Test::Unit::TestCase
assert_raise(TypeError) {1.0.floor(nil)}
def (prec = Object.new).to_int; 2; end
assert_equal(0.99, 0.998.floor(prec))
+
+ assert_equal(-10000000000, -1.0.floor(-10), "[Bug #20654]")
+ assert_equal(-100000000000000000000, -1.0.floor(-20), "[Bug #20654]")
+ assert_equal(-100000000000000000000000000000000000000000000000000, -1.0.floor(-50), "[Bug #20654]")
end
def test_ceil_with_precision
@@ -557,6 +561,10 @@ class TestFloat < Test::Unit::TestCase
assert_raise(TypeError) {1.0.ceil(nil)}
def (prec = Object.new).to_int; 2; end
assert_equal(0.99, 0.981.ceil(prec))
+
+ assert_equal(10000000000, 1.0.ceil(-10), "[Bug #20654]")
+ assert_equal(100000000000000000000, 1.0.ceil(-20), "[Bug #20654]")
+ assert_equal(100000000000000000000000000000000000000000000000000, 1.0.ceil(-50), "[Bug #20654]")
end
def test_truncate_with_precision
@@ -842,6 +850,14 @@ class TestFloat < Test::Unit::TestCase
o = Object.new
def o.to_f; inf = Float::INFINITY; inf/inf; end
assert_predicate(Float(o), :nan?)
+
+ assert_raise(Encoding::CompatibilityError) {Float("0".encode("utf-16be"))}
+ assert_raise(Encoding::CompatibilityError) {Float("0".encode("utf-16le"))}
+ assert_raise(Encoding::CompatibilityError) {Float("0".encode("utf-32be"))}
+ assert_raise(Encoding::CompatibilityError) {Float("0".encode("utf-32le"))}
+ assert_raise(Encoding::CompatibilityError) {Float("0".encode("iso-2022-jp"))}
+
+ assert_raise_with_message(ArgumentError, /\u{1f4a1}/) {Float("\u{1f4a1}")}
end
def test_invalid_str
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 39b001c3d0..9a9796dc55 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -40,16 +40,93 @@ class TestGc < Test::Unit::TestCase
end
def test_enable_disable
+ EnvUtil.without_gc do
+ GC.enable
+ assert_equal(false, GC.enable)
+ assert_equal(false, GC.disable)
+ assert_equal(true, GC.disable)
+ assert_equal(true, GC.disable)
+ assert_nil(GC.start)
+ assert_equal(true, GC.enable)
+ assert_equal(false, GC.enable)
+ end
+ end
+
+ def test_gc_config_full_mark_by_default
+ omit "unsupoported platform/GC" unless defined?(GC.config)
+
+ config = GC.config
+ assert_not_empty(config)
+ assert_true(config[:rgengc_allow_full_mark])
+ end
+
+ def test_gc_config_invalid_args
+ omit "unsupoported platform/GC" unless defined?(GC.config)
+
+ assert_raise(ArgumentError) { GC.config(0) }
+ end
+
+ def test_gc_config_setting_returns_updated_config_hash
+ omit "unsupoported platform/GC" unless defined?(GC.config)
+
+ old_value = GC.config[:rgengc_allow_full_mark]
+ assert_true(old_value)
+
+ new_value = GC.config(rgengc_allow_full_mark: false)[:rgengc_allow_full_mark]
+ assert_false(new_value)
+ new_value = GC.config(rgengc_allow_full_mark: nil)[:rgengc_allow_full_mark]
+ assert_false(new_value)
+ ensure
+ GC.config(rgengc_allow_full_mark: old_value)
+ GC.start
+ end
+
+ def test_gc_config_setting_returns_nil_for_missing_keys
+ omit "unsupoported platform/GC" unless defined?(GC.config)
+
+ missing_value = GC.config(no_such_key: true)[:no_such_key]
+ assert_nil(missing_value)
+ ensure
+ GC.config(full_mark: true)
+ GC.start
+ end
+
+ def test_gc_config_disable_major
+ omit "unsupoported platform/GC" unless defined?(GC.config)
+
GC.enable
- assert_equal(false, GC.enable)
- assert_equal(false, GC.disable)
- assert_equal(true, GC.disable)
- assert_equal(true, GC.disable)
+ GC.start
+
+ GC.config(rgengc_allow_full_mark: false)
+ major_count = GC.stat[:major_gc_count]
+ minor_count = GC.stat[:minor_gc_count]
+
+ arr = []
+ (GC.stat_heap[0][:heap_eden_slots] * 2).times do
+ arr << Object.new
+ Object.new
+ end
+
+ assert_equal(major_count, GC.stat[:major_gc_count])
+ assert_operator(minor_count, :<=, GC.stat[:minor_gc_count])
assert_nil(GC.start)
- assert_equal(true, GC.enable)
- assert_equal(false, GC.enable)
ensure
- GC.enable
+ GC.config(rgengc_allow_full_mark: true)
+ GC.start
+ end
+
+ def test_gc_config_disable_major_gc_start_always_works
+ omit "unsupoported platform/GC" unless defined?(GC.config)
+
+ GC.config(full_mark: false)
+
+ major_count = GC.stat[:major_gc_count]
+ GC.start
+
+ assert_operator(major_count, :<, GC.stat[:major_gc_count])
+ ensure
+ GC.config(full_mark: true)
+ GC.start
end
def test_start_full_mark
@@ -131,10 +208,9 @@ class TestGc < Test::Unit::TestCase
# marking_time + sweeping_time could differ from time by 1 because they're stored in nanoseconds
assert_in_delta stat[:time], stat[:marking_time] + stat[:sweeping_time], 1
assert_equal stat[:total_allocated_pages], stat[:heap_allocated_pages] + stat[:total_freed_pages]
- assert_operator stat[:heap_sorted_length], :>=, stat[:heap_eden_pages] + stat[:heap_allocatable_pages], "stat is: " + stat.inspect
assert_equal stat[:heap_available_slots], stat[:heap_live_slots] + stat[:heap_free_slots] + stat[:heap_final_slots]
assert_equal stat[:heap_live_slots], stat[:total_allocated_objects] - stat[:total_freed_objects] - stat[:heap_final_slots]
- assert_equal stat[:heap_allocated_pages], stat[:heap_eden_pages] + stat[:heap_tomb_pages]
+ assert_equal stat[:heap_allocated_pages], stat[:heap_eden_pages]
if use_rgengc?
assert_equal stat[:count], stat[:major_gc_count] + stat[:minor_gc_count]
@@ -151,22 +227,15 @@ class TestGc < Test::Unit::TestCase
GC.stat(stat)
GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i|
- begin
- reenable_gc = !GC.disable
+ EnvUtil.without_gc do
GC.stat_heap(i, stat_heap)
GC.stat(stat)
- ensure
- GC.enable if reenable_gc
end
- assert_equal GC::INTERNAL_CONSTANTS[:RVALUE_SIZE] * (2**i), stat_heap[:slot_size]
- assert_operator stat_heap[:heap_allocatable_pages], :<=, stat[:heap_allocatable_pages]
+ assert_equal (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] + GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD]) * (2**i), stat_heap[:slot_size]
assert_operator stat_heap[:heap_eden_pages], :<=, stat[:heap_eden_pages]
assert_operator stat_heap[:heap_eden_slots], :>=, 0
- assert_operator stat_heap[:heap_tomb_pages], :<=, stat[:heap_tomb_pages]
- assert_operator stat_heap[:heap_tomb_slots], :>=, 0
assert_operator stat_heap[:total_allocated_pages], :>=, 0
- assert_operator stat_heap[:total_freed_pages], :>=, 0
assert_operator stat_heap[:force_major_gc_count], :>=, 0
assert_operator stat_heap[:force_incremental_marking_finish_count], :>=, 0
assert_operator stat_heap[:total_allocated_objects], :>=, 0
@@ -186,13 +255,12 @@ class TestGc < Test::Unit::TestCase
omit "flaky with RJIT, which allocates objects itself" if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
stat_heap_all = {}
stat_heap = {}
-
- 2.times do
- GC.stat_heap(0, stat_heap)
- GC.stat_heap(nil, stat_heap_all)
- end
+ # Initialize to prevent GC in future calls
+ GC.stat_heap(0, stat_heap)
+ GC.stat_heap(nil, stat_heap_all)
GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i|
+ GC.stat_heap(nil, stat_heap_all)
GC.stat_heap(i, stat_heap)
# Remove keys that can vary between invocations
@@ -221,12 +289,8 @@ class TestGc < Test::Unit::TestCase
hash.each { |k, v| stat_heap_sum[k] += v }
end
- assert_equal stat[:heap_allocatable_pages], stat_heap_sum[:heap_allocatable_pages]
assert_equal stat[:heap_eden_pages], stat_heap_sum[:heap_eden_pages]
- assert_equal stat[:heap_tomb_pages], stat_heap_sum[:heap_tomb_pages]
- assert_equal stat[:heap_available_slots], stat_heap_sum[:heap_eden_slots] + stat_heap_sum[:heap_tomb_slots]
- assert_equal stat[:total_allocated_pages], stat_heap_sum[:total_allocated_pages]
- assert_equal stat[:total_freed_pages], stat_heap_sum[:total_freed_pages]
+ assert_equal stat[:heap_available_slots], stat_heap_sum[:heap_eden_slots]
assert_equal stat[:total_allocated_objects], stat_heap_sum[:total_allocated_objects]
assert_equal stat[:total_freed_objects], stat_heap_sum[:total_freed_objects]
end
@@ -253,7 +317,7 @@ class TestGc < Test::Unit::TestCase
assert_separately([], __FILE__, __LINE__, <<-'RUBY')
GC.start
- count = GC.stat(:heap_free_slots) + GC.stat(:heap_allocatable_pages) * GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT]
+ count = GC.stat(:heap_free_slots) + GC.stat(:heap_allocatable_slots)
count.times{ "a" + "b" }
assert_equal :newobj, GC.latest_gc_info[:gc_by]
RUBY
@@ -298,19 +362,22 @@ class TestGc < Test::Unit::TestCase
objects.append(100.times.map { '*' })
end
- # We need to ensure that no GC gets ran before the call to GC.start since
- # it would trigger a major GC. Assertions could allocate objects and
- # trigger a GC so we don't run assertions until we perform the major GC.
- need_major_by = GC.latest_gc_info(:need_major_by)
- GC.start(full_mark: false) # should be upgraded to major
- major_by = GC.latest_gc_info(:major_by)
+ EnvUtil.without_gc do
+ # We need to ensure that no GC gets ran before the call to GC.start since
+ # it would trigger a major GC. Assertions could allocate objects and
+ # trigger a GC so we don't run assertions until we perform the major GC.
+ need_major_by = GC.latest_gc_info(:need_major_by)
+ GC.start(full_mark: false) # should be upgraded to major
+ major_by = GC.latest_gc_info(:major_by)
- assert_not_nil(need_major_by)
- assert_not_nil(major_by)
+ assert_not_nil(need_major_by)
+ assert_not_nil(major_by)
+ end
end
def test_latest_gc_info_weak_references_count
assert_separately([], __FILE__, __LINE__, <<~RUBY)
+ GC.disable
count = 10_000
# Some weak references may be created, so allow some margin of error
error_tolerance = 100
@@ -465,114 +532,40 @@ class TestGc < Test::Unit::TestCase
end
def test_gc_parameter_init_slots
- assert_separately([], __FILE__, __LINE__, <<~RUBY)
+ assert_separately([], __FILE__, __LINE__, <<~RUBY, timeout: 60)
# Constant from gc.c.
GC_HEAP_INIT_SLOTS = 10_000
- GC.stat_heap.each do |_, s|
- multiple = s[:slot_size] / (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] + GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD])
- # Allocatable pages are assumed to have lost 1 slot due to alignment.
- slots_per_page = (GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT] / multiple) - 1
- total_slots = s[:heap_eden_slots] + s[:heap_allocatable_pages] * slots_per_page
- assert_operator(total_slots, :>=, GC_HEAP_INIT_SLOTS, s)
+ gc_count = GC.stat(:count)
+ # Fill up all of the size pools to the init slots
+ GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i|
+ capa = (GC.stat_heap(i, :slot_size) - GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD] - (2 * RbConfig::SIZEOF["void*"])) / RbConfig::SIZEOF["void*"]
+ while GC.stat_heap(i, :heap_eden_slots) < GC_HEAP_INIT_SLOTS
+ Array.new(capa)
+ end
end
+
+ assert_equal gc_count, GC.stat(:count)
RUBY
env = {}
- # Make the heap big enough to ensure the heap never needs to grow.
- sizes = GC.stat_heap.keys.reverse.map { |i| (i + 1) * 100_000 }
+ sizes = GC.stat_heap.keys.reverse.map { 20_000 }
GC.stat_heap.keys.each do |heap|
env["RUBY_GC_HEAP_#{heap}_INIT_SLOTS"] = sizes[heap].to_s
end
- assert_separately([env, "-W0"], __FILE__, __LINE__, <<~RUBY)
- SIZES = #{sizes}
- GC.stat_heap.each do |i, s|
- multiple = s[:slot_size] / (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] + GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD])
- # Allocatable pages are assumed to have lost 1 slot due to alignment.
- slots_per_page = (GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT] / multiple) - 1
-
- total_slots = s[:heap_eden_slots] + s[:heap_allocatable_pages] * slots_per_page
-
- # The delta is calculated as follows:
- # - For allocated pages, each page can vary by 1 slot due to alignment.
- # - For allocatable pages, we can end up with at most 1 extra page of slots.
- assert_in_delta(SIZES[i], total_slots, s[:heap_eden_pages] + slots_per_page, s)
- end
- RUBY
-
- # Check that the configured sizes are "remembered" across GC invocations.
- assert_separately([env, "-W0"], __FILE__, __LINE__, <<~RUBY)
+ assert_separately([env, "-W0"], __FILE__, __LINE__, <<~RUBY, timeout: 60)
SIZES = #{sizes}
- # Fill size pool 0 with transient objects.
- ary = []
- while GC.stat_heap(0, :heap_allocatable_pages) != 0
- ary << Object.new
- end
- ary.clear
- ary = nil
-
- # Clear all the objects that were allocated.
- GC.start
-
- # Check that we still have the same number of slots as initially configured.
- GC.stat_heap.each do |i, s|
- multiple = s[:slot_size] / (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] + GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD])
- # Allocatable pages are assumed to have lost 1 slot due to alignment.
- slots_per_page = (GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT] / multiple) - 1
-
- total_slots = s[:heap_eden_slots] + s[:heap_allocatable_pages] * slots_per_page
-
- # The delta is calculated as follows:
- # - For allocated pages, each page can vary by 1 slot due to alignment.
- # - For allocatable pages, we can end up with at most 1 extra page of slots.
- assert_in_delta(SIZES[i], total_slots, s[:heap_eden_pages] + slots_per_page, s)
- end
- RUBY
-
- # Check that we don't grow the heap in minor GC if we have alloctable pages.
- env["RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO"] = "0.3"
- env["RUBY_GC_HEAP_FREE_SLOTS_GOAL_RATIO"] = "0.99"
- env["RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO"] = "1.0"
- env["RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR"] = "100" # Large value to disable major GC
- assert_separately([env, "-W0"], __FILE__, __LINE__, <<~RUBY)
- SIZES = #{sizes}
-
- # Run a major GC to clear out dead objects.
- GC.start
-
- # Disable GC so we can control when GC is ran.
- GC.disable
-
- # Run minor GC enough times so that we don't grow the heap because we
- # haven't yet ran RVALUE_OLD_AGE minor GC cycles.
- GC::INTERNAL_CONSTANTS[:RVALUE_OLD_AGE].times { GC.start(full_mark: false) }
-
- # Fill size pool 0 to over 50% full so that the number of allocatable
- # pages that will be created will be over the number in heap_allocatable_pages
- # (calculated using RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO).
- # 70% was chosen here to guarantee that.
- ary = []
- while GC.stat_heap(0, :heap_allocatable_pages) >
- (GC.stat_heap(0, :heap_allocatable_pages) + GC.stat_heap(0, :heap_eden_pages)) * 0.3
- ary << Object.new
+ gc_count = GC.stat(:count)
+ # Fill up all of the size pools to the init slots
+ GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i|
+ capa = (GC.stat_heap(i, :slot_size) - GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD] - (2 * RbConfig::SIZEOF["void*"])) / RbConfig::SIZEOF["void*"]
+ while GC.stat_heap(i, :heap_eden_slots) < SIZES[i]
+ Array.new(capa)
+ end
end
- GC.start(full_mark: false)
-
- # Check that we still have the same number of slots as initially configured.
- GC.stat_heap.each do |i, s|
- multiple = s[:slot_size] / (GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] + GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD])
- # Allocatable pages are assumed to have lost 1 slot due to alignment.
- slots_per_page = (GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT] / multiple) - 1
-
- total_slots = s[:heap_eden_slots] + s[:heap_allocatable_pages] * slots_per_page
-
- # The delta is calculated as follows:
- # - For allocated pages, each page can vary by 1 slot due to alignment.
- # - For allocatable pages, we can end up with at most 1 extra page of slots.
- assert_in_delta(SIZES[i], total_slots, s[:heap_eden_pages] + slots_per_page, s)
- end
+ assert_equal gc_count, GC.stat(:count)
RUBY
end
@@ -648,7 +641,7 @@ class TestGc < Test::Unit::TestCase
def test_thrashing_for_young_objects
# This test prevents bugs like [Bug #18929]
- assert_separately([], __FILE__, __LINE__, <<-'RUBY')
+ assert_separately([], __FILE__, __LINE__, <<-'RUBY', timeout: 60)
# Grow the heap
@ary = 100_000.times.map { Object.new }
@@ -672,7 +665,7 @@ class TestGc < Test::Unit::TestCase
# Should not be thrashing in page creation
assert_equal before_stats[:heap_allocated_pages], after_stats[:heap_allocated_pages], debug_msg
- assert_equal 0, after_stats[:heap_tomb_pages], debug_msg
+ assert_equal 0, after_stats[:heap_empty_pages], debug_msg
assert_equal 0, after_stats[:total_freed_pages], debug_msg
# Only young objects, so should not trigger major GC
assert_equal before_stats[:major_gc_count], after_stats[:major_gc_count], debug_msg
@@ -681,7 +674,7 @@ class TestGc < Test::Unit::TestCase
def test_gc_internals
assert_not_nil GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT]
- assert_not_nil GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]
+ assert_not_nil GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE]
end
def test_sweep_in_finalizer
@@ -772,13 +765,17 @@ class TestGc < Test::Unit::TestCase
end
def test_gc_disabled_start
- begin
- disabled = GC.disable
+ EnvUtil.without_gc do
c = GC.count
GC.start
assert_equal 1, GC.count - c
- ensure
- GC.enable unless disabled
+ end
+
+ EnvUtil.without_gc do
+ c = GC.count
+ GC.start(immediate_mark: false, immediate_sweep: false)
+ 10_000.times { Object.new }
+ assert_equal 1, GC.count - c
end
end
@@ -853,28 +850,26 @@ class TestGc < Test::Unit::TestCase
end
def test_old_to_young_reference
- original_gc_disabled = GC.disable
+ EnvUtil.without_gc do
+ require "objspace"
- require "objspace"
+ old_obj = Object.new
+ 4.times { GC.start }
- old_obj = Object.new
- 4.times { GC.start }
+ assert_include ObjectSpace.dump(old_obj), '"old":true'
- assert_include ObjectSpace.dump(old_obj), '"old":true'
+ young_obj = Object.new
+ old_obj.instance_variable_set(:@test, young_obj)
- young_obj = Object.new
- old_obj.instance_variable_set(:@test, young_obj)
+ # Not immediately promoted to old generation
+ 3.times do
+ assert_not_include ObjectSpace.dump(young_obj), '"old":true'
+ GC.start
+ end
- # Not immediately promoted to old generation
- 3.times do
- assert_not_include ObjectSpace.dump(young_obj), '"old":true'
+ # Takes 4 GC to promote to old generation
GC.start
+ assert_include ObjectSpace.dump(young_obj), '"old":true'
end
-
- # Takes 4 GC to promote to old generation
- GC.start
- assert_include ObjectSpace.dump(young_obj), '"old":true'
- ensure
- GC.enable if !original_gc_disabled
end
end
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
index f47c0b046b..c331968b3d 100644
--- a/test/ruby/test_gc_compact.rb
+++ b/test/ruby/test_gc_compact.rb
@@ -146,7 +146,7 @@ class TestGCCompact < Test::Unit::TestCase
end
def test_ast_compacts
- assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
def walk_ast ast
children = ast.children.grep(RubyVM::AbstractSyntaxTree::Node)
@@ -185,7 +185,7 @@ class TestGCCompact < Test::Unit::TestCase
end
def test_updating_references_for_heap_allocated_shared_arrays
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
ary = []
50.times { |i| ary << i }
@@ -209,7 +209,7 @@ class TestGCCompact < Test::Unit::TestCase
def test_updating_references_for_embed_shared_arrays
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
ary = Array.new(50)
50.times { |i| ary[i] = i }
@@ -233,7 +233,7 @@ class TestGCCompact < Test::Unit::TestCase
end
def test_updating_references_for_heap_allocated_frozen_shared_arrays
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
ary = []
50.times { |i| ary << i }
@@ -258,7 +258,7 @@ class TestGCCompact < Test::Unit::TestCase
def test_updating_references_for_embed_frozen_shared_arrays
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
ary = Array.new(50)
50.times { |i| ary[i] = i }
@@ -286,7 +286,7 @@ class TestGCCompact < Test::Unit::TestCase
def test_moving_arrays_down_size_pools
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
ARY_COUNT = 50000
@@ -308,7 +308,7 @@ class TestGCCompact < Test::Unit::TestCase
def test_moving_arrays_up_size_pools
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
ARY_COUNT = 50000
@@ -332,7 +332,7 @@ class TestGCCompact < Test::Unit::TestCase
def test_moving_objects_between_size_pools
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 60)
begin;
class Foo
def add_ivars
@@ -364,7 +364,7 @@ class TestGCCompact < Test::Unit::TestCase
def test_moving_strings_up_size_pools
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30)
begin;
STR_COUNT = 50000
@@ -385,7 +385,7 @@ class TestGCCompact < Test::Unit::TestCase
def test_moving_strings_down_size_pools
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30)
begin;
STR_COUNT = 50000
@@ -407,7 +407,7 @@ class TestGCCompact < Test::Unit::TestCase
# AR and ST hashes are in the same size pool on 32 bit
omit unless RbConfig::SIZEOF["uint64_t"] <= RbConfig::SIZEOF["void*"]
- assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30, signal: :SEGV)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30)
begin;
HASH_COUNT = 50000
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb
index 3349a1c493..c2cad36aa4 100644
--- a/test/ruby/test_integer.rb
+++ b/test/ruby/test_integer.rb
@@ -282,31 +282,31 @@ class TestInteger < Test::Unit::TestCase
def test_upto
a = []
- 1.upto(3) {|x| a << x }
+ assert_equal(1, 1.upto(3) {|x| a << x })
assert_equal([1, 2, 3], a)
a = []
- 1.upto(0) {|x| a << x }
+ assert_equal(1, 1.upto(0) {|x| a << x })
assert_equal([], a)
y = 2**30 - 1
a = []
- y.upto(y+2) {|x| a << x }
+ assert_equal(y, y.upto(y+2) {|x| a << x })
assert_equal([y, y+1, y+2], a)
end
def test_downto
a = []
- -1.downto(-3) {|x| a << x }
+ assert_equal(-1, -1.downto(-3) {|x| a << x })
assert_equal([-1, -2, -3], a)
a = []
- 1.downto(2) {|x| a << x }
+ assert_equal(1, 1.downto(2) {|x| a << x })
assert_equal([], a)
y = -(2**30)
a = []
- y.downto(y-2) {|x| a << x }
+ assert_equal(y, y.downto(y-2) {|x| a << x })
assert_equal([y, y-1, y-2], a)
end
@@ -465,6 +465,10 @@ class TestInteger < Test::Unit::TestCase
assert_int_equal(1111_1111_1111_1111_1111_1111_1111_1111, 1111_1111_1111_1111_1111_1111_1111_1111.floor(1))
assert_int_equal(10**400, (10**400).floor(1))
+
+ assert_int_equal(-10000000000, -1.floor(-10), "[Bug #20654]")
+ assert_int_equal(-100000000000000000000, -1.floor(-20), "[Bug #20654]")
+ assert_int_equal(-100000000000000000000000000000000000000000000000000, -1.floor(-50), "[Bug #20654]")
end
def test_ceil
@@ -493,6 +497,10 @@ class TestInteger < Test::Unit::TestCase
assert_int_equal(1111_1111_1111_1111_1111_1111_1111_1111, 1111_1111_1111_1111_1111_1111_1111_1111.ceil(1))
assert_int_equal(10**400, (10**400).ceil(1))
+
+ assert_int_equal(10000000000, 1.ceil(-10), "[Bug #20654]")
+ assert_int_equal(100000000000000000000, 1.ceil(-20), "[Bug #20654]")
+ assert_int_equal(100000000000000000000000000000000000000000000000000, 1.ceil(-50), "[Bug #20654]")
end
def test_truncate
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 476d9f882f..1ca05ae362 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2543,7 +2543,7 @@ class TestIO < Test::Unit::TestCase
end
assert_raise(Errno::ESPIPE) do
assert_deprecated_warning(/IO process creation with a leading '\|'/) do # https://bugs.ruby-lang.org/issues/19630
- IO.read("|echo foo", 1, 1)
+ IO.read("|#{EnvUtil.rubybin} -e 'puts :foo'", 1, 1)
end
end
end
@@ -2929,6 +2929,15 @@ class TestIO < Test::Unit::TestCase
f.close
assert_equal("FOO\n", File.read(t.path))
+
+ fd = IO.sysopen(t.path)
+ %w[w r+ w+ a+].each do |mode|
+ assert_raise(Errno::EINVAL, "#{mode} [ruby-dev:38571]") {IO.new(fd, mode)}
+ end
+ f = IO.new(fd, "r")
+ data = f.read
+ f.close
+ assert_equal("FOO\n", data)
}
end
@@ -3867,8 +3876,10 @@ __END__
end
def test_open_fifo_does_not_block_other_threads
- mkcdtmpdir {
+ mkcdtmpdir do
File.mkfifo("fifo")
+ rescue NotImplementedError
+ else
assert_separately([], <<-'EOS')
t1 = Thread.new {
open("fifo", "r") {|r|
@@ -3883,8 +3894,32 @@ __END__
t1_value, _ = assert_join_threads([t1, t2])
assert_equal("foo", t1_value)
EOS
- }
- end if /mswin|mingw|bccwin|cygwin/ !~ RUBY_PLATFORM
+ end
+ end
+
+ def test_open_fifo_restart_at_signal_intterupt
+ mkcdtmpdir do
+ File.mkfifo("fifo")
+ rescue NotImplementedError
+ else
+ wait = EnvUtil.apply_timeout_scale(0.1)
+ data = "writing to fifo"
+
+ # Do not use assert_separately, because reading from stdin
+ # prevents to reproduce [Bug #20708]
+ assert_in_out_err(["-e", "#{<<~"begin;"}\n#{<<~'end;'}"], [], [data])
+ wait, data = #{wait}, #{data.dump}
+ ;
+ begin;
+ trap(:USR1) {}
+ Thread.new do
+ sleep wait; Process.kill(:USR1, $$)
+ sleep wait; File.write("fifo", data)
+ end
+ puts File.read("fifo")
+ end;
+ end
+ end if Signal.list[:USR1] # Pointless on platforms without signal
def test_open_flag
make_tempfile do |t|
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index d2a39e673f..49aa4c5abd 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -95,6 +95,16 @@ class TestISeq < Test::Unit::TestCase
assert_equal(42, ISeq.load_from_binary(iseq.to_binary).eval)
end
+ def test_forwardable
+ iseq = compile(<<~EOF, __LINE__+1)
+ Class.new {
+ def bar(a, b); a + b; end
+ def foo(...); bar(...); end
+ }
+ EOF
+ assert_equal(42, ISeq.load_from_binary(iseq.to_binary).eval.new.foo(40, 2))
+ end
+
def test_super_with_block
iseq = compile(<<~EOF, __LINE__+1)
def (Object.new).touch(*) # :nodoc:
@@ -167,6 +177,14 @@ class TestISeq < Test::Unit::TestCase
end
end
+ def test_ractor_shareable_value_frozen_core
+ iseq = RubyVM::InstructionSequence.compile(<<~'RUBY')
+ # shareable_constant_value: literal
+ REGEX = /#{}/ # [Bug #20569]
+ RUBY
+ assert_includes iseq.to_binary, "REGEX".b
+ end
+
def test_disasm_encoding
src = +"\u{3042} = 1; \u{3042}; \u{3043}"
asm = compile(src).disasm
@@ -347,11 +365,17 @@ class TestISeq < Test::Unit::TestCase
end
end
assert_equal([m1, e1.message], [m2, e2.message], feature11951)
- message = e1.message.each_line
- message.with_index(1) do |line, i|
- next if /^ / =~ line
- assert_send([line, :start_with?, __FILE__],
- proc {message.map {|l, j| (i == j ? ">" : " ") + l}.join("")})
+
+ if e1.message.lines[0] == "#{__FILE__}:#{line}: syntax errors found\n"
+ # Prism lays out the error messages in line with the source, so the
+ # following assertions do not make sense in that context.
+ else
+ message = e1.message.each_line
+ message.with_index(1) do |line, i|
+ next if /^ / =~ line
+ assert_send([line, :start_with?, __FILE__],
+ proc {message.map {|l, j| (i == j ? ">" : " ") + l}.join("")})
+ end
end
end
@@ -463,7 +487,7 @@ class TestISeq < Test::Unit::TestCase
["<class:C>@1",
["bar@10", ["block in bar@11",
["block (2 levels) in bar@12"]]],
- ["foo@2", ["ensure in foo@2"],
+ ["foo@2", ["ensure in foo@7"],
["rescue in foo@4"]]],
["<class:D>@17"]]
@@ -496,7 +520,7 @@ class TestISeq < Test::Unit::TestCase
[4, :line],
[7, :line],
[9, :return]]],
- [["ensure in foo@2", [[7, :line]]]],
+ [["ensure in foo@7", [[7, :line]]]],
[["rescue in foo@4", [[5, :line],
[5, :rescue]]]]]],
[["<class:D>@17", [[17, :class],
@@ -567,7 +591,7 @@ class TestISeq < Test::Unit::TestCase
end
def test_to_binary_with_hidden_local_variables
- assert_iseq_to_binary("for foo in bar; end")
+ assert_iseq_to_binary("for _foo in bar; end")
bin = RubyVM::InstructionSequence.compile(<<-RUBY).to_binary
Object.new.instance_eval do
@@ -789,6 +813,11 @@ class TestISeq < Test::Unit::TestCase
end
def test_unreachable_pattern_matching
+ assert_in_out_err([], "true or 1 in 1")
+ assert_in_out_err([], "true or (case 1; in 1; 1; in 2; 2; end)")
+ end
+
+ def test_unreachable_pattern_matching_in_if_condition
assert_in_out_err([], "#{<<~"begin;"}\n#{<<~'end;'}", %w[1])
begin;
if true or {a: 0} in {a:}
@@ -799,6 +828,27 @@ class TestISeq < Test::Unit::TestCase
end;
end
+ def test_unreachable_next_in_block
+ bug20344 = '[ruby-core:117210] [Bug #20344]'
+ assert_nothing_raised(SyntaxError, bug20344) do
+ compile(<<~RUBY)
+ proc do
+ next
+
+ case nil
+ when "a"
+ next
+ when "b"
+ when "c"
+ proc {}
+ end
+
+ next
+ end
+ RUBY
+ end
+ end
+
def test_loading_kwargs_memory_leak
assert_no_memory_leak([], "#{<<~"begin;"}", "#{<<~'end;'}", rss: true)
a = RubyVM::InstructionSequence.compile("foo(bar: :baz)").to_binary
@@ -818,7 +868,7 @@ class TestISeq < Test::Unit::TestCase
def test_compile_prism_with_file
Tempfile.create(%w"test_iseq .rb") do |f|
- f.puts "name = 'Prism'; puts 'hello'"
+ f.puts "_name = 'Prism'; puts 'hello'"
f.close
assert_nothing_raised(TypeError) do
@@ -837,8 +887,6 @@ class TestISeq < Test::Unit::TestCase
def test_unused_param
a = RubyVM::InstructionSequence.of(method(:block_using_method)).to_a
- omit 'TODO: Prism' if a.dig(4, :parser) != :"parse.y"
-
assert_equal true, a.dig(11, :use_block)
b = RubyVM::InstructionSequence.of(method(:block_unused_method)).to_a
@@ -857,4 +905,12 @@ class TestISeq < Test::Unit::TestCase
RubyVM::InstructionSequence.load_from_binary(var_0)
end
end
+
+ def test_while_in_until_condition
+ assert_in_out_err(["--dump=i", "-e", "until while 1; end; end"]) do |stdout, stderr, status|
+ assert_include(stdout.shift, "== disasm:")
+ assert_include(stdout.pop, "leave")
+ assert_predicate(status, :success?)
+ end
+ end
end
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb
index 820d5591c1..1bb655d52e 100644
--- a/test/ruby/test_iterator.rb
+++ b/test/ruby/test_iterator.rb
@@ -175,10 +175,13 @@ class TestIterator < Test::Unit::TestCase
end
def test_block_given
+ verbose_bak, $VERBOSE = $VERBOSE, nil
assert(m1{p 'test'})
assert(m2{p 'test'})
assert(!m1())
assert(!m2())
+ ensure
+ $VERBOSE = verbose_bak
end
def m3(var, &block)
@@ -308,7 +311,18 @@ class TestIterator < Test::Unit::TestCase
def test_ljump
assert_raise(LocalJumpError) {get_block{break}.call}
- assert_raise(LocalJumpError) {proc_call2(get_block{break}){}}
+ begin
+ verbose_bak, $VERBOSE = $VERBOSE, nil
+ # See the commit https://github.com/ruby/ruby/commit/7d8a415bc2d08a1b5e9d1ea802493b6eeb99c219
+ # This block is not used but this is intentional.
+ # |
+ # +-----------------------------------------------------+
+ # |
+ # vv
+ assert_raise(LocalJumpError) {proc_call2(get_block{break}){}}
+ ensure
+ $VERBOSE = verbose_bak
+ end
# cannot use assert_nothing_raised due to passing block.
begin
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb
index 34a80c3729..a214acc232 100644
--- a/test/ruby/test_keyword.rb
+++ b/test/ruby/test_keyword.rb
@@ -193,7 +193,7 @@ class TestKeywordArguments < Test::Unit::TestCase
# cfunc call
assert_equal(nil, p(**nil))
- def self.a0; end
+ def self.a0(&); end
assert_equal(nil, a0(**nil))
assert_equal(nil, :a0.to_proc.call(self, **nil))
assert_equal(nil, a0(**nil, &:block))
@@ -2848,6 +2848,20 @@ class TestKeywordArguments < Test::Unit::TestCase
assert_equal(1, process(:foo, bar: :baz))
end
+ def test_ruby2_keywords_bug_20679
+ c = Class.new do
+ def self.get(_, _, h, &block)
+ h[1]
+ end
+
+ ruby2_keywords def get(*args, &block)
+ self.class.get(*args, &block)
+ end
+ end
+
+ assert_equal 2, c.new.get(true, {}, 1 => 2)
+ end
+
def test_top_ruby2_keywords
assert_in_out_err([], <<-INPUT, ["[1, 2, 3]", "{:k=>1}"], [])
def bar(*a, **kw)
@@ -4523,6 +4537,24 @@ class TestKeywordArgumentsSymProcRefinements < Test::Unit::TestCase
assert_equal({one: 1, two: 2}, f.call(one:, two:))
end
+ def m_bug20570(*a, **nil)
+ a
+ end
+
+ def test_splat_arg_with_prohibited_keyword
+ assert_equal([], m_bug20570(*[]))
+ assert_equal([1], m_bug20570(*[1]))
+ assert_equal([1, 2], m_bug20570(*[1, 2]))
+ h = nil
+ assert_equal([], m_bug20570(*[], **h))
+ assert_equal([1], m_bug20570(*[1], **h))
+ assert_equal([1, 2], m_bug20570(*[1, 2], **h))
+
+ assert_equal([], m_bug20570(*[], **nil))
+ assert_equal([1], m_bug20570(*[1], **nil))
+ assert_equal([1, 2], m_bug20570(*[1, 2], **nil))
+ end
+
private def one
1
end
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index 22127e903a..4dddbab50c 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -489,6 +489,10 @@ EOS
assert_equal [1, 2, 3], enum.map { |x| x / 2 }
end
+ def test_lazy_zip_map_yield_arity_bug_20623
+ assert_equal([[1, 2]], [1].lazy.zip([2].lazy).map { |x| x }.force)
+ end
+
def test_lazy_to_enum
lazy = [1, 2, 3].lazy
def lazy.foo(*args)
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index c6154af1f6..1fdc6aa853 100644
--- a/test/ruby/test_literal.rb
+++ b/test/ruby/test_literal.rb
@@ -39,6 +39,8 @@ class TestRubyLiteral < Test::Unit::TestCase
end
def test_string
+ verbose_bak, $VERBOSE = $VERBOSE, nil # prevent syntax warnings
+
assert_instance_of String, ?a
assert_equal "a", ?a
assert_instance_of String, ?A
@@ -94,6 +96,9 @@ class TestRubyLiteral < Test::Unit::TestCase
assert_equal "ab", eval("?a 'b'")
assert_equal "a\nb", eval("<<A 'b'\na\nA")
+
+ ensure
+ $VERBOSE = verbose_bak
end
def test_dstring
@@ -241,8 +246,9 @@ class TestRubyLiteral < Test::Unit::TestCase
def test_dregexp
assert_instance_of Regexp, /re#{'ge'}xp/
assert_equal(/regexp/, /re#{'ge'}xp/)
- bug3903 = '[ruby-core:32682]'
- assert_raise(SyntaxError, bug3903) {eval('/[#{"\x80"}]/')}
+
+ # [ruby-core:32682]
+ eval('/[#{"\x80"}]/')
end
def test_array
@@ -590,6 +596,8 @@ class TestRubyLiteral < Test::Unit::TestCase
end
def test_integer
+ verbose_bak, $VERBOSE = $VERBOSE, nil # prevent syntax warnings
+
head = ['', '0x', '0o', '0b', '0d', '-', '+']
chars = ['0', '1', '_', '9', 'f']
head.each {|h|
@@ -619,9 +627,14 @@ class TestRubyLiteral < Test::Unit::TestCase
assert_syntax_error(h, /numeric literal without digits\Z/, "#{bug2407}: #{h.inspect}")
end
end
+
+ ensure
+ $VERBOSE = verbose_bak
end
def test_float
+ verbose_bak, $VERBOSE = $VERBOSE, nil # prevent syntax warnings
+
head = ['', '-', '+']
chars = ['0', '1', '_', '9', 'f', '.']
head.each {|h|
@@ -640,15 +653,27 @@ class TestRubyLiteral < Test::Unit::TestCase
end
begin
r2 = eval(s)
- rescue NameError, SyntaxError
+ rescue ArgumentError
+ # Debug log for a random failure: ArgumentError: SyntaxError#path changed
+ $stderr.puts "TestRubyLiteral#test_float failed: %p" % s
+ raise
+ rescue SyntaxError => e
+ r2 = :err
+ rescue NameError
r2 = :err
end
r2 = :err if Range === r2
- assert_equal(r1, r2, "Float(#{s.inspect}) != eval(#{s.inspect})")
+ s = s.inspect
+ mesg = "Float(#{s}) != eval(#{s})"
+ mesg << ":" << e.message if e
+ assert_equal(r1, r2, mesg)
}
}
}
assert_equal(100.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100e100)
+
+ ensure
+ $VERBOSE = verbose_bak
end
def test_symbol_list
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index a6493374b5..93366ed02a 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -1439,20 +1439,20 @@ class TestM17N < Test::Unit::TestCase
assert_regexp_usascii_literal('//', Encoding::US_ASCII)
assert_regexp_usascii_literal('/#{ }/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/#{"a"}/', Encoding::US_ASCII)
- assert_regexp_usascii_literal('/#{%q"\x80"}/', Encoding::ASCII_8BIT)
- assert_regexp_usascii_literal('/#{"\x80"}/', nil, SyntaxError)
+ assert_regexp_usascii_literal('/#{%q"\x80"}/', Encoding::US_ASCII)
+ assert_regexp_usascii_literal('/#{"\x80"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/a/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/a#{ }/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/a#{"a"}/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/a#{%q"\x80"}/', Encoding::ASCII_8BIT)
- assert_regexp_usascii_literal('/a#{"\x80"}/', nil, SyntaxError)
+ assert_regexp_usascii_literal('/a#{"\x80"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\x80/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\x80#{ }/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\x80#{"a"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\x80#{%q"\x80"}/', Encoding::ASCII_8BIT)
- assert_regexp_usascii_literal('/\x80#{"\x80"}/', nil, SyntaxError)
+ assert_regexp_usascii_literal('/\x80#{"\x80"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\u1234/', Encoding::UTF_8)
assert_regexp_usascii_literal('/\u1234#{ }/', Encoding::UTF_8)
@@ -1721,6 +1721,23 @@ class TestM17N < Test::Unit::TestCase
assert_equal(e("[\"\xB4\xC1\xBB\xFA\"]"), s, bug11787)
end
+ def test_encoding_names_of_default_internal
+ # [Bug #20595] [Bug #20598]
+ [
+ "default_internal.names",
+ "name_list",
+ "aliases.keys"
+ ].each do |method|
+ assert_separately(%w(-W0), <<~RUBY)
+ exp_name = "int" + "ernal"
+ Encoding.default_internal = Encoding::ASCII_8BIT
+ name = Encoding.#{method}.find { |x| x == exp_name }
+ Encoding.default_internal = nil
+ assert_equal exp_name, name, "Encoding.#{method} [Bug #20595] [Bug #20598]"
+ RUBY
+ end
+ end
+
def test_greek_capital_gap
bug12204 = '[ruby-core:74478] [Bug #12204] GREEK CAPITAL RHO and SIGMA'
assert_equal("\u03A3", "\u03A1".succ, bug12204)
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index 5301b51650..a7945082c2 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -1618,25 +1618,42 @@ class TestMethod < Test::Unit::TestCase
def test_kwarg_eval_memory_leak
assert_no_memory_leak([], "", <<~RUBY, rss: true, limit: 1.2)
+ obj = Object.new
+ def obj.test(**kwargs) = nil
+
100_000.times do
- eval("Hash.new(foo: 123)")
+ eval("obj.test(foo: 123)")
end
RUBY
end
+ def test_super_with_splat
+ c = Class.new {
+ attr_reader :x
+
+ def initialize(*args)
+ @x, _ = args
+ end
+ }
+ b = Class.new(c) { def initialize(...) = super }
+ a = Class.new(b) { def initialize(*args) = super }
+ obj = a.new(1, 2, 3)
+ assert_equal 1, obj.x
+ end
+
def test_warn_unused_block
assert_in_out_err '-w', <<-'RUBY' do |_out, err, _status|
def foo = nil
foo{} # warn
- send(:foo){} # warn
+ send(:foo){} # don't warn because it uses send
b = Proc.new{}
foo(&b) # warn
RUBY
- assert_equal 3, err.size
- err = err.join
- assert_match(/-:2: warning/, err)
- assert_match(/-:3: warning/, err)
- assert_match(/-:5: warning/, err)
+ errstr = err.join("\n")
+ assert_equal 2, err.size, errstr
+
+ assert_match(/-:2: warning/, errstr)
+ assert_match(/-:5: warning/, errstr)
end
assert_in_out_err '-w', <<-'RUBY' do |_out, err, _status|
diff --git a/test/ruby/test_mixed_unicode_escapes.rb b/test/ruby/test_mixed_unicode_escapes.rb
index f0b4cc691f..a30b5c19f5 100644
--- a/test/ruby/test_mixed_unicode_escapes.rb
+++ b/test/ruby/test_mixed_unicode_escapes.rb
@@ -18,12 +18,12 @@ class TestMixedUnicodeEscape < Test::Unit::TestCase
assert_raise(SyntaxError) { eval %q("\u{1234}é")}
# also should not work for Regexp
- assert_raise(SyntaxError) { eval %q(/#{"\u1234"}#{"é"}/)}
assert_raise(RegexpError) { eval %q(/\u{1234}#{nil}é/)}
assert_raise(RegexpError) { eval %q(/é#{nil}\u1234/)}
# String interpolation turns into an expression and we get
# a different kind of error, but we still can't mix these
+ assert_raise(Encoding::CompatibilityError) { eval %q(/#{"\u1234"}#{"é"}/)}
assert_raise(Encoding::CompatibilityError) { eval %q("\u{1234}#{nil}é")}
assert_raise(Encoding::CompatibilityError) { eval %q("é#{nil}\u1234")}
end
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 75d8d909d7..370b7351c2 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -3163,6 +3163,19 @@ class TestModule < Test::Unit::TestCase
end;
end
+ def test_define_method_changes_visibility_with_existing_method_bug_19749
+ c = Class.new do
+ def a; end
+ private def b; end
+
+ define_method(:b, instance_method(:b))
+ private
+ define_method(:a, instance_method(:a))
+ end
+ assert_equal([:b], c.public_instance_methods(false))
+ assert_equal([:a], c.private_instance_methods(false))
+ end
+
def test_define_method_with_unbound_method
# Passing an UnboundMethod to define_method succeeds if it is from an ancestor
assert_nothing_raised do
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb
index 1c97bd517e..beb66da7e2 100644
--- a/test/ruby/test_objectspace.rb
+++ b/test/ruby/test_objectspace.rb
@@ -101,6 +101,20 @@ End
ObjectSpace.define_finalizer(a) { p :ok }
!b
END
+
+ assert_in_out_err(["-e", <<~RUBY], "", %w(:ok :ok), [], timeout: 60)
+ a = Object.new
+ ObjectSpace.define_finalizer(a) { p :ok }
+
+ 1_000_000.times do
+ o = Object.new
+ ObjectSpace.define_finalizer(o) { }
+ end
+
+ b = Object.new
+ ObjectSpace.define_finalizer(b) { p :ok }
+ RUBY
+
assert_raise(ArgumentError) { ObjectSpace.define_finalizer([], Object.new) }
code = proc do |priv|
@@ -177,30 +191,29 @@ End
end
def test_finalizer_thread_raise
- GC.disable
- fzer = proc do |id|
- sleep 0.2
- end
- 2.times do
- o = Object.new
- ObjectSpace.define_finalizer(o, fzer)
- end
+ EnvUtil.without_gc do
+ fzer = proc do |id|
+ sleep 0.2
+ end
+ 2.times do
+ o = Object.new
+ ObjectSpace.define_finalizer(o, fzer)
+ end
- my_error = Class.new(RuntimeError)
- begin
- main_th = Thread.current
- Thread.new do
- sleep 0.1
- main_th.raise(my_error)
+ my_error = Class.new(RuntimeError)
+ begin
+ main_th = Thread.current
+ Thread.new do
+ sleep 0.1
+ main_th.raise(my_error)
+ end
+ GC.start
+ puts "After GC"
+ sleep(10)
+ assert(false)
+ rescue my_error
end
- GC.start
- puts "After GC"
- sleep(10)
- assert(false)
- rescue my_error
end
- ensure
- GC.enable
end
def test_each_object
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb
index a7a0582dbb..982da661ec 100644
--- a/test/ruby/test_optimization.rb
+++ b/test/ruby/test_optimization.rb
@@ -749,6 +749,98 @@ class TestRubyOptimization < Test::Unit::TestCase
end
end
+ def test_peephole_array_freeze
+ code = "#{<<~'begin;'}\n#{<<~'end;'}"
+ begin;
+ [1].freeze
+ end;
+ iseq = RubyVM::InstructionSequence.compile(code)
+ insn = iseq.disasm
+ assert_match(/opt_ary_freeze/, insn)
+ assert_no_match(/duparray/, insn)
+ assert_no_match(/send/, insn)
+ assert_predicate([1].freeze, :frozen?)
+ assert_in_out_err([], <<~RUBY, [":ok"])
+ class Array
+ prepend Module.new {
+ def freeze
+ :ok
+ end
+ }
+ end
+ p [1].freeze
+ RUBY
+ end
+
+ def test_peephole_array_freeze_empty
+ code = "#{<<~'begin;'}\n#{<<~'end;'}"
+ begin;
+ [].freeze
+ end;
+ iseq = RubyVM::InstructionSequence.compile(code)
+ insn = iseq.disasm
+ assert_match(/opt_ary_freeze/, insn)
+ assert_no_match(/duparray/, insn)
+ assert_no_match(/send/, insn)
+ assert_predicate([].freeze, :frozen?)
+ assert_in_out_err([], <<~RUBY, [":ok"])
+ class Array
+ prepend Module.new {
+ def freeze
+ :ok
+ end
+ }
+ end
+ p [].freeze
+ RUBY
+ end
+
+ def test_peephole_hash_freeze
+ code = "#{<<~'begin;'}\n#{<<~'end;'}"
+ begin;
+ {a:1}.freeze
+ end;
+ iseq = RubyVM::InstructionSequence.compile(code)
+ insn = iseq.disasm
+ assert_match(/opt_hash_freeze/, insn)
+ assert_no_match(/duphash/, insn)
+ assert_no_match(/send/, insn)
+ assert_predicate([1].freeze, :frozen?)
+ assert_in_out_err([], <<~RUBY, [":ok"])
+ class Hash
+ prepend Module.new {
+ def freeze
+ :ok
+ end
+ }
+ end
+ p({a:1}.freeze)
+ RUBY
+ end
+
+ def test_peephole_hash_freeze_empty
+ code = "#{<<~'begin;'}\n#{<<~'end;'}"
+ begin;
+ {}.freeze
+ end;
+ iseq = RubyVM::InstructionSequence.compile(code)
+ insn = iseq.disasm
+ assert_match(/opt_hash_freeze/, insn)
+ assert_no_match(/duphash/, insn)
+ assert_no_match(/send/, insn)
+ assert_predicate([].freeze, :frozen?)
+ assert_in_out_err([], <<~RUBY, [":ok"])
+ class Hash
+ prepend Module.new {
+ def freeze
+ :ok
+ end
+ }
+ end
+ p({}.freeze)
+ RUBY
+ end
+
def test_branch_condition_backquote
bug = '[ruby-core:80740] [Bug #13444] redefined backquote should be called'
class << self
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index 1ce46e8916..ca089f09c3 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -895,4 +895,45 @@ EXPECTED
}
assert_equal [nil], "a".unpack("C", offset: 1)
end
+
+ def test_monkey_pack
+ assert_separately([], <<-'end;')
+ $-w = false
+ class Array
+ alias :old_pack :pack
+ def pack _; "oh no"; end
+ end
+
+ v = [2 ** 15].pack('n')
+
+ class Array
+ alias :pack :old_pack
+ end
+
+ assert_equal "oh no", v
+ end;
+ end
+
+ def test_monkey_pack_buffer
+ assert_separately([], <<-'end;')
+ $-w = false
+ class Array
+ alias :old_pack :pack
+ def pack _, buffer:; buffer << " no"; end
+ end
+
+ def test
+ b = +"oh"
+ [2 ** 15].pack('n', buffer: b)
+ end
+
+ v = test
+
+ class Array
+ alias :pack :old_pack
+ end
+
+ assert_equal "oh no", v
+ end;
+ end
end
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index bd6dabf2c9..d52e480eb9 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -463,6 +463,8 @@ class TestParse < Test::Unit::TestCase
assert_parse_error(%q[def ((%w();1)).foo; end], msg)
assert_parse_error(%q[def ("#{42}").foo; end], msg)
assert_parse_error(%q[def (:"#{42}").foo; end], msg)
+ assert_parse_error(%q[def ([]).foo; end], msg)
+ assert_parse_error(%q[def ([1]).foo; end], msg)
end
def test_flip_flop
@@ -512,12 +514,12 @@ class TestParse < Test::Unit::TestCase
def t.dummy(_)
end
- assert_syntax_error("#{<<~"begin;"}\n#{<<~'end;'}", /block arg given in index/)
+ assert_syntax_error("#{<<~"begin;"}\n#{<<~'end;'}", /block arg given in index assignment/)
begin;
t[42, &blk] ||= 42
end;
- assert_syntax_error("#{<<~"begin;"}\n#{<<~'end;'}", /block arg given in index/)
+ assert_syntax_error("#{<<~"begin;"}\n#{<<~'end;'}", /block arg given in index assignment/)
begin;
t[42, &blk] ||= t.dummy 42 # command_asgn test
end;
@@ -555,34 +557,42 @@ class TestParse < Test::Unit::TestCase
mesg = 'from the backslash through the invalid char'
e = assert_syntax_error('"\xg1"', /hex escape/)
- assert_equal(' ^~'"\n", e.message.lines.last, mesg)
+ assert_match(/(^|\| ) \^~(?!~)/, e.message.lines.last, mesg)
e = assert_syntax_error('"\u{1234"', 'unterminated Unicode escape')
- assert_equal(' ^'"\n", e.message.lines.last, mesg)
+ assert_match(/(^|\| ) \^(?!~)/, e.message.lines.last, mesg)
e = assert_syntax_error('"\u{xxxx}"', 'invalid Unicode escape')
- assert_equal(' ^'"\n", e.message.lines.last, mesg)
+ assert_match(/(^|\| ) \^(?!~)/, e.message.lines.last, mesg)
e = assert_syntax_error('"\u{xxxx', 'Unicode escape')
- assert_pattern_list([
- /.*: invalid Unicode escape\n.*\n/,
- / \^/,
- /\n/,
- /.*: unterminated Unicode escape\n.*\n/,
- / \^/,
- /\n/,
- /.*: unterminated string.*\n.*\n/,
- / \^\n/,
- ], e.message)
+ if e.message.lines.first == "#{__FILE__}:#{__LINE__ - 1}: syntax errors found\n"
+ assert_pattern_list([
+ /\s+\| \^ unterminated string;.+\n/,
+ /\s+\| \^ unterminated Unicode escape\n/,
+ /\s+\| \^ invalid Unicode escape sequence\n/,
+ ], e.message.lines[2..-1].join)
+ else
+ assert_pattern_list([
+ /.*: invalid Unicode escape\n.*\n/,
+ / \^/,
+ /\n/,
+ /.*: unterminated Unicode escape\n.*\n/,
+ / \^/,
+ /\n/,
+ /.*: unterminated string.*\n.*\n/,
+ / \^\n/,
+ ], e.message)
+ end
e = assert_syntax_error('"\M1"', /escape character syntax/)
- assert_equal(' ^~~'"\n", e.message.lines.last, mesg)
+ assert_match(/(^|\| ) \^~~(?!~)/, e.message.lines.last, mesg)
e = assert_syntax_error('"\C1"', /escape character syntax/)
- assert_equal(' ^~~'"\n", e.message.lines.last, mesg)
+ assert_match(/(^|\| ) \^~~(?!~)/, e.message.lines.last, mesg)
src = '"\xD0\u{90'"\n""000000000000000000000000"
- assert_syntax_error(src, /:#{__LINE__}: unterminated/o)
+ assert_syntax_error(src, /(:#{__LINE__}:|> #{__LINE__} \|.+) unterminated/om)
assert_syntax_error('"\u{100000000}"', /invalid Unicode escape/)
assert_equal("", eval('"\u{}"'))
@@ -605,22 +615,22 @@ class TestParse < Test::Unit::TestCase
assert_syntax_error("\"\\C-\\M-\x01\"", 'Invalid escape character syntax')
e = assert_syntax_error('"\c\u0000"', 'Invalid escape character syntax')
- assert_equal(' ^~~~'"\n", e.message.lines.last)
+ assert_match(/(^|\| ) \^~~~(?!~)/, e.message.lines.last)
e = assert_syntax_error('"\c\U0000"', 'Invalid escape character syntax')
- assert_equal(' ^~~~'"\n", e.message.lines.last)
+ assert_match(/(^|\| ) \^~~~(?!~)/, e.message.lines.last)
e = assert_syntax_error('"\C-\u0000"', 'Invalid escape character syntax')
- assert_equal(' ^~~~~'"\n", e.message.lines.last)
+ assert_match(/(^|\| ) \^~~~~(?!~)/, e.message.lines.last)
e = assert_syntax_error('"\C-\U0000"', 'Invalid escape character syntax')
- assert_equal(' ^~~~~'"\n", e.message.lines.last)
+ assert_match(/(^|\| ) \^~~~~(?!~)/, e.message.lines.last)
e = assert_syntax_error('"\M-\u0000"', 'Invalid escape character syntax')
- assert_equal(' ^~~~~'"\n", e.message.lines.last)
+ assert_match(/(^|\| ) \^~~~~(?!~)/, e.message.lines.last)
e = assert_syntax_error('"\M-\U0000"', 'Invalid escape character syntax')
- assert_equal(' ^~~~~'"\n", e.message.lines.last)
+ assert_match(/(^|\| ) \^~~~~(?!~)/, e.message.lines.last)
e = assert_syntax_error(%["\\C-\u3042"], 'Invalid escape character syntax')
- assert_match(/^\s \^(?# \\ ) ~(?# C ) ~(?# - ) ~+(?# U+3042 )$/x, e.message.lines.last)
+ assert_match(/(^|\|\s)\s \^(?# \\ ) ~(?# C ) ~(?# - ) ~+(?# U+3042 )($|\s)/x, e.message.lines.last)
assert_not_include(e.message, "invalid multibyte char")
end
@@ -875,7 +885,8 @@ x = __ENCODING__
$test_parse_foobarbazqux = nil
assert_equal(nil, $&)
assert_equal(nil, eval('alias $& $preserve_last_match'))
- assert_syntax_error('a = $#', /as a global variable name\na = \$\#\n \^~$/)
+ assert_syntax_error('a = $#', /as a global variable name/)
+ assert_syntax_error('a = $#', /a = \$\#\n(^|.+?\| ) \^~(?!~)/)
end
def test_invalid_instance_variable
@@ -941,6 +952,7 @@ x = __ENCODING__
assert_nil assert_warning(useless_use) {eval("true; nil")}
assert_nil assert_warning(useless_use) {eval("false; nil")}
assert_nil assert_warning(useless_use) {eval("defined?(1); nil")}
+ assert_nil assert_warning(useless_use) {eval("begin; ensure; x; end")}
assert_equal 1, x
assert_syntax_error("1; next; 2", /Invalid next/)
@@ -1336,17 +1348,21 @@ x = __ENCODING__
end
def test_unexpected_token_after_numeric
- assert_syntax_error('0000xyz', /^ \^~~\Z/)
- assert_syntax_error('1.2i1.1', /^ \^~~\Z/)
- assert_syntax_error('1.2.3', /^ \^~\Z/)
+ assert_syntax_error('0000xyz', /(^|\| ) \^~~(?!~)/)
+ assert_syntax_error('1.2i1.1', /(^|\| ) \^~~(?!~)/)
+ assert_syntax_error('1.2.3', /(^|\| ) \^~(?!~)/)
assert_syntax_error('1.', /unexpected end-of-input/)
assert_syntax_error('1e', /expecting end-of-input/)
end
def test_truncated_source_line
- e = assert_syntax_error("'0123456789012345678901234567890123456789' abcdefghijklmnopqrstuvwxyz0123456789 0123456789012345678901234567890123456789",
+ lineno = __LINE__ + 1
+ e = assert_syntax_error("'0123456789012345678901234567890123456789' abcdefghijklmnopqrstuvwxyz0123456789 123456789012345678901234567890123456789",
/unexpected local variable or method/)
+
line = e.message.lines[1]
+ line.delete_prefix!("> #{lineno} | ") if line.start_with?(">")
+
assert_operator(line, :start_with?, "...")
assert_operator(line, :end_with?, "...\n")
end
@@ -1390,11 +1406,11 @@ x = __ENCODING__
end
def test_unexpected_eof
- assert_syntax_error('unless', /^ \^\Z/)
+ assert_syntax_error('unless', /(^|\| ) \^(?!~)/)
end
def test_location_of_invalid_token
- assert_syntax_error('class xxx end', /^ \^~~\Z/)
+ assert_syntax_error('class xxx end', /(^|\| ) \^~~(?!~)/)
end
def test_whitespace_warning
@@ -1560,6 +1576,21 @@ x = __ENCODING__
assert_equal(2, b[1], bug_20341)
end
+ def test_shareable_constant_value_literal_const_refs
+ a = eval_separately("#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ # shareable_constant_value: literal
+ # [Bug #20668]
+ SOME_CONST = {
+ 'Object' => Object,
+ 'String' => String,
+ 'Array' => Array,
+ }
+ SOME_CONST
+ end;
+ assert_ractor_shareable(a)
+ end
+
def test_shareable_constant_value_nested
a, b = eval_separately("#{<<~"begin;"}\n#{<<~'end;'}")
begin;
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index db6ad06b82..cfe3bd1e19 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -1331,7 +1331,7 @@ END
end
assert_block do
- case {}
+ case C.new({})
in {}
C.keys == nil
end
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 2f91da8aa8..dd05d09a49 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -207,18 +207,24 @@ class TestProc < Test::Unit::TestCase
end
def test_block_given_method
+ verbose_bak, $VERBOSE = $VERBOSE, nil
m = method(:m_block_given?)
assert(!m.call, "without block")
assert(m.call {}, "with block")
assert(!m.call, "without block second")
+ ensure
+ $VERBOSE = verbose_bak
end
def test_block_given_method_to_proc
+ verbose_bak, $VERBOSE = $VERBOSE, nil
bug8341 = '[Bug #8341]'
m = method(:m_block_given?).to_proc
assert(!m.call, "#{bug8341} without block")
assert(m.call {}, "#{bug8341} with block")
assert(!m.call, "#{bug8341} without block second")
+ ensure
+ $VERBOSE = verbose_bak
end
def test_block_persist_between_calls
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 7ef184d639..6e8ba484a4 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1732,15 +1732,20 @@ class TestProcess < Test::Unit::TestCase
sig_w.write('?')
end
pid = nil
+ th = nil
IO.pipe do |r, w|
pid = fork { r.read(1); exit }
- Thread.start {
+ th = Thread.start {
Thread.current.report_on_exception = false
raise
}
w.puts
end
Process.wait pid
+ begin
+ th.join
+ rescue Exception
+ end
assert_send [sig_r, :wait_readable, 5], 'self-pipe not readable'
end
if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # checking -DRJIT_FORCE_ENABLE. It may trigger extra SIGCHLD.
@@ -2759,7 +2764,7 @@ EOS
begin;
GC.start
- TIMES = 10_000
+ TIMES = 100_000
ary = Array.new(TIMES)
TIMES.times do |i|
ary[i] = Object.new
@@ -2770,15 +2775,12 @@ EOS
# Disable GC so we can make sure GC only runs in Process.warmup
GC.disable
- total_pages_before = GC.stat_heap.map { |_, v| v[:heap_eden_pages] + v[:heap_allocatable_pages] }
+ total_slots_before = GC.stat(:heap_available_slots) + GC.stat(:heap_allocatable_slots)
Process.warmup
- # Number of pages freed should cause equal increase in number of allocatable pages.
- total_pages_before.each_with_index do |val, i|
- assert_equal(val, GC.stat_heap(i, :heap_eden_pages) + GC.stat_heap(i, :heap_allocatable_pages), "size pool: #{i}")
- end
- assert_equal(0, GC.stat(:heap_tomb_pages))
+ assert_equal(total_slots_before, GC.stat(:heap_available_slots) + GC.stat(:heap_allocatable_slots))
+ assert_equal(0, GC.stat(:heap_empty_pages))
assert_operator(GC.stat(:total_freed_pages), :>, 0)
end;
end
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb
index 84b3b205f0..e0c1d20bd2 100644
--- a/test/ruby/test_range.rb
+++ b/test/ruby/test_range.rb
@@ -246,67 +246,138 @@ class TestRange < Test::Unit::TestCase
assert_kind_of(String, (0..1).hash.to_s)
end
- def test_step
- a = []
- (0..10).step {|x| a << x }
- assert_equal([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], a)
+ def test_step_numeric_range
+ # Fixnums, floats and all other numbers (like rationals) should behave exactly the same,
+ # but the behavior is implemented independently in 3 different branches of code,
+ # so we need to test each of them.
+ %i[to_i to_r to_f].each do |type|
+ conv = type.to_proc
+
+ from = conv.(0)
+ to = conv.(10)
+ step = conv.(2)
+
+ # finite
+ a = []
+ (from..to).step(step) {|x| a << x }
+ assert_equal([0, 2, 4, 6, 8, 10].map(&conv), a)
- a = []
- (0..).step {|x| a << x; break if a.size == 10 }
- assert_equal([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], a)
+ a = []
+ (from...to).step(step) {|x| a << x }
+ assert_equal([0, 2, 4, 6, 8].map(&conv), a)
- a = []
- (0..10).step(2) {|x| a << x }
- assert_equal([0, 2, 4, 6, 8, 10], a)
+ # Note: ArithmeticSequence behavior tested in its own test, but we also put it here
+ # to demonstrate the result is the same
+ assert_kind_of(Enumerator::ArithmeticSequence, (from..to).step(step))
+ assert_equal([0, 2, 4, 6, 8, 10].map(&conv), (from..to).step(step).to_a)
+ assert_kind_of(Enumerator::ArithmeticSequence, (from...to).step(step))
+ assert_equal([0, 2, 4, 6, 8].map(&conv), (from...to).step(step).to_a)
- a = []
- (0..).step(2) {|x| a << x; break if a.size == 10 }
- assert_equal([0, 2, 4, 6, 8, 10, 12, 14, 16, 18], a)
-
- assert_kind_of(Enumerator::ArithmeticSequence, (0..10).step)
- assert_kind_of(Enumerator::ArithmeticSequence, (0..10).step(2))
- assert_kind_of(Enumerator::ArithmeticSequence, (0..10).step(0.5))
- assert_kind_of(Enumerator::ArithmeticSequence, (10..0).step(-1))
- assert_kind_of(Enumerator::ArithmeticSequence, (..10).step(2))
- assert_kind_of(Enumerator::ArithmeticSequence, (1..).step(2))
-
- assert_raise(ArgumentError) { (0..10).step(-1) { } }
- assert_raise(ArgumentError) { (0..10).step(0) }
- assert_raise(ArgumentError) { (0..10).step(0) { } }
- assert_raise(ArgumentError) { (0..).step(-1) { } }
- assert_raise(ArgumentError) { (0..).step(0) }
- assert_raise(ArgumentError) { (0..).step(0) { } }
+ # endless
+ a = []
+ (from..).step(step) {|x| a << x; break if a.size == 5 }
+ assert_equal([0, 2, 4, 6, 8].map(&conv), a)
- a = []
- ("a" .. "z").step(2) {|x| a << x }
- assert_equal(%w(a c e g i k m o q s u w y), a)
+ assert_kind_of(Enumerator::ArithmeticSequence, (from..).step(step))
+ assert_equal([0, 2, 4, 6, 8].map(&conv), (from..).step(step).take(5))
- a = []
- ("a" .. ).step(2) {|x| a << x; break if a.size == 13 }
- assert_equal(%w(a c e g i k m o q s u w y), a)
+ # beginless
+ assert_raise(ArgumentError) { (..to).step(step) {} }
+ assert_kind_of(Enumerator::ArithmeticSequence, (..to).step(step))
+ # This is inconsistent, but so it is implemented by ArithmeticSequence
+ assert_raise(TypeError) { (..to).step(step).to_a }
- a = []
- ("a" .. "z").step(2**32) {|x| a << x }
- assert_equal(["a"], a)
+ # negative step
- a = []
- (:a .. :z).step(2) {|x| a << x }
- assert_equal(%i(a c e g i k m o q s u w y), a)
+ a = []
+ (from..to).step(-step) {|x| a << x }
+ assert_equal([], a)
- a = []
- (:a .. ).step(2) {|x| a << x; break if a.size == 13 }
- assert_equal(%i(a c e g i k m o q s u w y), a)
+ a = []
+ (from..-to).step(-step) {|x| a << x }
+ assert_equal([0, -2, -4, -6, -8, -10].map(&conv), a)
- a = []
- (:a .. :z).step(2**32) {|x| a << x }
- assert_equal([:a], a)
+ a = []
+ (from...-to).step(-step) {|x| a << x }
+ assert_equal([0, -2, -4, -6, -8].map(&conv), a)
+
+ a = []
+ (from...).step(-step) {|x| a << x; break if a.size == 5 }
+ assert_equal([0, -2, -4, -6, -8].map(&conv), a)
+
+ assert_kind_of(Enumerator::ArithmeticSequence, (from..to).step(-step))
+ assert_equal([], (from..to).step(-step).to_a)
+
+ assert_kind_of(Enumerator::ArithmeticSequence, (from..-to).step(-step))
+ assert_equal([0, -2, -4, -6, -8, -10].map(&conv), (from..-to).step(-step).to_a)
+
+ assert_kind_of(Enumerator::ArithmeticSequence, (from...-to).step(-step))
+ assert_equal([0, -2, -4, -6, -8].map(&conv), (from...-to).step(-step).to_a)
+
+ assert_kind_of(Enumerator::ArithmeticSequence, (from...).step(-step))
+ assert_equal([0, -2, -4, -6, -8].map(&conv), (from...).step(-step).take(5))
+
+ # zero step
+
+ assert_raise(ArgumentError) { (from..to).step(0) {} }
+ assert_raise(ArgumentError) { (from..to).step(0) }
+
+ # default step
+
+ a = []
+ (from..to).step {|x| a << x }
+ assert_equal([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(&conv), a)
+
+ assert_kind_of(Enumerator::ArithmeticSequence, (from..to).step)
+ assert_equal([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(&conv), (from..to).step.to_a)
+
+ # default + endless range
+ a = []
+ (from..).step {|x| a << x; break if a.size == 5 }
+ assert_equal([0, 1, 2, 3, 4].map(&conv), a)
+
+ assert_kind_of(Enumerator::ArithmeticSequence, (from..).step)
+ assert_equal([0, 1, 2, 3, 4].map(&conv), (from..).step.take(5))
+
+ # default + beginless range
+ assert_kind_of(Enumerator::ArithmeticSequence, (..to).step)
+ # step is not numeric
+
+ to = conv.(5)
+
+ val = Struct.new(:val)
+
+ a = []
+ assert_raise(TypeError) { (from..to).step(val.new(step)) {|x| a << x } }
+ assert_kind_of(Enumerator, (from..to).step(val.new(step)))
+ assert_raise(TypeError) { (from..to).step(val.new(step)).to_a }
+
+ # step is not numeric, but coercible
+ val = Struct.new(:val) do
+ def coerce(num) = [self.class.new(num), self]
+ def +(other) = self.class.new(val + other.val)
+ def <=>(other) = other.is_a?(self.class) ? val <=> other.val : val <=> other
+ end
+
+ a = []
+ (from..to).step(val.new(step)) {|x| a << x }
+ assert_equal([from, val.new(conv.(2)), val.new(conv.(4))], a)
+
+ assert_kind_of(Enumerator, (from..to).step(val.new(step)))
+ assert_equal([from, val.new(conv.(2)), val.new(conv.(4))], (from..to).step(val.new(step)).to_a)
+ end
+ end
+
+ def test_step_numeric_fixnum_boundary
a = []
(2**32-1 .. 2**32+1).step(2) {|x| a << x }
assert_equal([4294967295, 4294967297], a)
+
zero = (2**32).coerce(0).first
assert_raise(ArgumentError) { (2**32-1 .. 2**32+1).step(zero) }
assert_raise(ArgumentError) { (2**32-1 .. 2**32+1).step(zero) { } }
+
a = []
(2**32-1 .. ).step(2) {|x| a << x; break if a.size == 2 }
assert_equal([4294967295, 4294967297], a)
@@ -315,58 +386,189 @@ class TestRange < Test::Unit::TestCase
a = []
(max..).step {|x| a << x; break if a.size == 2 }
assert_equal([max, max+1], a)
+
a = []
(max..).step(max) {|x| a << x; break if a.size == 4 }
assert_equal([max, 2*max, 3*max, 4*max], a)
+ end
- o1 = Object.new
- o2 = Object.new
- def o1.<=>(x); -1; end
- def o2.<=>(x); 0; end
- assert_raise(TypeError) { (o1..o2).step(1) { } }
- assert_raise(TypeError) { (o1..).step(1) { } }
+ def test_step_big_float
+ a = []
+ (0x40000000..0x40000002).step(0.5) {|x| a << x }
+ assert_equal([1073741824, 1073741824.5, 1073741825.0, 1073741825.5, 1073741826], a)
+ end
- class << o1; self; end.class_eval do
- define_method(:succ) { o2 }
- end
+ def test_step_non_numeric_range
+ # finite
a = []
- (o1..o2).step(1) {|x| a << x }
- assert_equal([o1, o2], a)
+ ('a'..'aaaa').step('a') { a << _1 }
+ assert_equal(%w[a aa aaa aaaa], a)
+
+ assert_kind_of(Enumerator, ('a'..'aaaa').step('a'))
+ assert_equal(%w[a aa aaa aaaa], ('a'..'aaaa').step('a').to_a)
a = []
- (o1...o2).step(1) {|x| a << x }
- assert_equal([o1], a)
+ ('a'...'aaaa').step('a') { a << _1 }
+ assert_equal(%w[a aa aaa], a)
- assert_nothing_raised("[ruby-dev:34557]") { (0..2).step(0.5) {|x| } }
+ assert_kind_of(Enumerator, ('a'...'aaaa').step('a'))
+ assert_equal(%w[a aa aaa], ('a'...'aaaa').step('a').to_a)
+ # endless
a = []
- (0..2).step(0.5) {|x| a << x }
- assert_equal([0, 0.5, 1.0, 1.5, 2.0], a)
+ ('a'...).step('a') { a << _1; break if a.size == 3 }
+ assert_equal(%w[a aa aaa], a)
+
+ assert_kind_of(Enumerator, ('a'...).step('a'))
+ assert_equal(%w[a aa aaa], ('a'...).step('a').take(3))
+
+ # beginless
+ assert_raise(ArgumentError) { (...'aaa').step('a') {} }
+ assert_raise(ArgumentError) { (...'aaa').step('a') }
+
+ # step is not provided
+ assert_raise(ArgumentError) { (Time.new(2022)...Time.new(2023)).step }
+ # step is incompatible
+ assert_raise(TypeError) { (Time.new(2022)...Time.new(2023)).step('a') {} }
+ assert_raise(TypeError) { (Time.new(2022)...Time.new(2023)).step('a').to_a }
+
+ # step is compatible, but shouldn't convert into numeric domain:
a = []
- (0..).step(0.5) {|x| a << x; break if a.size == 5 }
- assert_equal([0, 0.5, 1.0, 1.5, 2.0], a)
+ (Time.utc(2022, 2, 24)...).step(1) { a << _1; break if a.size == 2 }
+ assert_equal([Time.utc(2022, 2, 24), Time.utc(2022, 2, 24, 0, 0, 1)], a)
a = []
- (0x40000000..0x40000002).step(0.5) {|x| a << x }
- assert_equal([1073741824, 1073741824.5, 1073741825.0, 1073741825.5, 1073741826], a)
+ (Time.utc(2022, 2, 24)...).step(1.0) { a << _1; break if a.size == 2 }
+ assert_equal([Time.utc(2022, 2, 24), Time.utc(2022, 2, 24, 0, 0, 1)], a)
- o = Object.new
- def o.to_int() 1 end
- assert_nothing_raised("[ruby-dev:34558]") { (0..2).step(o) {|x| } }
+ a = []
+ (Time.utc(2022, 2, 24)...).step(1r) { a << _1; break if a.size == 2 }
+ assert_equal([Time.utc(2022, 2, 24), Time.utc(2022, 2, 24, 0, 0, 1)], a)
- o = Object.new
- class << o
- def to_str() "a" end
- def <=>(other) to_str <=> other end
- end
+ # step decreases the value
+ a = []
+ (Time.utc(2022, 2, 24)...).step(-1) { a << _1; break if a.size == 2 }
+ assert_equal([Time.utc(2022, 2, 24), Time.utc(2022, 2, 23, 23, 59, 59)], a)
a = []
- (o.."c").step(1) {|x| a << x}
- assert_equal(["a", "b", "c"], a)
+ (Time.utc(2022, 2, 24)...Time.utc(2022, 2, 23, 23, 59, 57)).step(-1) { a << _1 }
+ assert_equal([Time.utc(2022, 2, 24), Time.utc(2022, 2, 23, 23, 59, 59),
+ Time.utc(2022, 2, 23, 23, 59, 58)], a)
+
a = []
- (o..).step(1) {|x| a << x; break if a.size >= 3}
- assert_equal(["a", "b", "c"], a)
+ (Time.utc(2022, 2, 24)..Time.utc(2022, 2, 23, 23, 59, 57)).step(-1) { a << _1 }
+ assert_equal([Time.utc(2022, 2, 24), Time.utc(2022, 2, 23, 23, 59, 59),
+ Time.utc(2022, 2, 23, 23, 59, 58), Time.utc(2022, 2, 23, 23, 59, 57)], a)
+
+ # step decreases, but the range is forward-directed:
+ a = []
+ (Time.utc(2022, 2, 24)...Time.utc(2022, 2, 24, 01, 01, 03)).step(-1) { a << _1 }
+ assert_equal([], a)
+ end
+
+ def test_step_string_legacy
+ # finite
+ a = []
+ ('a'..'g').step(2) { a << _1 }
+ assert_equal(%w[a c e g], a)
+
+ assert_kind_of(Enumerator, ('a'..'g').step(2))
+ assert_equal(%w[a c e g], ('a'..'g').step(2).to_a)
+
+ a = []
+ ('a'...'g').step(2) { a << _1 }
+ assert_equal(%w[a c e], a)
+
+ assert_kind_of(Enumerator, ('a'...'g').step(2))
+ assert_equal(%w[a c e], ('a'...'g').step(2).to_a)
+
+ # endless
+ a = []
+ ('a'...).step(2) { a << _1; break if a.size == 3 }
+ assert_equal(%w[a c e], a)
+
+ assert_kind_of(Enumerator, ('a'...).step(2))
+ assert_equal(%w[a c e], ('a'...).step(2).take(3))
+
+ # beginless
+ assert_raise(ArgumentError) { (...'g').step(2) {} }
+ assert_raise(ArgumentError) { (...'g').step(2) }
+
+ # step is not provided
+ a = []
+ ('a'..'d').step { a << _1 }
+ assert_equal(%w[a b c d], a)
+
+ assert_kind_of(Enumerator, ('a'..'d').step)
+ assert_equal(%w[a b c d], ('a'..'d').step.to_a)
+
+ a = []
+ ('a'...'d').step { a << _1 }
+ assert_equal(%w[a b c], a)
+
+ assert_kind_of(Enumerator, ('a'...'d').step)
+ assert_equal(%w[a b c], ('a'...'d').step.to_a)
+
+ # endless
+ a = []
+ ('a'...).step { a << _1; break if a.size == 3 }
+ assert_equal(%w[a b c], a)
+
+ assert_kind_of(Enumerator, ('a'...).step)
+ assert_equal(%w[a b c], ('a'...).step.take(3))
+ end
+
+ def test_step_symbol_legacy
+ # finite
+ a = []
+ (:a..:g).step(2) { a << _1 }
+ assert_equal(%i[a c e g], a)
+
+ assert_kind_of(Enumerator, (:a..:g).step(2))
+ assert_equal(%i[a c e g], (:a..:g).step(2).to_a)
+
+ a = []
+ (:a...:g).step(2) { a << _1 }
+ assert_equal(%i[a c e], a)
+
+ assert_kind_of(Enumerator, (:a...:g).step(2))
+ assert_equal(%i[a c e], (:a...:g).step(2).to_a)
+
+ # endless
+ a = []
+ (:a...).step(2) { a << _1; break if a.size == 3 }
+ assert_equal(%i[a c e], a)
+
+ assert_kind_of(Enumerator, (:a...).step(2))
+ assert_equal(%i[a c e], (:a...).step(2).take(3))
+
+ # beginless
+ assert_raise(ArgumentError) { (...:g).step(2) {} }
+ assert_raise(ArgumentError) { (...:g).step(2) }
+
+ # step is not provided
+ a = []
+ (:a..:d).step { a << _1 }
+ assert_equal(%i[a b c d], a)
+
+ assert_kind_of(Enumerator, (:a..:d).step)
+ assert_equal(%i[a b c d], (:a..:d).step.to_a)
+
+ a = []
+ (:a...:d).step { a << _1 }
+ assert_equal(%i[a b c], a)
+
+ assert_kind_of(Enumerator, (:a...:d).step)
+ assert_equal(%i[a b c], (:a...:d).step.to_a)
+
+ # endless
+ a = []
+ (:a...).step { a << _1; break if a.size == 3 }
+ assert_equal(%i[a b c], a)
+
+ assert_kind_of(Enumerator, (:a...).step)
+ assert_equal(%i[a b c], (:a...).step.take(3))
end
def test_step_bug15537
@@ -392,26 +594,6 @@ class TestRange < Test::Unit::TestCase
assert_equal(4, (1.0...5.6).step(1.5).to_a.size)
end
- def test_step_with_succ
- c = Struct.new(:i) do
- def succ; self.class.new(i+1); end
- def <=>(other) i <=> other.i;end
- end.new(0)
-
- result = []
- (c..c.succ).step(2) do |d|
- result << d.i
- end
- assert_equal([0], result)
-
- result = []
- (c..).step(2) do |d|
- result << d.i
- break if d.i >= 4
- end
- assert_equal([0, 2, 4], result)
- end
-
def test_each
a = []
(0..10).each {|x| a << x }
@@ -1289,6 +1471,7 @@ class TestRange < Test::Unit::TestCase
assert_operator((..3), :overlap?, (3..))
assert_operator((nil..nil), :overlap?, (3..))
assert_operator((nil...nil), :overlap?, (nil..))
+ assert_operator((nil..nil), :overlap?, (..3))
assert_raise(TypeError) { (1..3).overlap?(1) }
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index 11acf31f21..913c968d35 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -825,7 +825,7 @@ class TestRefinement < Test::Unit::TestCase
GC.stress = true
10.times{
#{PrependAfterRefine_CODE}
- undef PrependAfterRefine
+ Object.send(:remove_const, :PrependAfterRefine)
}
}, timeout: 60
end
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index c72029ca80..58b3081035 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -559,16 +559,26 @@ class TestRegexp < Test::Unit::TestCase
assert_raise(IndexError) { m.byteoffset(2) }
assert_raise(IndexError) { m.begin(2) }
assert_raise(IndexError) { m.end(2) }
+ assert_raise(IndexError) { m.bytebegin(2) }
+ assert_raise(IndexError) { m.byteend(2) }
m = /(?<x>q..)?/.match("foobarbaz")
assert_equal([nil, nil], m.byteoffset("x"))
assert_equal(nil, m.begin("x"))
assert_equal(nil, m.end("x"))
+ assert_equal(nil, m.bytebegin("x"))
+ assert_equal(nil, m.byteend("x"))
m = /\A\u3042(.)(.)?(.)\z/.match("\u3042\u3043\u3044")
assert_equal([3, 6], m.byteoffset(1))
+ assert_equal(3, m.bytebegin(1))
+ assert_equal(6, m.byteend(1))
assert_equal([nil, nil], m.byteoffset(2))
+ assert_equal(nil, m.bytebegin(2))
+ assert_equal(nil, m.byteend(2))
assert_equal([6, 9], m.byteoffset(3))
+ assert_equal(6, m.bytebegin(3))
+ assert_equal(9, m.byteend(3))
end
def test_match_to_s
@@ -1783,7 +1793,7 @@ class TestRegexp < Test::Unit::TestCase
end
t = Time.now - t
- assert_in_delta(timeout, t, timeout / 2)
+ assert_operator(timeout, :<=, [timeout * 1.5, 1].max)
end;
end
@@ -1862,7 +1872,7 @@ class TestRegexp < Test::Unit::TestCase
def test_timeout_shorter_than_global
omit "timeout test is too unstable on s390x" if RUBY_PLATFORM =~ /s390x/
- per_instance_redos_test(10, 0.2, 0.2)
+ per_instance_redos_test(10, 0.5, 0.5)
end
def test_timeout_longer_than_global
@@ -1892,6 +1902,22 @@ class TestRegexp < Test::Unit::TestCase
end;
end
+ def test_timeout_memory_leak
+ assert_no_memory_leak([], "#{<<~"begin;"}", "#{<<~'end;'}", "[Bug #20650]", timeout: 100, rss: true)
+ regex = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
+ str = "a" * 1_000_000 + "x"
+
+ code = proc do
+ regex =~ str
+ rescue
+ end
+
+ 10.times(&code)
+ begin;
+ 1_000.times(&code)
+ end;
+ end
+
def test_match_cache_exponential
assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}")
timeout = #{ EnvUtil.apply_timeout_scale(10).inspect }
@@ -1929,7 +1955,7 @@ class TestRegexp < Test::Unit::TestCase
end
def test_match_cache_positive_look_ahead
- assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}")
+ assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}", timeout: 30)
timeout = #{ EnvUtil.apply_timeout_scale(10).inspect }
begin;
Regexp.timeout = timeout
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index ef33928376..5aadf779fb 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -847,7 +847,7 @@ class TestRequire < Test::Unit::TestCase
f.close
File.unlink(f.path)
File.mkfifo(f.path)
- assert_separately(["-", f.path], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 3)
+ assert_separately(["-", f.path], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
th = Thread.current
Thread.start {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
@@ -866,7 +866,7 @@ class TestRequire < Test::Unit::TestCase
File.unlink(f.path)
File.mkfifo(f.path)
- assert_separately(["-", f.path], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 3)
+ assert_separately(["-", f.path], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
begin;
path = ARGV[0]
th = Thread.current
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 76be9152a7..f82861b8ce 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -5,6 +5,7 @@ require 'timeout'
require 'tmpdir'
require 'tempfile'
require_relative '../lib/jit_support'
+require_relative '../lib/parser_support'
class TestRubyOptions < Test::Unit::TestCase
def self.rjit_enabled? = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
@@ -13,7 +14,12 @@ class TestRubyOptions < Test::Unit::TestCase
# Here we're defining our own RUBY_DESCRIPTION without "+PRISM". We do this
# here so that the various tests that reference RUBY_DESCRIPTION don't have to
# worry about it. The flag itself is tested in its own test.
- RUBY_DESCRIPTION = ::RUBY_DESCRIPTION.sub(/\+PRISM /, '')
+ RUBY_DESCRIPTION =
+ if ParserSupport.prism_enabled_in_subprocess?
+ ::RUBY_DESCRIPTION
+ else
+ ::RUBY_DESCRIPTION.sub(/\+PRISM /, '')
+ end
NO_JIT_DESCRIPTION =
if rjit_enabled?
@@ -163,14 +169,14 @@ class TestRubyOptions < Test::Unit::TestCase
/^jruby #{q[RUBY_ENGINE_VERSION]} \(#{q[RUBY_VERSION]}\).*? \[#{
q[RbConfig::CONFIG["host_os"]]}-#{q[RbConfig::CONFIG["host_cpu"]]}\]$/
else
- /^ruby #{q[RUBY_VERSION]}(?:[p ]|dev|rc).*? \[#{q[RUBY_PLATFORM]}\]$/
+ /^ruby #{q[RUBY_VERSION]}(?:[p ]|dev|rc).*? (\+PRISM )?\[#{q[RUBY_PLATFORM]}\]$/
end
private_constant :VERSION_PATTERN
VERSION_PATTERN_WITH_RJIT =
case RUBY_ENGINE
when 'ruby'
- /^ruby #{q[RUBY_VERSION]}(?:[p ]|dev|rc).*? \+RJIT (\+MN )?\[#{q[RUBY_PLATFORM]}\]$/
+ /^ruby #{q[RUBY_VERSION]}(?:[p ]|dev|rc).*? \+RJIT (\+MN )?(\+PRISM )?\[#{q[RUBY_PLATFORM]}\]$/
else
VERSION_PATTERN
end
@@ -231,7 +237,7 @@ class TestRubyOptions < Test::Unit::TestCase
def test_kanji
assert_in_out_err(%w(-KU), "p '\u3042'") do |r, e|
- assert_equal("\"\u3042\"", r.join.force_encoding(Encoding::UTF_8))
+ assert_equal("\"\u3042\"", r.join('').force_encoding(Encoding::UTF_8))
end
line = '-eputs"\xc2\xa1".encoding'
env = {'RUBYOPT' => nil}
@@ -302,11 +308,8 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_parser_flag
- warning = /compiler based on the Prism parser is currently experimental/
-
- assert_in_out_err(%w(--parser=prism -e) + ["puts :hi"], "", %w(hi), warning)
- assert_in_out_err(%w(--parser=prism -W:no-experimental -e) + ["puts :hi"], "", %w(hi), [])
- assert_in_out_err(%w(--parser=prism -W:no-experimental --dump=parsetree -e _=:hi), "", /"hi"/, [])
+ assert_in_out_err(%w(--parser=prism -e) + ["puts :hi"], "", %w(hi), [])
+ assert_in_out_err(%w(--parser=prism --dump=parsetree -e _=:hi), "", /"hi"/, [])
assert_in_out_err(%w(--parser=parse.y -e) + ["puts :hi"], "", %w(hi), [])
assert_norun_with_rflag('--parser=parse.y', '--version', "")
@@ -359,12 +362,25 @@ class TestRubyOptions < Test::Unit::TestCase
d = Dir.tmpdir
assert_in_out_err(["-C", d, "-e", "puts Dir.pwd"]) do |r, e|
- assert_file.identical?(r.join, d)
+ assert_file.identical?(r.join(''), d)
assert_equal([], e)
end
+
+ Dir.mktmpdir(d) do |base|
+ # "test" in Japanese and N'Ko
+ test = base + "/\u{30c6 30b9 30c8}_\u{7e1 7ca 7dd 7cc 7df 7cd 7eb}"
+ Dir.mkdir(test)
+ assert_in_out_err(["-C", base, "-C", File.basename(test), "-e", "puts Dir.pwd"]) do |r, e|
+ assert_file.identical?(r.join(''), test)
+ assert_equal([], e)
+ end
+ Dir.rmdir(test)
+ end
end
def test_yydebug
+ omit if ParserSupport.prism_enabled_in_subprocess?
+
assert_in_out_err(["-ye", ""]) do |r, e|
assert_not_equal([], r)
assert_equal([], e)
@@ -390,16 +406,16 @@ class TestRubyOptions < Test::Unit::TestCase
def test_syntax_check
assert_in_out_err(%w(-cw -e a=1+1 -e !a), "", ["Syntax OK"], [])
- assert_in_out_err(%w(-cw -e break), "", [], ["-e:1: Invalid break", :*])
- assert_in_out_err(%w(-cw -e next), "", [], ["-e:1: Invalid next", :*])
- assert_in_out_err(%w(-cw -e redo), "", [], ["-e:1: Invalid redo", :*])
- assert_in_out_err(%w(-cw -e retry), "", [], ["-e:1: Invalid retry", :*])
- assert_in_out_err(%w(-cw -e yield), "", [], ["-e:1: Invalid yield", :*])
- assert_in_out_err(%w(-cw -e begin -e break -e end), "", [], ["-e:2: Invalid break", :*])
- assert_in_out_err(%w(-cw -e begin -e next -e end), "", [], ["-e:2: Invalid next", :*])
- assert_in_out_err(%w(-cw -e begin -e redo -e end), "", [], ["-e:2: Invalid redo", :*])
- assert_in_out_err(%w(-cw -e begin -e retry -e end), "", [], ["-e:2: Invalid retry", :*])
- assert_in_out_err(%w(-cw -e begin -e yield -e end), "", [], ["-e:2: Invalid yield", :*])
+ assert_in_out_err(%w(-cw -e break), "", [], [:*, /(-e:1:|~) Invalid break/, :*])
+ assert_in_out_err(%w(-cw -e next), "", [], [:*, /(-e:1:|~) Invalid next/, :*])
+ assert_in_out_err(%w(-cw -e redo), "", [], [:*, /(-e:1:|~) Invalid redo/, :*])
+ assert_in_out_err(%w(-cw -e retry), "", [], [:*, /(-e:1:|~) Invalid retry/, :*])
+ assert_in_out_err(%w(-cw -e yield), "", [], [:*, /(-e:1:|~) Invalid yield/, :*])
+ assert_in_out_err(%w(-cw -e begin -e break -e end), "", [], [:*, /(-e:2:|~) Invalid break/, :*])
+ assert_in_out_err(%w(-cw -e begin -e next -e end), "", [], [:*, /(-e:2:|~) Invalid next/, :*])
+ assert_in_out_err(%w(-cw -e begin -e redo -e end), "", [], [:*, /(-e:2:|~) Invalid redo/, :*])
+ assert_in_out_err(%w(-cw -e begin -e retry -e end), "", [], [:*, /(-e:2:|~) Invalid retry/, :*])
+ assert_in_out_err(%w(-cw -e begin -e yield -e end), "", [], [:*, /(-e:2:|~) Invalid yield/, :*])
assert_in_out_err(%w(-cw -e !defined?(break)), "", ["Syntax OK"], [])
assert_in_out_err(%w(-cw -e !defined?(next)), "", ["Syntax OK"], [])
assert_in_out_err(%w(-cw -e !defined?(redo)), "", ["Syntax OK"], [])
@@ -860,6 +876,8 @@ class TestRubyOptions < Test::Unit::TestCase
end
def assert_segv(args, message=nil, list: SEGVTest::ExpectedStderrList, **opt, &block)
+ pend "macOS 15 beta is not working with this assertion" if macos?(15)
+
# We want YJIT to be enabled in the subprocess if it's enabled for us
# so that the Ruby description matches.
env = Hash === args.first ? args.shift : {}
@@ -903,6 +921,8 @@ class TestRubyOptions < Test::Unit::TestCase
end
def assert_crash_report(path, cmd = nil, &block)
+ pend "macOS 15 beta is not working with this assertion" if macos?(15)
+
Dir.mktmpdir("ruby_crash_report") do |dir|
list = SEGVTest::ExpectedStderrList
if cmd
@@ -1172,6 +1192,8 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_dump_parsetree_error_tolerant
+ omit if ParserSupport.prism_enabled_in_subprocess?
+
assert_in_out_err(['--dump=parse', '-e', 'begin'],
"", [], /unexpected end-of-input/, success: false)
assert_in_out_err(['--dump=parse', '--dump=+error_tolerant', '-e', 'begin'],
@@ -1208,15 +1230,12 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_frozen_string_literal_debug
- default_frozen = eval("'test'").frozen?
-
with_debug_pat = /created at/
wo_debug_pat = /can\'t modify frozen String: "\w+" \(FrozenError\)\n\z/
frozen = [
["--enable-frozen-string-literal", true],
["--disable-frozen-string-literal", false],
]
- frozen << [nil, false] unless default_frozen
debugs = [
["--debug-frozen-string-literal", true],
@@ -1239,6 +1258,17 @@ class TestRubyOptions < Test::Unit::TestCase
end
end
+ def test_frozen_string_literal_debug_chilled_strings
+ code = <<~RUBY
+ "foo" << "bar"
+ RUBY
+ warning = ["-:1: warning: literal string will be frozen in the future"]
+ assert_in_out_err(["-W:deprecated"], code, [], warning)
+ assert_in_out_err(["-W:deprecated", "--debug-frozen-string-literal"], code, [], warning)
+ assert_in_out_err(["-W:deprecated", "--disable-frozen-string-literal", "--debug-frozen-string-literal"], code, [], [])
+ assert_in_out_err(["-W:deprecated", "--enable-frozen-string-literal", "--debug-frozen-string-literal"], code, [], ["-:1:in '<main>': can't modify frozen String: \"foo\", created at -:1 (FrozenError)"])
+ end
+
def test___dir__encoding
lang = {"LC_ALL"=>ENV["LC_ALL"]||ENV["LANG"]}
with_tmpchdir do
diff --git a/test/ruby/test_rubyvm.rb b/test/ruby/test_rubyvm.rb
index 053a914a8a..225cb45f33 100644
--- a/test/ruby/test_rubyvm.rb
+++ b/test/ruby/test_rubyvm.rb
@@ -1,5 +1,6 @@
# frozen_string_literal: false
require 'test/unit'
+require_relative '../lib/parser_support'
class TestRubyVM < Test::Unit::TestCase
def test_stat
@@ -32,7 +33,7 @@ class TestRubyVM < Test::Unit::TestCase
end
def test_keep_script_lines
- omit if compiling_with_prism?
+ omit if ParserSupport.prism_enabled?
pend if ENV['RUBY_ISEQ_DUMP_DEBUG'] # TODO
prev_conf = RubyVM.keep_script_lines
@@ -69,12 +70,4 @@ class TestRubyVM < Test::Unit::TestCase
ensure
RubyVM.keep_script_lines = prev_conf
end
-
- private
-
- # RubyVM.keep_script_lines does not mean anything in the context of prism, so
- # we should omit tests that are looking for that functionality.
- def compiling_with_prism?
- RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism
- end
end
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 1251f8879f..868015947e 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -232,7 +232,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["line", 5, :meth_return, self.class],
events.shift)
- assert_equal(["return", 7, :meth_return, self.class],
+ assert_equal(["line", 6, :meth_return, self.class],
+ events.shift)
+ assert_equal(["return", 6, :meth_return, self.class],
events.shift)
assert_equal(["line", 10, :test_return, self.class],
events.shift)
@@ -271,7 +273,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["line", 6, :meth_return2, self.class],
events.shift)
- assert_equal(["return", 7, :meth_return2, self.class],
+ assert_equal(["return", 6, :meth_return2, self.class],
events.shift)
assert_equal(["line", 9, :test_return2, self.class],
events.shift)
@@ -454,6 +456,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
bug3921 = '[ruby-dev:42350]'
ok = false
func = lambda{|e, f, l, i, b, k|
+ # In parallel testing, unexpected events like IO operations may be traced,
+ # so we filter out events here.
+ next unless f == __FILE__
set_trace_func(nil)
ok = eval("self", b)
}
@@ -1371,9 +1376,11 @@ CODE
def test_a_call
events = []
+ log = []
TracePoint.new(:a_call){|tp|
next if !target_thread?
events << tp.event
+ log << "| event:#{ tp.event } method_id:#{ tp.method_id } #{ tp.path }:#{ tp.lineno }"
}.enable{
[1].map{
3
@@ -1388,14 +1395,16 @@ CODE
:b_call,
:call,
:b_call,
- ], events)
+ ], events, "TracePoint log:\n#{ log.join("\n") }\n")
end
def test_a_return
events = []
+ log = []
TracePoint.new(:a_return){|tp|
next if !target_thread?
events << tp.event
+ log << "| event:#{ tp.event } method_id:#{ tp.method_id } #{ tp.path }:#{ tp.lineno }"
}.enable{
[1].map{
3
@@ -1410,7 +1419,7 @@ CODE
:b_return,
:return,
:b_return
- ], events)
+ ], events, "TracePoint log:\n#{ log.join("\n") }\n")
end
def test_const_missing
@@ -2298,7 +2307,7 @@ CODE
_c = a + b
end
- def check_with_events *trace_events
+ def check_with_events(trace_point_events, expected_events = trace_point_events)
all_events = [[:call, :method_for_enable_target1],
[:line, :method_for_enable_target1],
[:line, :method_for_enable_target1],
@@ -2320,7 +2329,7 @@ CODE
[:return, :method_for_enable_target1],
]
events = []
- TracePoint.new(*trace_events) do |tp|
+ TracePoint.new(*trace_point_events) do |tp|
next unless target_thread?
events << [tp.event, tp.method_id]
end.enable(target: method(:method_for_enable_target1)) do
@@ -2328,15 +2337,22 @@ CODE
method_for_enable_target2
method_for_enable_target1
end
- assert_equal all_events.find_all{|(ev)| trace_events.include? ev}, events
+
+ assert_equal all_events.keep_if { |(ev)| expected_events.include? ev }, events
end
def test_tracepoint_enable_target
- check_with_events :line
- check_with_events :call, :return
- check_with_events :line, :call, :return
- check_with_events :call, :return, :b_call, :b_return
- check_with_events :line, :call, :return, :b_call, :b_return
+ check_with_events([:line])
+ check_with_events([:call, :return])
+ check_with_events([:line, :call, :return])
+ check_with_events([:call, :return, :b_call, :b_return])
+ check_with_events([:line, :call, :return, :b_call, :b_return])
+
+ # No arguments passed into TracePoint.new enables all ISEQ_TRACE_EVENTS
+ check_with_events([], [:line, :class, :end, :call, :return, :c_call, :c_return, :b_call, :b_return, :rescue])
+
+ # Raise event should be ignored
+ check_with_events([:line, :raise])
end
def test_tracepoint_nested_enabled_with_target
diff --git a/test/ruby/test_sleep.rb b/test/ruby/test_sleep.rb
index 61002b8b18..991b73ebd5 100644
--- a/test/ruby/test_sleep.rb
+++ b/test/ruby/test_sleep.rb
@@ -4,14 +4,13 @@ require 'etc'
class TestSleep < Test::Unit::TestCase
def test_sleep_5sec
- GC.disable
- start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
- sleep 5
- slept = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
- bottom = 5.0
- assert_operator(slept, :>=, bottom)
- assert_operator(slept, :<=, 6.0, "[ruby-core:18015]: longer than expected")
- ensure
- GC.enable
+ EnvUtil.without_gc do
+ start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
+ sleep 5
+ slept = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
+ bottom = 5.0
+ assert_operator(slept, :>=, bottom)
+ assert_operator(slept, :<=, 6.0, "[ruby-core:18015]: longer than expected")
+ end
end
end
diff --git a/test/ruby/test_sprintf.rb b/test/ruby/test_sprintf.rb
index c453ecd350..8cf2c63a20 100644
--- a/test/ruby/test_sprintf.rb
+++ b/test/ruby/test_sprintf.rb
@@ -266,8 +266,8 @@ class TestSprintf < Test::Unit::TestCase
# Specifying the precision multiple times with negative star arguments:
assert_raise(ArgumentError, "[ruby-core:11570]") {sprintf("%.*.*.*.*f", -1, -1, -1, 5, 1)}
- # Null bytes after percent signs are removed:
- assert_equal("%\0x hello", sprintf("%\0x hello"), "[ruby-core:11571]")
+ assert_raise(ArgumentError) {sprintf("%\0x hello")}
+ assert_raise(ArgumentError) {sprintf("%\nx hello")}
assert_raise(ArgumentError, "[ruby-core:11573]") {sprintf("%.25555555555555555555555555555555555555s", "hello")}
@@ -279,10 +279,9 @@ class TestSprintf < Test::Unit::TestCase
assert_raise_with_message(ArgumentError, /unnumbered\(1\) mixed with numbered/) { sprintf("%1$*d", 3) }
assert_raise_with_message(ArgumentError, /unnumbered\(1\) mixed with numbered/) { sprintf("%1$.*d", 3) }
- verbose, $VERBOSE = $VERBOSE, nil
- assert_nothing_raised { sprintf("", 1) }
- ensure
- $VERBOSE = verbose
+ assert_warning(/too many arguments/) do
+ sprintf("", 1)
+ end
end
def test_float
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index ebe85dac82..8658097ae4 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -1971,6 +1971,22 @@ CODE
assert_nil($&)
end
+ def test_start_with_timeout_memory_leak
+ assert_no_memory_leak([], "#{<<~"begin;"}", "#{<<~'end;'}", "[Bug #20653]", rss: true)
+ regex = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
+ str = "a" * 1_000_000 + "x"
+
+ code = proc do
+ str.start_with?(regex)
+ rescue
+ end
+
+ 10.times(&code)
+ begin;
+ 1_000.times(&code)
+ end;
+ end
+
def test_strip
assert_equal(S("x"), S(" x ").strip)
assert_equal(S("x"), S(" \n\r\t x \t\r\n\n ").strip)
@@ -3614,20 +3630,68 @@ CODE
assert_bytesplice_raise(ArgumentError, S("hello"), 0..-1, "bye", 0, 3)
end
+ def test_append_bytes_into_binary
+ buf = S("".b)
+ assert_equal Encoding::BINARY, buf.encoding
+
+ buf.append_as_bytes(S("hello"))
+ assert_equal "hello".b, buf
+ assert_equal Encoding::BINARY, buf.encoding
+
+ buf.append_as_bytes(S("ã“ã‚“ã«ã¡ã¯"))
+ assert_equal S("helloã“ã‚“ã«ã¡ã¯".b), buf
+ assert_equal Encoding::BINARY, buf.encoding
+ end
+
+ def test_append_bytes_into_utf8
+ buf = S("")
+ assert_equal Encoding::UTF_8, buf.encoding
+
+ buf.append_as_bytes(S("hello"))
+ assert_equal S("hello"), buf
+ assert_equal Encoding::UTF_8, buf.encoding
+ assert_predicate buf, :ascii_only?
+ assert_predicate buf, :valid_encoding?
+
+ buf.append_as_bytes(S("ã“ã‚“ã«ã¡ã¯"))
+ assert_equal S("helloã“ã‚“ã«ã¡ã¯"), buf
+ assert_equal Encoding::UTF_8, buf.encoding
+ refute_predicate buf, :ascii_only?
+ assert_predicate buf, :valid_encoding?
+
+ buf.append_as_bytes(S("\xE2\x82".b))
+ assert_equal S("helloã“ã‚“ã«ã¡ã¯\xE2\x82"), buf
+ assert_equal Encoding::UTF_8, buf.encoding
+ refute_predicate buf, :valid_encoding?
+
+ buf.append_as_bytes(S("\xAC".b))
+ assert_equal S("helloã“ã‚“ã«ã¡ã¯â‚¬"), buf
+ assert_equal Encoding::UTF_8, buf.encoding
+ assert_predicate buf, :valid_encoding?
+ end
+
+ def test_append_bytes_into_utf32
+ buf = S("abc".encode(Encoding::UTF_32LE))
+ assert_equal Encoding::UTF_32LE, buf.encoding
+
+ buf.append_as_bytes("def")
+ assert_equal Encoding::UTF_32LE, buf.encoding
+ refute_predicate buf, :valid_encoding?
+ end
+
def test_chilled_string
chilled_string = eval('"chilled"')
- # Chilled strings pretend to be frozen
- assert_predicate chilled_string, :frozen?
+ assert_not_predicate chilled_string, :frozen?
assert_not_predicate chilled_string.dup, :frozen?
- assert_predicate chilled_string.clone, :frozen?
+ assert_not_predicate chilled_string.clone, :frozen?
# @+ treat the original string as frozen
assert_not_predicate(+chilled_string, :frozen?)
assert_not_same chilled_string, +chilled_string
- # @- the original string as mutable
+ # @- treat the original string as mutable
assert_predicate(-chilled_string, :frozen?)
assert_not_same chilled_string, -chilled_string
end
diff --git a/test/ruby/test_string_memory.rb b/test/ruby/test_string_memory.rb
index 3b4694f36f..a93a3bd54a 100644
--- a/test/ruby/test_string_memory.rb
+++ b/test/ruby/test_string_memory.rb
@@ -6,21 +6,31 @@ class TestStringMemory < Test::Unit::TestCase
def capture_allocations(klass)
allocations = []
- GC.start
- GC.disable
- generation = GC.count
+ EnvUtil.without_gc do
+ GC.start
+ generation = GC.count
- ObjectSpace.trace_object_allocations do
- yield
+ ObjectSpace.trace_object_allocations do
+ yield
- ObjectSpace.each_object(klass) do |instance|
- allocations << instance if ObjectSpace.allocation_generation(instance) == generation
+ ObjectSpace.each_object(klass) do |instance|
+ allocations << instance if ObjectSpace.allocation_generation(instance) == generation
+ end
end
- end
- return allocations
- ensure
- GC.enable
+ return allocations.map do |instance|
+ [
+ ObjectSpace.allocation_sourcefile(instance),
+ ObjectSpace.allocation_sourceline(instance),
+ instance.class,
+ instance,
+ ]
+ end.select do |path,|
+ # drop strings not created in this file
+ # (the parallel testing framework may create strings in a separate thread)
+ path == __FILE__
+ end
+ end
end
def test_byteslice_prefix
@@ -30,7 +40,7 @@ class TestStringMemory < Test::Unit::TestCase
string.byteslice(0, 50_000)
end
- assert_equal 1, allocations.size
+ assert_equal 1, allocations.size, "One object allocation is expected, but allocated: #{ allocations.inspect }"
end
def test_byteslice_postfix
@@ -40,7 +50,7 @@ class TestStringMemory < Test::Unit::TestCase
string.byteslice(50_000, 100_000)
end
- assert_equal 1, allocations.size
+ assert_equal 1, allocations.size, "One object allocation is expected, but allocated: #{ allocations.inspect }"
end
def test_byteslice_postfix_twice
@@ -50,6 +60,6 @@ class TestStringMemory < Test::Unit::TestCase
string.byteslice(50_000, 100_000).byteslice(25_000, 50_000)
end
- assert_equal 2, allocations.size
+ assert_equal 2, allocations.size, "Two object allocations are expected, but allocated: #{ allocations.inspect }"
end
end
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb
index ce78e66c52..418f293f66 100644
--- a/test/ruby/test_super.rb
+++ b/test/ruby/test_super.rb
@@ -8,6 +8,7 @@ class TestSuper < Test::Unit::TestCase
def array(*a) a end
def optional(a = 0) a end
def keyword(**a) a end
+ def forward(*a) a end
end
class Single1 < Base
def single(*) super end
@@ -63,6 +64,16 @@ class TestSuper < Test::Unit::TestCase
[x, y]
end
end
+ class Forward < Base
+ def forward(...)
+ w = super()
+ x = super
+ y = super(...)
+ a = 1
+ z = super(a, ...)
+ [w, x, y, z]
+ end
+ end
def test_single1
assert_equal(1, Single1.new.single(1))
@@ -133,6 +144,11 @@ class TestSuper < Test::Unit::TestCase
def test_keyword2
assert_equal([{foo: "changed1"}, {foo: "changed2"}], Keyword2.new.keyword)
end
+ def test_forwardable(...)
+ assert_equal([[],[],[],[1]], Forward.new.forward())
+ assert_equal([[],[1,2],[1,2],[1,1,2]], Forward.new.forward(1,2))
+ assert_equal([[],[:test],[:test],[1,:test]], Forward.new.forward(:test, ...))
+ end
class A
def tt(aa)
@@ -617,6 +633,35 @@ class TestSuper < Test::Unit::TestCase
}
end
+ def test_super_with_included_prepended_module_method_caching_bug_20716
+ a = Module.new do
+ def test(*args)
+ super
+ end
+ end
+
+ b = Module.new do
+ def test(a)
+ a
+ end
+ end
+
+ c = Class.new
+
+ b.prepend(a)
+ c.include(b)
+
+ assert_equal(1, c.new.test(1))
+
+ b.class_eval do
+ def test
+ :test
+ end
+ end
+
+ assert_equal(:test, c.new.test)
+ end
+
class TestFor_super_with_modified_rest_parameter_base
def foo *args
args
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 41b71097d1..c50febf5d1 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -90,12 +90,15 @@ class TestSymbol < Test::Unit::TestCase
end
def test_inspect_dollar
+ verbose_bak, $VERBOSE = $VERBOSE, nil
# 4) :$- always treats next character literally:
assert_raise(SyntaxError) {eval ':$-'}
assert_raise(SyntaxError) {eval ":$-\n"}
assert_raise(SyntaxError) {eval ":$- "}
assert_raise(SyntaxError) {eval ":$-#"}
assert_raise(SyntaxError) {eval ':$-('}
+ ensure
+ $VERBOSE = verbose_bak
end
def test_inspect_number
@@ -120,8 +123,7 @@ class TestSymbol < Test::Unit::TestCase
def test_inspect_under_gc_compact_stress
omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077
- omit "very flaky on many platforms, more so with YJIT enabled" if defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
- omit "very flaky on many platforms, more so with RJIT enabled" if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
+
EnvUtil.under_gc_compact_stress do
assert_inspect_evaled(':testing')
end
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 7b894eee79..5c341a69b7 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -208,7 +208,7 @@ class TestSyntax < Test::Unit::TestCase
blocks = [['do end', 'do'], ['{}', 'brace']],
*|
[%w'. dot', %w':: colon'].product(methods, blocks) do |(c, n1), (m, n2), (b, n3)|
- m = m.tr_s('()', ' ').strip if n2 == 'do'
+ m = m.tr_s('()', ' ').strip if n3 == 'do'
name = "test_#{n3}_block_after_blockcall_#{n1}_#{n2}_arg"
code = "#{blockcall}#{c}#{m} #{b}"
define_method(name) {assert_valid_syntax(code, bug6115)}
@@ -330,7 +330,12 @@ class TestSyntax < Test::Unit::TestCase
bug10315 = '[ruby-core:65368] [Bug #10315]'
o = KW2.new
- assert_equal([23, 2], o.kw(**{k1: 22}, **{k1: 23}), bug10315)
+ begin
+ verbose_bak, $VERBOSE = $VERBOSE, nil
+ assert_equal([23, 2], eval("o.kw(**{k1: 22}, **{k1: 23})"), bug10315)
+ ensure
+ $VERBOSE = verbose_bak
+ end
h = {k3: 31}
assert_raise(ArgumentError) {o.kw(**h)}
@@ -392,12 +397,11 @@ class TestSyntax < Test::Unit::TestCase
end
def test_keyword_self_reference
- message = /circular argument reference - var/
- assert_syntax_error("def foo(var: defined?(var)) var end", message)
- assert_syntax_error("def foo(var: var) var end", message)
- assert_syntax_error("def foo(var: bar(var)) var end", message)
- assert_syntax_error("def foo(var: bar {var}) var end", message)
- assert_syntax_error("def foo(var: (1 in ^var)); end", message)
+ assert_valid_syntax("def foo(var: defined?(var)) var end")
+ assert_valid_syntax("def foo(var: var) var end")
+ assert_valid_syntax("def foo(var: bar(var)) var end")
+ assert_valid_syntax("def foo(var: bar {var}) var end")
+ assert_valid_syntax("def foo(var: (1 in ^var)); end")
o = Object.new
assert_warn("") do
@@ -423,6 +427,9 @@ class TestSyntax < Test::Unit::TestCase
assert_warn("") do
o.instance_eval("proc {|var: 1| var}")
end
+
+ o = Object.new
+ assert_nil(o.instance_eval("def foo(bar: bar) = bar; foo"))
end
def test_keyword_invalid_name
@@ -456,14 +463,13 @@ class TestSyntax < Test::Unit::TestCase
end
def test_optional_self_reference
- message = /circular argument reference - var/
- assert_syntax_error("def foo(var = defined?(var)) var end", message)
- assert_syntax_error("def foo(var = var) var end", message)
- assert_syntax_error("def foo(var = bar(var)) var end", message)
- assert_syntax_error("def foo(var = bar {var}) var end", message)
- assert_syntax_error("def foo(var = (def bar;end; var)) var end", message)
- assert_syntax_error("def foo(var = (def self.bar;end; var)) var end", message)
- assert_syntax_error("def foo(var = (1 in ^var)); end", message)
+ assert_valid_syntax("def foo(var = defined?(var)) var end")
+ assert_valid_syntax("def foo(var = var) var end")
+ assert_valid_syntax("def foo(var = bar(var)) var end")
+ assert_valid_syntax("def foo(var = bar {var}) var end")
+ assert_valid_syntax("def foo(var = (def bar;end; var)) var end")
+ assert_valid_syntax("def foo(var = (def self.bar;end; var)) var end")
+ assert_valid_syntax("def foo(var = (1 in ^var)); end")
o = Object.new
assert_warn("") do
@@ -489,6 +495,9 @@ class TestSyntax < Test::Unit::TestCase
assert_warn("") do
o.instance_eval("proc {|var = 1| var}")
end
+
+ o = Object.new
+ assert_nil(o.instance_eval("def foo(bar: bar) = bar; foo"))
end
def test_warn_grouped_expression
@@ -506,10 +515,6 @@ class TestSyntax < Test::Unit::TestCase
end
def test_warn_balanced
- warning = <<WARN
-test:1: warning: '%s' after local variable or literal is interpreted as binary operator
-test:1: warning: even though it seems like %s
-WARN
[
[:**, "argument prefix"],
[:*, "argument prefix"],
@@ -523,7 +528,9 @@ WARN
all_assertions do |a|
["puts 1 #{op}0", "puts :a #{op}0", "m = 1; puts m #{op}0"].each do |src|
a.for(src) do
- assert_warning(warning % [op, syn], src) do
+ warning = /'#{Regexp.escape(op)}' after local variable or literal is interpreted as binary operator.+?even though it seems like #{syn}/m
+
+ assert_warning(warning, src) do
assert_valid_syntax(src, "test", verbose: true)
end
end
@@ -715,8 +722,8 @@ WARN
end
def test_duplicated_when
- w = 'warning: duplicated \'when\' clause with line 3 is ignored'
- assert_warning(/3: #{w}.+4: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m) {
+ w = ->(line) { "warning: 'when' clause on line #{line} duplicates 'when' clause on line 3 and is ignored" }
+ assert_warning(/#{w[3]}.+#{w[4]}.+#{w[4]}.+#{w[5]}.+#{w[5]}/m) {
eval %q{
case 1
when 1, 1
@@ -725,7 +732,7 @@ WARN
end
}
}
- assert_warning(/#{w}/) {#/3: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m){
+ assert_warning(/#{w[3]}.+#{w[4]}.+#{w[5]}.+#{w[5]}/m) {
a = a = 1
eval %q{
case 1
@@ -735,7 +742,7 @@ WARN
end
}
}
- assert_warning(/3: #{w}/m) {
+ assert_warning(/#{w[3]}/) {
eval %q{
case 1
when __LINE__, __LINE__
@@ -744,7 +751,7 @@ WARN
end
}
}
- assert_warning(/3: #{w}/m) {
+ assert_warning(/#{w[3]}/) {
eval %q{
case 1
when __FILE__, __FILE__
@@ -756,7 +763,7 @@ WARN
end
def test_duplicated_when_check_option
- w = /duplicated \'when\' clause with line 3 is ignored/
+ w = /'when' clause on line 4 duplicates 'when' clause on line 3 and is ignored/
assert_in_out_err(%[-wc], "#{<<~"begin;"}\n#{<<~'end;'}", ["Syntax OK"], w)
begin;
case 1
@@ -1248,6 +1255,20 @@ eom
assert_syntax_error("a&.x,=0", /multiple assignment destination/)
end
+ def test_safe_call_in_for_variable
+ assert_valid_syntax("for x&.bar in []; end")
+ assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ foo = nil
+ for foo&.bar in [1]; end
+ assert_nil(foo)
+
+ foo = Struct.new(:bar).new
+ for foo&.bar in [1]; end
+ assert_equal(1, foo.bar)
+ end;
+ end
+
def test_no_warning_logop_literal
assert_warning("") do
eval("true||raise;nil")
@@ -1371,7 +1392,7 @@ eom
def test_block_after_cmdarg_in_paren
bug11873 = '[ruby-core:72482] [Bug #11873]'
- def bug11873.p(*);end;
+ def bug11873.p(*, &);end;
assert_raise(LocalJumpError, bug11873) do
bug11873.instance_eval do
@@ -1587,13 +1608,13 @@ eom
end
def test_syntax_error_at_newline
- expected = "\n ^"
+ expected = /(\n|\| ) \^/
assert_syntax_error("%[abcdef", expected)
assert_syntax_error("%[abcdef\n", expected)
end
def test_invalid_jump
- assert_in_out_err(%w[-e redo], "", [], /^-e:1: /)
+ assert_in_out_err(%w[-e redo], "", [], /^-e:1: |~ Invalid redo/)
end
def test_keyword_not_parens
@@ -1813,6 +1834,10 @@ eom
assert_valid_syntax('a.b (;),(),()', bug19281)
end
+ def test_command_do_block_call_with_empty_args_brace_block
+ assert_valid_syntax('cmd 1, 2 do end.m() { blk_body }')
+ end
+
def test_numbered_parameter
assert_valid_syntax('proc {_1}')
assert_equal(3, eval('[1,2].then {_1+_2}'))
@@ -1910,7 +1935,7 @@ eom
]
end
assert_valid_syntax('proc {def foo(_);end;it}')
- assert_syntax_error('p { [it **2] }', /unexpected \*\*arg/)
+ assert_syntax_error('p { [it **2] }', /unexpected \*\*/)
end
def test_value_expr_in_condition
@@ -2236,7 +2261,7 @@ eom
end
end
- def caller_lineno(*)
+ def caller_lineno(*, &)
caller_locations(1, 1)[0].lineno
end
end
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index da14c429e6..6620ccbf33 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -3,7 +3,6 @@
require 'test/unit'
require "rbconfig/sizeof"
require "timeout"
-require "fiddle"
class TestThread < Test::Unit::TestCase
class Thread < ::Thread
@@ -1446,13 +1445,16 @@ q.pop
end
def test_thread_native_thread_id_across_fork_on_linux
- rtld_default = Fiddle.dlopen(nil)
- omit "this test is only for Linux" unless rtld_default.sym_defined?('gettid')
-
- gettid = Fiddle::Function.new(rtld_default['gettid'], [], Fiddle::TYPE_INT)
+ begin
+ require '-test-/thread/id'
+ rescue LoadError
+ omit "this test is only for Linux"
+ else
+ extend Bug::ThreadID
+ end
parent_thread_id = Thread.main.native_thread_id
- real_parent_thread_id = gettid.call
+ real_parent_thread_id = gettid
assert_equal real_parent_thread_id, parent_thread_id
@@ -1464,7 +1466,7 @@ q.pop
else
# child
puts Thread.main.native_thread_id
- puts gettid.call
+ puts gettid
end
end
child_thread_id = child_lines[0].chomp.to_i
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index 2a541bbe8c..99ee84f247 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -1444,4 +1444,63 @@ class TestTime < Test::Unit::TestCase
def test_parse_zero_bigint
assert_equal 0, Time.new("2020-10-28T16:48:07.000Z").nsec, '[Bug #19390]'
end
+
+ def test_xmlschema_encode
+ [:xmlschema, :iso8601].each do |method|
+ bug6100 = '[ruby-core:42997]'
+
+ t = Time.utc(2001, 4, 17, 19, 23, 17, 300000)
+ assert_equal("2001-04-17T19:23:17Z", t.__send__(method))
+ assert_equal("2001-04-17T19:23:17.3Z", t.__send__(method, 1))
+ assert_equal("2001-04-17T19:23:17.300000Z", t.__send__(method, 6))
+ assert_equal("2001-04-17T19:23:17.3000000Z", t.__send__(method, 7))
+ assert_equal("2001-04-17T19:23:17.3Z", t.__send__(method, 1.9), bug6100)
+
+ t = Time.utc(2001, 4, 17, 19, 23, 17, 123456)
+ assert_equal("2001-04-17T19:23:17.1234560Z", t.__send__(method, 7))
+ assert_equal("2001-04-17T19:23:17.123456Z", t.__send__(method, 6))
+ assert_equal("2001-04-17T19:23:17.12345Z", t.__send__(method, 5))
+ assert_equal("2001-04-17T19:23:17.1Z", t.__send__(method, 1))
+ assert_equal("2001-04-17T19:23:17.1Z", t.__send__(method, 1.9), bug6100)
+
+ t = Time.at(2.quo(3)).getlocal("+09:00")
+ assert_equal("1970-01-01T09:00:00.666+09:00", t.__send__(method, 3))
+ assert_equal("1970-01-01T09:00:00.6666666666+09:00", t.__send__(method, 10))
+ assert_equal("1970-01-01T09:00:00.66666666666666666666+09:00", t.__send__(method, 20))
+ assert_equal("1970-01-01T09:00:00.6+09:00", t.__send__(method, 1.1), bug6100)
+ assert_equal("1970-01-01T09:00:00.666+09:00", t.__send__(method, 3.2), bug6100)
+
+ t = Time.at(123456789.quo(9999999999)).getlocal("+09:00")
+ assert_equal("1970-01-01T09:00:00.012+09:00", t.__send__(method, 3))
+ assert_equal("1970-01-01T09:00:00.012345678+09:00", t.__send__(method, 9))
+ assert_equal("1970-01-01T09:00:00.0123456789+09:00", t.__send__(method, 10))
+ assert_equal("1970-01-01T09:00:00.0123456789012345678+09:00", t.__send__(method, 19))
+ assert_equal("1970-01-01T09:00:00.01234567890123456789+09:00", t.__send__(method, 20))
+ assert_equal("1970-01-01T09:00:00.012+09:00", t.__send__(method, 3.8), bug6100)
+
+ t = Time.utc(1)
+ assert_equal("0001-01-01T00:00:00Z", t.__send__(method))
+
+ begin
+ Time.at(-1)
+ rescue ArgumentError
+ # ignore
+ else
+ t = Time.utc(1960, 12, 31, 23, 0, 0, 123456)
+ assert_equal("1960-12-31T23:00:00.123456Z", t.__send__(method, 6))
+ end
+
+ t = get_t2000.getlocal("-09:30") # Pacific/Marquesas
+ assert_equal("1999-12-31T14:30:00-09:30", t.__send__(method))
+
+ assert_equal("10000-01-01T00:00:00Z", Time.utc(10000).__send__(method))
+ assert_equal("9999-01-01T00:00:00Z", Time.utc(9999).__send__(method))
+ assert_equal("0001-01-01T00:00:00Z", Time.utc(1).__send__(method)) # 1 AD
+ assert_equal("0000-01-01T00:00:00Z", Time.utc(0).__send__(method)) # 1 BC
+ assert_equal("-0001-01-01T00:00:00Z", Time.utc(-1).__send__(method)) # 2 BC
+ assert_equal("-0004-01-01T00:00:00Z", Time.utc(-4).__send__(method)) # 5 BC
+ assert_equal("-9999-01-01T00:00:00Z", Time.utc(-9999).__send__(method))
+ assert_equal("-10000-01-01T00:00:00Z", Time.utc(-10000).__send__(method))
+ end
+ end
end
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb
index ceef19e7ea..63d37f4ba4 100644
--- a/test/ruby/test_transcode.rb
+++ b/test/ruby/test_transcode.rb
@@ -661,6 +661,25 @@ class TestTranscode < Test::Unit::TestCase
check_both_ways("\u00A0", "\xFF", 'IBM863') # non-breaking space
end
+ def test_IBM864
+ check_both_ways("\u00B0", "\x80", 'IBM864') # °
+ check_both_ways("\u2518", "\x8F", 'IBM864') # ┘
+ check_both_ways("\u03B2", "\x90", 'IBM864') # β
+ check_both_ways("\uFE73", "\x9F", 'IBM864') # ï¹³
+ check_both_ways("\u00A0", "\xA0", 'IBM864') # non-breaking space
+ check_both_ways("\uFEA5", "\xAF", 'IBM864') # ﺥ
+ check_both_ways("\u0660", "\xB0", 'IBM864') # Ù 
+ check_both_ways("\u061F", "\xBF", 'IBM864') # ØŸ
+ check_both_ways("\u00A2", "\xC0", 'IBM864') # ¢
+ check_both_ways("\uFEA9", "\xCF", 'IBM864') # ﺩ
+ check_both_ways("\uFEAB", "\xD0", 'IBM864') # ﺫ
+ check_both_ways("\uFEC9", "\xDF", 'IBM864') # ﻉ
+ check_both_ways("\u0640", "\xE0", 'IBM864') # Ù€
+ check_both_ways("\uFEE1", "\xEF", 'IBM864') # ﻡ
+ check_both_ways("\uFE7D", "\xF0", 'IBM864') # ï¹½
+ check_both_ways("\u25A0", "\xFE", 'IBM864') # â– 
+ end
+
def test_IBM865
check_both_ways("\u00C7", "\x80", 'IBM865') # Ç
check_both_ways("\u00C5", "\x8F", 'IBM865') # Ã…
@@ -1615,6 +1634,8 @@ class TestTranscode < Test::Unit::TestCase
assert_equal("\e$B%*!+%,%I%J!+%N!+%P%\\%^!+%Q%]%\"\e(B".force_encoding("cp50220"),
"\xB5\xDE\xB6\xDE\xC4\xDE\xC5\xDE\xC9\xDE\xCA\xDE\xCE\xDE\xCF\xDE\xCA\xDF\xCE\xDF\xB1".
encode("cp50220", "sjis"))
+ assert_equal("\e$B\x21\x23\e(I\x7E\e(B".force_encoding("cp50220"),
+ "\x8E\xA1\x8E\xFE".encode("cp50220", "cp51932"))
end
def test_iso_2022_jp_1
diff --git a/test/ruby/test_vm_dump.rb b/test/ruby/test_vm_dump.rb
index c718f69316..22afee7a24 100644
--- a/test/ruby/test_vm_dump.rb
+++ b/test/ruby/test_vm_dump.rb
@@ -4,8 +4,10 @@ require 'test/unit'
return unless /darwin/ =~ RUBY_PLATFORM
class TestVMDump < Test::Unit::TestCase
- def assert_darwin_vm_dump_works(args)
- assert_in_out_err(args, "", [], /^\[IMPORTANT\]/)
+ def assert_darwin_vm_dump_works(args, timeout=nil)
+ pend "macOS 15 beta is not working with this assertion" if macos?(15)
+
+ assert_in_out_err(args, "", [], /^\[IMPORTANT\]/, timeout: timeout || 300)
end
def test_darwin_invalid_call
diff --git a/test/ruby/test_warning.rb b/test/ruby/test_warning.rb
new file mode 100644
index 0000000000..cd220ff00f
--- /dev/null
+++ b/test/ruby/test_warning.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+require 'test/unit'
+
+class TestWarning < Test::Unit::TestCase
+ def test_warn_called_only_when_category_enabled
+ # Assert that warn is called when the category is enabled
+ assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ Warning[:deprecated] = true
+ $warnings = []
+ def Warning.warn(msg, category:)
+ $warnings << [msg, category]
+ end
+ assert_equal(0, $warnings.length)
+ "" << 12
+ assert_equal(1, $warnings.length)
+ end;
+
+ assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ Warning[:deprecated] = false
+ $warnings = []
+ def Warning.warn(msg, category:)
+ $warnings << [msg, category]
+ end
+ assert_equal(0, $warnings.length)
+ "" << 12
+ assert_equal(0, $warnings.length, $warnings.join)
+ end;
+ end
+end
diff --git a/test/ruby/test_weakkeymap.rb b/test/ruby/test_weakkeymap.rb
index 6b3ffbb81f..91c1538076 100644
--- a/test/ruby/test_weakkeymap.rb
+++ b/test/ruby/test_weakkeymap.rb
@@ -61,6 +61,20 @@ class TestWeakKeyMap < Test::Unit::TestCase
refute @wm[k]
end
+ def test_clear_bug_20691
+ assert_normal_exit(<<~RUBY)
+ map = ObjectSpace::WeakKeyMap.new
+
+ 1_000.times do
+ 1_000.times do
+ map[Object.new] = nil
+ end
+
+ map.clear
+ end
+ RUBY
+ end
+
def test_inspect
x = Object.new
k = Object.new
diff --git a/test/ruby/test_weakmap.rb b/test/ruby/test_weakmap.rb
index 97d7197dbb..a2904776bc 100644
--- a/test/ruby/test_weakmap.rb
+++ b/test/ruby/test_weakmap.rb
@@ -78,7 +78,7 @@ class TestWeakMap < Test::Unit::TestCase
@wm[i] = Object.new
@wm.inspect
end
- assert_match(/\A\#<#{@wm.class.name}:[^:]++:(?:\s\d+\s=>\s\#<(?:Object|collected):[^:<>]*+>(?:,|>\z))+/,
+ assert_match(/\A\#<#{@wm.class.name}:0x[\da-f]+(?::(?: \d+ => \#<(?:Object|collected):0x[\da-f]+>,?)+)?>\z/,
@wm.inspect)
end
@@ -258,4 +258,11 @@ class TestWeakMap < Test::Unit::TestCase
assert_equal b, @wm[1]
end
+
+ def test_use_after_free_bug_20688
+ assert_normal_exit(<<~RUBY)
+ weakmap = ObjectSpace::WeakMap.new
+ 10_000.times { weakmap[Object.new] = Object.new }
+ RUBY
+ end
end
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index 796787e355..c91d631256 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -56,14 +56,26 @@ class TestYJIT < Test::Unit::TestCase
def test_yjit_enable
args = []
args << "--disable=yjit" if RubyVM::YJIT.enabled?
- assert_separately(args, <<~RUBY)
- assert_false RubyVM::YJIT.enabled?
- assert_false RUBY_DESCRIPTION.include?("+YJIT")
+ assert_separately(args, <<~'RUBY')
+ refute_predicate RubyVM::YJIT, :enabled?
+ refute_includes RUBY_DESCRIPTION, "+YJIT"
RubyVM::YJIT.enable
- assert_true RubyVM::YJIT.enabled?
- assert_true RUBY_DESCRIPTION.include?("+YJIT")
+ assert_predicate RubyVM::YJIT, :enabled?
+ assert_includes RUBY_DESCRIPTION, "+YJIT"
+ RUBY
+ end
+
+ def test_yjit_disable
+ assert_separately(["--yjit", "--yjit-disable"], <<~'RUBY')
+ refute_predicate RubyVM::YJIT, :enabled?
+ refute_includes RUBY_DESCRIPTION, "+YJIT"
+
+ RubyVM::YJIT.enable
+
+ assert_predicate RubyVM::YJIT, :enabled?
+ assert_includes RUBY_DESCRIPTION, "+YJIT"
RUBY
end
@@ -1574,21 +1586,19 @@ class TestYJIT < Test::Unit::TestCase
end
def test_kw_splat_nil
- assert_compiles(<<~'RUBY', result: %i[ok ok ok], no_send_fallbacks: true)
+ assert_compiles(<<~'RUBY', result: %i[ok ok], no_send_fallbacks: true)
def id(x) = x
def kw_fw(arg, **) = id(arg, **)
- def fw(...) = id(...)
- def use = [fw(:ok), kw_fw(:ok), :ok.itself(**nil)]
+ def use = [kw_fw(:ok), :ok.itself(**nil)]
use
RUBY
end
def test_empty_splat
- assert_compiles(<<~'RUBY', result: %i[ok ok], no_send_fallbacks: true)
+ assert_compiles(<<~'RUBY', result: :ok, no_send_fallbacks: true)
def foo = :ok
- def fw(...) = foo(...)
- def use(empty) = [foo(*empty), fw]
+ def use(empty) = foo(*empty)
use([])
RUBY
@@ -1613,6 +1623,56 @@ class TestYJIT < Test::Unit::TestCase
RUBY
end
+ def test_runtime_stats_types
+ assert_compiles(<<~'RUBY', exits: :any, result: true)
+ def test = :ok
+ 3.times { test }
+
+ stats = RubyVM::YJIT.runtime_stats
+ return true unless stats[:all_stats]
+
+ [
+ stats[:object_shape_count].is_a?(Integer),
+ stats[:ratio_in_yjit].is_a?(Float),
+ ].all?
+ RUBY
+ end
+
+ def test_runtime_stats_key_arg
+ assert_compiles(<<~'RUBY', exits: :any, result: true)
+ def test = :ok
+ 3.times { test }
+
+ # Collect single stat.
+ stat = RubyVM::YJIT.runtime_stats(:ratio_in_yjit)
+
+ # Ensure this invocation had stats.
+ return true unless RubyVM::YJIT.runtime_stats[:all_stats]
+
+ stat > 0.0
+ RUBY
+ end
+
+ def test_runtime_stats_arg_error
+ assert_compiles(<<~'RUBY', exits: :any, result: true)
+ begin
+ RubyVM::YJIT.runtime_stats(Object.new)
+ :no_error
+ rescue TypeError => e
+ e.message == "non-symbol given"
+ end
+ RUBY
+ end
+
+ def test_runtime_stats_unknown_key
+ assert_compiles(<<~'RUBY', exits: :any, result: true)
+ def test = :ok
+ 3.times { test }
+
+ RubyVM::YJIT.runtime_stats(:some_key_unlikely_to_exist).nil?
+ RUBY
+ end
+
private
def code_gc_helpers
diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb
index b90b7f28eb..3514954103 100644
--- a/test/rubygems/helper.rb
+++ b/test/rubygems/helper.rb
@@ -19,7 +19,6 @@ require "shellwords"
require "tmpdir"
require "rubygems/vendor/uri/lib/uri"
require "zlib"
-require "benchmark" # stdlib
require_relative "mock_gem_ui"
module Gem
@@ -76,8 +75,6 @@ class Gem::TestCase < Test::Unit::TestCase
attr_accessor :uri # :nodoc:
- @@tempdirs = []
-
def assert_activate(expected, *specs)
specs.each do |spec|
case spec
@@ -451,8 +448,6 @@ class Gem::TestCase < Test::Unit::TestCase
Dir.chdir @current_dir
- FileUtils.rm_rf @tempdir
-
ENV.replace(@orig_env)
Gem::ConfigFile.send :remove_const, :SYSTEM_WIDE_CONFIG_FILE
@@ -481,12 +476,9 @@ class Gem::TestCase < Test::Unit::TestCase
@back_ui.close
- refute_directory_exists @tempdir, "may be still in use"
- ghosts = @@tempdirs.filter_map do |test_name, tempdir|
- test_name if File.exist?(tempdir)
- end
- @@tempdirs << [method_name, @tempdir]
- assert_empty ghosts
+ FileUtils.rm_rf @tempdir
+
+ refute_directory_exists @tempdir, "#{@tempdir} used by test #{method_name} is still in use"
end
def credential_setup
@@ -541,6 +533,16 @@ class Gem::TestCase < Test::Unit::TestCase
ENV["BUNDLE_GEMFILE"] = File.join(@tempdir, "Gemfile")
end
+ def with_env(overrides, &block)
+ orig_env = ENV.to_h
+ ENV.replace(overrides)
+ begin
+ block.call
+ ensure
+ ENV.replace(orig_env)
+ end
+ end
+
##
# A git_gem is used with a gem dependencies file. The gem created here
# has no files, just a gem specification for the given +name+ and +version+.
@@ -813,9 +815,15 @@ class Gem::TestCase < Test::Unit::TestCase
Gem::Specification.unresolved_deps.values.map(&:to_s).sort
end
- def new_default_spec(name, version, deps = nil, *files)
+ def new_default_spec(name, version, deps = nil, *files, executable: false)
spec = util_spec name, version, deps
+ if executable
+ spec.executables = %w[executable]
+
+ write_file File.join(@tempdir, "bin", "executable")
+ end
+
spec.loaded_from = File.join(@gemhome, "specifications", "default", spec.spec_name)
spec.files = files
@@ -824,10 +832,8 @@ class Gem::TestCase < Test::Unit::TestCase
Gem.instance_variable_set(:@default_gem_load_paths, [*Gem.send(:default_gem_load_paths), lib_dir])
$LOAD_PATH.unshift(lib_dir)
files.each do |file|
- rb_path = File.join(lib_dir, file)
- FileUtils.mkdir_p(File.dirname(rb_path))
- File.open(rb_path, "w") do |rb|
- rb << "# #{file}"
+ write_file File.join(lib_dir, file) do |io|
+ io.write "# #{file}"
end
end
diff --git a/test/rubygems/test_bundled_ca.rb b/test/rubygems/test_bundled_ca.rb
index 50e621f22b..a737185681 100644
--- a/test/rubygems/test_bundled_ca.rb
+++ b/test/rubygems/test_bundled_ca.rb
@@ -33,7 +33,7 @@ class TestGemBundledCA < Gem::TestCase
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.cert_store = bundled_certificate_store
http.get("/")
- rescue Errno::ENOENT, Errno::ETIMEDOUT, SocketError, Net::OpenTimeout
+ rescue Errno::ENOENT, Errno::ETIMEDOUT, SocketError, Gem::Net::OpenTimeout
pend "#{host} seems offline, I can't tell whether ssl would work."
rescue OpenSSL::SSL::SSLError => e
# Only fail for certificate verification errors
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 3fb66e1407..e8a294d65c 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -516,7 +516,10 @@ class TestGem < Gem::TestCase
Gem.clear_paths
- assert_nil Gem::Specification.send(:class_variable_get, :@@all)
+ with_env("GEM_HOME" => "foo", "GEM_PATH" => "bar") do
+ assert_equal("foo", Gem.dir)
+ assert_equal("bar", Gem.path.first)
+ end
end
def test_self_configuration
@@ -1559,21 +1562,20 @@ class TestGem < Gem::TestCase
assert_equal m1.gem_dir, File.join(Gem.user_dir, "gems", "m-1")
tests = [
- [:dir0, [Gem.dir, Gem.user_dir], m0],
- [:dir1, [Gem.user_dir, Gem.dir], m1],
+ [:dir0, [Gem.dir, Gem.user_dir]],
+ [:dir1, [Gem.user_dir, Gem.dir]],
]
- tests.each do |name, paths, expected|
+ tests.each do |name, paths|
Gem.use_paths paths.first, paths
- Gem::Specification.reset
Gem.searcher = nil
assert_equal Gem::Dependency.new("m","1").to_specs,
Gem::Dependency.new("m","1").to_specs.sort
assert_equal \
- [expected.gem_dir],
- Gem::Dependency.new("m","1").to_specs.map(&:gem_dir).sort,
+ [m0.gem_dir, m1.gem_dir],
+ Gem::Dependency.new("m","1").to_specs.map(&:gem_dir).uniq.sort,
"Wrong specs for #{name}"
spec = Gem::Dependency.new("m","1").to_spec
@@ -1613,9 +1615,11 @@ class TestGem < Gem::TestCase
Gem.use_paths Gem.dir, [Gem.dir, Gem.user_dir]
+ spec = Gem::Dependency.new("m", "1").to_spec
+
assert_equal \
File.join(Gem.dir, "gems", "m-1"),
- Gem::Dependency.new("m","1").to_spec.gem_dir,
+ spec.gem_dir,
"Wrong spec selected"
end
diff --git a/test/rubygems/test_gem_bundler_version_finder.rb b/test/rubygems/test_gem_bundler_version_finder.rb
index 6d88810493..b72670b802 100644
--- a/test/rubygems/test_gem_bundler_version_finder.rb
+++ b/test/rubygems/test_gem_bundler_version_finder.rb
@@ -45,6 +45,8 @@ class TestGemBundlerVersionFinder < Gem::TestCase
assert_equal v("1.1.1.1"), bvf.bundler_version
ARGV.replace %w[update --bundler\ 1.1.1.2 --bundler --bundler 1.1.1.1 gem_name]
assert_equal v("1.1.1.1"), bvf.bundler_version
+ $0 = "/foo/bar/bundler"
+ assert_equal v("1.1.1.1"), bvf.bundler_version
$0 = "other"
assert_nil bvf.bundler_version
end
diff --git a/test/rubygems/test_gem_ci_detector.rb b/test/rubygems/test_gem_ci_detector.rb
index 3caefce97d..a28ee49f4b 100644
--- a/test/rubygems/test_gem_ci_detector.rb
+++ b/test/rubygems/test_gem_ci_detector.rb
@@ -3,7 +3,7 @@
require_relative "helper"
require "rubygems"
-class TestCiDetector < Test::Unit::TestCase
+class TestCiDetector < Gem::TestCase
def test_ci?
with_env("FOO" => "bar") { assert_equal(false, Gem::CIDetector.ci?) }
with_env("CI" => "true") { assert_equal(true, Gem::CIDetector.ci?) }
@@ -29,16 +29,4 @@ class TestCiDetector < Test::Unit::TestCase
assert_equal(["dsari", "taskcluster"], Gem::CIDetector.ci_strings)
end
end
-
- private
-
- def with_env(overrides, &block)
- @orig_env = ENV.to_h
- ENV.replace(overrides)
- begin
- block.call
- ensure
- ENV.replace(@orig_env)
- end
- end
end
diff --git a/test/rubygems/test_gem_commands_exec_command.rb b/test/rubygems/test_gem_commands_exec_command.rb
index e52fe247a2..fd48ce73ca 100644
--- a/test/rubygems/test_gem_commands_exec_command.rb
+++ b/test/rubygems/test_gem_commands_exec_command.rb
@@ -182,7 +182,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
fetcher.download "a", 2 do |s|
s.executables = %w[a]
s.files = %w[bin/a lib/a.rb]
- s.add_runtime_dependency "with_platform"
+ s.add_dependency "with_platform"
write_file File.join(*%W[gems #{s.original_name} bin a]) do |f|
f << 'require "with_platform"' << "\n"
@@ -222,7 +222,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
fetcher.download "a", 2 do |s|
s.executables = %w[a]
s.files = %w[bin/a lib/a.rb]
- s.add_runtime_dependency "with_platform"
+ s.add_dependency "with_platform"
s.platform = Gem::Platform.local.to_s
write_file File.join(*%W[gems #{s.original_name} bin a]) do |f|
@@ -234,7 +234,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
fetcher.download "a", 2 do |s|
s.executables = %w[a]
s.files = %w[bin/a lib/a.rb extconf.rb]
- s.add_runtime_dependency "with_platform"
+ s.add_dependency "with_platform"
write_file File.join(*%W[gems #{s.original_name} bin a]) do |f|
f << 'require "with_platform"' << "\n"
@@ -261,7 +261,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
fetcher.download "with_platform", 2 do |s|
s.files = %w[lib/with_platform.rb]
- s.add_runtime_dependency "sometimes_used"
+ s.add_dependency "sometimes_used"
end
fetcher.download "sometimes_used", 2 do |s|
@@ -677,7 +677,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
fetcher.gem "a", 1 do |s|
s.executables = %w[]
s.files = %w[lib/a.rb]
- s.add_runtime_dependency "b"
+ s.add_dependency "b"
end
fetcher.gem "b", 1 do |s|
@@ -711,7 +711,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
fetcher.download "a", 2 do |s|
s.executables = %w[a]
s.files = %w[bin/a lib/a.rb]
- s.add_runtime_dependency "b"
+ s.add_dependency "b"
write_file File.join(*%W[gems #{s.original_name} bin a]) do |f|
f << "Gem.ui.say #{s.original_name.dump}"
@@ -749,7 +749,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
assert_match(/\A\s*\** LOCAL GEMS \**\s*\z/m, @ui.output)
invoke "gem", "env", "GEM_HOME"
- assert_equal "#{@gem_home}/gem_exec\n", @ui.output
+ assert_equal "#{@gem_home}\n", @ui.output
end
end
diff --git a/test/rubygems/test_gem_commands_fetch_command.rb b/test/rubygems/test_gem_commands_fetch_command.rb
index e8710d3cd1..bd8f8aa4f9 100644
--- a/test/rubygems/test_gem_commands_fetch_command.rb
+++ b/test/rubygems/test_gem_commands_fetch_command.rb
@@ -21,11 +21,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[a]
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
a2 = specs["a-2"]
@@ -46,11 +42,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[a]
@cmd.options[:version] = req(">= 0.1")
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
a2 = specs["a-2"]
assert_path_exist(File.join(@tempdir, a2.file_name),
@@ -68,11 +60,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[a]
@cmd.options[:prerelease] = true
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
a2 = specs["a-2"]
@@ -105,11 +93,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
FileUtils.cp a2_universal_darwin, a2_universal_darwin_spec.cache_file
util_set_arch "arm64-darwin20" do
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
end
assert_path_exist(File.join(@tempdir, a2_universal_darwin_spec.file_name),
@@ -126,11 +110,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:prerelease] = true
@cmd.options[:version] = "2.a"
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
a2_pre = specs["a-2.a"]
@@ -147,11 +127,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[a]
@cmd.options[:version] = Gem::Requirement.new "1"
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
a1 = specs["a-1"]
@@ -166,11 +142,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[a:1]
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
a1 = specs["a-1"]
@@ -182,11 +154,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[a b]
@cmd.options[:version] = Gem::Requirement.new "1"
- use_ui @ui do
- assert_raise Gem::MockGemUi::TermError, @ui.error do
- @cmd.execute
- end
- end
+ execute_with_term_error
msg = "ERROR: Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem fetch 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
@@ -203,11 +171,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[a:1 b:1]
- use_ui @ui do
- Dir.chdir @tempdir do
- @cmd.execute
- end
- end
+ execute_with_exit_code
a1 = specs["a-1"]
b1 = specs["b-1"]
@@ -225,9 +189,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase
@cmd.options[:args] = %w[foo:2]
- use_ui @ui do
- @cmd.execute
- end
+ execute_with_term_error
expected = <<-EXPECTED
ERROR: Could not find a valid gem 'foo' (2) in any repository
@@ -245,9 +207,7 @@ ERROR: Possible alternatives: foo
@cmd.options[:args] = %w[foo:2]
@cmd.options[:suggest_alternate] = false
- use_ui @ui do
- @cmd.execute
- end
+ execute_with_term_error
expected = <<-EXPECTED
ERROR: Could not find a valid gem 'foo' (2) in any repository
@@ -255,4 +215,24 @@ ERROR: Could not find a valid gem 'foo' (2) in any repository
assert_equal expected, @ui.error
end
+
+ private
+
+ def execute_with_term_error
+ use_ui @ui do
+ assert_raise Gem::MockGemUi::TermError, @ui.error do
+ @cmd.execute
+ end
+ end
+ end
+
+ def execute_with_exit_code
+ use_ui @ui do
+ Dir.chdir @tempdir do
+ assert_raise Gem::MockGemUi::SystemExitException, @ui.error do
+ @cmd.execute
+ end
+ end
+ end
+ end
end
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 5b09512ac4..1bd96600f3 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -667,7 +667,7 @@ ERROR: Possible alternatives: non_existent_with_hint
assert_path_exist File.join(a2.doc_dir, "ri")
assert_path_exist File.join(a2.doc_dir, "rdoc")
- end
+ end if defined?(Gem::RDoc)
def test_execute_rdoc_with_path
specs = spec_fetcher do |fetcher|
@@ -703,7 +703,7 @@ ERROR: Possible alternatives: non_existent_with_hint
wait_for_child_process_to_exit
assert_path_exist "whatever/doc/a-2", "documentation not installed"
- end
+ end if defined?(Gem::RDoc)
def test_execute_saves_build_args
specs = spec_fetcher do |fetcher|
diff --git a/test/rubygems/test_gem_commands_list_command.rb b/test/rubygems/test_gem_commands_list_command.rb
index c83dd51b67..0b52b54e77 100644
--- a/test/rubygems/test_gem_commands_list_command.rb
+++ b/test/rubygems/test_gem_commands_list_command.rb
@@ -8,7 +8,9 @@ class TestGemCommandsListCommand < Gem::TestCase
super
@cmd = Gem::Commands::ListCommand.new
+ end
+ def test_execute_installed
spec_fetcher do |fetcher|
fetcher.spec "c", 1
end
@@ -16,9 +18,7 @@ class TestGemCommandsListCommand < Gem::TestCase
@fetcher.data["#{@gem_repo}Marshal.#{Gem.marshal_version}"] = proc do
raise Gem::RemoteFetcher::FetchError
end
- end
- def test_execute_installed
@cmd.handle_options %w[c --installed]
assert_raise Gem::MockGemUi::SystemExitException do
@@ -30,4 +30,29 @@ class TestGemCommandsListCommand < Gem::TestCase
assert_equal "true\n", @ui.output
assert_equal "", @ui.error
end
+
+ def test_execute_normal_gem_shadowing_default_gem
+ c1_default = new_default_spec "c", 1
+ install_default_gems c1_default
+
+ c1 = util_spec("c", 1) {|s| s.date = "2024-01-01" }
+ install_gem c1
+
+ Gem::Specification.reset
+
+ @cmd.handle_options %w[c]
+
+ use_ui @ui do
+ @cmd.execute
+ end
+
+ expected = <<-EOF
+
+*** LOCAL GEMS ***
+
+c (1)
+EOF
+
+ assert_equal expected, @ui.output
+ end
end
diff --git a/test/rubygems/test_gem_commands_lock_command.rb b/test/rubygems/test_gem_commands_lock_command.rb
index 6afe4f35c5..02a7103f89 100644
--- a/test/rubygems/test_gem_commands_lock_command.rb
+++ b/test/rubygems/test_gem_commands_lock_command.rb
@@ -9,11 +9,11 @@ class TestGemCommandsLockCommand < Gem::TestCase
@a1 = quick_gem "a", "1"
@b1 = quick_gem "b", "1" do |s|
- s.add_runtime_dependency "a"
+ s.add_dependency "a"
end
@d1 = quick_gem "d", "1" do |s|
- s.add_runtime_dependency "z"
+ s.add_dependency "z"
end
@cmd = Gem::Commands::LockCommand.new
diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb
index a17d7837c9..b8b39133ff 100644
--- a/test/rubygems/test_gem_commands_pristine_command.rb
+++ b/test/rubygems/test_gem_commands_pristine_command.rb
@@ -96,7 +96,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase
out = @ui.output.split("\n")
assert_equal "Restoring gems to pristine condition...", out.shift
- assert_equal "Restored #{a.full_name}", out.shift
+ assert_equal "Restored #{a.full_name} in #{Gem.user_dir}", out.shift
assert_empty out, out.inspect
ensure
FileUtils.chmod(0o755, @gemhome)
@@ -404,7 +404,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase
out = @ui.output.split "\n"
assert_equal "Restoring gems to pristine condition...", out.shift
- assert_equal "Restored #{a.full_name}", out.shift
+ assert_equal "Restored #{a.full_name} in #{@gemhome}", out.shift
assert_equal "Restored #{b.full_name}", out.shift
assert_empty out, out.inspect
@@ -476,8 +476,9 @@ class TestGemCommandsPristineCommand < Gem::TestCase
[
"Restoring gems to pristine condition...",
- "Cached gem for a-1 not found, attempting to fetch...",
- "Restored a-1",
+ "Cached gem for a-1 in #{@gemhome} not found, attempting to fetch...",
+ "Restored a-1 in #{@gemhome}",
+ "Restored b-1 in #{@gemhome}",
"Cached gem for b-1 not found, attempting to fetch...",
"Restored b-1",
].each do |line|
@@ -495,7 +496,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase
assert_path_exist File.join(gemhome2, "cache", "b-1.gem")
assert_path_not_exist File.join(@gemhome, "cache", "b-2.gem")
assert_path_exist File.join(gemhome2, "gems", "b-1")
- assert_path_not_exist File.join(@gemhome, "gems", "b-1")
+ assert_path_exist File.join(@gemhome, "gems", "b-1")
end
def test_execute_no_gem
diff --git a/test/rubygems/test_gem_commands_rebuild_command.rb b/test/rubygems/test_gem_commands_rebuild_command.rb
index 5e8c797e2d..3b7927c44e 100644
--- a/test/rubygems/test_gem_commands_rebuild_command.rb
+++ b/test/rubygems/test_gem_commands_rebuild_command.rb
@@ -105,7 +105,7 @@ class TestGemCommandsRebuildCommand < Gem::TestCase
assert_equal old_spec.name, new_spec.name
assert_equal old_spec.summary, new_spec.summary
- reproduced
+ [reproduced, original]
end
def test_build_is_reproducible
@@ -134,12 +134,21 @@ class TestGemCommandsRebuildCommand < Gem::TestCase
# also testing that `gem rebuild` overrides the value.
ENV["SOURCE_DATE_EPOCH"] = Time.new(2007, 8, 9, 10, 11, 12).to_s
- rebuild_gem_file = util_test_rebuild_gem(@gem, [@gem_name, @gem_version], original_gem_file, gemspec_file, timestamp)
+ rebuild_gem_file, saved_gem_file =
+ util_test_rebuild_gem(@gem, [@gem_name, @gem_version], original_gem_file, gemspec_file, timestamp)
rebuild_contents = File.read(rebuild_gem_file)
assert_equal build_contents, rebuild_contents
ensure
ENV["SOURCE_DATE_EPOCH"] = epoch
+ if rebuild_gem_file
+ File.unlink(rebuild_gem_file)
+ dir = File.dirname(rebuild_gem_file)
+ Dir.rmdir(dir)
+ File.unlink(saved_gem_file)
+ Dir.rmdir(File.dirname(saved_gem_file))
+ Dir.rmdir(File.dirname(dir))
+ end
end
end
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 43f695f147..8eedb6c03a 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -159,6 +159,23 @@ class TestGemCommandsSetupCommand < Gem::TestCase
end
end
+ def test_destdir_flag_regenerates_binstubs
+ # install to destdir
+ destdir = File.join(@tempdir, "foo")
+ gem_bin_path = gem_install "destdir-only-gem", install_dir: destdir
+
+ # change binstub manually
+ write_file gem_bin_path do |io|
+ io.puts "I changed it!"
+ end
+
+ @cmd.options[:destdir] = destdir
+ @cmd.options[:prefix] = "/"
+ @cmd.execute
+
+ assert_match(/\A#!/, File.read(gem_bin_path))
+ end
+
def test_files_in
assert_equal %w[rubygems.rb rubygems/requirement.rb rubygems/ssl_certs/rubygems.org/foo.pem],
@cmd.files_in("lib").sort
@@ -412,7 +429,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
end
end
- def gem_install(name)
+ def gem_install(name, **options)
gem = util_spec name do |s|
s.executables = [name]
s.files = %W[bin/#{name}]
@@ -420,8 +437,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase
write_file File.join @tempdir, "bin", name do |f|
f.puts "#!/usr/bin/ruby"
end
- install_gem gem
- File.join @gemhome, "bin", name
+ install_gem gem, **options
+ File.join options[:install_dir] || @gemhome, "bin", name
end
def gem_install_with_plugin(name)
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb
index 4daa61cb0c..32553d1730 100644
--- a/test/rubygems/test_gem_commands_uninstall_command.rb
+++ b/test/rubygems/test_gem_commands_uninstall_command.rb
@@ -32,7 +32,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
@cmd.execute
end
- assert_equal %w[a_evil-9 b-2 c-1.2 default-1 dep_x-1 pl-1-x86-linux x-1],
+ assert_equal %w[a-4 a_evil-9 b-2 c-1.2 default-1 dep_x-1 pl-1-x86-linux x-1],
Gem::Specification.all_names.sort
end
@@ -81,6 +81,61 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
assert_equal "Successfully uninstalled z-2", output.shift
end
+ def test_execute_does_not_remove_default_gem_executables
+ z_1_default = new_default_spec "z", "1", executable: true
+ install_default_gems z_1_default
+
+ z_1, = util_gem "z", "1" do |spec|
+ util_make_exec spec
+ end
+ install_gem z_1, force: true
+
+ Gem::Specification.reset
+
+ @cmd.options[:all] = true
+ @cmd.options[:force] = true
+ @cmd.options[:executables] = true
+ @cmd.options[:args] = %w[z]
+
+ use_ui @ui do
+ @cmd.execute
+ end
+
+ assert File.exist? File.join(@gemhome, "bin", "executable")
+ assert File.exist? File.join(@gemhome, "gems", "z-1", "bin", "executable")
+
+ output = @ui.output.split "\n"
+
+ refute_includes output, "Removing executable"
+ assert_equal "Successfully uninstalled z-1", output.shift
+ assert_equal "There was both a regular copy and a default copy of z-1. The regular copy was successfully uninstalled, but the default copy was left around because default gems can't be removed.", output.shift
+ end
+
+ def test_execute_does_not_error_on_shadowed_default_gems
+ z_1_default = new_default_spec "z", "1"
+ install_default_gems z_1_default
+
+ z_1 = util_spec "z", "1" do |spec|
+ spec.date = "2024-01-01"
+ end
+ install_gem z_1
+
+ Gem::Specification.reset
+
+ @cmd.options[:args] = %w[z:1]
+
+ use_ui @ui do
+ @cmd.execute
+ end
+
+ output = @ui.output.split "\n"
+ assert_equal "Successfully uninstalled z-1", output.shift
+ assert_equal "There was both a regular copy and a default copy of z-1. The regular copy was successfully uninstalled, but the default copy was left around because default gems can't be removed.", output.shift
+
+ error = @ui.error.split "\n"
+ assert_empty error
+ end
+
def test_execute_dependency_order
initial_install
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 2683840f2e..642a62a373 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -217,7 +217,15 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
end
def test_execute_system_update_installed_in_non_default_gem_path
- rubygems_update_spec = quick_gem "rubygems-update", 9 do |s|
+ rubygems_update_spec = Gem::Specification.new do |s|
+ s.name = "rubygems-update"
+ s.version = "9"
+ s.author = "A User"
+ s.email = "example@example.com"
+ s.homepage = "http://example.com"
+ s.summary = "this is a summary"
+ s.description = "This is a test description"
+
write_file File.join(@tempdir, "setup.rb")
s.files += %w[setup.rb]
@@ -498,7 +506,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
a2 = @specs["a-2"]
assert_path_exist File.join(a2.doc_dir, "rdoc")
- end
+ end if defined?(Gem::RDoc)
def test_execute_named
spec_fetcher do |fetcher|
diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb
index a055f248be..4230eda4d3 100644
--- a/test/rubygems/test_gem_config_file.rb
+++ b/test/rubygems/test_gem_config_file.rb
@@ -569,10 +569,81 @@ if you believe they were disclosed to a third party.
yaml = <<~YAML
---
:foo: bar # buzz
+ #:notkey: bar
YAML
actual = Gem::ConfigFile.load_with_rubygems_config_hash(yaml)
assert_equal("bar", actual[:foo])
+ assert_equal(false, actual.key?("#:notkey"))
+ assert_equal(false, actual.key?(:notkey))
+ assert_equal(1, actual.size)
+ end
+
+ def test_s3_source
+ yaml = <<~YAML
+ ---
+ :sources:
+ - s3://bucket1/
+ - s3://bucket2/
+ - s3://bucket3/path_to_gems_dir/
+ - s3://bucket4/
+ - https://rubygems.org/
+ :s3_source:
+ :bucket1:
+ :provider: env
+ :bucket2:
+ :provider: instance_profile
+ :region: us-west-2
+ :bucket3:
+ :id: AOUEAOEU123123AOEUAO
+ :secret: aodnuhtdao/saeuhto+19283oaehu/asoeu+123h
+ :region: us-east-2
+ :bucket4:
+ :id: AOUEAOEU123123AOEUAO
+ :secret: aodnuhtdao/saeuhto+19283oaehu/asoeu+123h
+ :security_token: AQoDYXdzEJr
+ :region: us-west-1
+ YAML
+
+ File.open @temp_conf, "w" do |fp|
+ fp.puts yaml
+ end
+ util_config_file
+
+ assert_equal(["s3://bucket1/", "s3://bucket2/", "s3://bucket3/path_to_gems_dir/", "s3://bucket4/", "https://rubygems.org/"], @cfg.sources)
+ expected_config = {
+ bucket1: { provider: "env" },
+ bucket2: { provider: "instance_profile", region: "us-west-2" },
+ bucket3: { id: "AOUEAOEU123123AOEUAO", secret: "aodnuhtdao/saeuhto+19283oaehu/asoeu+123h", region: "us-east-2" },
+ bucket4: { id: "AOUEAOEU123123AOEUAO", secret: "aodnuhtdao/saeuhto+19283oaehu/asoeu+123h", security_token: "AQoDYXdzEJr", region: "us-west-1" },
+ }
+ assert_equal(expected_config, @cfg[:s3_source])
+ assert_equal(expected_config[:bucket1], @cfg[:s3_source][:bucket1])
+ assert_equal(expected_config[:bucket2], @cfg[:s3_source][:bucket2])
+ assert_equal(expected_config[:bucket3], @cfg[:s3_source][:bucket3])
+ assert_equal(expected_config[:bucket4], @cfg[:s3_source][:bucket4])
+ end
+
+ def test_s3_source_with_config_without_lookahead
+ yaml = <<~YAML
+ :sources:
+ - s3://bucket1/
+ s3_source:
+ bucket1:
+ provider: env
+ YAML
+
+ File.open @temp_conf, "w" do |fp|
+ fp.puts yaml
+ end
+ util_config_file
+
+ assert_equal(["s3://bucket1/"], @cfg.sources)
+ expected_config = {
+ "bucket1" => { "provider" => "env" },
+ }
+ assert_equal(expected_config, @cfg[:s3_source])
+ assert_equal(expected_config[:bucket1], @cfg[:s3_source][:bucket1])
end
def util_config_file(args = @cfg_args)
diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb
index d5812da2aa..34f85e6b75 100644
--- a/test/rubygems/test_gem_ext_builder.rb
+++ b/test/rubygems/test_gem_ext_builder.rb
@@ -310,6 +310,76 @@ install:
assert_path_exist @spec.extension_dir
end
+ def test_build_extensions_with_target_rbconfig
+ fake_rbconfig = File.join @tempdir, "fake_rbconfig.rb"
+ File.open fake_rbconfig, "w" do |f|
+ f.write <<~RUBY
+ module RbConfig
+ CONFIG = {}
+ MAKEFILE_CONFIG = {}
+
+ def self.fire_update!(key, value); end
+ def self.expand(val, config = CONFIG); val; end
+ end
+ RUBY
+ RbConfig::CONFIG.each do |k, v|
+ f.puts %(RbConfig::CONFIG[#{k.dump}] = #{v.dump})
+ end
+ RbConfig::MAKEFILE_CONFIG.each do |k, v|
+ f.puts %(RbConfig::MAKEFILE_CONFIG[#{k.dump}] = #{v.dump})
+ end
+ f.puts "RbConfig::CONFIG['host_os'] = 'fake_os'"
+ f.puts "RbConfig::CONFIG['arch'] = 'fake_arch'"
+ f.puts "RbConfig::CONFIG['platform'] = 'fake_platform'"
+ end
+
+ stdout, stderr = capture_subprocess_io do
+ system(Gem.ruby, "-rmkmf", "-e", "exit MakeMakefile::RbConfig::CONFIG['host_os'] == 'fake_os'",
+ "--", "--target-rbconfig=#{fake_rbconfig}")
+ end
+ unless $?.success?
+ assert_include(stderr, "uninitialized constant MakeMakefile::RbConfig")
+ pend "This version of mkmf does not support --target-rbconfig"
+ end
+ assert_empty(stdout)
+
+ @spec.extensions << "extconf.rb"
+ @builder = Gem::Ext::Builder.new @spec, "", Gem::TargetRbConfig.from_path(fake_rbconfig)
+
+ FileUtils.mkdir_p @spec.gem_dir
+ lib_dir = File.join(@spec.gem_dir, "lib")
+
+ FileUtils.mkdir lib_dir
+
+ File.open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f|
+ f.write <<-'RUBY'
+ require 'mkmf'
+
+ extconf_args = File.join __dir__, 'rbconfig_dump'
+ File.open extconf_args, 'w' do |f|
+ ["host_os", "arch"].each do |k|
+ f.puts "#{k}=#{MakeMakefile::RbConfig::CONFIG[k]}"
+ end
+ end
+
+ create_makefile 'a'
+ RUBY
+ end
+
+ use_ui @ui do
+ @builder.build_extensions
+ end
+
+ path = File.join @spec.gem_dir, "rbconfig_dump"
+
+ assert_equal <<~DUMP, File.read(path)
+ host_os=fake_os
+ arch=fake_arch
+ DUMP
+ assert_path_exist @spec.extension_dir
+ assert_equal [], Dir.glob(File.join(lib_dir, "*"))
+ end
+
def test_initialize
build_info_dir = File.join @gemhome, "build_info"
diff --git a/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock b/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock
index abd1e0ae33..5ea15859f6 100644
--- a/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock
+++ b/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock
@@ -152,18 +152,18 @@ dependencies = [
[[package]]
name = "rb-sys"
-version = "0.9.97"
+version = "0.9.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47d30bcad206b51f2f66121190ca678dce1fdf3a2eae0ac5d838d1818b19bdf5"
+checksum = "df4dec4b1d304c3b308a2cd86b1216ea45dd4361f4e9fa056f108332d0a450c1"
dependencies = [
"rb-sys-build",
]
[[package]]
name = "rb-sys-build"
-version = "0.9.97"
+version = "0.9.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3cbd92f281615f3c2dcb9dcb0f0576624752afbf9a7f99173b37c4b55b62dd8a"
+checksum = "1d71de3e29d174b8fb17b5d4470f27d7aa2605f8a9d05fda0d3aeff30e05a570"
dependencies = [
"bindgen",
"lazy_static",
diff --git a/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml b/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml
index ad3e7f9b76..3d78418ed3 100644
--- a/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml
+++ b/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml
@@ -7,4 +7,4 @@ edition = "2021"
crate-type = ["cdylib"]
[dependencies]
-rb-sys = "0.9.97"
+rb-sys = "0.9.102"
diff --git a/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock b/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock
index 1d174f569e..21e26dd123 100644
--- a/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock
+++ b/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock
@@ -145,18 +145,18 @@ dependencies = [
[[package]]
name = "rb-sys"
-version = "0.9.97"
+version = "0.9.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47d30bcad206b51f2f66121190ca678dce1fdf3a2eae0ac5d838d1818b19bdf5"
+checksum = "df4dec4b1d304c3b308a2cd86b1216ea45dd4361f4e9fa056f108332d0a450c1"
dependencies = [
"rb-sys-build",
]
[[package]]
name = "rb-sys-build"
-version = "0.9.97"
+version = "0.9.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3cbd92f281615f3c2dcb9dcb0f0576624752afbf9a7f99173b37c4b55b62dd8a"
+checksum = "1d71de3e29d174b8fb17b5d4470f27d7aa2605f8a9d05fda0d3aeff30e05a570"
dependencies = [
"bindgen",
"lazy_static",
diff --git a/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml b/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml
index 60cf49ce03..ac2454eda7 100644
--- a/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml
+++ b/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml
@@ -7,4 +7,4 @@ edition = "2021"
crate-type = ["cdylib"]
[dependencies]
-rb-sys = "0.9.97"
+rb-sys = "0.9.102"
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index 61609a26c9..b83a01c73b 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -1083,6 +1083,8 @@ end
end
assert_match(/ran executable/, e.message)
+
+ assert_path_not_exist(File.join(installer.bin_dir, "executable.lock"))
end
def test_conflicting_binstubs
@@ -1131,6 +1133,8 @@ end
# We expect the bin stub to activate the version that actually contains
# the binstub.
assert_match("I have an executable", e.message)
+
+ assert_path_not_exist(File.join(installer.bin_dir, "executable.lock"))
end
def test_install_creates_binstub_that_understand_version
@@ -1160,6 +1164,8 @@ end
end
assert_includes(e.message, "can't find gem a (= 3.0)")
+
+ assert_path_not_exist(File.join(installer.bin_dir, "executable.lock"))
end
def test_install_creates_binstub_that_prefers_user_installed_gem_to_default
@@ -1192,6 +1198,8 @@ end
end
assert_equal(e.message, "ran executable")
+
+ assert_path_not_exist(File.join(installer.bin_dir, "executable.lock"))
end
def test_install_creates_binstub_that_dont_trust_encoding
@@ -1222,6 +1230,36 @@ end
end
assert_match(/ran executable/, e.message)
+
+ assert_path_not_exist(File.join(installer.bin_dir, "executable.lock"))
+ end
+
+ def test_install_does_not_leave_lockfile_for_binstub
+ installer = util_setup_installer
+
+ installer.wrappers = true
+
+ File.class_eval do
+ alias_method :original_chmod, :chmod
+ define_method(:chmod) do |mode|
+ original_chmod(mode)
+ raise Gem::Ext::BuildError if path.end_with?("/executable")
+ end
+ end
+
+ assert_raise(Gem::Ext::BuildError) do
+ installer.install
+ end
+
+ assert_path_not_exist(File.join(installer.bin_dir, "executable.lock"))
+ # TODO: remove already copied files at failures.
+ # assert_path_not_exist(File.join(installer.bin_dir, "executable"))
+ ensure
+ File.class_eval do
+ remove_method :chmod
+ alias_method :chmod, :original_chmod
+ remove_method :original_chmod
+ end
end
def test_install_with_no_prior_files
@@ -2386,10 +2424,10 @@ end
installer = Gem::Installer.for_spec @spec
installer.gem_home = @gemhome
- File.class_eval do
- alias_method :original_write, :write
+ File.singleton_class.class_eval do
+ alias_method :original_binwrite, :binwrite
- def write(data)
+ def binwrite(path, data)
raise Errno::ENOSPC
end
end
@@ -2400,10 +2438,10 @@ end
assert_path_not_exist @spec.spec_file
ensure
- File.class_eval do
- remove_method :write
- alias_method :write, :original_write
- remove_method :original_write
+ File.singleton_class.class_eval do
+ remove_method :binwrite
+ alias_method :binwrite, :original_binwrite
+ remove_method :original_binwrite
end
end
@@ -2577,6 +2615,7 @@ end
yield
ensure
- RbConfig::CONFIG["LIBRUBY_RELATIVE"] = orig_libruby_relative
+ # RbConfig::CONFIG values are strings only, there should not be a nil.
+ RbConfig::CONFIG["LIBRUBY_RELATIVE"] = orig_libruby_relative if orig_libruby_relative
end
end
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index 00e48498c6..070c8007bc 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -90,46 +90,46 @@ class TestGemPlatform < Gem::TestCase
"java" => [nil, "java", nil],
"jruby" => [nil, "java", nil],
"universal-dotnet" => ["universal", "dotnet", nil],
- "universal-dotnet2.0" => ["universal", "dotnet", "2.0"],
- "universal-dotnet4.0" => ["universal", "dotnet", "4.0"],
+ "universal-dotnet2.0" => ["universal", "dotnet", "2.0"],
+ "universal-dotnet4.0" => ["universal", "dotnet", "4.0"],
"powerpc-aix5.3.0.0" => ["powerpc", "aix", "5"],
- "powerpc-darwin7" => ["powerpc", "darwin", "7"],
- "powerpc-darwin8" => ["powerpc", "darwin", "8"],
+ "powerpc-darwin7" => ["powerpc", "darwin", "7"],
+ "powerpc-darwin8" => ["powerpc", "darwin", "8"],
"powerpc-linux" => ["powerpc", "linux", nil],
"powerpc64-linux" => ["powerpc64", "linux", nil],
"sparc-solaris2.10" => ["sparc", "solaris", "2.10"],
- "sparc-solaris2.8" => ["sparc", "solaris", "2.8"],
- "sparc-solaris2.9" => ["sparc", "solaris", "2.9"],
- "universal-darwin8" => ["universal", "darwin", "8"],
- "universal-darwin9" => ["universal", "darwin", "9"],
- "universal-macruby" => ["universal", "macruby", nil],
- "i386-cygwin" => ["x86", "cygwin", nil],
- "i686-darwin" => ["x86", "darwin", nil],
- "i686-darwin8.4.1" => ["x86", "darwin", "8"],
- "i386-freebsd4.11" => ["x86", "freebsd", "4"],
- "i386-freebsd5" => ["x86", "freebsd", "5"],
- "i386-freebsd6" => ["x86", "freebsd", "6"],
- "i386-freebsd7" => ["x86", "freebsd", "7"],
+ "sparc-solaris2.8" => ["sparc", "solaris", "2.8"],
+ "sparc-solaris2.9" => ["sparc", "solaris", "2.9"],
+ "universal-darwin8" => ["universal", "darwin", "8"],
+ "universal-darwin9" => ["universal", "darwin", "9"],
+ "universal-macruby" => ["universal", "macruby", nil],
+ "i386-cygwin" => ["x86", "cygwin", nil],
+ "i686-darwin" => ["x86", "darwin", nil],
+ "i686-darwin8.4.1" => ["x86", "darwin", "8"],
+ "i386-freebsd4.11" => ["x86", "freebsd", "4"],
+ "i386-freebsd5" => ["x86", "freebsd", "5"],
+ "i386-freebsd6" => ["x86", "freebsd", "6"],
+ "i386-freebsd7" => ["x86", "freebsd", "7"],
"i386-freebsd" => ["x86", "freebsd", nil],
"universal-freebsd" => ["universal", "freebsd", nil],
"i386-java1.5" => ["x86", "java", "1.5"],
"x86-java1.6" => ["x86", "java", "1.6"],
"i386-java1.6" => ["x86", "java", "1.6"],
- "i686-linux" => ["x86", "linux", nil],
- "i586-linux" => ["x86", "linux", nil],
- "i486-linux" => ["x86", "linux", nil],
- "i386-linux" => ["x86", "linux", nil],
- "i586-linux-gnu" => ["x86", "linux", "gnu"],
- "i386-linux-gnu" => ["x86", "linux", "gnu"],
+ "i686-linux" => ["x86", "linux", nil],
+ "i586-linux" => ["x86", "linux", nil],
+ "i486-linux" => ["x86", "linux", nil],
+ "i386-linux" => ["x86", "linux", nil],
+ "i586-linux-gnu" => ["x86", "linux", "gnu"],
+ "i386-linux-gnu" => ["x86", "linux", "gnu"],
"i386-mingw32" => ["x86", "mingw32", nil],
"x64-mingw-ucrt" => ["x64", "mingw", "ucrt"],
"i386-mswin32" => ["x86", "mswin32", nil],
- "i386-mswin32_80" => ["x86", "mswin32", "80"],
- "i386-mswin32-80" => ["x86", "mswin32", "80"],
+ "i386-mswin32_80" => ["x86", "mswin32", "80"],
+ "i386-mswin32-80" => ["x86", "mswin32", "80"],
"x86-mswin32" => ["x86", "mswin32", nil],
- "x86-mswin32_60" => ["x86", "mswin32", "60"],
- "x86-mswin32-60" => ["x86", "mswin32", "60"],
- "i386-netbsdelf" => ["x86", "netbsdelf", nil],
+ "x86-mswin32_60" => ["x86", "mswin32", "60"],
+ "x86-mswin32-60" => ["x86", "mswin32", "60"],
+ "i386-netbsdelf" => ["x86", "netbsdelf", nil],
"i386-openbsd4.0" => ["x86", "openbsd", "4.0"],
"i386-solaris2.10" => ["x86", "solaris", "2.10"],
"i386-solaris2.8" => ["x86", "solaris", "2.8"],
@@ -142,8 +142,8 @@ class TestGemPlatform < Gem::TestCase
"arm-linux-gnueabi" => ["arm", "linux", "gnueabi"],
"arm-linux-musleabi" => ["arm", "linux", "musleabi"],
"arm-linux-uclibceabi" => ["arm", "linux", "uclibceabi"],
- "x86_64-openbsd3.9" => ["x86_64", "openbsd", "3.9"],
- "x86_64-openbsd4.0" => ["x86_64", "openbsd", "4.0"],
+ "x86_64-openbsd3.9" => ["x86_64", "openbsd", "3.9"],
+ "x86_64-openbsd4.0" => ["x86_64", "openbsd", "4.0"],
"x86_64-openbsd" => ["x86_64", "openbsd", nil],
"wasm32-wasi" => ["wasm32", "wasi", nil],
"wasm32-wasip1" => ["wasm32", "wasi", nil],
@@ -368,18 +368,27 @@ class TestGemPlatform < Gem::TestCase
arm = Gem::Platform.new "arm-linux"
armv5 = Gem::Platform.new "armv5-linux"
armv7 = Gem::Platform.new "armv7-linux"
+ arm64 = Gem::Platform.new "arm64-linux"
util_set_arch "armv5-linux"
assert((arm === Gem::Platform.local), "arm === armv5")
assert((armv5 === Gem::Platform.local), "armv5 === armv5")
refute((armv7 === Gem::Platform.local), "armv7 === armv5")
+ refute((arm64 === Gem::Platform.local), "arm64 === armv5")
refute((Gem::Platform.local === arm), "armv5 === arm")
util_set_arch "armv7-linux"
assert((arm === Gem::Platform.local), "arm === armv7")
refute((armv5 === Gem::Platform.local), "armv5 === armv7")
assert((armv7 === Gem::Platform.local), "armv7 === armv7")
+ refute((arm64 === Gem::Platform.local), "arm64 === armv7")
refute((Gem::Platform.local === arm), "armv7 === arm")
+
+ util_set_arch "arm64-linux"
+ refute((arm === Gem::Platform.local), "arm === arm64")
+ refute((armv5 === Gem::Platform.local), "armv5 === arm64")
+ refute((armv7 === Gem::Platform.local), "armv7 === arm64")
+ assert((arm64 === Gem::Platform.local), "arm64 === arm64")
end
def test_equals3_universal_mingw
diff --git a/test/rubygems/test_gem_rdoc.rb b/test/rubygems/test_gem_rdoc.rb
index f9b1df6cd5..19ccf1e587 100644
--- a/test/rubygems/test_gem_rdoc.rb
+++ b/test/rubygems/test_gem_rdoc.rb
@@ -134,4 +134,4 @@ class TestGemRDoc < Gem::TestCase
FileUtils.rm_r @a.doc_dir
end
end
-end
+end if defined?(Gem::RDoc)
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index e71b2f5ff6..ca858cfda5 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -2,105 +2,14 @@
require_relative "helper"
-require "webrick"
-require "webrick/https" if Gem::HAVE_OPENSSL
-
-unless Gem::HAVE_OPENSSL
- warn "Skipping Gem::RemoteFetcher tests. openssl not found."
-end
-
require "rubygems/remote_fetcher"
require "rubygems/package"
-# = Testing Proxy Settings
-#
-# These tests check the proper proxy server settings by running two
-# web servers. The web server at http://localhost:#{SERVER_PORT}
-# represents the normal gem server and returns a gemspec with a rake
-# version of 0.4.11. The web server at http://localhost:#{PROXY_PORT}
-# represents the proxy server and returns a different dataset where
-# rake has version 0.4.2. This allows us to detect which server is
-# returning the data.
-#
-# Note that the proxy server is not a *real* proxy server. But our
-# software doesn't really care, as long as we hit the proxy URL when a
-# proxy is configured.
-
class TestGemRemoteFetcher < Gem::TestCase
include Gem::DefaultUserInteraction
- SERVER_DATA = <<-EOY
---- !ruby/object:Gem::Cache
-gems:
- rake-0.4.11: !ruby/object:Gem::Specification
- rubygems_version: "0.7"
- specification_version: 1
- name: rake
- version: !ruby/object:Gem::Version
- version: 0.4.11
- date: 2004-11-12
- summary: Ruby based make-like utility.
- require_paths:
- - lib
- author: Jim Weirich
- email: jim@weirichhouse.org
- homepage: http://rake.rubyforge.org
- description: Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.
- autorequire:
- bindir: bin
- has_rdoc: true
- required_ruby_version: !ruby/object:Gem::Version::Requirement
- requirements:
- -
- - ">"
- - !ruby/object:Gem::Version
- version: 0.0.0
- version:
- platform: ruby
- files:
- - README
- test_files: []
- library_stubs:
- rdoc_options:
- extra_rdoc_files:
- executables:
- - rake
- extensions: []
- requirements: []
- dependencies: []
- EOY
-
- PROXY_DATA = SERVER_DATA.gsub(/0.4.11/, "0.4.2")
-
- # Generated via:
- # x = OpenSSL::PKey::DH.new(2048) # wait a while...
- # x.to_s => pem
- TEST_KEY_DH2048 = OpenSSL::PKey::DH.new <<-_END_OF_PEM_
------BEGIN DH PARAMETERS-----
-MIIBCAKCAQEA3Ze2EHSfYkZLUn557torAmjBgPsqzbodaRaGZtgK1gEU+9nNJaFV
-G1JKhmGUiEDyIW7idsBpe4sX/Wqjnp48Lr8IeI/SlEzLdoGpf05iRYXC8Cm9o8aM
-cfmVgoSEAo9YLBpzoji2jHkO7Q5IPt4zxbTdlmmGFLc/GO9q7LGHhC+rcMcNTGsM
-49AnILNn49pq4Y72jSwdmvq4psHZwwFBbPwLdw6bLUDDCN90jfqvYt18muwUxDiN
-NP0fuvVAIB158VnQ0liHSwcl6+9vE1mL0Jo/qEXQxl0+UdKDjaGfTsn6HIrwTnmJ
-PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
------END DH PARAMETERS-----
- _END_OF_PEM_
-
def setup
- @proxies = %w[https_proxy http_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY]
- @old_proxies = @proxies.map {|k| ENV[k] }
- @proxies.each {|k| ENV[k] = nil }
-
super
- start_servers
- self.enable_yaml = true
- self.enable_zip = false
-
- base_server_uri = "http://localhost:#{normal_server_port}"
- @proxy_uri = "http://localhost:#{proxy_server_port}"
-
- @server_uri = base_server_uri + "/yaml"
- @server_z_uri = base_server_uri + "/yaml.Z"
@cache_dir = File.join @gemhome, "cache"
@@ -116,14 +25,6 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
@fetcher = Gem::RemoteFetcher.fetcher
end
- def teardown
- @fetcher.close_all
- stop_servers
- super
- Gem.configuration[:http_proxy] = nil
- @proxies.each_with_index {|k, i| ENV[k] = @old_proxies[i] }
- end
-
def test_self_fetcher
fetcher = Gem::RemoteFetcher.fetcher
refute_nil fetcher
@@ -140,6 +41,8 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
refute_nil fetcher
assert_kind_of Gem::RemoteFetcher, fetcher
assert_equal proxy_uri, fetcher.instance_variable_get(:@proxy).to_s
+ ensure
+ Gem.configuration[:http_proxy] = nil
end
def test_fetch_path_bad_uri
@@ -153,14 +56,6 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
assert_equal "uri scheme is invalid: nil", e.message
end
- def test_no_proxy
- use_ui @stub_ui do
- assert_data_from_server @fetcher.fetch_path(@server_uri)
- response = @fetcher.fetch_path(@server_uri, nil, true)
- assert_equal SERVER_DATA.size, response["content-length"].to_i
- end
- end
-
def test_cache_update_path
uri = Gem::URI "http://example/file"
path = File.join @tempdir, "file"
@@ -616,41 +511,6 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
assert_nil fetcher.fetch_path(Gem::URI.parse(@gem_repo), Time.at(0))
end
- def test_implicit_no_proxy
- use_ui @stub_ui do
- ENV["http_proxy"] = "http://fakeurl:12345"
- fetcher = Gem::RemoteFetcher.new :no_proxy
- @fetcher = fetcher
- assert_data_from_server fetcher.fetch_path(@server_uri)
- end
- end
-
- def test_implicit_proxy
- use_ui @stub_ui do
- ENV["http_proxy"] = @proxy_uri
- fetcher = Gem::RemoteFetcher.new nil
- @fetcher = fetcher
- assert_data_from_proxy fetcher.fetch_path(@server_uri)
- end
- end
-
- def test_implicit_upper_case_proxy
- use_ui @stub_ui do
- ENV["HTTP_PROXY"] = @proxy_uri
- fetcher = Gem::RemoteFetcher.new nil
- @fetcher = fetcher
- assert_data_from_proxy fetcher.fetch_path(@server_uri)
- end
- end
-
- def test_implicit_proxy_no_env
- use_ui @stub_ui do
- fetcher = Gem::RemoteFetcher.new nil
- @fetcher = fetcher
- assert_data_from_server fetcher.fetch_path(@server_uri)
- end
- end
-
def test_fetch_http
fetcher = Gem::RemoteFetcher.new nil
@fetcher = fetcher
@@ -712,247 +572,6 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
assert_equal "redirecting but no redirect location was given (#{url})", e.message
end
- def test_fetch_http_with_additional_headers
- ENV["http_proxy"] = @proxy_uri
- ENV["no_proxy"] = Gem::URI.parse(@server_uri).host
- fetcher = Gem::RemoteFetcher.new nil, nil, { "X-Captain" => "murphy" }
- @fetcher = fetcher
- assert_equal "murphy", fetcher.fetch_path(@server_uri)
- end
-
- def assert_fetch_s3(url, signature, token=nil, region="us-east-1", instance_profile_json=nil)
- fetcher = Gem::RemoteFetcher.new nil
- @fetcher = fetcher
- $fetched_uri = nil
- $instance_profile = instance_profile_json
-
- def fetcher.request(uri, request_class, last_modified = nil)
- $fetched_uri = uri
- res = Gem::Net::HTTPOK.new nil, 200, nil
- def res.body
- "success"
- end
- res
- end
-
- def fetcher.s3_uri_signer(uri)
- require "json"
- s3_uri_signer = Gem::S3URISigner.new(uri)
- def s3_uri_signer.ec2_metadata_credentials_json
- JSON.parse($instance_profile)
- end
- # Running sign operation to make sure uri.query is not mutated
- s3_uri_signer.sign
- raise "URI query is not empty: #{uri.query}" unless uri.query.nil?
- s3_uri_signer
- end
-
- data = fetcher.fetch_s3 Gem::URI.parse(url)
-
- assert_equal "https://my-bucket.s3.#{region}.amazonaws.com/gems/specs.4.8.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=testuser%2F20190624%2F#{region}%2Fs3%2Faws4_request&X-Amz-Date=20190624T050641Z&X-Amz-Expires=86400#{token ? "&X-Amz-Security-Token=" + token : ""}&X-Amz-SignedHeaders=host&X-Amz-Signature=#{signature}", $fetched_uri.to_s
- assert_equal "success", data
- ensure
- $fetched_uri = nil
- end
-
- def test_fetch_s3_config_creds
- Gem.configuration[:s3_source] = {
- "my-bucket" => { id: "testuser", secret: "testpass" },
- }
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
- end
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_config_creds_with_region
- Gem.configuration[:s3_source] = {
- "my-bucket" => { id: "testuser", secret: "testpass", region: "us-west-2" },
- }
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2"
- end
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_config_creds_with_token
- Gem.configuration[:s3_source] = {
- "my-bucket" => { id: "testuser", secret: "testpass", security_token: "testtoken" },
- }
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken"
- end
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_env_creds
- ENV["AWS_ACCESS_KEY_ID"] = "testuser"
- ENV["AWS_SECRET_ACCESS_KEY"] = "testpass"
- ENV["AWS_SESSION_TOKEN"] = nil
- Gem.configuration[:s3_source] = {
- "my-bucket" => { provider: "env" },
- }
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
- end
- ensure
- ENV.each_key {|key| ENV.delete(key) if key.start_with?("AWS") }
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_env_creds_with_region
- ENV["AWS_ACCESS_KEY_ID"] = "testuser"
- ENV["AWS_SECRET_ACCESS_KEY"] = "testpass"
- ENV["AWS_SESSION_TOKEN"] = nil
- Gem.configuration[:s3_source] = {
- "my-bucket" => { provider: "env", region: "us-west-2" },
- }
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2"
- end
- ensure
- ENV.each_key {|key| ENV.delete(key) if key.start_with?("AWS") }
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_env_creds_with_token
- ENV["AWS_ACCESS_KEY_ID"] = "testuser"
- ENV["AWS_SECRET_ACCESS_KEY"] = "testpass"
- ENV["AWS_SESSION_TOKEN"] = "testtoken"
- Gem.configuration[:s3_source] = {
- "my-bucket" => { provider: "env" },
- }
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken"
- end
- ensure
- ENV.each_key {|key| ENV.delete(key) if key.start_with?("AWS") }
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_url_creds
- url = "s3://testuser:testpass@my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
- end
- end
-
- def test_fetch_s3_instance_profile_creds
- Gem.configuration[:s3_source] = {
- "my-bucket" => { provider: "instance_profile" },
- }
-
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b", nil, "us-east-1",
- '{"AccessKeyId": "testuser", "SecretAccessKey": "testpass"}'
- end
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_instance_profile_creds_with_region
- Gem.configuration[:s3_source] = {
- "my-bucket" => { provider: "instance_profile", region: "us-west-2" },
- }
-
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2",
- '{"AccessKeyId": "testuser", "SecretAccessKey": "testpass"}'
- end
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_instance_profile_creds_with_token
- Gem.configuration[:s3_source] = {
- "my-bucket" => { provider: "instance_profile" },
- }
-
- url = "s3://my-bucket/gems/specs.4.8.gz"
- Time.stub :now, Time.at(1_561_353_581) do
- assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken", "us-east-1",
- '{"AccessKeyId": "testuser", "SecretAccessKey": "testpass", "Token": "testtoken"}'
- end
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def refute_fetch_s3(url, expected_message)
- fetcher = Gem::RemoteFetcher.new nil
- @fetcher = fetcher
-
- e = assert_raise Gem::RemoteFetcher::FetchError do
- fetcher.fetch_s3 Gem::URI.parse(url)
- end
-
- assert_match expected_message, e.message
- end
-
- def test_fetch_s3_no_source_key
- url = "s3://my-bucket/gems/specs.4.8.gz"
- refute_fetch_s3 url, "no s3_source key exists in .gemrc"
- end
-
- def test_fetch_s3_no_host
- Gem.configuration[:s3_source] = {
- "my-bucket" => { id: "testuser", secret: "testpass" },
- }
-
- url = "s3://other-bucket/gems/specs.4.8.gz"
- refute_fetch_s3 url, "no key for host other-bucket in s3_source in .gemrc"
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_no_id
- Gem.configuration[:s3_source] = { "my-bucket" => { secret: "testpass" } }
-
- url = "s3://my-bucket/gems/specs.4.8.gz"
- refute_fetch_s3 url, "s3_source for my-bucket missing id or secret"
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_fetch_s3_no_secret
- Gem.configuration[:s3_source] = { "my-bucket" => { id: "testuser" } }
-
- url = "s3://my-bucket/gems/specs.4.8.gz"
- refute_fetch_s3 url, "s3_source for my-bucket missing id or secret"
- ensure
- Gem.configuration[:s3_source] = nil
- end
-
- def test_observe_no_proxy_env_single_host
- use_ui @stub_ui do
- ENV["http_proxy"] = @proxy_uri
- ENV["no_proxy"] = Gem::URI.parse(@server_uri).host
- fetcher = Gem::RemoteFetcher.new nil
- @fetcher = fetcher
- assert_data_from_server fetcher.fetch_path(@server_uri)
- end
- end
-
- def test_observe_no_proxy_env_list
- use_ui @stub_ui do
- ENV["http_proxy"] = @proxy_uri
- ENV["no_proxy"] = "fakeurl.com, #{Gem::URI.parse(@server_uri).host}"
- fetcher = Gem::RemoteFetcher.new nil
- @fetcher = fetcher
- assert_data_from_server fetcher.fetch_path(@server_uri)
- end
- end
-
def test_request_block
fetcher = Gem::RemoteFetcher.new nil
@fetcher = fetcher
@@ -967,112 +586,12 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
def test_yaml_error_on_size
use_ui @stub_ui do
- self.enable_yaml = false
fetcher = Gem::RemoteFetcher.new nil
@fetcher = fetcher
assert_error { fetcher.size }
end
end
- def test_ssl_connection
- ssl_server = start_ssl_server
- temp_ca_cert = File.join(__dir__, "ca_cert.pem")
- with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
- fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
- end
- end
-
- def test_ssl_client_cert_auth_connection
- ssl_server = start_ssl_server(
- { SSLVerifyClient: OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT }
- )
-
- temp_ca_cert = File.join(__dir__, "ca_cert.pem")
- temp_client_cert = File.join(__dir__, "client.pem")
-
- with_configured_fetcher(
- ":ssl_ca_cert: #{temp_ca_cert}\n" \
- ":ssl_client_cert: #{temp_client_cert}\n"
- ) do |fetcher|
- fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
- end
- end
-
- def test_do_not_allow_invalid_client_cert_auth_connection
- ssl_server = start_ssl_server(
- { SSLVerifyClient: OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT }
- )
-
- temp_ca_cert = File.join(__dir__, "ca_cert.pem")
- temp_client_cert = File.join(__dir__, "invalid_client.pem")
-
- with_configured_fetcher(
- ":ssl_ca_cert: #{temp_ca_cert}\n" \
- ":ssl_client_cert: #{temp_client_cert}\n"
- ) do |fetcher|
- assert_raise Gem::RemoteFetcher::FetchError do
- fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
- end
- end
- end
-
- def test_do_not_allow_insecure_ssl_connection_by_default
- ssl_server = start_ssl_server
- with_configured_fetcher do |fetcher|
- assert_raise Gem::RemoteFetcher::FetchError do
- fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
- end
- end
- end
-
- def test_ssl_connection_allow_verify_none
- ssl_server = start_ssl_server
- with_configured_fetcher(":ssl_verify_mode: 0") do |fetcher|
- fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
- end
- end
-
- def test_do_not_follow_insecure_redirect
- ssl_server = start_ssl_server
- temp_ca_cert = File.join(__dir__, "ca_cert.pem")
- expected_error_message =
- "redirecting to non-https resource: #{@server_uri} (https://localhost:#{ssl_server.config[:Port]}/insecure_redirect?to=#{@server_uri})"
-
- with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
- err = assert_raise Gem::RemoteFetcher::FetchError do
- fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/insecure_redirect?to=#{@server_uri}")
- end
-
- assert_equal(err.message, expected_error_message)
- end
- end
-
- def test_nil_ca_cert
- ssl_server = start_ssl_server
- temp_ca_cert = nil
-
- with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
- assert_raise Gem::RemoteFetcher::FetchError do
- fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}")
- end
- end
- end
-
- def with_configured_fetcher(config_str = nil, &block)
- if config_str
- temp_conf = File.join @tempdir, ".gemrc"
- File.open temp_conf, "w" do |fp|
- fp.puts config_str
- end
- Gem.configuration = Gem::ConfigFile.new %W[--config-file #{temp_conf}]
- end
- fetcher = Gem::RemoteFetcher.new
- yield fetcher
- ensure
- fetcher.close_all
- Gem.configuration = nil
- end
-
def assert_error(exception_class=Exception)
got_exception = false
@@ -1084,152 +603,4 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
assert got_exception, "Expected exception conforming to #{exception_class}"
end
-
- def assert_data_from_server(data)
- assert_match(/0\.4\.11/, data, "Data is not from server")
- end
-
- def assert_data_from_proxy(data)
- assert_match(/0\.4\.2/, data, "Data is not from proxy")
- end
-
- class NilLog < WEBrick::Log
- def log(level, data) # Do nothing
- end
- end
-
- private
-
- attr_reader :normal_server, :proxy_server
- attr_accessor :enable_zip, :enable_yaml
-
- def start_servers
- @normal_server ||= start_server(SERVER_DATA)
- @proxy_server ||= start_server(PROXY_DATA)
- @enable_yaml = true
- @enable_zip = false
- @ssl_server = nil
- @ssl_server_thread = nil
- end
-
- def stop_servers
- if @normal_server
- @normal_server.kill.join
- @normal_server = nil
- end
- if @proxy_server
- @proxy_server.kill.join
- @proxy_server = nil
- end
- if @ssl_server
- @ssl_server.stop
- @ssl_server = nil
- end
- if @ssl_server_thread
- @ssl_server_thread.kill.join
- @ssl_server_thread = nil
- end
- WEBrick::Utils::TimeoutHandler.terminate
- end
-
- def normal_server_port
- @normal_server[:server].config[:Port]
- end
-
- def proxy_server_port
- @proxy_server[:server].config[:Port]
- end
-
- def start_ssl_server(config = {})
- pend "starting this test server fails randomly on jruby" if Gem.java_platform?
-
- null_logger = NilLog.new
- server = WEBrick::HTTPServer.new({
- Port: 0,
- Logger: null_logger,
- AccessLog: [],
- SSLEnable: true,
- SSLCACertificateFile: File.join(__dir__, "ca_cert.pem"),
- SSLCertificate: cert("ssl_cert.pem"),
- SSLPrivateKey: key("ssl_key.pem"),
- SSLVerifyClient: nil,
- SSLCertName: nil,
- }.merge(config))
- server.mount_proc("/yaml") do |_req, res|
- res.body = "--- true\n"
- end
- server.mount_proc("/insecure_redirect") do |req, res|
- res.set_redirect(WEBrick::HTTPStatus::MovedPermanently, req.query["to"])
- end
- server.ssl_context.tmp_dh_callback = proc { TEST_KEY_DH2048 }
- t = Thread.new do
- server.start
- rescue StandardError => ex
- puts "ERROR during server thread: #{ex.message}"
- raise
- ensure
- server.shutdown
- end
- while server.status != :Running
- sleep 0.1
- unless t.alive?
- t.join
- raise
- end
- end
- @ssl_server = server
- @ssl_server_thread = t
- server
- end
-
- def start_server(data)
- null_logger = NilLog.new
- s = WEBrick::HTTPServer.new(
- Port: 0,
- DocumentRoot: nil,
- Logger: null_logger,
- AccessLog: null_logger
- )
- s.mount_proc("/kill") {|_req, _res| s.shutdown }
- s.mount_proc("/yaml") do |req, res|
- if req["X-Captain"]
- res.body = req["X-Captain"]
- elsif @enable_yaml
- res.body = data
- res["Content-Type"] = "text/plain"
- res["content-length"] = data.size
- else
- res.status = "404"
- res.body = "<h1>NOT FOUND</h1>"
- res["Content-Type"] = "text/html"
- end
- end
- s.mount_proc("/yaml.Z") do |_req, res|
- if @enable_zip
- res.body = Zlib::Deflate.deflate(data)
- res["Content-Type"] = "text/plain"
- else
- res.status = "404"
- res.body = "<h1>NOT FOUND</h1>"
- res["Content-Type"] = "text/html"
- end
- end
- th = Thread.new do
- s.start
- rescue StandardError => ex
- abort "ERROR during server thread: #{ex.message}"
- ensure
- s.shutdown
- end
- th[:server] = s
- th
- end
-
- def cert(filename)
- OpenSSL::X509::Certificate.new(File.read(File.join(__dir__, filename)))
- end
-
- def key(filename)
- OpenSSL::PKey::RSA.new(File.read(File.join(__dir__, filename)))
- end
-end if Gem::HAVE_OPENSSL
+end
diff --git a/test/rubygems/test_gem_remote_fetcher_local_server.rb b/test/rubygems/test_gem_remote_fetcher_local_server.rb
new file mode 100644
index 0000000000..3d3e8b503b
--- /dev/null
+++ b/test/rubygems/test_gem_remote_fetcher_local_server.rb
@@ -0,0 +1,220 @@
+# frozen_string_literal: true
+
+require_relative "helper"
+
+require "socket"
+
+require "rubygems/remote_fetcher"
+require "rubygems/package"
+
+# = Testing Proxy Settings
+#
+# These tests check the proper proxy server settings by running two
+# web servers. The web server at http://localhost:#{SERVER_PORT}
+# represents the normal gem server and returns a gemspec with a rake
+# version of 0.4.11. The web server at http://localhost:#{PROXY_PORT}
+# represents the proxy server and returns a different dataset where
+# rake has version 0.4.2. This allows us to detect which server is
+# returning the data.
+#
+# Note that the proxy server is not a *real* proxy server. But our
+# software doesn't really care, as long as we hit the proxy URL when a
+# proxy is configured.
+
+class TestGemRemoteFetcherLocalServer < Gem::TestCase
+ include Gem::DefaultUserInteraction
+
+ SERVER_DATA = <<-EOY
+--- !ruby/object:Gem::Cache
+gems:
+ rake-0.4.11: !ruby/object:Gem::Specification
+ rubygems_version: "0.7"
+ specification_version: 1
+ name: rake
+ version: !ruby/object:Gem::Version
+ version: 0.4.11
+ date: 2004-11-12
+ summary: Ruby based make-like utility.
+ require_paths:
+ - lib
+ author: Jim Weirich
+ email: jim@weirichhouse.org
+ homepage: http://rake.rubyforge.org
+ description: Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.
+ autorequire:
+ bindir: bin
+ has_rdoc: true
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
+ requirements:
+ -
+ - ">"
+ - !ruby/object:Gem::Version
+ version: 0.0.0
+ version:
+ platform: ruby
+ files:
+ - README
+ test_files: []
+ library_stubs:
+ rdoc_options:
+ extra_rdoc_files:
+ executables:
+ - rake
+ extensions: []
+ requirements: []
+ dependencies: []
+ EOY
+
+ PROXY_DATA = SERVER_DATA.gsub(/0.4.11/, "0.4.2")
+
+ def setup
+ @proxies = %w[https_proxy http_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY]
+ @old_proxies = @proxies.map {|k| ENV[k] }
+ @proxies.each {|k| ENV[k] = nil }
+
+ super
+
+ @normal_server ||= start_server(SERVER_DATA)
+ @proxy_server ||= start_server(PROXY_DATA)
+
+ @server_uri = "http://localhost:#{@normal_server[:server].addr[1]}" + "/yaml"
+ @proxy_uri = "http://localhost:#{@proxy_server[:server].addr[1]}"
+
+ Gem::RemoteFetcher.fetcher = nil
+ @stub_ui = Gem::MockGemUi.new
+ @fetcher = Gem::RemoteFetcher.fetcher
+ end
+
+ def teardown
+ @fetcher&.close_all
+
+ if @normal_server
+ @normal_server.kill.join
+ @normal_server[:server].close
+ @normal_server = nil
+ end
+ if @proxy_server
+ @proxy_server.kill.join
+ @proxy_server[:server].close
+ @proxy_server = nil
+ end
+
+ super
+ Gem.configuration[:http_proxy] = nil
+ @proxies.each_with_index {|k, i| ENV[k] = @old_proxies[i] }
+ end
+
+ def test_no_proxy
+ use_ui @stub_ui do
+ assert_data_from_server @fetcher.fetch_path(@server_uri)
+ response = @fetcher.fetch_path(@server_uri, nil, true)
+ assert_equal SERVER_DATA.size, response["content-length"].to_i
+ end
+ end
+
+ def test_implicit_no_proxy
+ use_ui @stub_ui do
+ ENV["http_proxy"] = "http://fakeurl:12345"
+ fetcher = Gem::RemoteFetcher.new :no_proxy
+ @fetcher = fetcher
+ assert_data_from_server fetcher.fetch_path(@server_uri)
+ end
+ end
+
+ def test_implicit_proxy
+ use_ui @stub_ui do
+ ENV["http_proxy"] = @proxy_uri
+ fetcher = Gem::RemoteFetcher.new nil
+ @fetcher = fetcher
+ assert_data_from_proxy fetcher.fetch_path(@server_uri)
+ end
+ end
+
+ def test_implicit_upper_case_proxy
+ use_ui @stub_ui do
+ ENV["HTTP_PROXY"] = @proxy_uri
+ fetcher = Gem::RemoteFetcher.new nil
+ @fetcher = fetcher
+ assert_data_from_proxy fetcher.fetch_path(@server_uri)
+ end
+ end
+
+ def test_implicit_proxy_no_env
+ use_ui @stub_ui do
+ fetcher = Gem::RemoteFetcher.new nil
+ @fetcher = fetcher
+ assert_data_from_server fetcher.fetch_path(@server_uri)
+ end
+ end
+
+ def test_fetch_http_with_additional_headers
+ ENV["http_proxy"] = @proxy_uri
+ ENV["no_proxy"] = Gem::URI.parse(@server_uri).host
+ fetcher = Gem::RemoteFetcher.new nil, nil, { "X-Captain" => "murphy" }
+ @fetcher = fetcher
+ assert_equal "murphy", fetcher.fetch_path(@server_uri)
+ end
+
+ def test_observe_no_proxy_env_single_host
+ use_ui @stub_ui do
+ ENV["http_proxy"] = @proxy_uri
+ ENV["no_proxy"] = Gem::URI.parse(@server_uri).host
+ fetcher = Gem::RemoteFetcher.new nil
+ @fetcher = fetcher
+ assert_data_from_server fetcher.fetch_path(@server_uri)
+ end
+ end
+
+ def test_observe_no_proxy_env_list
+ use_ui @stub_ui do
+ ENV["http_proxy"] = @proxy_uri
+ ENV["no_proxy"] = "fakeurl.com, #{Gem::URI.parse(@server_uri).host}"
+ fetcher = Gem::RemoteFetcher.new nil
+ @fetcher = fetcher
+ assert_data_from_server fetcher.fetch_path(@server_uri)
+ end
+ end
+
+ private
+
+ attr_reader :normal_server, :proxy_server
+
+ def assert_data_from_server(data)
+ assert_match(/0\.4\.11/, data, "Data is not from server")
+ end
+
+ def assert_data_from_proxy(data)
+ assert_match(/0\.4\.2/, data, "Data is not from proxy")
+ end
+
+ def start_server(data)
+ server = TCPServer.new("localhost", 0)
+ thread = Thread.new do
+ loop do
+ client = server.accept
+ handle_request(client, data)
+ end
+ end
+ thread[:server] = server
+ thread
+ end
+
+ def handle_request(client, data)
+ request_line = client.gets
+ headers = {}
+ while (line = client.gets) && line != "\r\n"
+ key, value = line.split(": ", 2)
+ headers[key] = value.strip
+ end
+
+ if request_line.start_with?("GET /yaml")
+ response = headers["X-Captain"] ? headers["X-Captain"] : data
+ client.print "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: #{response.size}\r\n\r\n#{response}"
+ elsif request_line.start_with?("HEAD /yaml") || request_line.start_with?("GET http://") && request_line.include?("/yaml")
+ client.print "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: #{data.size}\r\n\r\n#{data}"
+ else
+ client.print "HTTP/1.1 404 Not Found\r\nContent-Type: text/html\r\n\r\n<h1>NOT FOUND</h1>"
+ end
+ client.close
+ end
+end
diff --git a/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb b/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb
new file mode 100644
index 0000000000..ad5be1a033
--- /dev/null
+++ b/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb
@@ -0,0 +1,195 @@
+# frozen_string_literal: true
+
+require_relative "helper"
+require "socket"
+require "openssl"
+
+unless Gem::HAVE_OPENSSL
+ warn "Skipping Gem::RemoteFetcher tests. openssl not found."
+end
+
+require "rubygems/remote_fetcher"
+require "rubygems/package"
+
+class TestGemRemoteFetcherLocalSSLServer < Gem::TestCase
+ include Gem::DefaultUserInteraction
+
+ # Generated via:
+ # x = OpenSSL::PKey::DH.new(2048) # wait a while...
+ # x.to_s => pem
+ TEST_KEY_DH2048 = OpenSSL::PKey::DH.new <<-_END_OF_PEM_
+-----BEGIN DH PARAMETERS-----
+MIIBCAKCAQEA3Ze2EHSfYkZLUn557torAmjBgPsqzbodaRaGZtgK1gEU+9nNJaFV
+G1JKhmGUiEDyIW7idsBpe4sX/Wqjnp48Lr8IeI/SlEzLdoGpf05iRYXC8Cm9o8aM
+cfmVgoSEAo9YLBpzoji2jHkO7Q5IPt4zxbTdlmmGFLc/GO9q7LGHhC+rcMcNTGsM
+49AnILNn49pq4Y72jSwdmvq4psHZwwFBbPwLdw6bLUDDCN90jfqvYt18muwUxDiN
+NP0fuvVAIB158VnQ0liHSwcl6+9vE1mL0Jo/qEXQxl0+UdKDjaGfTsn6HIrwTnmJ
+PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
+-----END DH PARAMETERS-----
+ _END_OF_PEM_
+
+ def setup
+ super
+ @ssl_server_thread = nil
+ @ssl_server = nil
+ end
+
+ def teardown
+ if @ssl_server_thread
+ @ssl_server_thread.kill.join
+ @ssl_server_thread = nil
+ end
+ if @ssl_server
+ @ssl_server.close
+ @ssl_server = nil
+ end
+ super
+ end
+
+ def test_ssl_connection
+ ssl_server = start_ssl_server
+ temp_ca_cert = File.join(__dir__, "ca_cert.pem")
+ with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
+ fetcher.fetch_path("https://localhost:#{ssl_server.addr[1]}/yaml")
+ end
+ end
+
+ def test_ssl_client_cert_auth_connection
+ ssl_server = start_ssl_server(
+ { verify_mode: OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT }
+ )
+
+ temp_ca_cert = File.join(__dir__, "ca_cert.pem")
+ temp_client_cert = File.join(__dir__, "client.pem")
+
+ with_configured_fetcher(
+ ":ssl_ca_cert: #{temp_ca_cert}\n" \
+ ":ssl_client_cert: #{temp_client_cert}\n"
+ ) do |fetcher|
+ fetcher.fetch_path("https://localhost:#{ssl_server.addr[1]}/yaml")
+ end
+ end
+
+ def test_do_not_allow_invalid_client_cert_auth_connection
+ ssl_server = start_ssl_server(
+ { verify_mode: OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT }
+ )
+
+ temp_ca_cert = File.join(__dir__, "ca_cert.pem")
+ temp_client_cert = File.join(__dir__, "invalid_client.pem")
+
+ with_configured_fetcher(
+ ":ssl_ca_cert: #{temp_ca_cert}\n" \
+ ":ssl_client_cert: #{temp_client_cert}\n"
+ ) do |fetcher|
+ assert_raise Gem::RemoteFetcher::FetchError do
+ fetcher.fetch_path("https://localhost:#{ssl_server.addr[1]}/yaml")
+ end
+ end
+ end
+
+ def test_do_not_allow_insecure_ssl_connection_by_default
+ ssl_server = start_ssl_server
+ with_configured_fetcher do |fetcher|
+ assert_raise Gem::RemoteFetcher::FetchError do
+ fetcher.fetch_path("https://localhost:#{ssl_server.addr[1]}/yaml")
+ end
+ end
+ end
+
+ def test_ssl_connection_allow_verify_none
+ ssl_server = start_ssl_server
+ with_configured_fetcher(":ssl_verify_mode: 0") do |fetcher|
+ fetcher.fetch_path("https://localhost:#{ssl_server.addr[1]}/yaml")
+ end
+ end
+
+ def test_do_not_follow_insecure_redirect
+ @server_uri = "http://example.com"
+ ssl_server = start_ssl_server
+ temp_ca_cert = File.join(__dir__, "ca_cert.pem")
+ expected_error_message =
+ "redirecting to non-https resource: #{@server_uri} (https://localhost:#{ssl_server.addr[1]}/insecure_redirect?to=#{@server_uri})"
+
+ with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
+ err = assert_raise Gem::RemoteFetcher::FetchError do
+ fetcher.fetch_path("https://localhost:#{ssl_server.addr[1]}/insecure_redirect?to=#{@server_uri}")
+ end
+
+ assert_equal(err.message, expected_error_message)
+ end
+ end
+
+ def test_nil_ca_cert
+ ssl_server = start_ssl_server
+ temp_ca_cert = nil
+
+ with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
+ assert_raise Gem::RemoteFetcher::FetchError do
+ fetcher.fetch_path("https://localhost:#{ssl_server.addr[1]}")
+ end
+ end
+ end
+
+ private
+
+ def with_configured_fetcher(config_str = nil, &block)
+ if config_str
+ temp_conf = File.join @tempdir, ".gemrc"
+ File.open temp_conf, "w" do |fp|
+ fp.puts config_str
+ end
+ Gem.configuration = Gem::ConfigFile.new %W[--config-file #{temp_conf}]
+ end
+ fetcher = Gem::RemoteFetcher.new
+ yield fetcher
+ sleep 0.5 unless RUBY_PLATFORM.match?(/mswin|mingw/)
+ ensure
+ fetcher.close_all
+ Gem.configuration = nil
+ end
+
+ def start_ssl_server(config = {})
+ server = TCPServer.new(0)
+ ctx = OpenSSL::SSL::SSLContext.new
+ ctx.cert = cert("ssl_cert.pem")
+ ctx.key = key("ssl_key.pem")
+ ctx.ca_file = File.join(__dir__, "ca_cert.pem")
+ ctx.tmp_dh_callback = proc { TEST_KEY_DH2048 }
+ ctx.verify_mode = config[:verify_mode] if config[:verify_mode]
+ @ssl_server = OpenSSL::SSL::SSLServer.new(server, ctx)
+ @ssl_server_thread = Thread.new do
+ loop do
+ ssl_client = @ssl_server.accept
+ Thread.new(ssl_client) do |client|
+ handle_request(client)
+ ensure
+ client.close
+ end
+ rescue OpenSSL::SSL::SSLError
+ # Ignore SSL errors because we're testing them implicitly
+ end
+ end
+ @ssl_server
+ end
+
+ def handle_request(client)
+ request = client.gets
+ if request.start_with?("GET /yaml")
+ client.print "HTTP/1.1 200 OK\r\nContent-Type: text/yaml\r\n\r\n--- true\n"
+ elsif request.start_with?("GET /insecure_redirect")
+ location = request.match(/to=([^ ]+)/)[1]
+ client.print "HTTP/1.1 301 Moved Permanently\r\nLocation: #{location}\r\n\r\n"
+ else
+ client.print "HTTP/1.1 404 Not Found\r\n\r\n"
+ end
+ end
+
+ def cert(filename)
+ OpenSSL::X509::Certificate.new(File.read(File.join(__dir__, filename)))
+ end
+
+ def key(filename)
+ OpenSSL::PKey::RSA.new(File.read(File.join(__dir__, filename)))
+ end
+end if Gem::HAVE_OPENSSL
diff --git a/test/rubygems/test_gem_remote_fetcher_s3.rb b/test/rubygems/test_gem_remote_fetcher_s3.rb
new file mode 100644
index 0000000000..fe7eb7ec01
--- /dev/null
+++ b/test/rubygems/test_gem_remote_fetcher_s3.rb
@@ -0,0 +1,233 @@
+# frozen_string_literal: true
+
+require_relative "helper"
+
+require "rubygems/remote_fetcher"
+require "rubygems/package"
+
+class TestGemRemoteFetcherS3 < Gem::TestCase
+ include Gem::DefaultUserInteraction
+
+ def setup
+ super
+
+ @a1, @a1_gem = util_gem "a", "1" do |s|
+ s.executables << "a_bin"
+ end
+
+ @a1.loaded_from = File.join(@gemhome, "specifications", @a1.full_name)
+ end
+
+ def assert_fetch_s3(url, signature, token=nil, region="us-east-1", instance_profile_json=nil)
+ fetcher = Gem::RemoteFetcher.new nil
+ @fetcher = fetcher
+ $fetched_uri = nil
+ $instance_profile = instance_profile_json
+
+ def fetcher.request(uri, request_class, last_modified = nil)
+ $fetched_uri = uri
+ res = Gem::Net::HTTPOK.new nil, 200, nil
+ def res.body
+ "success"
+ end
+ res
+ end
+
+ def fetcher.s3_uri_signer(uri)
+ require "json"
+ s3_uri_signer = Gem::S3URISigner.new(uri)
+ def s3_uri_signer.ec2_metadata_credentials_json
+ JSON.parse($instance_profile)
+ end
+ # Running sign operation to make sure uri.query is not mutated
+ s3_uri_signer.sign
+ raise "URI query is not empty: #{uri.query}" unless uri.query.nil?
+ s3_uri_signer
+ end
+
+ data = fetcher.fetch_s3 Gem::URI.parse(url)
+
+ assert_equal "https://my-bucket.s3.#{region}.amazonaws.com/gems/specs.4.8.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=testuser%2F20190624%2F#{region}%2Fs3%2Faws4_request&X-Amz-Date=20190624T050641Z&X-Amz-Expires=86400#{token ? "&X-Amz-Security-Token=" + token : ""}&X-Amz-SignedHeaders=host&X-Amz-Signature=#{signature}", $fetched_uri.to_s
+ assert_equal "success", data
+ ensure
+ $fetched_uri = nil
+ end
+
+ def test_fetch_s3_config_creds
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { id: "testuser", secret: "testpass" },
+ }
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
+ end
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_config_creds_with_region
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { id: "testuser", secret: "testpass", region: "us-west-2" },
+ }
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2"
+ end
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_config_creds_with_token
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { id: "testuser", secret: "testpass", security_token: "testtoken" },
+ }
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken"
+ end
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_env_creds
+ ENV["AWS_ACCESS_KEY_ID"] = "testuser"
+ ENV["AWS_SECRET_ACCESS_KEY"] = "testpass"
+ ENV["AWS_SESSION_TOKEN"] = nil
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { provider: "env" },
+ }
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
+ end
+ ensure
+ ENV.each_key {|key| ENV.delete(key) if key.start_with?("AWS") }
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_env_creds_with_region
+ ENV["AWS_ACCESS_KEY_ID"] = "testuser"
+ ENV["AWS_SECRET_ACCESS_KEY"] = "testpass"
+ ENV["AWS_SESSION_TOKEN"] = nil
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { provider: "env", region: "us-west-2" },
+ }
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2"
+ end
+ ensure
+ ENV.each_key {|key| ENV.delete(key) if key.start_with?("AWS") }
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_env_creds_with_token
+ ENV["AWS_ACCESS_KEY_ID"] = "testuser"
+ ENV["AWS_SECRET_ACCESS_KEY"] = "testpass"
+ ENV["AWS_SESSION_TOKEN"] = "testtoken"
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { provider: "env" },
+ }
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken"
+ end
+ ensure
+ ENV.each_key {|key| ENV.delete(key) if key.start_with?("AWS") }
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_url_creds
+ url = "s3://testuser:testpass@my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
+ end
+ end
+
+ def test_fetch_s3_instance_profile_creds
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { provider: "instance_profile" },
+ }
+
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b", nil, "us-east-1",
+ '{"AccessKeyId": "testuser", "SecretAccessKey": "testpass"}'
+ end
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_instance_profile_creds_with_region
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { provider: "instance_profile", region: "us-west-2" },
+ }
+
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2",
+ '{"AccessKeyId": "testuser", "SecretAccessKey": "testpass"}'
+ end
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_instance_profile_creds_with_token
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { provider: "instance_profile" },
+ }
+
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ Time.stub :now, Time.at(1_561_353_581) do
+ assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken", "us-east-1",
+ '{"AccessKeyId": "testuser", "SecretAccessKey": "testpass", "Token": "testtoken"}'
+ end
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def refute_fetch_s3(url, expected_message)
+ fetcher = Gem::RemoteFetcher.new nil
+ @fetcher = fetcher
+
+ e = assert_raise Gem::RemoteFetcher::FetchError do
+ fetcher.fetch_s3 Gem::URI.parse(url)
+ end
+
+ assert_match expected_message, e.message
+ end
+
+ def test_fetch_s3_no_source_key
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ refute_fetch_s3 url, "no s3_source key exists in .gemrc"
+ end
+
+ def test_fetch_s3_no_host
+ Gem.configuration[:s3_source] = {
+ "my-bucket" => { id: "testuser", secret: "testpass" },
+ }
+
+ url = "s3://other-bucket/gems/specs.4.8.gz"
+ refute_fetch_s3 url, "no key for host other-bucket in s3_source in .gemrc"
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_no_id
+ Gem.configuration[:s3_source] = { "my-bucket" => { secret: "testpass" } }
+
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ refute_fetch_s3 url, "s3_source for my-bucket missing id or secret"
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+
+ def test_fetch_s3_no_secret
+ Gem.configuration[:s3_source] = { "my-bucket" => { id: "testuser" } }
+
+ url = "s3://my-bucket/gems/specs.4.8.gz"
+ refute_fetch_s3 url, "s3_source for my-bucket missing id or secret"
+ ensure
+ Gem.configuration[:s3_source] = nil
+ end
+end
diff --git a/test/rubygems/test_gem_request_set_gem_dependency_api.rb b/test/rubygems/test_gem_request_set_gem_dependency_api.rb
index af32005a16..4b5eaa38ed 100644
--- a/test/rubygems/test_gem_request_set_gem_dependency_api.rb
+++ b/test/rubygems/test_gem_request_set_gem_dependency_api.rb
@@ -44,7 +44,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
def test_gempspec_with_multiple_runtime_deps
save_gemspec "foo", "1.0" do |s|
- s.add_runtime_dependency "bar", ">= 1.6.0", "< 1.6.4"
+ s.add_dependency "bar", ">= 1.6.0", "< 1.6.4"
end
@gda.gemspec
assert_equal %w[foo bar].sort, @set.dependencies.map(&:name).sort
diff --git a/test/rubygems/test_gem_resolver.rb b/test/rubygems/test_gem_resolver.rb
index b7dadda708..4990d5d2dd 100644
--- a/test/rubygems/test_gem_resolver.rb
+++ b/test/rubygems/test_gem_resolver.rb
@@ -571,7 +571,7 @@ class TestGemResolver < Gem::TestCase
def test_raises_and_reports_an_implicit_request_properly
a1 = util_spec "a", "1" do |s|
- s.add_runtime_dependency "b", "= 2"
+ s.add_dependency "b", "= 2"
end
ad = make_dep "a", "= 1"
diff --git a/test/rubygems/test_gem_resolver_best_set.rb b/test/rubygems/test_gem_resolver_best_set.rb
index 8a750cdf8f..02f542efc0 100644
--- a/test/rubygems/test_gem_resolver_best_set.rb
+++ b/test/rubygems/test_gem_resolver_best_set.rb
@@ -9,33 +9,17 @@ class TestGemResolverBestSet < Gem::TestCase
assert_empty set.sets
end
- def test_find_all_index
+ def test_find_all
spec_fetcher do |fetcher|
fetcher.spec "a", 1
- fetcher.spec "a", 2
- fetcher.spec "b", 1
end
- set = Gem::Resolver::BestSet.new
-
- dependency = dep "a", "~> 1"
-
- req = Gem::Resolver::DependencyRequest.new dependency, nil
-
- found = set.find_all req
-
- assert_equal %w[a-1], found.map(&:full_name)
- end
+ api_uri = Gem::URI "#{@gem_repo}info/"
- def test_find_all_fallback
- spec_fetcher do |fetcher|
- fetcher.spec "a", 1
- end
+ @fetcher.data["#{api_uri}a"] = "---\n1 "
set = Gem::Resolver::BestSet.new
- api_uri = Gem::URI(@gem_repo)
-
set.sets << Gem::Resolver::APISet.new(api_uri)
dependency = dep "a", "~> 1"
@@ -90,64 +74,4 @@ class TestGemResolverBestSet < Gem::TestCase
assert_empty set.sets
end
-
- def test_replace_failed_api_set
- set = Gem::Resolver::BestSet.new
-
- api_uri = Gem::URI(@gem_repo) + "./info/"
- api_set = Gem::Resolver::APISet.new api_uri
-
- set.sets << api_set
-
- error_uri = api_uri + "a"
-
- error = Gem::RemoteFetcher::FetchError.new "bogus", error_uri
-
- set.replace_failed_api_set error
-
- assert_equal 1, set.sets.size
-
- refute_includes set.sets, api_set
-
- assert_kind_of Gem::Resolver::IndexSet, set.sets.first
- end
-
- def test_replace_failed_api_set_no_api_set
- set = Gem::Resolver::BestSet.new
-
- index_set = Gem::Resolver::IndexSet.new Gem::Source.new @gem_repo
-
- set.sets << index_set
-
- error = Gem::RemoteFetcher::FetchError.new "bogus", @gem_repo
-
- e = assert_raise Gem::RemoteFetcher::FetchError do
- set.replace_failed_api_set error
- end
-
- assert_equal error, e
- end
-
- def test_replace_failed_api_set_uri_with_credentials
- set = Gem::Resolver::BestSet.new
-
- api_uri = Gem::URI(@gem_repo) + "./info/"
- api_uri.user = "user"
- api_uri.password = "pass"
- api_set = Gem::Resolver::APISet.new api_uri
-
- set.sets << api_set
-
- error_uri = api_uri + "a"
-
- error = Gem::RemoteFetcher::FetchError.new "bogus", error_uri
-
- set.replace_failed_api_set error
-
- assert_equal 1, set.sets.size
-
- refute_includes set.sets, api_set
-
- assert_kind_of Gem::Resolver::IndexSet, set.sets.first
- end
end
diff --git a/test/rubygems/test_gem_safe_marshal.rb b/test/rubygems/test_gem_safe_marshal.rb
index ebb000a9ef..1085aca9fd 100644
--- a/test/rubygems/test_gem_safe_marshal.rb
+++ b/test/rubygems/test_gem_safe_marshal.rb
@@ -305,6 +305,18 @@ class TestGemSafeMarshal < Gem::TestCase
end
end
+ def test_gem_spec_unmarshall_license
+ spec = Gem::Specification.new do |s|
+ s.name = "hi"
+ s.version = "1.2.3"
+ s.license = "MIT"
+ end
+
+ unmarshalled_spec = Gem::SafeMarshal.safe_load(Marshal.dump(spec))
+
+ assert_equal ["MIT"], unmarshalled_spec.license
+ end
+
def test_gem_spec_disallowed_symbol
e = assert_raise(Gem::SafeMarshal::Visitors::ToRuby::UnpermittedSymbolError) do
spec = Gem::Specification.new do |s|
diff --git a/test/rubygems/test_gem_source.rb b/test/rubygems/test_gem_source.rb
index 6baa203dcb..423abd6dd2 100644
--- a/test/rubygems/test_gem_source.rb
+++ b/test/rubygems/test_gem_source.rb
@@ -46,7 +46,7 @@ class TestGemSource < Gem::TestCase
response = Gem::Net::HTTPResponse.new "1.1", 200, "OK"
response.uri = Gem::URI("http://example")
- @fetcher.data[@gem_repo] = response
+ @fetcher.data["#{@gem_repo}versions"] = response
set = @source.dependency_resolver_set
diff --git a/test/rubygems/test_gem_source_git.rb b/test/rubygems/test_gem_source_git.rb
index 20e750a0d4..abcd55907e 100644
--- a/test/rubygems/test_gem_source_git.rb
+++ b/test/rubygems/test_gem_source_git.rb
@@ -292,6 +292,12 @@ class TestGemSourceGit < Gem::TestCase
assert_equal Gem::URI(@repository), @source.uri
end
+ def test_pretty_print
+ assert_equal "#<Gem::Source::Git[Git: \n" \
+ " #{@repository}\n" \
+ " HEAD]>\n", @source.pretty_inspect
+ end
+
def test_uri_hash
assert_equal @hash, @source.uri_hash
diff --git a/test/rubygems/test_gem_source_installed.rb b/test/rubygems/test_gem_source_installed.rb
index 0d6171b0e5..0ef14d7470 100644
--- a/test/rubygems/test_gem_source_installed.rb
+++ b/test/rubygems/test_gem_source_installed.rb
@@ -32,4 +32,9 @@ class TestGemSourceInstalled < Gem::TestCase
assert_equal(1, vendor.<=>(installed), "vendor <=> installed")
assert_equal(-1, installed.<=>(vendor), "installed <=> vendor")
end
+
+ def test_pretty_print
+ local = Gem::Source::Installed.new
+ assert_equal "#<Gem::Source::Installed[Installed]>\n", local.pretty_inspect
+ end
end
diff --git a/test/rubygems/test_gem_source_local.rb b/test/rubygems/test_gem_source_local.rb
index c15e0e07c0..ed6aa24f94 100644
--- a/test/rubygems/test_gem_source_local.rb
+++ b/test/rubygems/test_gem_source_local.rb
@@ -104,4 +104,9 @@ class TestGemSourceLocal < Gem::TestCase
assert_equal(-1, specific.<=>(local), "specific <=> local")
assert_equal(1, local.<=>(specific), "local <=> specific")
end
+
+ def test_pretty_print
+ local = Gem::Source::Local.new
+ assert_equal "#<Gem::Source::Local[Local gems: ]>\n", local.pretty_inspect
+ end
end
diff --git a/test/rubygems/test_gem_source_specific_file.rb b/test/rubygems/test_gem_source_specific_file.rb
index 3bc1901ee1..bcc4168444 100644
--- a/test/rubygems/test_gem_source_specific_file.rb
+++ b/test/rubygems/test_gem_source_specific_file.rb
@@ -73,4 +73,8 @@ class TestGemSourceSpecificFile < Gem::TestCase
assert_equal(0, a1_source.<=>(a1_source), "a1_source <=> a1_source") # rubocop:disable Lint/BinaryOperatorWithIdenticalOperands
assert_equal(1, a2_source.<=>(a1_source), "a2_source <=> a1_source")
end
+
+ def test_pretty_print
+ assert_equal "#<Gem::Source::SpecificFile[SpecificFile:\n #{@sf.path}]>\n", @sf.pretty_inspect
+ end
end
diff --git a/test/rubygems/test_gem_source_subpath_problem.rb b/test/rubygems/test_gem_source_subpath_problem.rb
index a451a81a25..ad11529f67 100644
--- a/test/rubygems/test_gem_source_subpath_problem.rb
+++ b/test/rubygems/test_gem_source_subpath_problem.rb
@@ -24,7 +24,7 @@ class TestGemSourceSubpathProblem < Gem::TestCase
response = Gem::Net::HTTPResponse.new "1.1", 200, "OK"
response.uri = Gem::URI("http://example")
- @fetcher.data["#{@gem_repo}/"] = response
+ @fetcher.data["#{@gem_repo}/versions"] = response
set = @source.dependency_resolver_set
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index f9f063c797..0a009cbd7b 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "benchmark"
require_relative "helper"
require "date"
require "pathname"
@@ -146,6 +145,12 @@ end
end
def test_find_in_unresolved_tree_is_not_exponentiental
+ begin
+ require "benchmark"
+ rescue LoadError
+ pend "Benchmark is not available in this environment. Please install it with `gem install benchmark`."
+ end
+
pend "currently slower in CI on TruffleRuby" if RUBY_ENGINE == "truffleruby"
num_of_pkg = 7
num_of_version_per_pkg = 3
@@ -967,7 +972,10 @@ dependencies: []
def test_self_stubs_for_lazy_loading
Gem.loaded_specs.clear
- Gem::Specification.class_variable_set(:@@stubs, nil)
+
+ specification_record = Gem::Specification.specification_record
+
+ specification_record.instance_variable_set(:@stubs, nil)
dir_standard_specs = File.join Gem.dir, "specifications"
@@ -975,9 +983,9 @@ dependencies: []
save_gemspec("b-1", "1", dir_standard_specs) {|s| s.name = "b" }
assert_equal ["a-1"], Gem::Specification.stubs_for("a").map(&:full_name)
- assert_equal 1, Gem::Specification.class_variable_get(:@@stubs_by_name).length
+ assert_equal 1, specification_record.instance_variable_get(:@stubs_by_name).length
assert_equal ["b-1"], Gem::Specification.stubs_for("b").map(&:full_name)
- assert_equal 2, Gem::Specification.class_variable_get(:@@stubs_by_name).length
+ assert_equal 2, specification_record.instance_variable_get(:@stubs_by_name).length
assert_equal(
Gem::Specification.stubs_for("a").map(&:object_id),
@@ -986,7 +994,7 @@ dependencies: []
Gem.loaded_specs.delete "a"
Gem.loaded_specs.delete "b"
- Gem::Specification.class_variable_set(:@@stubs, nil)
+ specification_record.instance_variable_set(:@stubs, nil)
end
def test_self_stubs_for_no_lazy_loading_after_all_specs_setup
@@ -1830,7 +1838,7 @@ dependencies: []
end
def test_for_cache
- @a2.add_runtime_dependency "b", "1"
+ @a2.add_dependency "b", "1"
@a2.dependencies.first.instance_variable_set :@type, nil
@a2.required_rubygems_version = Gem::Requirement.new "> 0"
@a2.test_files = %w[test/test_b.rb]
@@ -2262,7 +2270,7 @@ dependencies: []
end
def test_to_ruby
- @a2.add_runtime_dependency "b", "1"
+ @a2.add_dependency "b", "1"
@a2.dependencies.first.instance_variable_set :@type, nil
@a2.required_rubygems_version = Gem::Requirement.new "> 0"
@a2.require_paths << "other"
@@ -2334,7 +2342,7 @@ end
end
def test_to_ruby_for_cache
- @a2.add_runtime_dependency "b", "1"
+ @a2.add_dependency "b", "1"
@a2.dependencies.first.instance_variable_set :@type, nil
@a2.required_rubygems_version = Gem::Requirement.new "> 0"
@a2.installed_by_version = Gem.rubygems_version
@@ -2360,7 +2368,7 @@ Gem::Specification.new do |s|
s.rubygems_version = "#{Gem::VERSION}".freeze
s.summary = "this is a summary".freeze
- s.installed_by_version = "#{Gem::VERSION}".freeze if s.respond_to? :installed_by_version
+ s.installed_by_version = "#{Gem::VERSION}".freeze
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
@@ -2757,7 +2765,7 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
Dir.chdir @tempdir do
@a1.version = "1.0.0.beta.1"
- @a1.add_runtime_dependency "b", "~> 1.2.0.beta.1"
+ @a1.add_dependency "b", "~> 1.2.0.beta.1"
use_ui @ui do
@a1.validate
@@ -2771,7 +2779,7 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
util_setup_validate
Dir.chdir @tempdir do
- @a1.add_runtime_dependency @a1.name, "1"
+ @a1.add_dependency @a1.name, "1"
use_ui @ui do
@a1.validate
@@ -2804,7 +2812,7 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
Dir.chdir @tempdir do
@a1.extensions = ["Rakefile"]
- @a1.add_runtime_dependency "rake"
+ @a1.add_dependency "rake"
File.write File.join(@tempdir, "Rakefile"), ""
use_ui @ui do
@@ -2975,19 +2983,27 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
end
def test_validate_empty_require_paths
- if Gem.win_platform?
- pend "test_validate_empty_require_paths skipped on MS Windows (symlink)"
- else
- util_setup_validate
+ util_setup_validate
- @a1.require_paths = []
- e = assert_raise Gem::InvalidSpecificationException do
- @a1.validate
- end
+ @a1.require_paths = []
+ e = assert_raise Gem::InvalidSpecificationException do
+ @a1.validate
+ end
+
+ assert_equal "specification must have at least one require_path",
+ e.message
+ end
- assert_equal "specification must have at least one require_path",
- e.message
+ def test_validate_require_paths_with_invalid_types
+ util_setup_validate
+
+ @a1.require_paths = [1, 2]
+ e = assert_raise Gem::InvalidSpecificationException do
+ @a1.validate
end
+
+ assert_equal "require_paths must be an Array of String",
+ e.message
end
def test_validate_files
@@ -3074,7 +3090,7 @@ Please report a bug if this causes problems.
def test_duplicate_runtime_dependency
expected = "WARNING: duplicated b dependency [\"~> 3.0\", \"~> 3.0\"]\n"
out, err = capture_output do
- @a1.add_runtime_dependency "b", "~> 3.0", "~> 3.0"
+ @a1.add_dependency "b", "~> 3.0", "~> 3.0"
end
assert_empty out
assert_equal(expected, err)
@@ -3948,6 +3964,40 @@ end
assert_equal ["default-2.0.0.0"], Gem::Specification.map(&:full_name)
end
+ def test_validate_for_resolution_validates_required_attributes
+ e = assert_raise Gem::InvalidSpecificationException do
+ @a1.name = nil
+ @a1.validate_for_resolution
+ end
+
+ assert_equal "missing value for attribute name", e.message
+ end
+
+ def test_validate_for_resolution_validates_name
+ e = assert_raise Gem::InvalidSpecificationException do
+ @a1.name = 123
+ @a1.validate_for_resolution
+ end
+
+ assert_equal 'invalid value for attribute name: "123" must be a string', e.message
+ end
+
+ def test_validate_for_resolution_validates_duplicate_dependencies
+ e = assert_raise Gem::InvalidSpecificationException do
+ @a1.add_dependency "foo", "1.2.3"
+ @a1.add_dependency "foo", "3.4.5"
+ @a1.validate_for_resolution
+ end
+
+ assert_match "duplicate dependency on foo", e.message
+ end
+
+ def test_validate_for_resolution_ignores_metadata
+ @a1.summary = "TODO: Invalid summary"
+ @a1.metadata["homepage_uri"] = "TODO: Invalid homepage URI"
+ @a1.validate_for_resolution
+ end
+
def util_setup_deps
@gem = util_spec "awesome", "1.0" do |awesome|
awesome.add_runtime_dependency "bonobo", []
diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb
index 20a0005341..92ea01a3bc 100644
--- a/test/rubygems/test_gem_uninstaller.rb
+++ b/test/rubygems/test_gem_uninstaller.rb
@@ -19,8 +19,6 @@ class TestGemUninstaller < Gem::InstallerTestCase
@user_spec = @user_installer.spec
end
end
-
- Gem::Specification.reset
end
def test_initialize_expand_path
@@ -213,6 +211,37 @@ class TestGemUninstaller < Gem::InstallerTestCase
Gem::Uninstaller.new(@spec.name, executables: true, install_dir: install_dir).uninstall
assert File.exist?(plugin_path), "plugin unintentionally removed"
+ refute File.exist?(install_dir_plugin_path), "plugin not removed"
+ end
+
+ def test_uninstall_with_install_dir_regenerates_plugins
+ write_file File.join(@tempdir, "lib", "rubygems_plugin.rb") do |io|
+ io.write "# do nothing"
+ end
+
+ @spec.files += %w[lib/rubygems_plugin.rb]
+
+ install_dir = "#{@gemhome}2"
+
+ package = Gem::Package.build(@spec)
+
+ spec_v9 = @spec.dup
+ spec_v9.version = "9"
+ package_v9 = Gem::Package.build(spec_v9)
+
+ Gem::Installer.at(package, force: true, install_dir: install_dir).install
+ Gem::Installer.at(package_v9, force: true, install_dir: install_dir).install
+
+ install_dir_plugin_path = File.join install_dir, "plugins/a_plugin.rb"
+ assert File.exist?(install_dir_plugin_path), "plugin not written"
+
+ Gem::Specification.dirs = [install_dir]
+ Gem::Uninstaller.new(@spec.name, version: "9", executables: true, install_dir: install_dir).uninstall
+ assert File.exist?(install_dir_plugin_path), "plugin unintentionally removed"
+
+ Gem::Specification.dirs = [install_dir]
+ Gem::Uninstaller.new(@spec.name, executables: true, install_dir: install_dir).uninstall
+ refute File.exist?(install_dir_plugin_path), "plugin not removed"
end
def test_remove_plugins_user_installed
@@ -374,7 +403,7 @@ create_makefile '#{@spec.name}'
def test_uninstall_not_ok
quick_gem "z" do |s|
- s.add_runtime_dependency @spec.name
+ s.add_dependency @spec.name
end
uninstaller = Gem::Uninstaller.new @spec.name
@@ -398,7 +427,7 @@ create_makefile '#{@spec.name}'
end
def test_uninstall_user_install
- @user_spec = Gem::Specification.find_by_name "b"
+ Gem::Specification.dirs = [Gem.user_dir]
uninstaller = Gem::Uninstaller.new(@user_spec.name,
executables: true,
@@ -422,6 +451,32 @@ create_makefile '#{@spec.name}'
assert_same uninstaller, @post_uninstall_hook_arg
end
+ def test_uninstall_user_install_with_symlinked_home
+ pend "Symlinks not supported or not enabled" unless symlink_supported?
+
+ Gem::Specification.dirs = [Gem.user_dir]
+
+ symlinked_home = File.join(@tempdir, "new-home")
+ FileUtils.ln_s(Gem.user_home, symlinked_home)
+
+ ENV["HOME"] = symlinked_home
+ Gem.instance_variable_set(:@user_home, nil)
+ Gem.instance_variable_set(:@data_home, nil)
+
+ uninstaller = Gem::Uninstaller.new(@user_spec.name,
+ executables: true,
+ user_install: true,
+ force: true)
+
+ gem_dir = File.join @user_spec.gem_dir
+
+ assert_path_exist gem_dir
+
+ uninstaller.uninstall
+
+ assert_path_not_exist gem_dir
+ end
+
def test_uninstall_wrong_repo
Dir.mkdir "#{@gemhome}2"
Gem.use_paths "#{@gemhome}2", [@gemhome]
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
index 30a4a477f9..b915a86197 100644
--- a/test/rubygems/test_require.rb
+++ b/test/rubygems/test_require.rb
@@ -223,7 +223,7 @@ class TestGemRequire < Gem::TestCase
def test_activate_via_require_respects_loaded_files
pend "Not sure what's going on. If another spec creates a 'a' gem before
- this test, somehow require will load the benchmark in b, and ignore that the
+ this test, somehow require will load the erb in b, and ignore that the
stdlib one is already in $LOADED_FEATURES?. Reproducible by running the
spaceship_specific_file test before this one" if Gem.java_platform?
@@ -240,11 +240,11 @@ class TestGemRequire < Gem::TestCase
load_path_changed = true
end
- require "benchmark" # the stdlib
+ require "erb" # the stdlib
a1 = util_spec "a", "1", { "b" => ">= 1" }, "lib/test_gem_require_a.rb"
- b1 = util_spec "b", "1", nil, "lib/benchmark.rb"
- b2 = util_spec "b", "2", nil, "lib/benchmark.rb"
+ b1 = util_spec "b", "1", nil, "lib/erb.rb"
+ b2 = util_spec "b", "2", nil, "lib/erb.rb"
install_specs b1, b2, a1
@@ -257,12 +257,12 @@ class TestGemRequire < Gem::TestCase
assert_equal unresolved_names, ["b (>= 1)"]
- # The require('benchmark') below will activate b-2. However, its
- # lib/benchmark.rb won't ever be loaded. The reason is MRI sees that even
- # though b-2 is earlier in $LOAD_PATH it already loaded a benchmark.rb file
+ # The require('erb') below will activate b-2. However, its
+ # lib/erb.rb won't ever be loaded. The reason is MRI sees that even
+ # though b-2 is earlier in $LOAD_PATH it already loaded a erb.rb file
# and that still exists in $LOAD_PATH (further down),
# and as a result #gem_original_require returns false.
- refute require("benchmark"), "the benchmark stdlib should be recognized as already loaded"
+ refute require("erb"), "the erb stdlib should be recognized as already loaded"
assert_includes $LOAD_PATH, b2.full_require_paths[0]
assert_includes $LOAD_PATH, rubylibdir
@@ -273,7 +273,7 @@ class TestGemRequire < Gem::TestCase
assert_operator $LOAD_PATH.index(b2.full_require_paths[0]), :<, $LOAD_PATH.index(rubylibdir), message
# We detected that we should activate b-2, so we did so, but
- # then #gem_original_require decided "I've already got some benchmark.rb" loaded.
+ # then #gem_original_require decided "I've already got some erb.rb" loaded.
# This case is fine because our lazy loading provided exactly
# the same behavior as eager loading would have.
@@ -489,6 +489,22 @@ class TestGemRequire < Gem::TestCase
assert_equal %w[default-3.0], loaded_spec_names
end
+ def test_default_gem_and_normal_gem_same_version
+ default_gem_spec = new_default_spec("default", "3.0",
+ nil, "default/gem.rb")
+ install_default_gems(default_gem_spec)
+ normal_gem_spec = util_spec("default", "3.0", nil,
+ "lib/default/gem.rb")
+ install_specs(normal_gem_spec)
+
+ # Load default ruby gems fresh as if we've just started a ruby script.
+ Gem::Specification.reset
+
+ assert_require "default/gem"
+ assert_equal %w[default-3.0], loaded_spec_names
+ refute Gem.loaded_specs["default"].default_gem?
+ end
+
def test_normal_gem_does_not_shadow_default_gem
default_gem_spec = new_default_spec("foo", "2.0", nil, "foo.rb")
install_default_gems(default_gem_spec)
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index 7f9dc53cae..6a016da71d 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -70,7 +70,7 @@ class TestSocket_TCPSocket < Test::Unit::TestCase
end
def test_initialize_connect_timeout
- assert_raise(IO::TimeoutError, Errno::ENETUNREACH) do
+ assert_raise(IO::TimeoutError, Errno::ENETUNREACH, Errno::EACCES) do
TCPSocket.new("192.0.2.1", 80, connect_timeout: 0)
end
end
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 9031650581..aeccac2577 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -990,7 +990,8 @@ class TestStringIO < Test::Unit::TestCase
assert_predicate(s.string, :ascii_only?)
end
- if eval(%{ "test".frozen? && !"test".equal?("test") }) # Ruby 3.4+ chilled strings
+ require "objspace"
+ if ObjectSpace.respond_to?(:dump) && ObjectSpace.dump(eval(%{"test"})).include?('"chilled":true') # Ruby 3.4+ chilled strings
def test_chilled_string
chilled_string = eval(%{""})
io = StringIO.new(chilled_string)
diff --git a/test/strscan/test_stringscanner.rb b/test/strscan/test_stringscanner.rb
index 143cf7197d..9b7b7910d0 100644
--- a/test/strscan/test_stringscanner.rb
+++ b/test/strscan/test_stringscanner.rb
@@ -262,7 +262,7 @@ module StringScannerTests
end
def test_scan
- s = create_string_scanner('stra strb strc', true)
+ s = create_string_scanner("stra strb\0strc", true)
tmp = s.scan(/\w+/)
assert_equal 'stra', tmp
@@ -270,7 +270,7 @@ module StringScannerTests
assert_equal ' ', tmp
assert_equal 'strb', s.scan(/\w+/)
- assert_equal ' ', s.scan(/\s+/)
+ assert_equal "\u0000", s.scan(/\0/)
tmp = s.scan(/\w+/)
assert_equal 'strc', tmp
@@ -312,11 +312,14 @@ module StringScannerTests
end
def test_scan_string
- s = create_string_scanner('stra strb strc')
+ s = create_string_scanner("stra strb\0strc")
assert_equal 'str', s.scan('str')
assert_equal 'str', s[0]
assert_equal 3, s.pos
assert_equal 'a ', s.scan('a ')
+ assert_equal 'strb', s.scan('strb')
+ assert_equal "\u0000", s.scan("\0")
+ assert_equal 'strc', s.scan('strc')
str = 'stra strb strc'.dup
s = create_string_scanner(str, false)
@@ -668,13 +671,47 @@ module StringScannerTests
assert_equal(nil, s.exist?(/e/))
end
- def test_exist_p_string
+ def test_exist_p_invalid_argument
s = create_string_scanner("test string")
assert_raise(TypeError) do
- s.exist?(" ")
+ s.exist?(1)
end
end
+ def test_exist_p_string
+ omit("not implemented on TruffleRuby") if RUBY_ENGINE == "truffleruby"
+ s = create_string_scanner("test string")
+ assert_equal(3, s.exist?("s"))
+ assert_equal(0, s.pos)
+ s.scan("test")
+ assert_equal(2, s.exist?("s"))
+ assert_equal(4, s.pos)
+ assert_equal(nil, s.exist?("e"))
+ end
+
+ def test_scan_until
+ s = create_string_scanner("Foo Bar\0Baz")
+ assert_equal("Foo", s.scan_until(/Foo/))
+ assert_equal(3, s.pos)
+ assert_equal(" Bar", s.scan_until(/Bar/))
+ assert_equal(7, s.pos)
+ assert_equal(nil, s.skip_until(/Qux/))
+ assert_equal("\u0000Baz", s.scan_until(/Baz/))
+ assert_equal(11, s.pos)
+ end
+
+ def test_scan_until_string
+ omit("not implemented on TruffleRuby") if RUBY_ENGINE == "truffleruby"
+ s = create_string_scanner("Foo Bar\0Baz")
+ assert_equal("Foo", s.scan_until("Foo"))
+ assert_equal(3, s.pos)
+ assert_equal(" Bar", s.scan_until("Bar"))
+ assert_equal(7, s.pos)
+ assert_equal(nil, s.skip_until("Qux"))
+ assert_equal("\u0000Baz", s.scan_until("Baz"))
+ assert_equal(11, s.pos)
+ end
+
def test_skip_until
s = create_string_scanner("Foo Bar Baz")
assert_equal(3, s.skip_until(/Foo/))
@@ -684,6 +721,16 @@ module StringScannerTests
assert_equal(nil, s.skip_until(/Qux/))
end
+ def test_skip_until_string
+ omit("not implemented on TruffleRuby") if RUBY_ENGINE == "truffleruby"
+ s = create_string_scanner("Foo Bar Baz")
+ assert_equal(3, s.skip_until("Foo"))
+ assert_equal(3, s.pos)
+ assert_equal(4, s.skip_until("Bar"))
+ assert_equal(7, s.pos)
+ assert_equal(nil, s.skip_until("Qux"))
+ end
+
def test_check_until
s = create_string_scanner("Foo Bar Baz")
assert_equal("Foo", s.check_until(/Foo/))
@@ -693,6 +740,16 @@ module StringScannerTests
assert_equal(nil, s.check_until(/Qux/))
end
+ def test_check_until_string
+ omit("not implemented on TruffleRuby") if RUBY_ENGINE == "truffleruby"
+ s = create_string_scanner("Foo Bar Baz")
+ assert_equal("Foo", s.check_until("Foo"))
+ assert_equal(0, s.pos)
+ assert_equal("Foo Bar", s.check_until("Bar"))
+ assert_equal(0, s.pos)
+ assert_equal(nil, s.check_until("Qux"))
+ end
+
def test_search_full
s = create_string_scanner("Foo Bar Baz")
assert_equal(8, s.search_full(/Bar /, false, false))
@@ -705,6 +762,19 @@ module StringScannerTests
assert_equal(11, s.pos)
end
+ def test_search_full_string
+ omit("not implemented on TruffleRuby") if RUBY_ENGINE == "truffleruby"
+ s = create_string_scanner("Foo Bar Baz")
+ assert_equal(8, s.search_full("Bar ", false, false))
+ assert_equal(0, s.pos)
+ assert_equal("Foo Bar ", s.search_full("Bar ", false, true))
+ assert_equal(0, s.pos)
+ assert_equal(8, s.search_full("Bar ", true, false))
+ assert_equal(8, s.pos)
+ assert_equal("Baz", s.search_full("az", true, true))
+ assert_equal(11, s.pos)
+ end
+
def test_peek
s = create_string_scanner("test string")
assert_equal("test st", s.peek(7))
diff --git a/test/test_bundled_gems.rb b/test/test_bundled_gems.rb
new file mode 100644
index 0000000000..36f7324336
--- /dev/null
+++ b/test/test_bundled_gems.rb
@@ -0,0 +1,35 @@
+require_relative "rubygems/helper"
+require "rubygems"
+require "bundled_gems"
+
+class TestBundlerGem < Gem::TestCase
+ def setup
+ Gem::BUNDLED_GEMS::WARNED.clear
+ end
+
+ def teardown
+ Gem::BUNDLED_GEMS::WARNED.clear
+ end
+
+ def test_warning
+ assert Gem::BUNDLED_GEMS.warning?("rss", specs: {})
+ assert_nil Gem::BUNDLED_GEMS.warning?("rss", specs: {})
+ end
+
+ def test_no_warning_warning
+ assert_nil Gem::BUNDLED_GEMS.warning?("some_gem", specs: {})
+ assert_nil Gem::BUNDLED_GEMS.warning?("/path/to/some_gem.rb", specs: {})
+ end
+
+ def test_warning_libdir
+ path = File.join(::RbConfig::CONFIG.fetch("rubylibdir"), "rss.rb")
+ assert Gem::BUNDLED_GEMS.warning?(path, specs: {})
+ assert_nil Gem::BUNDLED_GEMS.warning?(path, specs: {})
+ end
+
+ def test_warning_archdir
+ path = File.join(::RbConfig::CONFIG.fetch("rubyarchdir"), "syslog.so")
+ assert Gem::BUNDLED_GEMS.warning?(path, specs: {})
+ assert_nil Gem::BUNDLED_GEMS.warning?(path, specs: {})
+ end
+end
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index eddbac5d75..8077cc3603 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -3,6 +3,8 @@ require 'test/unit'
require 'tempfile'
class TestTempfile < Test::Unit::TestCase
+ LIB_TEMPFILE_RB_PATH = File.expand_path(__dir__ + "/../lib/tempfile.rb")
+
def initialize(*)
super
@tempfile = nil
@@ -19,7 +21,7 @@ class TestTempfile < Test::Unit::TestCase
end
end
- def test_leackchecker
+ def test_leakchecker
assert_instance_of(Tempfile, Tempfile.allocate)
end
@@ -172,8 +174,40 @@ class TestTempfile < Test::Unit::TestCase
end
end unless /mswin|mingw/ =~ RUBY_PLATFORM
+ def test_finalizer_removes_file
+ assert_in_out_err("-r#{LIB_TEMPFILE_RB_PATH}", <<~RUBY) do |(filename,*), (error,*)|
+ file = Tempfile.new("foo")
+ puts file.path
+ RUBY
+ assert_file.not_exist?(filename)
+ assert_nil error
+ end
+ end
+
+ def test_finalizer_removes_file_when_dup
+ assert_in_out_err("-r#{LIB_TEMPFILE_RB_PATH}", <<~RUBY) do |(filename,*), (error,*)|
+ file = Tempfile.new("foo")
+ file.dup
+ puts file.path
+ RUBY
+ assert_file.not_exist?(filename)
+ assert_nil error
+ end
+ end
+
+ def test_finalizer_removes_file_when_clone
+ assert_in_out_err("-r#{LIB_TEMPFILE_RB_PATH}", <<~RUBY) do |(filename,*), (error,*)|
+ file = Tempfile.new("foo")
+ file.clone
+ puts file.path
+ RUBY
+ assert_file.not_exist?(filename)
+ assert_nil error
+ end
+ end
+
def test_finalizer_does_not_unlink_if_already_unlinked
- assert_in_out_err('-rtempfile', <<-'EOS') do |(filename,*), (error,*)|
+ assert_in_out_err("-r#{LIB_TEMPFILE_RB_PATH}", <<-'EOS') do |(filename,*), (error,*)|
file = Tempfile.new('foo')
path = file.path
puts path
@@ -185,7 +219,7 @@ File.open(path, "w").close
assert_nil error
end
- assert_in_out_err('-rtempfile', <<-'EOS') do |(filename,*), (error,*)|
+ assert_in_out_err("-r#{LIB_TEMPFILE_RB_PATH}", <<-'EOS') do |(filename,*), (error,*)|
file = Tempfile.new('foo')
path = file.path
file.unlink
@@ -215,7 +249,7 @@ File.open(path, "w").close
end
def test_tempfile_is_unlinked_when_ruby_exits
- assert_in_out_err('-rtempfile', <<-'EOS') do |(filename), (error)|
+ assert_in_out_err("-r#{LIB_TEMPFILE_RB_PATH}", <<-'EOS') do |(filename), (error)|
puts Tempfile.new('foo').path
EOS
assert_file.for("tempfile must not be exist after GC.").not_exist?(filename)
@@ -225,7 +259,7 @@ puts Tempfile.new('foo').path
def test_tempfile_finalizer_does_not_run_if_unlinked
bug8768 = '[ruby-core:56521] [Bug #8768]'
- assert_in_out_err(%w(-rtempfile), <<-'EOS') do |(filename), (error)|
+ assert_in_out_err("-r#{LIB_TEMPFILE_RB_PATH}", <<-'EOS') do |(filename), (error)|
tmp = Tempfile.new('foo')
puts tmp.path
tmp.close
@@ -425,4 +459,53 @@ puts Tempfile.new('foo').path
assert_not_send([File.absolute_path(actual), :start_with?, target])
end
end
+
+ def test_create_anonymous_without_block
+ t = Tempfile.create(anonymous: true)
+ assert_equal(File, t.class)
+ assert_equal(0600, t.stat.mode & 0777) unless /mswin|mingw/ =~ RUBY_PLATFORM
+ t.puts "foo"
+ t.rewind
+ assert_equal("foo\n", t.read)
+ t.close
+ ensure
+ t.close if t
+ end
+
+ def test_create_anonymous_with_block
+ result = Tempfile.create(anonymous: true) {|t|
+ assert_equal(File, t.class)
+ assert_equal(0600, t.stat.mode & 0777) unless /mswin|mingw/ =~ RUBY_PLATFORM
+ t.puts "foo"
+ t.rewind
+ assert_equal("foo\n", t.read)
+ :result
+ }
+ assert_equal(:result, result)
+ end
+
+ def test_create_anonymous_removes_file
+ Dir.mktmpdir {|d|
+ t = Tempfile.create("", d, anonymous: true)
+ t.close
+ assert_equal([], Dir.children(d))
+ }
+ end
+
+ def test_create_anonymous_path
+ Dir.mktmpdir {|d|
+ begin
+ t = Tempfile.create("", d, anonymous: true)
+ assert_equal(File.join(d, ""), t.path)
+ ensure
+ t.close if t
+ end
+ }
+ end
+
+ def test_create_anonymous_autoclose
+ Tempfile.create(anonymous: true) {|t|
+ assert_equal(true, t.autoclose?)
+ }
+ end
end
diff --git a/test/test_timeout.rb b/test/test_timeout.rb
index e900b10cd7..34966f92a4 100644
--- a/test/test_timeout.rb
+++ b/test/test_timeout.rb
@@ -66,7 +66,7 @@ class TestTimeout < Test::Unit::TestCase
a = nil
assert_raise(Timeout::Error) do
Timeout.timeout(0.1) {
- Timeout.timeout(1) {
+ Timeout.timeout(30) {
nil while true
}
a = 1
@@ -84,7 +84,7 @@ class TestTimeout < Test::Unit::TestCase
def test_nested_timeout_error_identity
begin
Timeout.timeout(0.1, MyNewErrorOuter) {
- Timeout.timeout(1, MyNewErrorInner) {
+ Timeout.timeout(30, MyNewErrorInner) {
nil while true
}
}
diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb
index 054ca15d7a..eae0610c87 100644
--- a/test/test_tmpdir.rb
+++ b/test/test_tmpdir.rb
@@ -104,6 +104,12 @@ class TestTmpdir < Test::Unit::TestCase
end
end
+ def test_mktmpdir_not_empty_parent
+ assert_raise(ArgumentError) do
+ Dir.mktmpdir("foo", "")
+ end
+ end
+
def assert_mktmpdir_traversal
Dir.mktmpdir do |target|
target = target.chomp('/') + '/'
diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb
index 1df19e6968..bccdeafeaf 100644
--- a/test/uri/test_common.rb
+++ b/test/uri/test_common.rb
@@ -10,6 +10,36 @@ class URI::TestCommon < Test::Unit::TestCase
def teardown
end
+ def test_fallback_constants
+ orig_verbose = $VERBOSE
+ $VERBOSE = nil
+ assert URI::ABS_URI
+ assert_raise(NameError) { URI::FOO }
+ ensure
+ $VERBOSE = orig_verbose
+ end
+
+ def test_parser_switch
+ assert_equal(URI::Parser, URI::RFC3986_Parser)
+ refute defined?(URI::REGEXP)
+ refute defined?(URI::PATTERN)
+
+ URI.parser = URI::RFC2396_PARSER
+
+ assert_equal(URI::Parser, URI::RFC2396_Parser)
+ assert defined?(URI::REGEXP)
+ assert defined?(URI::PATTERN)
+ assert defined?(URI::PATTERN::ESCAPED)
+
+ URI.parser = URI::RFC3986_PARSER
+
+ assert_equal(URI::Parser, URI::RFC3986_Parser)
+ refute defined?(URI::REGEXP)
+ refute defined?(URI::PATTERN)
+ ensure
+ URI.parser = URI::RFC3986_PARSER
+ end
+
def test_extract
EnvUtil.suppress_warning do
assert_equal(['http://example.com'],
diff --git a/test/uri/test_parser.rb b/test/uri/test_parser.rb
index 75c02fe65b..f455a5cc9b 100644
--- a/test/uri/test_parser.rb
+++ b/test/uri/test_parser.rb
@@ -8,8 +8,8 @@ class URI::TestParser < Test::Unit::TestCase
end
def test_inspect
- assert_match(/URI::RFC2396_Parser/, URI::Parser.new.inspect)
- assert_match(/URI::RFC3986_Parser/, URI::RFC3986_Parser.new.inspect)
+ assert_match(/URI::RFC2396_Parser/, URI::RFC2396_Parser.new.inspect)
+ assert_match(/URI::RFC3986_Parser/, URI::Parser.new.inspect)
end
def test_compare
@@ -33,7 +33,9 @@ class URI::TestParser < Test::Unit::TestCase
assert(!u2.equal?(u3))
end
- def test_parse
+ def test_parse_rfc2396_parser
+ URI.parser = URI::RFC2396_PARSER
+
escaped = URI::REGEXP::PATTERN::ESCAPED
hex = URI::REGEXP::PATTERN::HEX
p1 = URI::Parser.new(:ESCAPED => "(?:#{escaped}|%u[#{hex}]{4})")
@@ -43,6 +45,8 @@ class URI::TestParser < Test::Unit::TestCase
u1.path = '/%uDCBA'
assert_equal(['http', nil, 'a', URI::HTTP.default_port, '/%uDCBA', nil, nil],
uri_to_ary(u1))
+ ensure
+ URI.parser = URI::DEFAULT_PARSER
end
def test_parse_query_pct_encoded
@@ -65,8 +69,8 @@ class URI::TestParser < Test::Unit::TestCase
end
end
- def test_unescape
- p1 = URI::Parser.new
+ def test_rfc2822_unescape
+ p1 = URI::RFC2396_Parser.new
assert_equal("\xe3\x83\x90", p1.unescape("\xe3\x83\x90"))
assert_equal("\xe3\x83\x90", p1.unescape('%e3%83%90'))
assert_equal("\u3042", p1.unescape('%e3%81%82'.force_encoding(Encoding::US_ASCII)))
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index ae4adc21fe..15e5bd852f 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -991,6 +991,25 @@ if defined? Zlib
assert_raise(ArgumentError) { f.read(-1) }
assert_equal(str, f.read)
end
+
+ Zlib::GzipReader.open(t.path) do |f|
+ s = "".b
+
+ assert_raise(ArgumentError) { f.read(-1, s) }
+
+ assert_same s, f.read(1, s)
+ assert_equal "\xE3".b, s
+
+ assert_same s, f.read(2, s)
+ assert_equal "\x81\x82".b, s
+
+ assert_same s, f.read(6, s)
+ assert_equal "\u3044\u3046".b, s
+
+ assert_nil f.read(1, s)
+ assert_equal "".b, s
+ assert_predicate f, :eof?
+ end
}
end
@@ -1005,10 +1024,14 @@ if defined? Zlib
Zlib::GzipReader.open(t.path) do |f|
s = "".dup
- f.readpartial(3, s)
+ assert_same s, f.readpartial(3, s)
assert("foo".start_with?(s))
assert_raise(ArgumentError) { f.readpartial(-1) }
+
+ assert_same s, f.readpartial(3, s)
+
+ assert_predicate f, :eof?
end
}
end