class Prism::MutationCompiler - Documentation for Ruby 3.4
Description: class Prism::MutationCompiler: 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
Keywords: ruby,class,Prism::MutationCompiler

# class Prism::MutationCompiler

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)
Source

    # File lib/prism/mutation_compiler.rb, line 18
    def visit_alias_global_variable_node(node)
      node.copy(new_name: visit(node.new_name), old_name: visit(node.old_name))
    end

Copy a `AliasGlobalVariableNode` node

visit_alias_method_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 23
    def visit_alias_method_node(node)
      node.copy(new_name: visit(node.new_name), old_name: visit(node.old_name))
    end

Copy a `AliasMethodNode` node

visit_alternation_pattern_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 28
    def visit_alternation_pattern_node(node)
      node.copy(left: visit(node.left), right: visit(node.right))
    end

Copy a `AlternationPatternNode` node

visit_and_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 33
    def visit_and_node(node)
      node.copy(left: visit(node.left), right: visit(node.right))
    end

Copy a `AndNode` node

visit_arguments_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 38
    def visit_arguments_node(node)
      node.copy(arguments: visit_all(node.arguments))
    end

Copy a `ArgumentsNode` node

visit_array_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 43
    def visit_array_node(node)
      node.copy(elements: visit_all(node.elements))
    end

Copy a `ArrayNode` node

visit_array_pattern_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 48
    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

Copy a `ArrayPatternNode` node

visit_assoc_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 53
    def visit_assoc_node(node)
      node.copy(key: visit(node.key), value: visit(node.value))
    end

Copy a `AssocNode` node

visit_assoc_splat_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 58
    def visit_assoc_splat_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `AssocSplatNode` node

visit_back_reference_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 63
    def visit_back_reference_read_node(node)
      node.copy
    end

Copy a `BackReferenceReadNode` node

visit_begin_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 68
    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

Copy a `BeginNode` node

visit_block_argument_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 73
    def visit_block_argument_node(node)
      node.copy(expression: visit(node.expression))
    end

Copy a `BlockArgumentNode` node

visit_block_local_variable_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 78
    def visit_block_local_variable_node(node)
      node.copy
    end

Copy a `BlockLocalVariableNode` node

visit_block_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 83
    def visit_block_node(node)
      node.copy(parameters: visit(node.parameters), body: visit(node.body))
    end

Copy a `BlockNode` node

visit_block_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 88
    def visit_block_parameter_node(node)
      node.copy
    end

Copy a `BlockParameterNode` node

visit_block_parameters_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 93
    def visit_block_parameters_node(node)
      node.copy(parameters: visit(node.parameters), locals: visit_all(node.locals))
    end

Copy a `BlockParametersNode` node

visit_break_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 98
    def visit_break_node(node)
      node.copy(arguments: visit(node.arguments))
    end

Copy a `BreakNode` node

visit_call_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 103
    def visit_call_and_write_node(node)
      node.copy(receiver: visit(node.receiver), value: visit(node.value))
    end

Copy a `CallAndWriteNode` node

visit_call_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 108
    def visit_call_node(node)
      node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), block: visit(node.block))
    end

Copy a `CallNode` node

visit_call_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 113
    def visit_call_operator_write_node(node)
      node.copy(receiver: visit(node.receiver), value: visit(node.value))
    end

Copy a `CallOperatorWriteNode` node

visit_call_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 118
    def visit_call_or_write_node(node)
      node.copy(receiver: visit(node.receiver), value: visit(node.value))
    end

Copy a `CallOrWriteNode` node

visit_call_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 123
    def visit_call_target_node(node)
      node.copy(receiver: visit(node.receiver))
    end

Copy a `CallTargetNode` node

visit_capture_pattern_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 128
    def visit_capture_pattern_node(node)
      node.copy(value: visit(node.value), target: visit(node.target))
    end

Copy a `CapturePatternNode` node

visit_case_match_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 133
    def visit_case_match_node(node)
      node.copy(predicate: visit(node.predicate), conditions: visit_all(node.conditions), else_clause: visit(node.else_clause))
    end

Copy a `CaseMatchNode` node

visit_case_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 138
    def visit_case_node(node)
      node.copy(predicate: visit(node.predicate), conditions: visit_all(node.conditions), else_clause: visit(node.else_clause))
    end

Copy a `CaseNode` node

visit_class_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 143
    def visit_class_node(node)
      node.copy(constant_path: visit(node.constant_path), superclass: visit(node.superclass), body: visit(node.body))
    end

Copy a `ClassNode` node

