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) click to toggle source

Copy a AliasGlobalVariableNode node

# File prism/mutation_compiler.rb, line 15
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 prism/mutation_compiler.rb, line 20
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 prism/mutation_compiler.rb, line 25
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 prism/mutation_compiler.rb, line 30
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 prism/mutation_compiler.rb, line 35
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 prism/mutation_compiler.rb, line 40
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 prism/mutation_compiler.rb, line 45
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 prism/mutation_compiler.rb, line 50
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 prism/mutation_compiler.rb, line 55
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 prism/mutation_compiler.rb, line 60
def visit_back_reference_read_node(node)
  node.copy
end
visit_begin_node(node) click to toggle source

Copy a BeginNode node

# File prism/mutation_compiler.rb, line 65
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 prism/mutation_compiler.rb, line 70
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 prism/mutation_compiler.rb, line 75
def visit_block_local_variable_node(node)
  node.copy
end
visit_block_node(node) click to toggle source

Copy a BlockNode node

# File prism/mutation_compiler.rb, line 80
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 prism/mutation_compiler.rb, line 85
def visit_block_parameter_node(node)
  node.copy
end
visit_block_parameters_node(node) click to toggle source

Copy a BlockParametersNode node

# File prism/mutation_compiler.rb, line 90
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 prism/mutation_compiler.rb, line 95
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 prism/mutation_compiler.rb, line 100
def visit_call_and_write_node(node)
  node.copy(receiver: visit(node.receiver), value: visit(node.value))
end
visit_call_node(node) click to toggle source

Copy a CallNode node

# File prism/mutation_compiler.rb, line 105
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 prism/mutation_compiler.rb, line 110
def visit_call_operator_write_node(node)
  node.copy(receiver: visit(node.receiver), value: visit(node.value))
end
visit_call_or_write_node(node) click to toggle source

Copy a CallOrWriteNode node

# File prism/mutation_compiler.rb, line 115
def visit_call_or_write_node(node)
  node.copy(receiver: visit(node.receiver), value: visit(node.value))
end
visit_call_target_node(node) click to toggle source

Copy a CallTargetNode node

# File prism/mutation_compiler.rb, line 120
def visit_call_target_node(node)
  node.copy(receiver: visit(node.receiver))
end
visit_capture_pattern_node(node) click to toggle source

Copy a CapturePatternNode node

# File prism/mutation_compiler.rb, line 125
def visit_capture_pattern_node(node)
  node.copy(value: visit(node.value), target: visit(node.target))
end
visit_case_match_node(node) click to toggle source

Copy a CaseMatchNode node

# File prism/mutation_compiler.rb, line 130
def visit_case_match_node(node)
  node.copy(predicate: visit(node.predicate), conditions: visit_all(node.conditions), else_clause: visit(node.else_clause))
end
visit_case_node(node) click to toggle source

Copy a CaseNode node

# File prism/mutation_compiler.rb, line 135
def visit_case_node(node)
  node.copy(predicate: visit(node.predicate), conditions: visit_all(node.conditions), else_clause: visit(node.else_clause))
end
visit_class_node(node) click to toggle source

Copy a ClassNode node

# File prism/mutation_compiler.rb, line 140
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 prism/mutation_compiler.rb, line 145
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 prism/mutation_compiler.rb, line 150
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 prism/mutation_compiler.rb, line 155
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 prism/mutation_compiler.rb, line 160
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 prism/mutation_compiler.rb, line 165
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 prism/mutation_compiler.rb, line 170
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 prism/mutation_compiler.rb, line 175
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 prism/mutation_compiler.rb, line 180
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 prism/mutation_compiler.rb, line 185
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 prism/mutation_compiler.rb, line 190
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 prism/mutation_compiler.rb, line 195
def visit_constant_path_node(node)
  node.copy(parent: visit(node.parent))
end
visit_constant_path_operator_write_node(node) click to toggle source

Copy a ConstantPathOperatorWriteNode node

# File prism/mutation_compiler.rb, line 200
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 prism/mutation_compiler.rb, line 205
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 prism/mutation_compiler.rb, line 210
def visit_constant_path_target_node(node)
  node.copy(parent: visit(node.parent))
end
visit_constant_path_write_node(node) click to toggle source

Copy a ConstantPathWriteNode node

# File prism/mutation_compiler.rb, line 215
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 prism/mutation_compiler.rb, line 220
def visit_constant_read_node(node)
  node.copy
