Rename Vool Block to Lambda

Making the distinction clearer
Some fixing of previous (wip)
This commit is contained in:
2019-08-19 10:40:22 +03:00
parent 02807cf6f9
commit ae16551ed0
8 changed files with 12 additions and 12 deletions

View File

@ -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}"

View File

@ -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}"

View File

@ -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))