Start to make slots recursive
This commit is contained in:
@ -25,7 +25,7 @@ module SlotMachine
|
||||
def initialize( source , receiver,arguments )
|
||||
super(source)
|
||||
@receiver , @arguments = receiver , arguments
|
||||
raise "Receiver not Slot #{@receiver}" unless @receiver.is_a?(Slot)
|
||||
raise "Receiver not Slot #{@receiver}" unless @receiver.is_a?(Slotted)
|
||||
@arguments.each{|a| raise "args not SlotLoad #{a}" unless a.is_a?(SlotLoad)}
|
||||
end
|
||||
|
||||
|
@ -33,8 +33,8 @@ module SlotMachine
|
||||
@left , @right = left , right
|
||||
@left = Slotted.for(@left.shift , @left) if @left.is_a? Array
|
||||
@right = Slotted.for(@right.shift , @right) if @right.is_a? Array
|
||||
raise "right not SlotMachine, #{@right.to_s}" unless @right.is_a?( Slot )
|
||||
raise "left not SlotMachine, #{@left.to_s}" unless @left.is_a?( Slot )
|
||||
raise "right not SlotMachine, #{@right.to_s}" unless @right.is_a?( Slotted )
|
||||
raise "left not SlotMachine, #{@left.to_s}" unless @left.is_a?( Slotted )
|
||||
@original_source = original_source || self
|
||||
end
|
||||
|
||||
|
@ -11,7 +11,7 @@ module SlotMachine
|
||||
def initialize(condition , false_jump)
|
||||
super(false_jump)
|
||||
@condition = condition
|
||||
raise "condition must be slot_definition #{condition}" unless condition.is_a?(Slot)
|
||||
raise "condition must be slot_definition #{condition}" unless condition.is_a?(Slotted)
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
Reference in New Issue
Block a user