Use child nameing in literal regexp mutator
This commit is contained in:
parent
50263607b8
commit
1be5f790a8
1 changed files with 1 additions and 21 deletions
|
@ -12,7 +12,7 @@ module Mutant
|
|||
# No input can ever be matched with this
|
||||
NULL_REGEXP_SOURCE = 'a\A'.freeze
|
||||
|
||||
SOURCE_INDEX, OPTIONS_INDEX = 0, 1
|
||||
children :source, :options
|
||||
|
||||
private
|
||||
|
||||
|
@ -28,26 +28,6 @@ module Mutant
|
|||
emit_self(s(:str, NULL_REGEXP_SOURCE), options)
|
||||
end
|
||||
|
||||
# Return options
|
||||
#
|
||||
# @return [Parser::AST::Node]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def options
|
||||
children[OPTIONS_INDEX]
|
||||
end
|
||||
|
||||
# Return source
|
||||
#
|
||||
# @return [Parser::AST::Node]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def source
|
||||
children[SOURCE_INDEX]
|
||||
end
|
||||
|
||||
end # Regex
|
||||
end # Literal
|
||||
end # Node
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue