pass a source into the builder

for debugging
This commit is contained in:
Torsten Ruger
2018-04-18 19:12:30 +03:00
parent df08cb78e2
commit 059ff4a868
8 changed files with 21 additions and 18 deletions

View File

@ -12,10 +12,12 @@ module Risc
# pass a compiler, to which instruction are added (usually)
# second arg determines weather instructions are added (default true)
# call build with a block to build
def initialize(compiler, auto_add)
def initialize(compiler, auto_add , for_source)
@compiler = compiler
@auto_add = auto_add
@built = nil
@source = for_source
@source_used = false
@names = {}
end