class YARP::MutationVisitor

This visitor walks through the tree and copies each node as it is being visited. This is useful for consumers that want to mutate the tree, as you can change subtrees in place without effecting the rest of the tree.

Public Instance Methods

visit_alias_global_variable_node(node) click to toggle source

Copy a AliasGlobalVariableNode node

# File yarp/mutation_visitor.rb, line 14
def visit_alias_global_variable_node(node)
  node.copy(new_name: visit(node.new_name), old_name: visit(node.old_name))
end
visit_alias_method_node(node) click to toggle source

Copy a AliasMethodNode node

# File yarp/mutation_visitor.rb, line 19
def visit_alias_method_node(node)
  node.copy(new_name: visit(node.new_name), old_name: visit(node.old_name))
end
visit_alternation_pattern_node(node) click to toggle source

Copy a AlternationPatternNode node

# File yarp/mutation_visitor.rb, line 24
def visit_alternation_pattern_node(node)
  node.copy(left: visit(node.left), right: visit(node.right))
end
visit_and_node(node) click to toggle source

Copy a AndNode node

# File yarp/mutation_visitor.rb, line 29
def visit_and_node(node)
  node.copy(left: visit(node.left), right: visit(node.right))
end
visit_arguments_node(node) click to toggle source

Copy a ArgumentsNode node

# File yarp/mutation_visitor.rb, line 34
def visit_arguments_node(node)
  node.copy(arguments: visit_all(node.arguments))
end
visit_array_node(node) click to toggle source

Copy a ArrayNode node

# File yarp/mutation_visitor.rb, line 39
def visit_array_node(node)
  node.copy(elements: visit_all(node.elements))
end
visit_array_pattern_node(node) click to toggle source

Copy a ArrayPatternNode node

# File yarp/mutation_visitor.rb, line 44
def visit_array_pattern_node(node)
  node.copy(constant: visit(node.constant), requireds: visit_all(node.requireds), rest: visit(node.rest), posts: visit_all(node.posts))
end
visit_assoc_node(node) click to toggle source

Copy a AssocNode node

# File yarp/mutation_visitor.rb, line 49
def visit_assoc_node(node)
  node.copy(key: visit(node.key), value: visit(node.value))
end
visit_assoc_splat_node(node) click to toggle source

Copy a AssocSplatNode node

# File yarp/mutation_visitor.rb, line 54
def visit_assoc_splat_node(node)
  node.copy(value: visit(node.value))
end
visit_back_reference_read_node(node) click to toggle source

Copy a BackReferenceReadNode node

# File yarp/mutation_visitor.rb, line 59
def visit_back_reference_read_node(node)
  node.copy
end
visit_begin_node(node) click to toggle source

Copy a BeginNode node

# File yarp/mutation_visitor.rb, line 64
def visit_begin_node(node)
  node.copy(statements: visit(node.statements), rescue_clause: visit(node.rescue_clause), else_clause: visit(node.else_clause), ensure_clause: visit(node.ensure_clause))
end
visit_block_argument_node(node) click to toggle source

Copy a BlockArgumentNode node

# File yarp/mutation_visitor.rb, line 69
def visit_block_argument_node(node)
  node.copy(expression: visit(node.expression))
end
visit_block_local_variable_node(node) click to toggle source

Copy a BlockLocalVariableNode node

# File yarp/mutation_visitor.rb, line 74
def visit_block_local_variable_node(node)
  node.copy
end
visit_block_node(node) click to toggle source

Copy a BlockNode node

# File yarp/mutation_visitor.rb, line 79
def visit_block_node(node)
  node.copy(parameters: visit(node.parameters), body: visit(node.body))
end
visit_block_parameter_node(node) click to toggle source

Copy a BlockParameterNode node

# File yarp/mutation_visitor.rb, line 84
def visit_block_parameter_node(node)
  node.copy
end
visit_block_parameters_node(node) click to toggle source

Copy a BlockParametersNode node

# File yarp/mutation_visitor.rb, line 89
def visit_block_parameters_node(node)
  node.copy(parameters: visit(node.parameters), locals: visit_all(node.locals))
