reimplement instruction listeners with indexes

easier to understand, as indexes map to Binarycode indexes, and can thus later be used to assemble directoy into the  code
Almost no change in tests (now only multiples of 4 addresses allowed)
This commit is contained in:
Torsten Ruger
2018-06-09 17:41:39 +03:00
parent cf94227b2c
commit ec1d38f5a6
4 changed files with 50 additions and 71 deletions

View File

@ -47,6 +47,12 @@ module Parfait
@next
end
def last_code
last = self
last = last.next while(last.next)
last
end
def each_block( &block )
block.call( self )
@next.each_block( &block ) if @next