Sha256: 6a6f1690aca8611f4eacefdc01e8bb8407e0f4dc2bc6af98c24645feab8663d9
Contents?: true
Size: 841 Bytes
Versions: 28
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true module Mutant class Mutator class Node module Regexp # Character type mutator class CharacterType < Node map = { regexp_digit_type: :regexp_nondigit_type, regexp_hex_type: :regexp_nonhex_type, regexp_space_type: :regexp_nonspace_type, regexp_word_boundary_anchor: :regexp_nonword_boundary_anchor, regexp_word_type: :regexp_nonword_type, regexp_xgrapheme_type: :regexp_linebreak_type } MAP = map.merge(map.invert) handle(*MAP.keys) private def dispatch emit(s(MAP.fetch(node.type))) end end # CharacterType end # Regexp end # Node end # Mutator end # Mutant
Version data entries
28 entries across 28 versions & 1 rubygems