end
visit_break_node(node) click to toggle source

Copy a BreakNode node

# File yarp/mutation_visitor.rb, line 94
def visit_break_node(node)
  node.copy(arguments: visit(node.arguments))
end
visit_call_and_write_node(node) click to toggle source

Copy a CallAndWriteNode node

# File yarp/mutation_visitor.rb, line 99
def visit_call_and_write_node(node)
  node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), value: visit(node.value))
end
visit_call_node(node) click to toggle source

Copy a CallNode node

# File yarp/mutation_visitor.rb, line 104
def visit_call_node(node)
  node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), block: visit(node.block))
end
visit_call_operator_write_node(node) click to toggle source

Copy a CallOperatorWriteNode node

# File yarp/mutation_visitor.rb, line 109
def visit_call_operator_write_node(node)
  node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), value: visit(node.value))
end
visit_call_or_write_node(node) click to toggle source

Copy a CallOrWriteNode node

# File yarp/mutation_visitor.rb, line 114
def visit_call_or_write_node(node)
  node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), value: visit(node.value))
end
visit_capture_pattern_node(node) click to toggle source

Copy a CapturePatternNode node

# File yarp/mutation_visitor.rb, line 119
def visit_capture_pattern_node(node)
  node.copy(value: visit(node.value), target: visit(node.target))
end
visit_case_node(node) click to toggle source

Copy a CaseNode node

# File yarp/mutation_visitor.rb, line 124
def visit_case_node(node)
  node.copy(predicate: visit(node.predicate), conditions: visit_all(node.conditions), consequent: visit(node.consequent))
end
visit_class_node(node) click to toggle source

Copy a ClassNode node

# File yarp/mutation_visitor.rb, line 129
def visit_class_node(node)
  node.copy(constant_path: visit(node.constant_path), superclass: visit(node.superclass), body: visit(node.body))
end
visit_class_variable_and_write_node(node) click to toggle source

Copy a ClassVariableAndWriteNode node

# File yarp/mutation_visitor.rb, line 134
def visit_class_variable_and_write_node(node)
  node.copy(value: visit(node.value))
end
visit_class_variable_operator_write_node(node) click to toggle source

Copy a ClassVariableOperatorWriteNode node

# File yarp/mutation_visitor.rb, line 139
def visit_class_variable_operator_write_node(node)
  node.copy(value: visit(node.value))
end
visit_class_variable_or_write_node(node) click to toggle source

Copy a ClassVariableOrWriteNode node

# File yarp/mutation_visitor.rb, line 144
def visit_class_variable_or_write_node(node)
  node.copy(value: visit(node.value))
end
visit_class_variable_read_node(node) click to toggle source

Copy a ClassVariableReadNode node

# File yarp/mutation_visitor.rb, line 149
def visit_class_variable_read_node(node)
  node.copy
end
visit_class_variable_target_node(node) click to toggle source

Copy a ClassVariableTargetNode node

# File yarp/mutation_visitor.rb, line 154
def visit_class_variable_target_node(node)
  node.copy
end
visit_class_variable_write_node(node) click to toggle source

Copy a ClassVariableWriteNode node

# File yarp/mutation_visitor.rb, line 159
def visit_class_variable_write_node(node)
  node.copy(value: visit(node.value))
end
visit_constant_and_write_node(node) click to toggle source

Copy a ConstantAndWriteNode node

# File yarp/mutation_visitor.rb, line 164
def visit_constant_and_write_node(node)
  node.copy(value: visit(node.value))
end
visit_constant_operator_write_node(node) click to toggle source

Copy a ConstantOperatorWriteNode node

# File yarp/mutation_visitor.rb, line 169
def visit_constant_operator_write_node(node)
  node.copy(value: visit(node.value))
end
visit_constant_or_write_node(node) click to toggle source

Copy a ConstantOrWriteNode node

# File yarp/mutation_visitor.rb, line 174
def visit_constant_or_write_node(node)
  node.copy(value: visit(node.value))
