Method: Parser::Source::TreeRewriter#merge!
- Defined in:
- lib/parser/source/tree_rewriter.rb
#merge!(with) ⇒ Rewriter
Merges the updates of argument with the receiver. Policies of the receiver are used. This action is atomic in that it won't change the receiver unless it succeeds.
139 140 141 142 143 144 145 |
# File 'lib/parser/source/tree_rewriter.rb', line 139 def merge!(with) raise 'TreeRewriter are not for the same source_buffer' unless source_buffer == with.source_buffer @action_root = @action_root.combine(with.action_root) self end |