visit_class_variable_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 148
    def visit_class_variable_and_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ClassVariableAndWriteNode` node

visit_class_variable_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 153
    def visit_class_variable_operator_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ClassVariableOperatorWriteNode` node

visit_class_variable_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 158
    def visit_class_variable_or_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ClassVariableOrWriteNode` node

visit_class_variable_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 163
    def visit_class_variable_read_node(node)
      node.copy
    end

Copy a `ClassVariableReadNode` node

visit_class_variable_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 168
    def visit_class_variable_target_node(node)
      node.copy
    end

Copy a `ClassVariableTargetNode` node

visit_class_variable_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 173
    def visit_class_variable_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ClassVariableWriteNode` node

visit_constant_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 178
    def visit_constant_and_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ConstantAndWriteNode` node

visit_constant_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 183
    def visit_constant_operator_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ConstantOperatorWriteNode` node

visit_constant_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 188
    def visit_constant_or_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ConstantOrWriteNode` node

visit_constant_path_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 193
    def visit_constant_path_and_write_node(node)
      node.copy(target: visit(node.target), value: visit(node.value))
    end

Copy a `ConstantPathAndWriteNode` node

visit_constant_path_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 198
    def visit_constant_path_node(node)
      node.copy(parent: visit(node.parent))
    end

Copy a `ConstantPathNode` node

visit_constant_path_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 203
    def visit_constant_path_operator_write_node(node)
      node.copy(target: visit(node.target), value: visit(node.value))
    end

Copy a `ConstantPathOperatorWriteNode` node

visit_constant_path_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 208
    def visit_constant_path_or_write_node(node)
      node.copy(target: visit(node.target), value: visit(node.value))
    end

Copy a `ConstantPathOrWriteNode` node

visit_constant_path_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 213
    def visit_constant_path_target_node(node)
      node.copy(parent: visit(node.parent))
    end

Copy a `ConstantPathTargetNode` node

visit_constant_path_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 218
    def visit_constant_path_write_node(node)
      node.copy(target: visit(node.target), value: visit(node.value))
    end

Copy a `ConstantPathWriteNode` node

visit_constant_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 223
    def visit_constant_read_node(node)
      node.copy
    end

Copy a `ConstantReadNode` node

visit_constant_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 228
    def visit_constant_target_node(node)
      node.copy
    end

Copy a `ConstantTargetNode` node

visit_constant_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 233
    def visit_constant_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ConstantWriteNode` node

visit_def_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 238
    def visit_def_node(node)
      node.copy(receiver: visit(node.receiver), parameters: visit(node.parameters), body: visit(node.body))
    end

Copy a `DefNode` node

visit_defined_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 243
    def visit_defined_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `DefinedNode` node

visit_else_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 248
    def visit_else_node(node)
      node.copy(statements: visit(node.statements))
    end

Copy a `ElseNode` node

visit_embedded_statements_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 253
    def visit_embedded_statements_node(node)
      node.copy(statements: visit(node.statements))
    end

Copy a `EmbeddedStatementsNode` node

visit_embedded_variable_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 258
    def visit_embedded_variable_node(node)
      node.copy(variable: visit(node.variable))
    end

Copy a `EmbeddedVariableNode` node

visit_ensure_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 263
    def visit_ensure_node(node)
      node.copy(statements: visit(node.statements))
    end

Copy a `EnsureNode` node

visit_false_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 268
    def visit_false_node(node)
      node.copy
    end

Copy a `FalseNode` node

visit_find_pattern_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 273
    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

Copy a `FindPatternNode` node

visit_flip_flop_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 278
    def visit_flip_flop_node(node)
      node.copy(left: visit(node.left), right: visit(node.right))
    end

Copy a `FlipFlopNode` node

visit_float_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 283
    def visit_float_node(node)
      node.copy
    end

Copy a `FloatNode` node

visit_for_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 288
    def visit_for_node(node)
      node.copy(index: visit(node.index), collection: visit(node.collection), statements: visit(node.statements))
    end

Copy a `ForNode` node

visit_forwarding_arguments_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 293
    def visit_forwarding_arguments_node(node)
      node.copy
    end

Copy a `ForwardingArgumentsNode` node

visit_forwarding_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 298
    def visit_forwarding_parameter_node(node)
      node.copy
    end

Copy a `ForwardingParameterNode` node

visit_forwarding_super_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 303
    def visit_forwarding_super_node(node)
      node.copy(block: visit(node.block))
    end

Copy a `ForwardingSuperNode` node

visit_global_variable_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 308
    def visit_global_variable_and_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `GlobalVariableAndWriteNode` node

visit_global_variable_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 313
    def visit_global_variable_operator_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `GlobalVariableOperatorWriteNode` node