end
visit_constant_path_and_write_node(node) click to toggle source

Copy a ConstantPathAndWriteNode node

# File yarp/mutation_visitor.rb, line 179
def visit_constant_path_and_write_node(node)
  node.copy(target: visit(node.target), value: visit(node.value))
end
visit_constant_path_node(node) click to toggle source

Copy a ConstantPathNode node

# File yarp/mutation_visitor.rb, line 184
def visit_constant_path_node(node)
  node.copy(parent: visit(node.parent), child: visit(node.child))
end
visit_constant_path_operator_write_node(node) click to toggle source

Copy a ConstantPathOperatorWriteNode node

# File yarp/mutation_visitor.rb, line 189
def visit_constant_path_operator_write_node(node)
  node.copy(target: visit(node.target), value: visit(node.value))
end
visit_constant_path_or_write_node(node) click to toggle source

Copy a ConstantPathOrWriteNode node

# File yarp/mutation_visitor.rb, line 194
def visit_constant_path_or_write_node(node)
  node.copy(target: visit(node.target), value: visit(node.value))
end
visit_constant_path_target_node(node) click to toggle source

Copy a ConstantPathTargetNode node

# File yarp/mutation_visitor.rb, line 199
def visit_constant_path_target_node(node)
  node.copy(parent: visit(node.parent), child: visit(node.child))
end
visit_constant_path_write_node(node) click to toggle source

Copy a ConstantPathWriteNode node

# File yarp/mutation_visitor.rb, line 204
def visit_constant_path_write_node(node)
  node.copy(target: visit(node.target), value: visit(node.value))
end
visit_constant_read_node(node) click to toggle source

Copy a ConstantReadNode node

# File yarp/mutation_visitor.rb, line 209
def visit_constant_read_node(node)
  node.copy
end
visit_constant_target_node(node) click to toggle source

Copy a ConstantTargetNode node

# File yarp/mutation_visitor.rb, line 214
def visit_constant_target_node(node)
  node.copy
end
visit_constant_write_node(node) click to toggle source

Copy a ConstantWriteNode node

# File yarp/mutation_visitor.rb, line 219
def visit_constant_write_node(node)
  node.copy(value: visit(node.value))
end
visit_def_node(node) click to toggle source

Copy a DefNode node

# File yarp/mutation_visitor.rb, line 224
def visit_def_node(node)
  node.copy(receiver: visit(node.receiver), parameters: visit(node.parameters), body: visit(node.body))
end
visit_defined_node(node) click to toggle source

Copy a DefinedNode node

# File yarp/mutation_visitor.rb, line 229
def visit_defined_node(node)
  node.copy(value: visit(node.value))
end
visit_else_node(node) click to toggle source

Copy a ElseNode node

# File yarp/mutation_visitor.rb, line 234
def visit_else_node(node)
  node.copy(statements: visit(node.statements))
end
visit_embedded_statements_node(node) click to toggle source

Copy a EmbeddedStatementsNode node

# File yarp/mutation_visitor.rb, line 239
def visit_embedded_statements_node(node)
  node.copy(statements: visit(node.statements))
end
visit_embedded_variable_node(node) click to toggle source

Copy a EmbeddedVariableNode node

# File yarp/mutation_visitor.rb, line 244
def visit_embedded_variable_node(node)
  node.copy(variable: visit(node.variable))
end
visit_ensure_node(node) click to toggle source

Copy a EnsureNode node

# File yarp/mutation_visitor.rb, line 249
def visit_ensure_node(node)
  node.copy(statements: visit(node.statements))
end
visit_false_node(node) click to toggle source

Copy a FalseNode node

# File yarp/mutation_visitor.rb, line 254
def visit_false_node(node)
  node.copy
end
visit_find_pattern_node(node) click to toggle source

Copy a FindPatternNode node

# File yarp/mutation_visitor.rb, line 259
def visit_find_pattern_node(node)
  node.copy(constant: visit(node.constant), left: visit(node.left), requireds: visit_all(node.requireds), right: visit(node.right))
end
visit_flip_flop_node(node) click to toggle source

