Sha256: e99c906e5b7d809a3a840e2aa913e4e864a4ed45d53b1c70126d30c70fed6177

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

module Mutant
  class Mutator
    class Node
      # Generic mutator
      class Generic < self

        handle(:self)

        # These nodes still need a dedicated mutator,
        # your contribution is that close!
        handle(
          :zsuper, :not, :or, :and, :defined,
          :next, :break, :match, :gvar, :cvar, :ensure,
          :dstr, :dsym, :yield, :rescue, :redo, :defined?,
          :lvar, :const, :blockarg, :block_pass, :op_asgn, :and_asgn,
          :regopt, :ivar, :restarg, :casgn, :resbody, :retry, :arg_expr,
          :kwrestarg, :kwoptarg, :kwarg, :undef, :module, :cbase, :empty,
          :alias, :for, :xstr, :back_ref, :nth_ref, :class,
          :sclass, :match_with_lvasgn, :match_current_line, :or_asgn, :kwbegin
        )

      private

        # Emit mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          children.each_with_index do |child, index|
            next unless child.kind_of?(Parser::AST::Node)
            mutate_child(index)
          end
        end

      end # Generic
    end # Node
  end # Mutator
end # Mutant

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mutant-0.3.0.beta18 lib/mutant/mutator/node/generic.rb