2017-04-01 20:28:57 +02:00
|
|
|
module Vool
|
|
|
|
class IntegerStatement < Statement
|
2017-04-06 15:06:51 +02:00
|
|
|
attr_reader :value
|
2017-04-01 20:28:57 +02:00
|
|
|
def initialize(value)
|
|
|
|
@value = value
|
|
|
|
end
|
2017-04-19 19:59:13 +02:00
|
|
|
def ct_type
|
|
|
|
Parfait.object_space.get_class_by_name(:Integer).instance_type
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
class FloatStatement < Statement
|
2017-04-06 15:06:51 +02:00
|
|
|
attr_reader :value
|
2017-04-01 20:28:57 +02:00
|
|
|
def initialize(value)
|
|
|
|
@value = value
|
|
|
|
end
|
2017-04-19 19:59:13 +02:00
|
|
|
def ct_type
|
|
|
|
true
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
class TrueStatement < Statement
|
2017-04-19 19:59:13 +02:00
|
|
|
def ct_type
|
|
|
|
Parfait.object_space.get_class_by_name(:True).instance_type
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
class FalseStatement < Statement
|
2017-04-19 19:59:13 +02:00
|
|
|
def ct_type
|
|
|
|
Parfait.object_space.get_class_by_name(:False).instance_type
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
class NilStatement < Statement
|
2017-04-19 19:59:13 +02:00
|
|
|
def ct_type
|
|
|
|
Parfait.object_space.get_class_by_name(:Nil).instance_type
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
2017-04-02 11:59:07 +02:00
|
|
|
class SelfStatement < Statement
|
|
|
|
end
|
2017-04-02 17:42:52 +02:00
|
|
|
class SuperStatement < Statement
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
class StringStatement < Statement
|
2017-04-06 15:06:51 +02:00
|
|
|
attr_reader :value
|
2017-04-01 20:28:57 +02:00
|
|
|
def initialize(value)
|
|
|
|
@value = value
|
|
|
|
end
|
2017-04-19 19:59:13 +02:00
|
|
|
def ct_type
|
|
|
|
Parfait.object_space.get_class_by_name(:Word).instance_type
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
2017-04-02 09:43:22 +02:00
|
|
|
class SymbolStatement < StringStatement
|
2017-04-19 19:59:13 +02:00
|
|
|
def ct_type
|
|
|
|
Parfait.object_space.get_class_by_name(:Word).instance_type
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
end
|