Copy a FlipFlopNode node

# File yarp/mutation_visitor.rb, line 264
def visit_flip_flop_node(node)
  node.copy(left: visit(node.left), right: visit(node.right))
end
visit_float_node(node) click to toggle source

Copy a FloatNode node

# File yarp/mutation_visitor.rb, line 269
def visit_float_node(node)
  node.copy
end
visit_for_node(node) click to toggle source

Copy a ForNode node

# File yarp/mutation_visitor.rb, line 274
def visit_for_node(node)
  node.copy(index: visit(node.index), collection: visit(node.collection), statements: visit(node.statements))
end
visit_forwarding_arguments_node(node) click to toggle source

Copy a ForwardingArgumentsNode node

# File yarp/mutation_visitor.rb, line 279
def visit_forwarding_arguments_node(node)
  node.copy
end
visit_forwarding_parameter_node(node) click to toggle source

Copy a ForwardingParameterNode node

# File yarp/mutation_visitor.rb, line 284
def visit_forwarding_parameter_node(node)
  node.copy
end
visit_forwarding_super_node(node) click to toggle source

Copy a ForwardingSuperNode node

# File yarp/mutation_visitor.rb, line 289
def visit_forwarding_super_node(node)
  node.copy(block: visit(node.block))
end
visit_global_variable_and_write_node(node) click to toggle source

Copy a GlobalVariableAndWriteNode node

# File yarp/mutation_visitor.rb, line 294
def visit_global_variable_and_write_node(node)
  node.copy(value: visit(node.value))
end
visit_global_variable_operator_write_node(node) click to toggle source

Copy a GlobalVariableOperatorWriteNode node

# File yarp/mutation_visitor.rb, line 299
def visit_global_variable_operator_write_node(node)
  node.copy(value: visit(node.value))
end
visit_global_variable_or_write_node(node) click to toggle source

Copy a GlobalVariableOrWriteNode node

# File yarp/mutation_visitor.rb, line 304
def visit_global_variable_or_write_node(node)
  node.copy(value: visit(node.value))
end
visit_global_variable_read_node(node) click to toggle source

Copy a GlobalVariableReadNode node

# File yarp/mutation_visitor.rb, line 309
def visit_global_variable_read_node(node)
  node.copy
end
visit_global_variable_target_node(node) click to toggle source

Copy a GlobalVariableTargetNode node

# File yarp/mutation_visitor.rb, line 314
def visit_global_variable_target_node(node)
  node.copy
end
visit_global_variable_write_node(node) click to toggle source

Copy a GlobalVariableWriteNode node

# File yarp/mutation_visitor.rb, line 319
def visit_global_variable_write_node(node)
  node.copy(value: visit(node.value))
end
visit_hash_node(node) click to toggle source

Copy a HashNode node

# File yarp/mutation_visitor.rb, line 324
def visit_hash_node(node)
  node.copy(elements: visit_all(node.elements))
end
visit_hash_pattern_node(node) click to toggle source

Copy a HashPatternNode node

# File yarp/mutation_visitor.rb, line 329
def visit_hash_pattern_node(node)
  node.copy(constant: visit(node.constant), assocs: visit_all(node.assocs), kwrest: visit(node.kwrest))
end
visit_if_node(node) click to toggle source

Copy a IfNode node

# File yarp/mutation_visitor.rb, line 334
def visit_if_node(node)
  node.copy(predicate: visit(node.predicate), statements: visit(node.statements), consequent: visit(node.consequent))
end
visit_imaginary_node(node) click to toggle source

Copy a ImaginaryNode node

# File yarp/mutation_visitor.rb, line 339
def visit_imaginary_node(node)
  node.copy(numeric: visit(node.numeric))
end
visit_in_node(node) click to toggle source

Copy a InNode node

# File yarp/mutation_visitor.rb, line 344
def visit_in_node(node)
  node.copy(pattern: visit(node.pattern), statements: visit(node.statements))
end
visit_instance_variable_and_write_node(node) click to toggle source

Copy a InstanceVariableAndWriteNode node

