finally change List to derive from data object

can’t derive from data16 as some lists are longer
have to get the delegation to work first
This commit is contained in:
Torsten Ruger
2018-05-28 15:45:29 +03:00
parent f9a89db10c
commit 8ef1a471a4
7 changed files with 33 additions and 52 deletions

View File

@ -15,15 +15,11 @@ module Parfait
class Word < Data8
attr_reader :char_length
#semi "indexed" methods for interpreter
def self.get_length_index
2 # 2 is the amount of attributes, type and char_length. the offset after which chars start
end
def self.type_length
2 # 0 type , 1 char_length
end
def self.get_indexed( i )
i + get_length_index * 4
def self.get_length_index
type_length - 1
end
# initialize with length. For now we try to keep all non-parfait (including String) out
# String will contain spaces for non-zero length