moving string to parfait

using parfait::word
also rename builtins string to word
This commit is contained in:
Torsten Ruger
2015-05-13 16:17:10 +03:00
parent baca6eb4c6
commit 9d711e7766
16 changed files with 50 additions and 60 deletions

View File

@ -71,7 +71,7 @@ module Virtual
# attr_reader :string
def self.compile_string expression , method
value = StringConstant.new(expression.string)
value = Parfait::Word.new(expression.string)
to = Return.new(Reference , value)
Machine.instance.space.add_object value
method.add_code Set.new( to , value )

View File

@ -8,7 +8,7 @@ module Virtual
me = Compiler.compile( expession.receiver , method )
method.add_code NewMessage.new
method.add_code Set.new(NewSelf.new(me.type), me)
method.add_code Set.new(NewName.new(), StringConstant.new(expession.name))
method.add_code Set.new(NewName.new(), Parfait::Word.new(expession.name))
compiled_args = []
expession.args.each_with_index do |arg , i|
#compile in the running method, ie before passing control