Rename SlotMaker to Variable
Feels like now with better names, i can start to work.
This commit is contained in:
@ -2,20 +2,20 @@ module SlotLanguage
|
||||
# A Assignment makes SlotLoad. That means it stores the information
|
||||
# to be able to create a SlotLoad
|
||||
#
|
||||
# Just like the SlotLoad stores two Slots, here we store two SlotMakers
|
||||
# Just like the SlotLoad stores two Slots, here we store two Variables
|
||||
#
|
||||
class Assignment
|
||||
# The two SlotMakers that become Slots in to_slot
|
||||
# The two Variables that become Slots in to_slot
|
||||
attr_reader :left , :right
|
||||
|
||||
def initialize(left , right)
|
||||
@left = left
|
||||
@right = right
|
||||
raise "No Slot #{left}" unless left.is_a?(SlotMaker)
|
||||
raise "No Slot #{right}" unless right.is_a?(SlotMaker)
|
||||
raise "No Slot #{left}" unless left.is_a?(Variable)
|
||||
raise "No Slot #{right}" unless right.is_a?(Variable)
|
||||
end
|
||||
|
||||
# create the SlotLoad, by creating the two Slots from the SlotMakers
|
||||
# create the SlotLoad, by creating the two Slots from the Variables
|
||||
def to_slot(compiler)
|
||||
left_d = @left.to_slot(compiler)
|
||||
right_d = @right.to_slot(compiler)
|
||||
|
Reference in New Issue
Block a user