# File yarp/mutation_visitor.rb, line 349
def visit_instance_variable_and_write_node(node)
  node.copy(value: visit(node.value))
end
visit_instance_variable_operator_write_node(node) click to toggle source

Copy a InstanceVariableOperatorWriteNode node

# File yarp/mutation_visitor.rb, line 354
def visit_instance_variable_operator_write_node(node)
  node.copy(value: visit(node.value))
end
visit_instance_variable_or_write_node(node) click to toggle source

Copy a InstanceVariableOrWriteNode node

# File yarp/mutation_visitor.rb, line 359
def visit_instance_variable_or_write_node(node)
  node.copy(value: visit(node.value))
end
visit_instance_variable_read_node(node) click to toggle source

Copy a InstanceVariableReadNode node

# File yarp/mutation_visitor.rb, line 364
def visit_instance_variable_read_node(node)
  node.copy
end
visit_instance_variable_target_node(node) click to toggle source

Copy a InstanceVariableTargetNode node

# File yarp/mutation_visitor.rb, line 369
def visit_instance_variable_target_node(node)
  node.copy
end
visit_instance_variable_write_node(node) click to toggle source

Copy a InstanceVariableWriteNode node

# File yarp/mutation_visitor.rb, line 374
def visit_instance_variable_write_node(node)
  node.copy(value: visit(node.value))
end
visit_integer_node(node) click to toggle source

Copy a IntegerNode node

# File yarp/mutation_visitor.rb, line 379
def visit_integer_node(node)
  node.copy
end
visit_interpolated_match_last_line_node(node) click to toggle source

Copy a InterpolatedMatchLastLineNode node

# File yarp/mutation_visitor.rb, line 384
def visit_interpolated_match_last_line_node(node)
  node.copy(parts: visit_all(node.parts))
end
visit_interpolated_regular_expression_node(node) click to toggle source

Copy a InterpolatedRegularExpressionNode node

# File yarp/mutation_visitor.rb, line 389
def visit_interpolated_regular_expression_node(node)
  node.copy(parts: visit_all(node.parts))
end
visit_interpolated_string_node(node) click to toggle source

Copy a InterpolatedStringNode node

# File yarp/mutation_visitor.rb, line 394
def visit_interpolated_string_node(node)
  node.copy(parts: visit_all(node.parts))
end
visit_interpolated_symbol_node(node) click to toggle source

Copy a InterpolatedSymbolNode node

# File yarp/mutation_visitor.rb, line 399
def visit_interpolated_symbol_node(node)
  node.copy(parts: visit_all(node.parts))
end
visit_interpolated_x_string_node(node) click to toggle source

Copy a InterpolatedXStringNode node

# File yarp/mutation_visitor.rb, line 404
def visit_interpolated_x_string_node(node)
  node.copy(parts: visit_all(node.parts))
end
visit_keyword_hash_node(node) click to toggle source

Copy a KeywordHashNode node

# File yarp/mutation_visitor.rb, line 409
def visit_keyword_hash_node(node)
  node.copy(elements: visit_all(node.elements))
end
visit_keyword_parameter_node(node) click to toggle source

Copy a KeywordParameterNode node

# File yarp/mutation_visitor.rb, line 414
def visit_keyword_parameter_node(node)
  node.copy(value: visit(node.value))
end
visit_keyword_rest_parameter_node(node) click to toggle source

Copy a KeywordRestParameterNode node

# File yarp/mutation_visitor.rb, line 419
def visit_keyword_rest_parameter_node(node)
  node.copy
end
visit_lambda_node(node) click to toggle source

Copy a LambdaNode node

# File yarp/mutation_visitor.rb, line 424
def visit_lambda_node(node)
  node.copy(parameters: visit(node.parameters), body: visit(node.body))
end
visit_local_variable_and_write_node(node) click to toggle source

Copy a LocalVariableAndWriteNode node

# File yarp/mutation_visitor.rb, line 429
def visit_local_variable_and_write_node(node)
  node.copy(value: visit(node.value))
