Move vool block compilation into constant generation
When the lambda is passed as argument, it must be moved. This triggers the generation of a corresponding parfait object (as before, and as for other constants) but now also triggers the code build. The code being the constant as it were Also some more name fixes from renames
This commit is contained in:
@ -10,12 +10,11 @@ module Vool
|
||||
# As cache key we must use the type of the object (which is the first word of _every_ object)
|
||||
# as that is constant, and function implementations depend on the type (not class)
|
||||
class SendStatement < CallStatement
|
||||
attr_reader :block
|
||||
|
||||
def block
|
||||
return nil if arguments.empty?
|
||||
bl = arguments.last
|
||||
bl.is_a?(BlockStatement) ? bl : nil
|
||||
bl.is_a?(LambdaExpression) ? bl : nil
|
||||
end
|
||||
|
||||
def add_block( block )
|
||||
|
Reference in New Issue
Block a user