lib/unparser/emitter.rb in unparser-0.1.10 vs lib/unparser/emitter.rb in unparser-0.1.11

- old
+ new

@@ -13,23 +13,29 @@ # # @return [Parser::AST::Node] # # @api private # - def local_variable_root - node + def local_variable_scope + AST::LocalVariableScope.new(node) end + def self.included(descendant) + descendant.class_eval do + memoize :local_variable_scope + end + end + end # Return local variable root # # @return [Parser::AST::Node] # # @api private # - def local_variable_root - parent.local_variable_root + def local_variable_scope + parent.local_variable_scope end # Registry for node emitters REGISTRY = {}