visit_global_variable_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 318
    def visit_global_variable_or_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `GlobalVariableOrWriteNode` node

visit_global_variable_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 323
    def visit_global_variable_read_node(node)
      node.copy
    end

Copy a `GlobalVariableReadNode` node

visit_global_variable_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 328
    def visit_global_variable_target_node(node)
      node.copy
    end

Copy a `GlobalVariableTargetNode` node

visit_global_variable_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 333
    def visit_global_variable_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `GlobalVariableWriteNode` node

visit_hash_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 338
    def visit_hash_node(node)
      node.copy(elements: visit_all(node.elements))
    end

Copy a `HashNode` node

visit_hash_pattern_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 343
    def visit_hash_pattern_node(node)
      node.copy(constant: visit(node.constant), elements: visit_all(node.elements), rest: visit(node.rest))
    end

Copy a `HashPatternNode` node

visit_if_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 348
    def visit_if_node(node)
      node.copy(predicate: visit(node.predicate), statements: visit(node.statements), subsequent: visit(node.subsequent))
    end

Copy a `IfNode` node

visit_imaginary_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 353
    def visit_imaginary_node(node)
      node.copy(numeric: visit(node.numeric))
    end

Copy a `ImaginaryNode` node

visit_implicit_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 358
    def visit_implicit_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `ImplicitNode` node

visit_implicit_rest_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 363
    def visit_implicit_rest_node(node)
      node.copy
    end

Copy a `ImplicitRestNode` node

visit_in_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 368
    def visit_in_node(node)
      node.copy(pattern: visit(node.pattern), statements: visit(node.statements))
    end

Copy a `InNode` node

visit_index_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 373
    def visit_index_and_write_node(node)
      node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), block: visit(node.block), value: visit(node.value))
    end

Copy a `IndexAndWriteNode` node

visit_index_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 378
    def visit_index_operator_write_node(node)
      node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), block: visit(node.block), value: visit(node.value))
    end

Copy a `IndexOperatorWriteNode` node

visit_index_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 383
    def visit_index_or_write_node(node)
      node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), block: visit(node.block), value: visit(node.value))
    end

Copy a `IndexOrWriteNode` node

visit_index_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 388
    def visit_index_target_node(node)
      node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), block: visit(node.block))
    end

Copy a `IndexTargetNode` node

visit_instance_variable_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 393
    def visit_instance_variable_and_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `InstanceVariableAndWriteNode` node

visit_instance_variable_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 398
    def visit_instance_variable_operator_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `InstanceVariableOperatorWriteNode` node

visit_instance_variable_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 403
    def visit_instance_variable_or_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `InstanceVariableOrWriteNode` node

visit_instance_variable_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 408
    def visit_instance_variable_read_node(node)
      node.copy
    end

Copy a `InstanceVariableReadNode` node

visit_instance_variable_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 413
    def visit_instance_variable_target_node(node)
      node.copy
    end

Copy a `InstanceVariableTargetNode` node

visit_instance_variable_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 418
    def visit_instance_variable_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `InstanceVariableWriteNode` node

visit_integer_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 423
    def visit_integer_node(node)
      node.copy
    end

Copy a `IntegerNode` node

visit_interpolated_match_last_line_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 428
    def visit_interpolated_match_last_line_node(node)
      node.copy(parts: visit_all(node.parts))
    end

Copy a `InterpolatedMatchLastLineNode` node

visit_interpolated_regular_expression_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 433
    def visit_interpolated_regular_expression_node(node)
      node.copy(parts: visit_all(node.parts))
    end

Copy a `InterpolatedRegularExpressionNode` node

visit_interpolated_string_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 438
    def visit_interpolated_string_node(node)
      node.copy(parts: visit_all(node.parts))
    end

Copy a `InterpolatedStringNode` node

visit_interpolated_symbol_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 443
    def visit_interpolated_symbol_node(node)
      node.copy(parts: visit_all(node.parts))
    end

Copy a `InterpolatedSymbolNode` node

visit_interpolated_x_string_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 448
    def visit_interpolated_x_string_node(node)
      node.copy(parts: visit_all(node.parts))
    end

Copy a `InterpolatedXStringNode` node

visit_it_local_variable_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 453
    def visit_it_local_variable_read_node(node)
      node.copy
    end

Copy a `ItLocalVariableReadNode` node

visit_it_parameters_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 458
    def visit_it_parameters_node(node)
      node.copy
    end

Copy a `ItParametersNode` node

visit_keyword_hash_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 463
    def visit_keyword_hash_node(node)
      node.copy(elements: visit_all(node.elements))
    end

Copy a `KeywordHashNode` node

visit_keyword_rest_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 468
    def visit_keyword_rest_parameter_node(node)
      node.copy
    end

Copy a `KeywordRestParameterNode` node

visit_lambda_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 473
    def visit_lambda_node(node)
      node.copy(parameters: visit(node.parameters), body: visit(node.body))
    end

Copy a `LambdaNode` node

visit_local_variable_and_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 478
    def visit_local_variable_and_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `LocalVariableAndWriteNode` node

visit_local_variable_operator_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 483
    def visit_local_variable_operator_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `LocalVariableOperatorWriteNode` node

visit_local_variable_or_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 488
    def visit_local_variable_or_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `LocalVariableOrWriteNode` node

visit_local_variable_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 493
    def visit_local_variable_read_node(node)
      node.copy
    end

Copy a `LocalVariableReadNode` node

visit_local_variable_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 498
    def visit_local_variable_target_node(node)
      node.copy
    end

Copy a `LocalVariableTargetNode` node

visit_local_variable_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 503
    def visit_local_variable_write_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `LocalVariableWriteNode` node

visit_match_last_line_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 508
    def visit_match_last_line_node(node)
      node.copy
    end

Copy a `MatchLastLineNode` node

visit_match_predicate_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 513
    def visit_match_predicate_node(node)
      node.copy(value: visit(node.value), pattern: visit(node.pattern))
    end

Copy a `MatchPredicateNode` node

visit_match_required_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 518
    def visit_match_required_node(node)
      node.copy(value: visit(node.value), pattern: visit(node.pattern))
    end

Copy a `MatchRequiredNode` node

visit_match_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 523
    def visit_match_write_node(node)
      node.copy(call: visit(node.call), targets: visit_all(node.targets))
    end

Copy a `MatchWriteNode` node

visit_missing_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 528
    def visit_missing_node(node)
      node.copy
    end

Copy a `MissingNode` node

visit_module_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 533
    def visit_module_node(node)
      node.copy(constant_path: visit(node.constant_path), body: visit(node.body))
    end

Copy a `ModuleNode` node

visit_multi_target_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 538
    def visit_multi_target_node(node)
      node.copy(lefts: visit_all(node.lefts), rest: visit(node.rest), rights: visit_all(node.rights))
    end

Copy a `MultiTargetNode` node

visit_multi_write_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 543
    def visit_multi_write_node(node)
      node.copy(lefts: visit_all(node.lefts), rest: visit(node.rest), rights: visit_all(node.rights), value: visit(node.value))
    end

Copy a `MultiWriteNode` node

visit_next_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 548
    def visit_next_node(node)
      node.copy(arguments: visit(node.arguments))
    end

Copy a `NextNode` node

visit_nil_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 553
    def visit_nil_node(node)
      node.copy
    end

Copy a `NilNode` node

visit_no_keywords_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 558
    def visit_no_keywords_parameter_node(node)
      node.copy
    end

Copy a `NoKeywordsParameterNode` node

visit_numbered_parameters_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 563
    def visit_numbered_parameters_node(node)
      node.copy
    end

Copy a `NumberedParametersNode` node

visit_numbered_reference_read_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 568
    def visit_numbered_reference_read_node(node)
      node.copy
    end

Copy a `NumberedReferenceReadNode` node

visit_optional_keyword_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 573
    def visit_optional_keyword_parameter_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `OptionalKeywordParameterNode` node

visit_optional_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 578
    def visit_optional_parameter_node(node)
      node.copy(value: visit(node.value))
    end

Copy a `OptionalParameterNode` node

visit_or_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 583
    def visit_or_node(node)
      node.copy(left: visit(node.left), right: visit(node.right))
    end

Copy a `OrNode` node

visit_parameters_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 588
    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

Copy a `ParametersNode` node

visit_parentheses_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 593
    def visit_parentheses_node(node)
      node.copy(body: visit(node.body))
    end

Copy a `ParenthesesNode` node

visit_pinned_expression_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 598
    def visit_pinned_expression_node(node)
      node.copy(expression: visit(node.expression))
    end

Copy a `PinnedExpressionNode` node

visit_pinned_variable_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 603
    def visit_pinned_variable_node(node)
      node.copy(variable: visit(node.variable))
    end

Copy a `PinnedVariableNode` node

visit_post_execution_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 608
    def visit_post_execution_node(node)
      node.copy(statements: visit(node.statements))
    end

Copy a `PostExecutionNode` node

visit_pre_execution_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 613
    def visit_pre_execution_node(node)
      node.copy(statements: visit(node.statements))
    end

Copy a `PreExecutionNode` node

