rubyx/lib/melon/ruby_method.rb
Torsten Ruger 4095bb397f starting to create vm_method from ruby_method
issues galore though
2017-01-15 12:10:37 +02:00

23 lines
531 B
Ruby

module Melon
class RubyMethod
attr_reader :name , :args_type , :locals_type , :source
def initialize(name , args_type , locals_type , source )
@name , @args_type , @locals_type , @source = name , args_type, locals_type , source
end
def normalize_source
@source = yield @source
end
def create_vm_method( type )
raise "create_method #{type.inspect} is not a Type" unless type.is_a? Parfait::Type
type.create_method( @name , @args_type )#FIXME, @locals_type)
end
end
end