removes class statements
classes have to be created in melon, a level up
This commit is contained in:
parent
ffb69a2c55
commit
48af14f5c9
@ -3,7 +3,7 @@ require_relative "tree"
|
||||
module Typed
|
||||
|
||||
CompilerModules = [ "assignment" , "basic_values" , "call_site",
|
||||
"class_statement" , "collections" , "field_access",
|
||||
"collections" , "field_access",
|
||||
"if_statement" , "name_expression" ,
|
||||
"operator_expression" , "return_statement", "statement_list",
|
||||
"while_statement"]
|
||||
|
@ -1,15 +0,0 @@
|
||||
module Typed
|
||||
module ClassStatement
|
||||
|
||||
def on_ClassStatement statement
|
||||
|
||||
raise "classes dont yet play babushka, get coding #{statement.name}" if @type
|
||||
|
||||
@type = Parfait::Space.object_space.get_class_by_name!(statement.name).instance_type
|
||||
#puts "Compiling class #{@type.inspect}"
|
||||
statement_value = process(statement.statements).last
|
||||
@type = nil
|
||||
return statement_value
|
||||
end
|
||||
end
|
||||
end
|
@ -9,7 +9,7 @@ end
|
||||
|
||||
["while_statement", "if_statement" , "return_statement" , "statements",
|
||||
"operator_expression" , "field_access" , "call_site" , "basic_values",
|
||||
"assignment" , "class_statement" , "to_code"].each do |code|
|
||||
"assignment" , "to_code"].each do |code|
|
||||
require_relative "tree/" + code
|
||||
end
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
module Typed
|
||||
module Tree
|
||||
class ClassStatement < Statement
|
||||
attr_accessor :name , :derives , :statements
|
||||
end
|
||||
|
||||
class ClassField < Statement
|
||||
attr_accessor :name , :type
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user