Rename Vool Block to Lambda
Making the distinction clearer Some fixing of previous (wip)
This commit is contained in:
@ -13,7 +13,7 @@ module Ruby
|
||||
return self.vool_brother.new(name,@value.to_vool)
|
||||
when SendStatement , YieldStatement
|
||||
return normalize_send
|
||||
when BlockStatement
|
||||
when RubyBlockStatement
|
||||
return normalize_block
|
||||
else
|
||||
raise "unsupported right #{value}"
|
||||
|
@ -27,7 +27,7 @@ module Ruby
|
||||
when LocalAssignment
|
||||
ret = ReturnStatement.new( LocalVariable.new(statement.name) )
|
||||
return Statements.new([statement , ret])
|
||||
when ReturnStatement , IfStatement , WhileStatement ,BlockStatement
|
||||
when ReturnStatement , IfStatement , WhileStatement ,RubyBlockStatement
|
||||
return statement
|
||||
else
|
||||
raise "Not implemented implicit return #{statement.class}"
|
||||
|
@ -20,7 +20,7 @@ module Ruby
|
||||
#
|
||||
def to_vool
|
||||
block_name = "implicit_block_#{object_id}".to_sym
|
||||
block = Vool::BlockStatement.new( @args.dup , @body.to_vool)
|
||||
block = Vool::LambdaStatement.new( @args.dup , @body.to_vool)
|
||||
assign = Vool::LocalAssignment.new( block_name , block)
|
||||
sendd = @send.to_vool
|
||||
if(sendd.is_a?(Vool::Statements))
|
||||
|
Reference in New Issue
Block a user