Class: Prism::MutationCompiler
- Inherits:
-
Compiler
- Object
- BasicVisitor
- Visitor
- Compiler
- Prism::MutationCompiler
- Defined in:
- lib/prism/mutation_compiler.rb
Overview
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.
Direct Known Subclasses
Instance Method Summary collapse
-
#visit_alias_global_variable_node(node) ⇒ Object
Copy a AliasGlobalVariableNode node.
-
#visit_alias_method_node(node) ⇒ Object
Copy a AliasMethodNode node.
-
#visit_alternation_pattern_node(node) ⇒ Object
Copy a AlternationPatternNode node.
-
#visit_and_node(node) ⇒ Object
Copy a AndNode node.
-
#visit_arguments_node(node) ⇒ Object
Copy a ArgumentsNode node.
-
#visit_array_node(node) ⇒ Object
Copy a ArrayNode node.
-
#visit_array_pattern_node(node) ⇒ Object
Copy a ArrayPatternNode node.
-
#visit_assoc_node(node) ⇒ Object
Copy a AssocNode node.
-
#visit_assoc_splat_node(node) ⇒ Object
Copy a AssocSplatNode node.
-
#visit_back_reference_read_node(node) ⇒ Object
Copy a BackReferenceReadNode node.
-
#visit_begin_node(node) ⇒ Object
Copy a BeginNode node.
-
#visit_block_argument_node(node) ⇒ Object
Copy a BlockArgumentNode node.
-
#visit_block_local_variable_node(node) ⇒ Object
Copy a BlockLocalVariableNode node.
-
#visit_block_node(node) ⇒ Object
Copy a BlockNode node.
-
#visit_block_parameter_node(node) ⇒ Object
Copy a BlockParameterNode node.
-
#visit_block_parameters_node(node) ⇒ Object
Copy a BlockParametersNode node.
-
#visit_break_node(node) ⇒ Object
Copy a BreakNode node.
-
#visit_call_and_write_node(node) ⇒ Object
Copy a CallAndWriteNode node.
-
#visit_call_node(node) ⇒ Object
Copy a CallNode node.
-
#visit_call_operator_write_node(node) ⇒ Object
Copy a CallOperatorWriteNode node.
-
#visit_call_or_write_node(node) ⇒ Object
Copy a CallOrWriteNode node.
-
#visit_call_target_node(node) ⇒ Object
Copy a CallTargetNode node.
-
#visit_capture_pattern_node(node) ⇒ Object
Copy a CapturePatternNode node.
-
#visit_case_match_node(node) ⇒ Object
Copy a CaseMatchNode node.
-
#visit_case_node(node) ⇒ Object
Copy a CaseNode node.
-
#visit_class_node(node) ⇒ Object
Copy a ClassNode node.
-
#visit_class_variable_and_write_node(node) ⇒ Object
Copy a ClassVariableAndWriteNode node.
-
#visit_class_variable_operator_write_node(node) ⇒ Object
Copy a ClassVariableOperatorWriteNode node.
-
#visit_class_variable_or_write_node(node) ⇒ Object
Copy a ClassVariableOrWriteNode node.
-
#visit_class_variable_read_node(node) ⇒ Object
Copy a ClassVariableReadNode node.
-
#visit_class_variable_target_node(node) ⇒ Object
Copy a ClassVariableTargetNode node.
-
#visit_class_variable_write_node(node) ⇒ Object
Copy a ClassVariableWriteNode node.
-
#visit_constant_and_write_node(node) ⇒ Object
Copy a ConstantAndWriteNode node.
-
#visit_constant_operator_write_node(node) ⇒ Object
Copy a ConstantOperatorWriteNode node.
-
#visit_constant_or_write_node(node) ⇒ Object
Copy a ConstantOrWriteNode node.
-
#visit_constant_path_and_write_node(node) ⇒ Object
Copy a ConstantPathAndWriteNode node.
-
#visit_constant_path_node(node) ⇒ Object
Copy a ConstantPathNode node.
-
#visit_constant_path_operator_write_node(node) ⇒ Object
Copy a ConstantPathOperatorWriteNode node.
-
#visit_constant_path_or_write_node(node) ⇒ Object
Copy a ConstantPathOrWriteNode node.
-
#visit_constant_path_target_node(node) ⇒ Object
Copy a ConstantPathTargetNode node.
-
#visit_constant_path_write_node(node) ⇒ Object
Copy a ConstantPathWriteNode node.
-
#visit_constant_read_node(node) ⇒ Object
Copy a ConstantReadNode node.
-
#visit_constant_target_node(node) ⇒ Object
Copy a ConstantTargetNode node.
-
#visit_constant_write_node(node) ⇒ Object
Copy a ConstantWriteNode node.
-
#visit_def_node(node) ⇒ Object
Copy a DefNode node.
-
#visit_defined_node(node) ⇒ Object
Copy a DefinedNode node.
-
#visit_else_node(node) ⇒ Object
Copy a ElseNode node.
-
#visit_embedded_statements_node(node) ⇒ Object
Copy a EmbeddedStatementsNode node.
-
#visit_embedded_variable_node(node) ⇒ Object
Copy a EmbeddedVariableNode node.
-
#visit_ensure_node(node) ⇒ Object
Copy a EnsureNode node.
-
#visit_false_node(node) ⇒ Object
Copy a FalseNode node.
-
#visit_find_pattern_node(node) ⇒ Object
Copy a FindPatternNode node.
-
#visit_flip_flop_node(node) ⇒ Object
Copy a FlipFlopNode node.
-
#visit_float_node(node) ⇒ Object
Copy a FloatNode node.
-
#visit_for_node(node) ⇒ Object
Copy a ForNode node.
-
#visit_forwarding_arguments_node(node) ⇒ Object
Copy a ForwardingArgumentsNode node.
-
#visit_forwarding_parameter_node(node) ⇒ Object
Copy a ForwardingParameterNode node.
-
#visit_forwarding_super_node(node) ⇒ Object
Copy a ForwardingSuperNode node.
-
#visit_global_variable_and_write_node(node) ⇒ Object
Copy a GlobalVariableAndWriteNode node.
-
#visit_global_variable_operator_write_node(node) ⇒ Object
Copy a GlobalVariableOperatorWriteNode node.
-
#visit_global_variable_or_write_node(node) ⇒ Object
Copy a GlobalVariableOrWriteNode node.
-
#visit_global_variable_read_node(node) ⇒ Object
Copy a GlobalVariableReadNode node.
-
#visit_global_variable_target_node(node) ⇒ Object
Copy a GlobalVariableTargetNode node.
-
#visit_global_variable_write_node(node) ⇒ Object
Copy a GlobalVariableWriteNode node.
-
#visit_hash_node(node) ⇒ Object
Copy a HashNode node.
-
#visit_hash_pattern_node(node) ⇒ Object
Copy a HashPatternNode node.
-
#visit_if_node(node) ⇒ Object
Copy a IfNode node.
-
#visit_imaginary_node(node) ⇒ Object
Copy a ImaginaryNode node.
-
#visit_implicit_node(node) ⇒ Object
Copy a ImplicitNode node.
-
#visit_implicit_rest_node(node) ⇒ Object
Copy a ImplicitRestNode node.
-
#visit_in_node(node) ⇒ Object
Copy a InNode node.
-
#visit_index_and_write_node(node) ⇒ Object
Copy a IndexAndWriteNode node.
-
#visit_index_operator_write_node(node) ⇒ Object
Copy a IndexOperatorWriteNode node.
-
#visit_index_or_write_node(node) ⇒ Object
Copy a IndexOrWriteNode node.
-
#visit_index_target_node(node) ⇒ Object
Copy a IndexTargetNode node.
-
#visit_instance_variable_and_write_node(node) ⇒ Object
Copy a InstanceVariableAndWriteNode node.
-
#visit_instance_variable_operator_write_node(node) ⇒ Object
Copy a InstanceVariableOperatorWriteNode node.
-
#visit_instance_variable_or_write_node(node) ⇒ Object
Copy a InstanceVariableOrWriteNode node.
-
#visit_instance_variable_read_node(node) ⇒ Object
Copy a InstanceVariableReadNode node.
-
#visit_instance_variable_target_node(node) ⇒ Object
Copy a InstanceVariableTargetNode node.
-
#visit_instance_variable_write_node(node) ⇒ Object
Copy a InstanceVariableWriteNode node.
-
#visit_integer_node(node) ⇒ Object
Copy a IntegerNode node.
-
#visit_interpolated_match_last_line_node(node) ⇒ Object
Copy a InterpolatedMatchLastLineNode node.
-
#visit_interpolated_regular_expression_node(node) ⇒ Object
Copy a InterpolatedRegularExpressionNode node.
-
#visit_interpolated_string_node(node) ⇒ Object
Copy a InterpolatedStringNode node.
-
#visit_interpolated_symbol_node(node) ⇒ Object
Copy a InterpolatedSymbolNode node.
-
#visit_interpolated_x_string_node(node) ⇒ Object
Copy a InterpolatedXStringNode node.
-
#visit_it_local_variable_read_node(node) ⇒ Object
Copy a ItLocalVariableReadNode node.
-
#visit_it_parameters_node(node) ⇒ Object
Copy a ItParametersNode node.
-
#visit_keyword_hash_node(node) ⇒ Object
Copy a KeywordHashNode node.
-
#visit_keyword_rest_parameter_node(node) ⇒ Object
Copy a KeywordRestParameterNode node.
-
#visit_lambda_node(node) ⇒ Object
Copy a LambdaNode node.
-
#visit_local_variable_and_write_node(node) ⇒ Object
Copy a LocalVariableAndWriteNode node.
-
#visit_local_variable_operator_write_node(node) ⇒ Object
Copy a LocalVariableOperatorWriteNode node.
-
#visit_local_variable_or_write_node(node) ⇒ Object
Copy a LocalVariableOrWriteNode node.
-
#visit_local_variable_read_node(node) ⇒ Object
Copy a LocalVariableReadNode node.
-
#visit_local_variable_target_node(node) ⇒ Object
Copy a LocalVariableTargetNode node.
-
#visit_local_variable_write_node(node) ⇒ Object
Copy a LocalVariableWriteNode node.
-
#visit_match_last_line_node(node) ⇒ Object
Copy a MatchLastLineNode node.
-
#visit_match_predicate_node(node) ⇒ Object
Copy a MatchPredicateNode node.
-
#visit_match_required_node(node) ⇒ Object
Copy a MatchRequiredNode node.
-
#visit_match_write_node(node) ⇒ Object
Copy a MatchWriteNode node.
-
#visit_missing_node(node) ⇒ Object
Copy a MissingNode node.
-
#visit_module_node(node) ⇒ Object
Copy a ModuleNode node.
-
#visit_multi_target_node(node) ⇒ Object
Copy a MultiTargetNode node.
-
#visit_multi_write_node(node) ⇒ Object
Copy a MultiWriteNode node.
-
#visit_next_node(node) ⇒ Object
Copy a NextNode node.
-
#visit_nil_node(node) ⇒ Object
Copy a NilNode node.
-
#visit_no_keywords_parameter_node(node) ⇒ Object
Copy a NoKeywordsParameterNode node.
-
#visit_numbered_parameters_node(node) ⇒ Object
Copy a NumberedParametersNode node.
-
#visit_numbered_reference_read_node(node) ⇒ Object
Copy a NumberedReferenceReadNode node.
-
#visit_optional_keyword_parameter_node(node) ⇒ Object
Copy a OptionalKeywordParameterNode node.
-
#visit_optional_parameter_node(node) ⇒ Object
Copy a OptionalParameterNode node.
-
#visit_or_node(node) ⇒ Object
Copy a OrNode node.
-
#visit_parameters_node(node) ⇒ Object
Copy a ParametersNode node.
-
#visit_parentheses_node(node) ⇒ Object
Copy a ParenthesesNode node.
-
#visit_pinned_expression_node(node) ⇒ Object
Copy a PinnedExpressionNode node.
-
#visit_pinned_variable_node(node) ⇒ Object
Copy a PinnedVariableNode node.
-
#visit_post_execution_node(node) ⇒ Object
Copy a PostExecutionNode node.
-
#visit_pre_execution_node(node) ⇒ Object
Copy a PreExecutionNode node.
-
#visit_program_node(node) ⇒ Object
Copy a ProgramNode node.
-
#visit_range_node(node) ⇒ Object
Copy a RangeNode node.
-
#visit_rational_node(node) ⇒ Object
Copy a RationalNode node.
-
#visit_redo_node(node) ⇒ Object
Copy a RedoNode node.
-
#visit_regular_expression_node(node) ⇒ Object
Copy a RegularExpressionNode node.
-
#visit_required_keyword_parameter_node(node) ⇒ Object
Copy a RequiredKeywordParameterNode node.
-
#visit_required_parameter_node(node) ⇒ Object
Copy a RequiredParameterNode node.
-
#visit_rescue_modifier_node(node) ⇒ Object
Copy a RescueModifierNode node.
-
#visit_rescue_node(node) ⇒ Object
Copy a RescueNode node.
-
#visit_rest_parameter_node(node) ⇒ Object
Copy a RestParameterNode node.
-
#visit_retry_node(node) ⇒ Object
Copy a RetryNode node.
-
#visit_return_node(node) ⇒ Object
Copy a ReturnNode node.
-
#visit_self_node(node) ⇒ Object
Copy a SelfNode node.
-
#visit_shareable_constant_node(node) ⇒ Object
Copy a ShareableConstantNode node.
-
#visit_singleton_class_node(node) ⇒ Object
Copy a SingletonClassNode node.
-
#visit_source_encoding_node(node) ⇒ Object
Copy a SourceEncodingNode node.
-
#visit_source_file_node(node) ⇒ Object
Copy a SourceFileNode node.
-
#visit_source_line_node(node) ⇒ Object
Copy a SourceLineNode node.
-
#visit_splat_node(node) ⇒ Object
Copy a SplatNode node.
-
#visit_statements_node(node) ⇒ Object
Copy a StatementsNode node.
-
#visit_string_node(node) ⇒ Object
Copy a StringNode node.
-
#visit_super_node(node) ⇒ Object
Copy a SuperNode node.
-
#visit_symbol_node(node) ⇒ Object
Copy a SymbolNode node.
-
#visit_true_node(node) ⇒ Object
Copy a TrueNode node.
-
#visit_undef_node(node) ⇒ Object
Copy a UndefNode node.
-
#visit_unless_node(node) ⇒ Object
Copy a UnlessNode node.
-
#visit_until_node(node) ⇒ Object
Copy a UntilNode node.
-
#visit_when_node(node) ⇒ Object
Copy a WhenNode node.
-
#visit_while_node(node) ⇒ Object
Copy a WhileNode node.
-
#visit_x_string_node(node) ⇒ Object
Copy a XStringNode node.
-
#visit_yield_node(node) ⇒ Object
Copy a YieldNode node.
Methods inherited from BasicVisitor
#visit, #visit_all, #visit_child_nodes
Instance Method Details
#visit_alias_global_variable_node(node) ⇒ Object
Copy a AliasGlobalVariableNode node
15 16 17 |
# File 'lib/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) ⇒ Object
Copy a AliasMethodNode node
20 21 22 |
# File 'lib/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) ⇒ Object
Copy a AlternationPatternNode node
25 26 27 |
# File 'lib/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) ⇒ Object
Copy a AndNode node
30 31 32 |
# File 'lib/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) ⇒ Object
Copy a ArgumentsNode node
35 36 37 |
# File 'lib/prism/mutation_compiler.rb', line 35 def visit_arguments_node(node) node.copy(arguments: visit_all(node.arguments)) end |
#visit_array_node(node) ⇒ Object
Copy a ArrayNode node
40 41 42 |
# File 'lib/prism/mutation_compiler.rb', line 40 def visit_array_node(node) node.copy(elements: visit_all(node.elements)) end |
#visit_array_pattern_node(node) ⇒ Object
Copy a ArrayPatternNode node
45 46 47 |
# File 'lib/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) ⇒ Object
Copy a AssocNode node
50 51 52 |
# File 'lib/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) ⇒ Object
Copy a AssocSplatNode node
55 56 57 |
# File 'lib/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) ⇒ Object
Copy a BackReferenceReadNode node
60 61 62 |
# File 'lib/prism/mutation_compiler.rb', line 60 def visit_back_reference_read_node(node) node.copy end |
#visit_begin_node(node) ⇒ Object
Copy a BeginNode node
65 66 67 |
# File 'lib/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) ⇒ Object
Copy a BlockArgumentNode node
70 71 72 |
# File 'lib/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) ⇒ Object
Copy a BlockLocalVariableNode node
75 76 77 |
# File 'lib/prism/mutation_compiler.rb', line 75 def visit_block_local_variable_node(node) node.copy end |
#visit_block_node(node) ⇒ Object
Copy a BlockNode node
80 81 82 |
# File 'lib/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) ⇒ Object
Copy a BlockParameterNode node
85 86 87 |
# File 'lib/prism/mutation_compiler.rb', line 85 def visit_block_parameter_node(node) node.copy end |
#visit_block_parameters_node(node) ⇒ Object
Copy a BlockParametersNode node
90 91 92 |
# File 'lib/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) ⇒ Object
Copy a BreakNode node
95 96 97 |
# File 'lib/prism/mutation_compiler.rb', line 95 def visit_break_node(node) node.copy(arguments: visit(node.arguments)) end |
#visit_call_and_write_node(node) ⇒ Object
Copy a CallAndWriteNode node
100 101 102 |
# File 'lib/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) ⇒ Object
Copy a CallNode node
105 106 107 |
# File 'lib/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) ⇒ Object
Copy a CallOperatorWriteNode node
110 111 112 |
# File 'lib/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) ⇒ Object
Copy a CallOrWriteNode node
115 116 117 |
# File 'lib/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) ⇒ Object
Copy a CallTargetNode node
120 121 122 |
# File 'lib/prism/mutation_compiler.rb', line 120 def visit_call_target_node(node) node.copy(receiver: visit(node.receiver)) end |
#visit_capture_pattern_node(node) ⇒ Object
Copy a CapturePatternNode node
125 126 127 |
# File 'lib/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) ⇒ Object
Copy a CaseMatchNode node
130 131 132 |
# File 'lib/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) ⇒ Object
Copy a CaseNode node
135 136 137 |
# File 'lib/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) ⇒ Object
Copy a ClassNode node
140 141 142 |
# File 'lib/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) ⇒ Object
Copy a ClassVariableAndWriteNode node
145 146 147 |
# File 'lib/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) ⇒ Object
Copy a ClassVariableOperatorWriteNode node
150 151 152 |
# File 'lib/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) ⇒ Object
Copy a ClassVariableOrWriteNode node
155 156 157 |
# File 'lib/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) ⇒ Object
Copy a ClassVariableReadNode node
160 161 162 |
# File 'lib/prism/mutation_compiler.rb', line 160 def visit_class_variable_read_node(node) node.copy end |
#visit_class_variable_target_node(node) ⇒ Object
Copy a ClassVariableTargetNode node
165 166 167 |
# File 'lib/prism/mutation_compiler.rb', line 165 def visit_class_variable_target_node(node) node.copy end |
#visit_class_variable_write_node(node) ⇒ Object
Copy a ClassVariableWriteNode node
170 171 172 |
# File 'lib/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) ⇒ Object
Copy a ConstantAndWriteNode node
175 176 177 |
# File 'lib/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) ⇒ Object
Copy a ConstantOperatorWriteNode node
180 181 182 |
# File 'lib/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) ⇒ Object
Copy a ConstantOrWriteNode node
185 186 187 |
# File 'lib/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) ⇒ Object
Copy a ConstantPathAndWriteNode node
190 191 192 |
# File 'lib/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) ⇒ Object
Copy a ConstantPathNode node
195 196 197 |
# File 'lib/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) ⇒ Object
Copy a ConstantPathOperatorWriteNode node
200 201 202 |
# File 'lib/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) ⇒ Object
Copy a ConstantPathOrWriteNode node
205 206 207 |
# File 'lib/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) ⇒ Object
Copy a ConstantPathTargetNode node
210 211 212 |
# File 'lib/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) ⇒ Object
Copy a ConstantPathWriteNode node
215 216 217 |
# File 'lib/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) ⇒ Object
Copy a ConstantReadNode node
220 221 222 |
# File 'lib/prism/mutation_compiler.rb', line 220 def visit_constant_read_node(node) node.copy end |
#visit_constant_target_node(node) ⇒ Object
Copy a ConstantTargetNode node
225 226 227 |
# File 'lib/prism/mutation_compiler.rb', line 225 def visit_constant_target_node(node) node.copy end |
#visit_constant_write_node(node) ⇒ Object
Copy a ConstantWriteNode node
230 231 232 |
# File 'lib/prism/mutation_compiler.rb', line 230 def visit_constant_write_node(node) node.copy(value: visit(node.value)) end |
#visit_def_node(node) ⇒ Object
Copy a DefNode node
235 236 237 |
# File 'lib/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) ⇒ Object
Copy a DefinedNode node
240 241 242 |
# File 'lib/prism/mutation_compiler.rb', line 240 def visit_defined_node(node) node.copy(value: visit(node.value)) end |
#visit_else_node(node) ⇒ Object
Copy a ElseNode node
245 246 247 |
# File 'lib/prism/mutation_compiler.rb', line 245 def visit_else_node(node) node.copy(statements: visit(node.statements)) end |
#visit_embedded_statements_node(node) ⇒ Object
Copy a EmbeddedStatementsNode node
250 251 252 |
# File 'lib/prism/mutation_compiler.rb', line 250 def (node) node.copy(statements: visit(node.statements)) end |
#visit_embedded_variable_node(node) ⇒ Object
Copy a EmbeddedVariableNode node
255 256 257 |
# File 'lib/prism/mutation_compiler.rb', line 255 def (node) node.copy(variable: visit(node.variable)) end |
#visit_ensure_node(node) ⇒ Object
Copy a EnsureNode node
260 261 262 |
# File 'lib/prism/mutation_compiler.rb', line 260 def visit_ensure_node(node) node.copy(statements: visit(node.statements)) end |
#visit_false_node(node) ⇒ Object
Copy a FalseNode node
265 266 267 |
# File 'lib/prism/mutation_compiler.rb', line 265 def visit_false_node(node) node.copy end |
#visit_find_pattern_node(node) ⇒ Object
Copy a FindPatternNode node
270 271 272 |
# File 'lib/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) ⇒ Object
Copy a FlipFlopNode node
275 276 277 |
# File 'lib/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) ⇒ Object
Copy a FloatNode node
280 281 282 |
# File 'lib/prism/mutation_compiler.rb', line 280 def visit_float_node(node) node.copy end |
#visit_for_node(node) ⇒ Object
Copy a ForNode node
285 286 287 |
# File 'lib/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) ⇒ Object
Copy a ForwardingArgumentsNode node
290 291 292 |
# File 'lib/prism/mutation_compiler.rb', line 290 def visit_forwarding_arguments_node(node) node.copy end |
#visit_forwarding_parameter_node(node) ⇒ Object
Copy a ForwardingParameterNode node
295 296 297 |
# File 'lib/prism/mutation_compiler.rb', line 295 def visit_forwarding_parameter_node(node) node.copy end |
#visit_forwarding_super_node(node) ⇒ Object
Copy a ForwardingSuperNode node
300 301 302 |
# File 'lib/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) ⇒ Object
Copy a GlobalVariableAndWriteNode node
305 306 307 |
# File 'lib/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) ⇒ Object
Copy a GlobalVariableOperatorWriteNode node
310 311 312 |
# File 'lib/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) ⇒ Object
Copy a GlobalVariableOrWriteNode node
315 316 317 |
# File 'lib/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) ⇒ Object
Copy a GlobalVariableReadNode node
320 321 322 |
# File 'lib/prism/mutation_compiler.rb', line 320 def visit_global_variable_read_node(node) node.copy end |
#visit_global_variable_target_node(node) ⇒ Object
Copy a GlobalVariableTargetNode node
325 326 327 |
# File 'lib/prism/mutation_compiler.rb', line 325 def visit_global_variable_target_node(node) node.copy end |
#visit_global_variable_write_node(node) ⇒ Object
Copy a GlobalVariableWriteNode node
330 331 332 |
# File 'lib/prism/mutation_compiler.rb', line 330 def visit_global_variable_write_node(node) node.copy(value: visit(node.value)) end |
#visit_hash_node(node) ⇒ Object
Copy a HashNode node
335 336 337 |
# File 'lib/prism/mutation_compiler.rb', line 335 def visit_hash_node(node) node.copy(elements: visit_all(node.elements)) end |
#visit_hash_pattern_node(node) ⇒ Object
Copy a HashPatternNode node
340 341 342 |
# File 'lib/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) ⇒ Object
Copy a IfNode node
345 346 347 |
# File 'lib/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) ⇒ Object
Copy a ImaginaryNode node
350 351 352 |
# File 'lib/prism/mutation_compiler.rb', line 350 def visit_imaginary_node(node) node.copy(numeric: visit(node.numeric)) end |
#visit_implicit_node(node) ⇒ Object
Copy a ImplicitNode node
355 356 357 |
# File 'lib/prism/mutation_compiler.rb', line 355 def visit_implicit_node(node) node.copy(value: visit(node.value)) end |
#visit_implicit_rest_node(node) ⇒ Object
Copy a ImplicitRestNode node
360 361 362 |
# File 'lib/prism/mutation_compiler.rb', line 360 def visit_implicit_rest_node(node) node.copy end |
#visit_in_node(node) ⇒ Object
Copy a InNode node
365 366 367 |
# File 'lib/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) ⇒ Object
Copy a IndexAndWriteNode node
370 371 372 |
# File 'lib/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) ⇒ Object
Copy a IndexOperatorWriteNode node
375 376 377 |
# File 'lib/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) ⇒ Object
Copy a IndexOrWriteNode node
380 381 382 |
# File 'lib/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) ⇒ Object
Copy a IndexTargetNode node
385 386 387 |
# File 'lib/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) ⇒ Object
Copy a InstanceVariableAndWriteNode node
390 391 392 |
# File 'lib/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) ⇒ Object
Copy a InstanceVariableOperatorWriteNode node
395 396 397 |
# File 'lib/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) ⇒ Object
Copy a InstanceVariableOrWriteNode node
400 401 402 |
# File 'lib/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) ⇒ Object
Copy a InstanceVariableReadNode node
405 406 407 |
# File 'lib/prism/mutation_compiler.rb', line 405 def visit_instance_variable_read_node(node) node.copy end |
#visit_instance_variable_target_node(node) ⇒ Object
Copy a InstanceVariableTargetNode node
410 411 412 |
# File 'lib/prism/mutation_compiler.rb', line 410 def visit_instance_variable_target_node(node) node.copy end |
#visit_instance_variable_write_node(node) ⇒ Object
Copy a InstanceVariableWriteNode node
415 416 417 |
# File 'lib/prism/mutation_compiler.rb', line 415 def visit_instance_variable_write_node(node) node.copy(value: visit(node.value)) end |
#visit_integer_node(node) ⇒ Object
Copy a IntegerNode node
420 421 422 |
# File 'lib/prism/mutation_compiler.rb', line 420 def visit_integer_node(node) node.copy end |
#visit_interpolated_match_last_line_node(node) ⇒ Object
Copy a InterpolatedMatchLastLineNode node
425 426 427 |
# File 'lib/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) ⇒ Object
Copy a InterpolatedRegularExpressionNode node
430 431 432 |
# File 'lib/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) ⇒ Object
Copy a InterpolatedStringNode node
435 436 437 |
# File 'lib/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) ⇒ Object
Copy a InterpolatedSymbolNode node
440 441 442 |
# File 'lib/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) ⇒ Object
Copy a InterpolatedXStringNode node
445 446 447 |
# File 'lib/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) ⇒ Object
Copy a ItLocalVariableReadNode node
450 451 452 |
# File 'lib/prism/mutation_compiler.rb', line 450 def visit_it_local_variable_read_node(node) node.copy end |
#visit_it_parameters_node(node) ⇒ Object
Copy a ItParametersNode node
455 456 457 |
# File 'lib/prism/mutation_compiler.rb', line 455 def visit_it_parameters_node(node) node.copy end |
#visit_keyword_hash_node(node) ⇒ Object
Copy a KeywordHashNode node
460 461 462 |
# File 'lib/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) ⇒ Object
Copy a KeywordRestParameterNode node
465 466 467 |
# File 'lib/prism/mutation_compiler.rb', line 465 def visit_keyword_rest_parameter_node(node) node.copy end |
#visit_lambda_node(node) ⇒ Object
Copy a LambdaNode node
470 471 472 |
# File 'lib/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) ⇒ Object
Copy a LocalVariableAndWriteNode node
475 476 477 |
# File 'lib/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) ⇒ Object
Copy a LocalVariableOperatorWriteNode node
480 481 482 |
# File 'lib/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) ⇒ Object
Copy a LocalVariableOrWriteNode node
485 486 487 |
# File 'lib/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) ⇒ Object
Copy a LocalVariableReadNode node
490 491 492 |
# File 'lib/prism/mutation_compiler.rb', line 490 def visit_local_variable_read_node(node) node.copy end |
#visit_local_variable_target_node(node) ⇒ Object
Copy a LocalVariableTargetNode node
495 496 497 |
# File 'lib/prism/mutation_compiler.rb', line 495 def visit_local_variable_target_node(node) node.copy end |
#visit_local_variable_write_node(node) ⇒ Object
Copy a LocalVariableWriteNode node
500 501 502 |
# File 'lib/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) ⇒ Object
Copy a MatchLastLineNode node
505 506 507 |
# File 'lib/prism/mutation_compiler.rb', line 505 def visit_match_last_line_node(node) node.copy end |
#visit_match_predicate_node(node) ⇒ Object
Copy a MatchPredicateNode node
510 511 512 |
# File 'lib/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) ⇒ Object
Copy a MatchRequiredNode node
515 516 517 |
# File 'lib/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) ⇒ Object
Copy a MatchWriteNode node
520 521 522 |
# File 'lib/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) ⇒ Object
Copy a MissingNode node
525 526 527 |
# File 'lib/prism/mutation_compiler.rb', line 525 def visit_missing_node(node) node.copy end |
#visit_module_node(node) ⇒ Object
Copy a ModuleNode node
530 531 532 |
# File 'lib/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) ⇒ Object
Copy a MultiTargetNode node
535 536 537 |
# File 'lib/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) ⇒ Object
Copy a MultiWriteNode node
540 541 542 |
# File 'lib/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) ⇒ Object
Copy a NextNode node
545 546 547 |
# File 'lib/prism/mutation_compiler.rb', line 545 def visit_next_node(node) node.copy(arguments: visit(node.arguments)) end |
#visit_nil_node(node) ⇒ Object
Copy a NilNode node
550 551 552 |
# File 'lib/prism/mutation_compiler.rb', line 550 def visit_nil_node(node) node.copy end |
#visit_no_keywords_parameter_node(node) ⇒ Object
Copy a NoKeywordsParameterNode node
555 556 557 |
# File 'lib/prism/mutation_compiler.rb', line 555 def visit_no_keywords_parameter_node(node) node.copy end |
#visit_numbered_parameters_node(node) ⇒ Object
Copy a NumberedParametersNode node
560 561 562 |
# File 'lib/prism/mutation_compiler.rb', line 560 def visit_numbered_parameters_node(node) node.copy end |
#visit_numbered_reference_read_node(node) ⇒ Object
Copy a NumberedReferenceReadNode node
565 566 567 |
# File 'lib/prism/mutation_compiler.rb', line 565 def visit_numbered_reference_read_node(node) node.copy end |
#visit_optional_keyword_parameter_node(node) ⇒ Object
Copy a OptionalKeywordParameterNode node
570 571 572 |
# File 'lib/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) ⇒ Object
Copy a OptionalParameterNode node
575 576 577 |
# File 'lib/prism/mutation_compiler.rb', line 575 def visit_optional_parameter_node(node) node.copy(value: visit(node.value)) end |
#visit_or_node(node) ⇒ Object
Copy a OrNode node
580 581 582 |
# File 'lib/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) ⇒ Object
Copy a ParametersNode node
585 586 587 |
# File 'lib/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) ⇒ Object
Copy a ParenthesesNode node
590 591 592 |
# File 'lib/prism/mutation_compiler.rb', line 590 def visit_parentheses_node(node) node.copy(body: visit(node.body)) end |
#visit_pinned_expression_node(node) ⇒ Object
Copy a PinnedExpressionNode node
595 596 597 |
# File 'lib/prism/mutation_compiler.rb', line 595 def visit_pinned_expression_node(node) node.copy(expression: visit(node.expression)) end |
#visit_pinned_variable_node(node) ⇒ Object
Copy a PinnedVariableNode node
600 601 602 |
# File 'lib/prism/mutation_compiler.rb', line 600 def visit_pinned_variable_node(node) node.copy(variable: visit(node.variable)) end |
#visit_post_execution_node(node) ⇒ Object
Copy a PostExecutionNode node
605 606 607 |
# File 'lib/prism/mutation_compiler.rb', line 605 def visit_post_execution_node(node) node.copy(statements: visit(node.statements)) end |
#visit_pre_execution_node(node) ⇒ Object
Copy a PreExecutionNode node
610 611 612 |
# File 'lib/prism/mutation_compiler.rb', line 610 def visit_pre_execution_node(node) node.copy(statements: visit(node.statements)) end |
#visit_program_node(node) ⇒ Object
Copy a ProgramNode node
615 616 617 |
# File 'lib/prism/mutation_compiler.rb', line 615 def visit_program_node(node) node.copy(statements: visit(node.statements)) end |
#visit_range_node(node) ⇒ Object
Copy a RangeNode node
620 621 622 |
# File 'lib/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) ⇒ Object
Copy a RationalNode node
625 626 627 |
# File 'lib/prism/mutation_compiler.rb', line 625 def visit_rational_node(node) node.copy end |
#visit_redo_node(node) ⇒ Object
Copy a RedoNode node
630 631 632 |
# File 'lib/prism/mutation_compiler.rb', line 630 def visit_redo_node(node) node.copy end |
#visit_regular_expression_node(node) ⇒ Object
Copy a RegularExpressionNode node
635 636 637 |
# File 'lib/prism/mutation_compiler.rb', line 635 def visit_regular_expression_node(node) node.copy end |
#visit_required_keyword_parameter_node(node) ⇒ Object
Copy a RequiredKeywordParameterNode node
640 641 642 |
# File 'lib/prism/mutation_compiler.rb', line 640 def visit_required_keyword_parameter_node(node) node.copy end |
#visit_required_parameter_node(node) ⇒ Object
Copy a RequiredParameterNode node
645 646 647 |
# File 'lib/prism/mutation_compiler.rb', line 645 def visit_required_parameter_node(node) node.copy end |
#visit_rescue_modifier_node(node) ⇒ Object
Copy a RescueModifierNode node
650 651 652 |
# File 'lib/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) ⇒ Object
Copy a RescueNode node
655 656 657 |
# File 'lib/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) ⇒ Object
Copy a RestParameterNode node
660 661 662 |
# File 'lib/prism/mutation_compiler.rb', line 660 def visit_rest_parameter_node(node) node.copy end |
#visit_retry_node(node) ⇒ Object
Copy a RetryNode node
665 666 667 |
# File 'lib/prism/mutation_compiler.rb', line 665 def visit_retry_node(node) node.copy end |
#visit_return_node(node) ⇒ Object
Copy a ReturnNode node
670 671 672 |
# File 'lib/prism/mutation_compiler.rb', line 670 def visit_return_node(node) node.copy(arguments: visit(node.arguments)) end |
#visit_self_node(node) ⇒ Object
Copy a SelfNode node
675 676 677 |
# File 'lib/prism/mutation_compiler.rb', line 675 def visit_self_node(node) node.copy end |
#visit_shareable_constant_node(node) ⇒ Object
Copy a ShareableConstantNode node
680 681 682 |
# File 'lib/prism/mutation_compiler.rb', line 680 def visit_shareable_constant_node(node) node.copy(write: visit(node.write)) end |
#visit_singleton_class_node(node) ⇒ Object
Copy a SingletonClassNode node
685 686 687 |
# File 'lib/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) ⇒ Object
Copy a SourceEncodingNode node
690 691 692 |
# File 'lib/prism/mutation_compiler.rb', line 690 def visit_source_encoding_node(node) node.copy end |
#visit_source_file_node(node) ⇒ Object
Copy a SourceFileNode node
695 696 697 |
# File 'lib/prism/mutation_compiler.rb', line 695 def visit_source_file_node(node) node.copy end |
#visit_source_line_node(node) ⇒ Object
Copy a SourceLineNode node
700 701 702 |
# File 'lib/prism/mutation_compiler.rb', line 700 def visit_source_line_node(node) node.copy end |
#visit_splat_node(node) ⇒ Object
Copy a SplatNode node
705 706 707 |
# File 'lib/prism/mutation_compiler.rb', line 705 def visit_splat_node(node) node.copy(expression: visit(node.expression)) end |
#visit_statements_node(node) ⇒ Object
Copy a StatementsNode node
710 711 712 |
# File 'lib/prism/mutation_compiler.rb', line 710 def visit_statements_node(node) node.copy(body: visit_all(node.body)) end |
#visit_string_node(node) ⇒ Object
Copy a StringNode node
715 716 717 |
# File 'lib/prism/mutation_compiler.rb', line 715 def visit_string_node(node) node.copy end |
#visit_super_node(node) ⇒ Object
Copy a SuperNode node
720 721 722 |
# File 'lib/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) ⇒ Object
Copy a SymbolNode node
725 726 727 |
# File 'lib/prism/mutation_compiler.rb', line 725 def visit_symbol_node(node) node.copy end |
#visit_true_node(node) ⇒ Object
Copy a TrueNode node
730 731 732 |
# File 'lib/prism/mutation_compiler.rb', line 730 def visit_true_node(node) node.copy end |
#visit_undef_node(node) ⇒ Object
Copy a UndefNode node
735 736 737 |
# File 'lib/prism/mutation_compiler.rb', line 735 def visit_undef_node(node) node.copy(names: visit_all(node.names)) end |
#visit_unless_node(node) ⇒ Object
Copy a UnlessNode node
740 741 742 |
# File 'lib/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) ⇒ Object
Copy a UntilNode node
745 746 747 |
# File 'lib/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) ⇒ Object
Copy a WhenNode node
750 751 752 |
# File 'lib/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) ⇒ Object
Copy a WhileNode node
755 756 757 |
# File 'lib/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) ⇒ Object
Copy a XStringNode node
760 761 762 |
# File 'lib/prism/mutation_compiler.rb', line 760 def visit_x_string_node(node) node.copy end |
#visit_yield_node(node) ⇒ Object
Copy a YieldNode node
765 766 767 |
# File 'lib/prism/mutation_compiler.rb', line 765 def visit_yield_node(node) node.copy(arguments: visit(node.arguments)) end |