end
visit_local_variable_operator_write_node(node) click to toggle source

Copy a LocalVariableOperatorWriteNode node

# File yarp/mutation_visitor.rb, line 434
def visit_local_variable_operator_write_node(node)
  node.copy(value: visit(node.value))
end
visit_local_variable_or_write_node(node) click to toggle source

Copy a LocalVariableOrWriteNode node

# File yarp/mutation_visitor.rb, line 439
def visit_local_variable_or_write_node(node)
  node.copy(value: visit(node.value))
end
visit_local_variable_read_node(node) click to toggle source

Copy a LocalVariableReadNode node

# File yarp/mutation_visitor.rb, line 444
def visit_local_variable_read_node(node)
  node.copy
end
visit_local_variable_target_node(node) click to toggle source

Copy a LocalVariableTargetNode node

# File yarp/mutation_visitor.rb, line 449
def visit_local_variable_target_node(node)
  node.copy
end
visit_local_variable_write_node(node) click to toggle source

Copy a LocalVariableWriteNode node

# File yarp/mutation_visitor.rb, line 454
def visit_local_variable_write_node(node)
  node.copy(value: visit(node.value))
end
visit_match_last_line_node(node) click to toggle source

Copy a MatchLastLineNode node

# File yarp/mutation_visitor.rb, line 459
def visit_match_last_line_node(node)
  node.copy
end
visit_match_predicate_node(node) click to toggle source

Copy a MatchPredicateNode node

# File yarp/mutation_visitor.rb, line 464
def visit_match_predicate_node(node)
  node.copy(value: visit(node.value), pattern: visit(node.pattern))
end
visit_match_required_node(node) click to toggle source

Copy a MatchRequiredNode node

# File yarp/mutation_visitor.rb, line 469
def visit_match_required_node(node)
  node.copy(value: visit(node.value), pattern: visit(node.pattern))
end
visit_missing_node(node) click to toggle source

Copy a MissingNode node

# File yarp/mutation_visitor.rb, line 474
def visit_missing_node(node)
  node.copy
end
visit_module_node(node) click to toggle source

Copy a ModuleNode node

# File yarp/mutation_visitor.rb, line 479
def visit_module_node(node)
  node.copy(constant_path: visit(node.constant_path), body: visit(node.body))
end
visit_multi_target_node(node) click to toggle source

Copy a MultiTargetNode node

# File yarp/mutation_visitor.rb, line 484
def visit_multi_target_node(node)
  node.copy(targets: visit_all(node.targets))
end
visit_multi_write_node(node) click to toggle source

Copy a MultiWriteNode node

# File yarp/mutation_visitor.rb, line 489
def visit_multi_write_node(node)
  node.copy(targets: visit_all(node.targets), value: visit(node.value))
end
visit_next_node(node) click to toggle source

Copy a NextNode node

# File yarp/mutation_visitor.rb, line 494
def visit_next_node(node)
  node.copy(arguments: visit(node.arguments))
end
visit_nil_node(node) click to toggle source

Copy a NilNode node

# File yarp/mutation_visitor.rb, line 499
def visit_nil_node(node)
  node.copy
end
visit_no_keywords_parameter_node(node) click to toggle source

Copy a NoKeywordsParameterNode node

# File yarp/mutation_visitor.rb, line 504
def visit_no_keywords_parameter_node(node)
  node.copy
end
visit_numbered_reference_read_node(node) click to toggle source

Copy a NumberedReferenceReadNode node

# File yarp/mutation_visitor.rb, line 509
def visit_numbered_reference_read_node(node)
  node.copy
end
visit_optional_parameter_node(node) click to toggle source

Copy a OptionalParameterNode node

# File yarp/mutation_visitor.rb, line 514
def visit_optional_parameter_node(node)
  node.copy(value: visit(node.value))
end
visit_or_node(node) click to toggle source

Copy a OrNode node

# File yarp/mutation_visitor.rb, line 519
def visit_or_node(node)
  node.copy(left: visit(node.left), right: visit(node.right))
end
visit_parameters_node(node) click to toggle source

