simplify writing binary

loop as should be, fixes the problem (one problem at least)
This commit is contained in:
Torsten Ruger
2018-05-13 18:01:45 +03:00
parent 866467ee5e
commit 4856b9891d
4 changed files with 18 additions and 11 deletions

View File

@ -117,6 +117,13 @@ module Parfait
"#{@for_type.object_class.name}:#{name}(#{arguments_type.inspect})"
end
def each_binary( &block )
bin = binary
while(bin) do
block.call( bin )
bin = bin.next
end
end
def each_method( &block )
block.call( self )
next_method.each_method( &block ) if next_method