Remove parser monkey patch
This commit is contained in:
parent
8f6c5ca5b4
commit
58db15c488
5 changed files with 4 additions and 38 deletions
|
@ -1,10 +1,11 @@
|
||||||
# v0.5.11 2014-04-07
|
# v0.5.11 2014-04-xx
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
* Fix crash on while and until without body
|
* Fix crash on while and until without body
|
||||||
* Better require highjack based zombifier
|
* Better require highjack based zombifier
|
||||||
* Do not mutate nthref $1 to gvar $0
|
* Do not mutate nthref $1 to gvar $0
|
||||||
|
* Use faster duplicate guarding hashing AST::Node intances
|
||||||
|
|
||||||
# v0.5.10 2014-04-06
|
# v0.5.10 2014-04-06
|
||||||
|
|
||||||
|
|
1
Gemfile
1
Gemfile
|
@ -3,6 +3,7 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'mutant', path: '.'
|
gem 'mutant', path: '.'
|
||||||
|
gem 'morpher', git: 'https://github.com/mbj/morpher'
|
||||||
|
|
||||||
gemspec name: 'mutant'
|
gemspec name: 'mutant'
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ require 'equalizer'
|
||||||
require 'digest/sha1'
|
require 'digest/sha1'
|
||||||
require 'inflecto'
|
require 'inflecto'
|
||||||
require 'parser'
|
require 'parser'
|
||||||
require 'parser_extensions'
|
|
||||||
require 'parser/current'
|
require 'parser/current'
|
||||||
require 'unparser'
|
require 'unparser'
|
||||||
require 'ice_nine'
|
require 'ice_nine'
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
# Monkey patch to parser that needs to be pushed upstream
|
|
||||||
module Parser
|
|
||||||
# AST namespace
|
|
||||||
module AST
|
|
||||||
# The AST nodes we use in mutant
|
|
||||||
class Node
|
|
||||||
|
|
||||||
# Return hash compatible with #eql?
|
|
||||||
#
|
|
||||||
# @return [Fixnum]
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
def hash
|
|
||||||
@type.hash ^ @children.hash ^ self.class.hash
|
|
||||||
end
|
|
||||||
|
|
||||||
# Test if node is equal to anotheo
|
|
||||||
#
|
|
||||||
# @return [true]
|
|
||||||
# if node represents the same code semantics locations are ignored
|
|
||||||
#
|
|
||||||
# @return [false]
|
|
||||||
# otherwise
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
#
|
|
||||||
def eql?(other)
|
|
||||||
other.kind_of?(self.class)
|
|
||||||
other.type.eql?(@type) && other.children.eql?(@children)
|
|
||||||
end
|
|
||||||
|
|
||||||
end # Node
|
|
||||||
end # AST
|
|
||||||
end # Parser
|
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ Gem::Specification.new do |gem|
|
||||||
gem.required_ruby_version = '>= 1.9.3'
|
gem.required_ruby_version = '>= 1.9.3'
|
||||||
|
|
||||||
gem.add_runtime_dependency('parser', '~> 2.1')
|
gem.add_runtime_dependency('parser', '~> 2.1')
|
||||||
|
gem.add_runtime_dependency('ast', '~> 2.0')
|
||||||
gem.add_runtime_dependency('diff-lcs', '~> 1.2')
|
gem.add_runtime_dependency('diff-lcs', '~> 1.2')
|
||||||
gem.add_runtime_dependency('morpher', '~> 0.2.2')
|
gem.add_runtime_dependency('morpher', '~> 0.2.2')
|
||||||
gem.add_runtime_dependency('procto', '~> 0.0.2')
|
gem.add_runtime_dependency('procto', '~> 0.0.2')
|
||||||
|
|
Loading…
Add table
Reference in a new issue