Copy a ParametersNode node

# File yarp/mutation_visitor.rb, line 524
def visit_parameters_node(node)
  node.copy(requireds: visit_all(node.requireds), optionals: visit_all(node.optionals), rest: visit(node.rest), posts: visit_all(node.posts), keywords: visit_all(node.keywords), keyword_rest: visit(node.keyword_rest), block: visit(node.block))
end
visit_parentheses_node(node) click to toggle source

Copy a ParenthesesNode node

# File yarp/mutation_visitor.rb, line 529
def visit_parentheses_node(node)
  node.copy(body: visit(node.body))
end
visit_pinned_expression_node(node) click to toggle source

Copy a PinnedExpressionNode node

# File yarp/mutation_visitor.rb, line 534
def visit_pinned_expression_node(node)
  node.copy(expression: visit(node.expression))
end
visit_pinned_variable_node(node) click to toggle source

Copy a PinnedVariableNode node

# File yarp/mutation_visitor.rb, line 539
def visit_pinned_variable_node(node)
  node.copy(variable: visit(node.variable))
end
visit_post_execution_node(node) click to toggle source

Copy a PostExecutionNode node

# File yarp/mutation_visitor.rb, line 544
def visit_post_execution_node(node)
  node.copy(statements: visit(node.statements))
end
visit_pre_execution_node(node) click to toggle source

Copy a PreExecutionNode node

# File yarp/mutation_visitor.rb, line 549
def visit_pre_execution_node(node)
  node.copy(statements: visit(node.statements))
end
visit_program_node(node) click to toggle source

Copy a ProgramNode node

# File yarp/mutation_visitor.rb, line 554
def visit_program_node(node)
  node.copy(statements: visit(node.statements))
end
visit_range_node(node) click to toggle source

Copy a RangeNode node

# File yarp/mutation_visitor.rb, line 559
def visit_range_node(node)
  node.copy(left: visit(node.left), right: visit(node.right))
end
visit_rational_node(node) click to toggle source

Copy a RationalNode node

# File yarp/mutation_visitor.rb, line 564
def visit_rational_node(node)
  node.copy(numeric: visit(node.numeric))
end
visit_redo_node(node) click to toggle source

Copy a RedoNode node

# File yarp/mutation_visitor.rb, line 569
def visit_redo_node(node)
  node.copy
end
visit_regular_expression_node(node) click to toggle source

Copy a RegularExpressionNode node

# File yarp/mutation_visitor.rb, line 574
def visit_regular_expression_node(node)
  node.copy
end
visit_required_destructured_parameter_node(node) click to toggle source

Copy a RequiredDestructuredParameterNode node

# File yarp/mutation_visitor.rb, line 579
def visit_required_destructured_parameter_node(node)
  node.copy(parameters: visit_all(node.parameters))
end
visit_required_parameter_node(node) click to toggle source

Copy a RequiredParameterNode node

# File yarp/mutation_visitor.rb, line 584
def visit_required_parameter_node(node)
  node.copy
end
visit_rescue_modifier_node(node) click to toggle source

Copy a RescueModifierNode node

# File yarp/mutation_visitor.rb, line 589
def visit_rescue_modifier_node(node)
  node.copy(expression: visit(node.expression), rescue_expression: visit(node.rescue_expression))
end
visit_rescue_node(node) click to toggle source

Copy a RescueNode node

# File yarp/mutation_visitor.rb, line 594
def visit_rescue_node(node)
  node.copy(exceptions: visit_all(node.exceptions), reference: visit(node.reference), statements: visit(node.statements), consequent: visit(node.consequent))
end
visit_rest_parameter_node(node) click to toggle source

Copy a RestParameterNode node

# File yarp/mutation_visitor.rb, line 599
def visit_rest_parameter_node(node)
  node.copy
end
visit_retry_node(node) click to toggle source

Copy a RetryNode node

# File yarp/mutation_visitor.rb, line 604
def visit_retry_node(node)
  node.copy
end
visit_return_node(node) click to toggle source

Copy a ReturnNode node

