fix interpreter to output symbols

which amazingly lets us get at classnames etc
This commit is contained in:
2019-09-08 15:31:03 +03:00
parent a99abd7ad0
commit 6811fc4174
4 changed files with 39 additions and 18 deletions

View File

@ -158,8 +158,13 @@ module Risc
end
case object
when Symbol
raise "Must convert symbol to word:#{object}" unless( index == 2 )
value = object.to_s.length
if(index == 0)
value = object.get_type
elsif(index==1)
value = object.to_s.length
else
raise "Must convert symbol to word:#{object}:#{index}"
end
when nil
raise "error #{@instruction} retrieves nil"
else