Rename Vool to Sol
Simple is really the descriptive name for the layer Sure, it is "virtual" but that is not as important as the fact that it is simple (or simplified) Also objct (based really) is better, since orientated implies it is a little like that, but only orientated, not really it. Sol only has objects, nothing else Just cause i was renaming anyway
This commit is contained in:
@ -6,11 +6,11 @@ module Ruby
|
||||
@name , @value = name , value
|
||||
end
|
||||
|
||||
def to_vool()
|
||||
def to_sol()
|
||||
raise "not named left #{name.class}" unless name.is_a?(Symbol)
|
||||
case value
|
||||
when Variable , Constant
|
||||
return self.vool_brother.new(name,@value.to_vool)
|
||||
return self.sol_brother.new(name,@value.to_sol)
|
||||
when SendStatement , YieldStatement , RubyBlockStatement
|
||||
return normalize_send
|
||||
else
|
||||
@ -18,12 +18,12 @@ module Ruby
|
||||
end
|
||||
end
|
||||
|
||||
# sends may have complex args that get hoisted in vool:ing them
|
||||
# sends may have complex args that get hoisted in sol:ing them
|
||||
# in which case we have to assign the simplified, otherwise the
|
||||
# plain send
|
||||
def normalize_send
|
||||
statements = value.to_vool
|
||||
return assignment( statements ) if statements.is_a?(Vool::CallStatement)
|
||||
statements = value.to_sol
|
||||
return assignment( statements ) if statements.is_a?(Sol::CallStatement)
|
||||
# send has hoisted assigns, so we make an assign out of the "pure" send
|
||||
statements << assignment(statements.statements.pop)
|
||||
statements
|
||||
@ -32,7 +32,7 @@ module Ruby
|
||||
# create same type assignment with the value (a send)
|
||||
def assignment(value)
|
||||
value ||= @value
|
||||
self.vool_brother.new(name,value)
|
||||
self.sol_brother.new(name,value)
|
||||
end
|
||||
|
||||
def to_s(depth = 0)
|
||||
|
Reference in New Issue
Block a user