rubyx/lib/vool/statements/variables.rb

29 lines
440 B
Ruby
Raw Normal View History

module Vool
module Named
attr_reader :name
def initialize name
@name = name
end
end
class LocalVariable < Statement
include Named
end
class InstanceVariable < Statement
include Named
2017-04-08 11:11:52 +02:00
# used to collect type information
def add_ivar( array )
array << @name
end
end
class ClassVariable < Statement
include Named
end
2017-04-04 17:00:21 +02:00
class ModuleName < Statement
include Named
end
end