ifx most of the conversion

well . . it's still converting to ruby, minor detail
This commit is contained in:
Torsten Ruger
2018-07-19 14:59:10 +03:00
parent ae3d64eb53
commit 61225c2f20
14 changed files with 57 additions and 25 deletions

36
lib/ruby/variables.rb Normal file
View File

@ -0,0 +1,36 @@
module Ruby
module Named
attr_reader :name
def initialize name
@name = name
end
def each(&block)
end
end
class LocalVariable < Expression
include Named
def to_s
name.to_s
end
end
class InstanceVariable < Expression
include Named
# used to collect type information
def add_ivar( array )
array << @name
end
def to_s
"@#{name}"
end
end
class ClassVariable < Expression
include Named
end
class ModuleName < Expression
include Named
end
end