whitespace and code style

This commit is contained in:
Torsten Ruger
2016-12-30 19:17:15 +02:00
parent db798d1a4a
commit 83b6628f1a
6 changed files with 12 additions and 11 deletions

View File

@ -5,14 +5,14 @@ module Register
def collect_space
@objects.clear
keep Parfait.object_space , 0
constants.each {|o| keep(o,0)}
constants.each {|obj| keep(obj,0)}
end
def keep object , depth
return if object.nil?
#puts "adding #{' ' * depth}:#{object.class}"
#puts "ADD #{object.first.class}, #{object.last.class}" if object.is_a? Array
return unless self.add_object object
#puts "ADD #{object.inspect}, #{object.hash}" if object.is_a? Parfait::Type
return unless add_object( object )
# probably should make labels or even instructions derive from Parfait::Object, but . .
if object.is_a? Register::Label
object.each_label { |l| self.add_object(l)}