end
visit_constant_target_node(node) click to toggle source

Copy a ConstantTargetNode node

# File prism/mutation_compiler.rb, line 225
def visit_constant_target_node(node)
  node.copy
end
visit_constant_write_node(node) click to toggle source

Copy a ConstantWriteNode node

# File prism/mutation_compiler.rb, line 230
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 prism/mutation_compiler.rb, line 235
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 prism/mutation_compiler.rb, line 240
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 prism/mutation_compiler.rb, line 245
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 prism/mutation_compiler.rb, line 250
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 prism/mutation_compiler.rb, line 255
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 prism/mutation_compiler.rb, line 260
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 prism/mutation_compiler.rb, line 265
def visit_false_node(node)
  node.copy
end
visit_find_pattern_node(node) click to toggle source

Copy a FindPatternNode node

# File prism/mutation_compiler.rb, line 270
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 prism/mutation_compiler.rb, line 275
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 prism/mutation_compiler.rb, line 280
def visit_float_node(node)
  node.copy
end
visit_for_node(node) click to toggle source

Copy a ForNode node

# File prism/mutation_compiler.rb, line 285
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 prism/mutation_compiler.rb, line 290
def visit_forwarding_arguments_node(node)
  node.copy
end
visit_forwarding_parameter_node(node) click to toggle source

Copy a ForwardingParameterNode node

# File prism/mutation_compiler.rb, line 295
def visit_forwarding_parameter_node(node)
  node.copy
end
visit_forwarding_super_node(node) click to toggle source

Copy a ForwardingSuperNode node

# File prism/mutation_compiler.rb, line 300
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 prism/mutation_compiler.rb, line 305
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 prism/mutation_compiler.rb, line 310
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 prism/mutation_compiler.rb, line 315
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 prism/mutation_compiler.rb, line 320
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 prism/mutation_compiler.rb, line 325
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 prism/mutation_compiler.rb, line 330
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 prism/mutation_compiler.rb, line 335
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 prism/mutation_compiler.rb, line 340
def visit_hash_pattern_node(node)
  node.copy(constant: visit(node.constant), elements: visit_all(node.elements), rest: visit(node.rest))
end
visit_if_node(node) click to toggle source

Copy a IfNode node

# File prism/mutation_compiler.rb, line 345
def visit_if_node(node)
  node.copy(predicate: visit(node.predicate), statements: visit(node.statements), subsequent: visit(node.subsequent))
end
visit_imaginary_node(node) click to toggle source

Copy a ImaginaryNode node

# File prism/mutation_compiler.rb, line 350
def visit_imaginary_node(node)
  node.copy(numeric: visit(node.numeric))
end
visit_implicit_node(node) click to toggle source

Copy a ImplicitNode node

# File prism/mutation_compiler.rb, line 355
def visit_implicit_node(node)
  node.copy(value: visit(node.value))
end
visit_implicit_rest_node(node) click to toggle source

Copy a ImplicitRestNode node

# File prism/mutation_compiler.rb, line 360
def visit_implicit_rest_node(node)
  node.copy
end
visit_in_node(node) click to toggle source

Copy a InNode node

# File prism/mutation_compiler.rb, line 365
def visit_in_node(node)
  node.copy(pattern: visit(node.pattern), statements: visit(node.statements))
end
visit_index_and_write_node(node) click to toggle source

Copy a IndexAndWriteNode node

# File prism/mutation_compiler.rb, line 370
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
visit_index_operator_write_node(node) click to toggle source

Copy a IndexOperatorWriteNode node

# File prism/mutation_compiler.rb, line 375
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
visit_index_or_write_node(node) click to toggle source

Copy a IndexOrWriteNode node

# File prism/mutation_compiler.rb, line 380
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
visit_index_target_node(node) click to toggle source

Copy a IndexTargetNode node

# File prism/mutation_compiler.rb, line 385
def visit_index_target_node(node)
  node.copy(receiver: visit(node.receiver), arguments: visit(node.arguments), block: visit(node.block))
end
visit_instance_variable_and_write_node(node) click to toggle source

Copy a InstanceVariableAndWriteNode node

# File prism/mutation_compiler.rb, line 390
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 prism/mutation_compiler.rb, line 395
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 prism/mutation_compiler.rb, line 400
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 prism/mutation_compiler.rb, line 405
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 prism/mutation_compiler.rb, line 410
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 prism/mutation_compiler.rb, line 415
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 prism/mutation_compiler.rb, line 420
def visit_integer_node(node)
  node.copy
