Merge pull request #522 from mbj/feature/parser-2-3
Add support for parser 2.3
This commit is contained in:
commit
06011d488f
4 changed files with 14 additions and 13 deletions
|
@ -41,8 +41,9 @@ module Mutant
|
|||
# Nodes that are NOT generated by parser but used by mutant / unparser.
|
||||
EXTRA = symbolset.(%w[empty])
|
||||
|
||||
# Nodes that are currently missing from parser META
|
||||
MISSING = symbolset.(%w[rational])
|
||||
# Nodes that are currently missing from Parser::Meta::NODE_TYPES
|
||||
# * https://github.com/whitequark/parser/pull/251
|
||||
MISSING = symbolset.(%w[csend])
|
||||
|
||||
# All node types mutant handles
|
||||
ALL = symbolset.((Parser::Meta::NODE_TYPES + EXTRA + MISSING) - BLACKLIST)
|
||||
|
|
|
@ -8,7 +8,7 @@ module Mutant
|
|||
# These nodes still need a dedicated mutator,
|
||||
# your contribution is that close!
|
||||
handle(
|
||||
:ensure, :redo, :regopt, :retry, :arg_expr,
|
||||
:csend, :ensure, :redo, :regopt, :retry, :arg_expr,
|
||||
:kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,
|
||||
:alias, :for, :xstr, :back_ref, :class,
|
||||
:sclass, :match_with_lvasgn, :while_post,
|
||||
|
|
14
meta/dsym.rb
14
meta/dsym.rb
|
@ -2,11 +2,11 @@ Mutant::Meta::Example.add do
|
|||
source ':"foo#{bar}baz"'
|
||||
|
||||
singleton_mutations
|
||||
# TODO: Unparser imperfection two asts with same source.
|
||||
mutation s(:dsym, s(:nil), s(:begin, s(:send, nil, :bar)), s(:str, 'baz'))
|
||||
mutation s(:dsym, s(:self), s(:begin, s(:send, nil, :bar)), s(:str, 'baz'))
|
||||
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:self)), s(:str, 'baz'))
|
||||
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:nil)), s(:str, 'baz'))
|
||||
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:send, nil, :bar)), s(:nil))
|
||||
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:send, nil, :bar)), s(:self))
|
||||
|
||||
mutation ':"#{nil}#{bar}#{"baz"}"'
|
||||
mutation ':"#{self}#{bar}#{"baz"}"'
|
||||
mutation ':"#{"foo"}#{nil}#{"baz"}"'
|
||||
mutation ':"#{"foo"}#{self}#{"baz"}"'
|
||||
mutation ':"#{"foo"}#{bar}#{nil}"'
|
||||
mutation ':"#{"foo"}#{bar}#{self}"'
|
||||
end
|
||||
|
|
|
@ -21,14 +21,14 @@ Gem::Specification.new do |gem|
|
|||
|
||||
gem.required_ruby_version = '>= 2.1'
|
||||
|
||||
gem.add_runtime_dependency('parser', '~> 2.2.2')
|
||||
gem.add_runtime_dependency('ast', '~> 2.1')
|
||||
gem.add_runtime_dependency('parser', '~> 2.3.0')
|
||||
gem.add_runtime_dependency('ast', '~> 2.2')
|
||||
gem.add_runtime_dependency('diff-lcs', '~> 1.2')
|
||||
gem.add_runtime_dependency('parallel', '~> 1.3')
|
||||
gem.add_runtime_dependency('morpher', '~> 0.2.6')
|
||||
gem.add_runtime_dependency('procto', '~> 0.0.2')
|
||||
gem.add_runtime_dependency('abstract_type', '~> 0.0.7')
|
||||
gem.add_runtime_dependency('unparser', '~> 0.2.4')
|
||||
gem.add_runtime_dependency('unparser', '~> 0.2.5')
|
||||
gem.add_runtime_dependency('ice_nine', '~> 0.11.1')
|
||||
gem.add_runtime_dependency('adamantium', '~> 0.2.0')
|
||||
gem.add_runtime_dependency('memoizable', '~> 0.4.2')
|
||||
|
|
Loading…
Reference in a new issue