visit_program_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 618
    def visit_program_node(node)
      node.copy(statements: visit(node.statements))
    end

Copy a `ProgramNode` node

visit_range_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 623
    def visit_range_node(node)
      node.copy(left: visit(node.left), right: visit(node.right))
    end

Copy a `RangeNode` node

visit_rational_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 628
    def visit_rational_node(node)
      node.copy
    end

Copy a `RationalNode` node

visit_redo_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 633
    def visit_redo_node(node)
      node.copy
    end

Copy a `RedoNode` node

visit_regular_expression_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 638
    def visit_regular_expression_node(node)
      node.copy
    end

Copy a `RegularExpressionNode` node

visit_required_keyword_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 643
    def visit_required_keyword_parameter_node(node)
      node.copy
    end

Copy a `RequiredKeywordParameterNode` node

visit_required_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 648
    def visit_required_parameter_node(node)
      node.copy
    end

Copy a `RequiredParameterNode` node

visit_rescue_modifier_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 653
    def visit_rescue_modifier_node(node)
      node.copy(expression: visit(node.expression), rescue_expression: visit(node.rescue_expression))
    end

Copy a `RescueModifierNode` node

visit_rescue_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 658
    def visit_rescue_node(node)
      node.copy(exceptions: visit_all(node.exceptions), reference: visit(node.reference), statements: visit(node.statements), subsequent: visit(node.subsequent))
    end

Copy a `RescueNode` node

visit_rest_parameter_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 663
    def visit_rest_parameter_node(node)
      node.copy
    end

Copy a `RestParameterNode` node

visit_retry_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 668
    def visit_retry_node(node)
      node.copy
    end

Copy a `RetryNode` node

visit_return_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 673
    def visit_return_node(node)
      node.copy(arguments: visit(node.arguments))
    end

Copy a `ReturnNode` node

visit_self_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 678
    def visit_self_node(node)
      node.copy
    end

Copy a `SelfNode` node

visit_shareable_constant_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 683
    def visit_shareable_constant_node(node)
      node.copy(write: visit(node.write))
    end

Copy a `ShareableConstantNode` node

visit_singleton_class_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 688
    def visit_singleton_class_node(node)
      node.copy(expression: visit(node.expression), body: visit(node.body))
    end

Copy a `SingletonClassNode` node

visit_source_encoding_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 693
    def visit_source_encoding_node(node)
      node.copy
    end

Copy a `SourceEncodingNode` node

visit_source_file_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 698
    def visit_source_file_node(node)
      node.copy
    end

Copy a `SourceFileNode` node

visit_source_line_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 703
    def visit_source_line_node(node)
      node.copy
    end

Copy a `SourceLineNode` node

visit_splat_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 708
    def visit_splat_node(node)
      node.copy(expression: visit(node.expression))
    end

Copy a `SplatNode` node

visit_statements_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 713
    def visit_statements_node(node)
      node.copy(body: visit_all(node.body))
    end

Copy a `StatementsNode` node

visit_string_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 718
    def visit_string_node(node)
      node.copy
    end

Copy a `StringNode` node

visit_super_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 723
    def visit_super_node(node)
      node.copy(arguments: visit(node.arguments), block: visit(node.block))
    end

Copy a `SuperNode` node

visit_symbol_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 728
    def visit_symbol_node(node)
      node.copy
    end

Copy a `SymbolNode` node

visit_true_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 733
    def visit_true_node(node)
      node.copy
    end

Copy a `TrueNode` node

visit_undef_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 738
    def visit_undef_node(node)
      node.copy(names: visit_all(node.names))
    end

Copy a `UndefNode` node

visit_unless_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 743
    def visit_unless_node(node)
      node.copy(predicate: visit(node.predicate), statements: visit(node.statements), else_clause: visit(node.else_clause))
    end

Copy a `UnlessNode` node

visit_until_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 748
    def visit_until_node(node)
      node.copy(predicate: visit(node.predicate), statements: visit(node.statements))
    end

Copy a `UntilNode` node

visit_when_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 753
    def visit_when_node(node)
      node.copy(conditions: visit_all(node.conditions), statements: visit(node.statements))
    end

Copy a `WhenNode` node

visit_while_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 758
    def visit_while_node(node)
      node.copy(predicate: visit(node.predicate), statements: visit(node.statements))
    end

Copy a `WhileNode` node

visit_x_string_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 763
    def visit_x_string_node(node)
      node.copy
    end

Copy a `XStringNode` node

visit_yield_node (node)
Source

    # File lib/prism/mutation_compiler.rb, line 768
    def visit_yield_node(node)
      node.copy(arguments: visit(node.arguments))
    end

Copy a `YieldNode` node