end
visit_interpolated_match_last_line_node(node) click to toggle source

Copy a InterpolatedMatchLastLineNode node

# File prism/mutation_compiler.rb, line 425
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 prism/mutation_compiler.rb, line 430
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 prism/mutation_compiler.rb, line 435
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 prism/mutation_compiler.rb, line 440
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 prism/mutation_compiler.rb, line 445
def visit_interpolated_x_string_node(node)
  node.copy(parts: visit_all(node.parts))
end
visit_it_local_variable_read_node(node) click to toggle source

Copy a ItLocalVariableReadNode node

# File prism/mutation_compiler.rb, line 450
def visit_it_local_variable_read_node(node)
  node.copy
end
visit_it_parameters_node(node) click to toggle source

Copy a ItParametersNode node

# File prism/mutation_compiler.rb, line 455
def visit_it_parameters_node(node)
  node.copy
end
visit_keyword_hash_node(node) click to toggle source

Copy a KeywordHashNode node

# File prism/mutation_compiler.rb, line 460
def visit_keyword_hash_node(node)
  node.copy(elements: visit_all(node.elements))
end
visit_keyword_rest_parameter_node(node) click to toggle source

Copy a KeywordRestParameterNode node

# File prism/mutation_compiler.rb, line 465
def visit_keyword_rest_parameter_node(node)
  node.copy
end
visit_lambda_node(node) click to toggle source

Copy a LambdaNode node

# File prism/mutation_compiler.rb, line 470
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 prism/mutation_compiler.rb, line 475
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 prism/mutation_compiler.rb, line 480
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 prism/mutation_compiler.rb, line 485
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 prism/mutation_compiler.rb, line 490
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 prism/mutation_compiler.rb, line 495
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 prism/mutation_compiler.rb, line 500
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 prism/mutation_compiler.rb, line 505
def visit_match_last_line_node(node)
  node.copy
end
visit_match_predicate_node(node) click to toggle source

Copy a MatchPredicateNode node

# File prism/mutation_compiler.rb, line 510
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 prism/mutation_compiler.rb, line 515
def visit_match_required_node(node)
  node.copy(value: visit(node.value), pattern: visit(node.pattern))
end
visit_match_write_node(node) click to toggle source

Copy a MatchWriteNode node

# File prism/mutation_compiler.rb, line 520
def visit_match_write_node(node)
  node.copy(call: visit(node.call), targets: visit_all(node.targets))
end
visit_missing_node(node) click to toggle source

Copy a MissingNode node

# File prism/mutation_compiler.rb, line 525
def visit_missing_node(node)
  node.copy
end
visit_module_node(node) click to toggle source

Copy a ModuleNode node

# File prism/mutation_compiler.rb, line 530
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 prism/mutation_compiler.rb, line 535
def visit_multi_target_node(node)
  node.copy(lefts: visit_all(node.lefts), rest: visit(node.rest), rights: visit_all(node.rights))
end
visit_multi_write_node(node) click to toggle source

Copy a MultiWriteNode node

# File prism/mutation_compiler.rb, line 540
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
visit_next_node(node) click to toggle source

Copy a NextNode node

# File prism/mutation_compiler.rb, line 545
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 prism/mutation_compiler.rb, line 550
def visit_nil_node(node)
  node.copy
end
visit_no_keywords_parameter_node(node) click to toggle source

Copy a NoKeywordsParameterNode node

# File prism/mutation_compiler.rb, line 555
def visit_no_keywords_parameter_node(node)
  node.copy
end
visit_numbered_parameters_node(node) click to toggle source

Copy a NumberedParametersNode node

# File prism/mutation_compiler.rb, line 560
def visit_numbered_parameters_node(node)
  node.copy
end
visit_numbered_reference_read_node(node) click to toggle source

Copy a NumberedReferenceReadNode node

# File prism/mutation_compiler.rb, line 565
def visit_numbered_reference_read_node(node)
  node.copy
end
visit_optional_keyword_parameter_node(node) click to toggle source

Copy a OptionalKeywordParameterNode node

# File prism/mutation_compiler.rb, line 570
def visit_optional_keyword_parameter_node(node)
  node.copy(value: visit(node.value))
end
visit_optional_parameter_node(node) click to toggle source

Copy a OptionalParameterNode node

