moving to instance variables in parfait

This commit is contained in:
2019-09-09 20:26:54 +03:00
parent fc8de10964
commit 81e3c0c270
21 changed files with 212 additions and 187 deletions

View File

@ -12,13 +12,13 @@ module Parfait
#
class VoolMethod < Object
attr :type, :name , :args_type , :frame_type
attr_reader :type, :name , :args_type , :frame_type
attr_reader :source
def initialize(name , args_type , frame_type , source )
self.name = name
self.args_type = args_type
self.frame_type = frame_type
@name = name
@args_type = args_type
@frame_type = frame_type
@source = source
raise "Name must be symbol" unless name.is_a?(Symbol)
raise "args_type must be type" unless args_type.is_a?(Parfait::Type)
@ -29,7 +29,7 @@ module Parfait
def create_callable_method( type )
raise "create_method #{type.inspect} is not a Type" unless type.is_a? Parfait::Type
type.create_method( name , args_type , frame_type)
type.create_method( @name , @args_type , @frame_type)
end
def compiler_for(self_type)