# File yarp/mutation_visitor.rb, line 609
def visit_return_node(node)
  node.copy(arguments: visit(node.arguments))
end
visit_self_node(node) click to toggle source

Copy a SelfNode node

# File yarp/mutation_visitor.rb, line 614
def visit_self_node(node)
  node.copy
end
visit_singleton_class_node(node) click to toggle source

Copy a SingletonClassNode node

# File yarp/mutation_visitor.rb, line 619
def visit_singleton_class_node(node)
  node.copy(expression: visit(node.expression), body: visit(node.body))
end
visit_source_encoding_node(node) click to toggle source

Copy a SourceEncodingNode node

# File yarp/mutation_visitor.rb, line 624
def visit_source_encoding_node(node)
  node.copy
end
visit_source_file_node(node) click to toggle source

Copy a SourceFileNode node

# File yarp/mutation_visitor.rb, line 629
def visit_source_file_node(node)
  node.copy
end
visit_source_line_node(node) click to toggle source

Copy a SourceLineNode node

# File yarp/mutation_visitor.rb, line 634
def visit_source_line_node(node)
  node.copy
end
visit_splat_node(node) click to toggle source

Copy a SplatNode node

# File yarp/mutation_visitor.rb, line 639
def visit_splat_node(node)
  node.copy(expression: visit(node.expression))
end
visit_statements_node(node) click to toggle source

Copy a StatementsNode node

# File yarp/mutation_visitor.rb, line 644
def visit_statements_node(node)
  node.copy(body: visit_all(node.body))
end
visit_string_concat_node(node) click to toggle source

Copy a StringConcatNode node

# File yarp/mutation_visitor.rb, line 649
def visit_string_concat_node(node)
  node.copy(left: visit(node.left), right: visit(node.right))
end
visit_string_node(node) click to toggle source

Copy a StringNode node

# File yarp/mutation_visitor.rb, line 654
def visit_string_node(node)
  node.copy
end
visit_super_node(node) click to toggle source

Copy a SuperNode node

# File yarp/mutation_visitor.rb, line 659
def visit_super_node(node)
  node.copy(arguments: visit(node.arguments), block: visit(node.block))
end
visit_symbol_node(node) click to toggle source

Copy a SymbolNode node

# File yarp/mutation_visitor.rb, line 664
def visit_symbol_node(node)
  node.copy
end
visit_true_node(node) click to toggle source

Copy a TrueNode node

# File yarp/mutation_visitor.rb, line 669
def visit_true_node(node)
  node.copy
end
visit_undef_node(node) click to toggle source

Copy a UndefNode node

# File yarp/mutation_visitor.rb, line 674
def visit_undef_node(node)
  node.copy(names: visit_all(node.names))
end
visit_unless_node(node) click to toggle source

Copy a UnlessNode node

# File yarp/mutation_visitor.rb, line 679
def visit_unless_node(node)
  node.copy(predicate: visit(node.predicate), statements: visit(node.statements), consequent: visit(node.consequent))
end
visit_until_node(node) click to toggle source

Copy a UntilNode node

# File yarp/mutation_visitor.rb, line 684
def visit_until_node(node)
  node.copy(predicate: visit(node.predicate), statements: visit(node.statements))
end
visit_when_node(node) click to toggle source

Copy a WhenNode node

# File yarp/mutation_visitor.rb, line 689
def visit_when_node(node)
  node.copy(conditions: visit_all(node.conditions), statements: visit(node.statements))
end
visit_while_node(node) click to toggle source

Copy a WhileNode node

# File yarp/mutation_visitor.rb, line 694
def visit_while_node(node)
  node.copy(predicate: visit(node.predicate), statements: visit(node.statements))
end
visit_x_string_node(node) click to toggle source

Copy a XStringNode node

# File yarp/mutation_visitor.rb, line 699
def visit_x_string_node(node)
  node.copy
end
visit_yield_node(node) click to toggle source

Copy a YieldNode node

# File yarp/mutation_visitor.rb, line 704
def visit_yield_node(node)
  node.copy(arguments: visit(node.arguments))
end