# File prism/mutation_compiler.rb, line 575
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 prism/mutation_compiler.rb, line 580
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 prism/mutation_compiler.rb, line 585
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 prism/mutation_compiler.rb, line 590
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 prism/mutation_compiler.rb, line 595
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 prism/mutation_compiler.rb, line 600
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 prism/mutation_compiler.rb, line 605
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 prism/mutation_compiler.rb, line 610
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 prism/mutation_compiler.rb, line 615
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 prism/mutation_compiler.rb, line 620
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 prism/mutation_compiler.rb, line 625
def visit_rational_node(node)
  node.copy
end
visit_redo_node(node) click to toggle source

Copy a RedoNode node

# File prism/mutation_compiler.rb, line 630
def visit_redo_node(node)
  node.copy
end
visit_regular_expression_node(node) click to toggle source

Copy a RegularExpressionNode node

# File prism/mutation_compiler.rb, line 635
def visit_regular_expression_node(node)
  node.copy
end
visit_required_keyword_parameter_node(node) click to toggle source

Copy a RequiredKeywordParameterNode node

# File prism/mutation_compiler.rb, line 640
def visit_required_keyword_parameter_node(node)
  node.copy
end
visit_required_parameter_node(node) click to toggle source

Copy a RequiredParameterNode node

# File prism/mutation_compiler.rb, line 645
def visit_required_parameter_node(node)
  node.copy
end
visit_rescue_modifier_node(node) click to toggle source

Copy a RescueModifierNode node

# File prism/mutation_compiler.rb, line 650
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 prism/mutation_compiler.rb, line 655
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
visit_rest_parameter_node(node) click to toggle source

Copy a RestParameterNode node

# File prism/mutation_compiler.rb, line 660
def visit_rest_parameter_node(node)
  node.copy
end
visit_retry_node(node) click to toggle source

Copy a RetryNode node

# File prism/mutation_compiler.rb, line 665
def visit_retry_node(node)
  node.copy
end
visit_return_node(node) click to toggle source

Copy a ReturnNode node

# File prism/mutation_compiler.rb, line 670
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 prism/mutation_compiler.rb, line 675
def visit_self_node(node)
  node.copy
end
visit_shareable_constant_node(node) click to toggle source

Copy a ShareableConstantNode node

# File prism/mutation_compiler.rb, line 680
def visit_shareable_constant_node(node)
  node.copy(write: visit(node.write))
end
visit_singleton_class_node(node) click to toggle source

Copy a SingletonClassNode node

# File prism/mutation_compiler.rb, line 685
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 prism/mutation_compiler.rb, line 690
def visit_source_encoding_node(node)
  node.copy
end
visit_source_file_node(node) click to toggle source

Copy a SourceFileNode node

# File prism/mutation_compiler.rb, line 695
def visit_source_file_node(node)
  node.copy
end
visit_source_line_node(node) click to toggle source

Copy a SourceLineNode node

# File prism/mutation_compiler.rb, line 700
def visit_source_line_node(node)
  node.copy
end
visit_splat_node(node) click to toggle source

Copy a SplatNode node

# File prism/mutation_compiler.rb, line 705
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 prism/mutation_compiler.rb, line 710
def visit_statements_node(node)
  node.copy(body: visit_all(node.body))
end
visit_string_node(node) click to toggle source

Copy a StringNode node

# File prism/mutation_compiler.rb, line 715
def visit_string_node(node)
  node.copy
end
visit_super_node(node) click to toggle source

Copy a SuperNode node

# File prism/mutation_compiler.rb, line 720
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 prism/mutation_compiler.rb, line 725
def visit_symbol_node(node)
  node.copy
end
visit_true_node(node) click to toggle source

Copy a TrueNode node

# File prism/mutation_compiler.rb, line 730
def visit_true_node(node)
  node.copy
end
visit_undef_node(node) click to toggle source

Copy a UndefNode node

# File prism/mutation_compiler.rb, line 735
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 prism/mutation_compiler.rb, line 740
def visit_unless_node(node)
  node.copy(predicate: visit(node.predicate), statements: visit(node.statements), else_clause: visit(node.else_clause))
end
visit_until_node(node) click to toggle source

Copy a UntilNode node

# File prism/mutation_compiler.rb, line 745
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 prism/mutation_compiler.rb, line 750
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 prism/mutation_compiler.rb, line 755
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 prism/mutation_compiler.rb, line 760
def visit_x_string_node(node)
  node.copy
end
visit_yield_node(node) click to toggle source

Copy a YieldNode node

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