retiring ClassField and class_field from typed layer

Creating classes is the responsibility of melon
This commit is contained in:
Torsten Ruger
2016-12-16 19:05:49 +02:00
parent dd6dede6ef
commit f8cefcde3c
9 changed files with 19 additions and 50 deletions

View File

@@ -1,18 +0,0 @@
module Typed
module ClassField
def on_ClassField statement
#type , name , value = *statement
for_type = @type
raise "no type" unless for_type
index = for_type.variable_index(statement.name)
raise "class field already defined:#{name} for class #{for_type}" if index
#FIXME should not hack into current type, but create a new
for_type.send(:private_add_instance_variable, statement.name , statement.type)
return nil # statements don't reurn values, only expressions
end
end
end