remove unused variable class
This commit is contained in:
parent
dc56274940
commit
886220d388
@ -132,7 +132,6 @@ module Register
|
|||||||
:TypedMethod => {:name => :Word, :source => :Object, :instructions => :Object, :binary => :Object,
|
:TypedMethod => {:name => :Word, :source => :Object, :instructions => :Object, :binary => :Object,
|
||||||
:arguments => :Type , :for_type => :Type, :locals => :Type } ,
|
:arguments => :Type , :for_type => :Type, :locals => :Type } ,
|
||||||
:Value => {},
|
:Value => {},
|
||||||
:Variable => {:value_type => :Class, :name => :Word , :value => :Object}
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ require_relative "parfait/word"
|
|||||||
require_relative "parfait/binary_code"
|
require_relative "parfait/binary_code"
|
||||||
require_relative "parfait/typed_method"
|
require_relative "parfait/typed_method"
|
||||||
require_relative "parfait/meta_class"
|
require_relative "parfait/meta_class"
|
||||||
require_relative "parfait/variable"
|
|
||||||
require_relative "parfait/dictionary"
|
require_relative "parfait/dictionary"
|
||||||
require_relative "parfait/type"
|
require_relative "parfait/type"
|
||||||
require_relative "parfait/message"
|
require_relative "parfait/message"
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
module Parfait
|
|
||||||
class Variable < Object
|
|
||||||
|
|
||||||
def initialize type , name , value = nil
|
|
||||||
raise "not type #{type}(#{type.class})" unless Register.machine.space.get_class_by_name(type)
|
|
||||||
self.value_type , self.name , self.value = type , name , value
|
|
||||||
self.value = 0 if self.value_type == :Integer and value == nil
|
|
||||||
raise "must give name for variable" unless name
|
|
||||||
end
|
|
||||||
attributes [:value_type , :name, :value]
|
|
||||||
|
|
||||||
def to_s
|
|
||||||
"Variable(#{self.value_type} ,#{self.name})"
|
|
||||||
end
|
|
||||||
def inspect
|
|
||||||
to_s
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user