let builder pass the source down, but inly once

This commit is contained in:
Torsten Ruger
2018-04-18 19:27:46 +03:00
parent 059ff4a868
commit 75d5fff611
2 changed files with 14 additions and 5 deletions

View File

@@ -26,7 +26,8 @@ module Risc
@source = source
@next = nekst
return unless source
raise "Source must be string or Instruction, not #{source.class}" unless source.is_a?(String) or source.is_a?(Mom::Instruction)
raise "Source must be string or Instruction, not #{source.class}" unless source.is_a?(String) or
source.is_a?(Mom::Instruction) or source.is_a?(Parfait::TypedMethod)
end
attr_reader :source