forgot to add compiled methods to the class, fixed
This commit is contained in:
@ -27,8 +27,9 @@ module Ast
|
||||
# check if it's a function definition and add
|
||||
# if not, execute it, but that does means we should be in salama (executable), not ruby. ie throw an error for now
|
||||
raise "only functions for now #{expression.inspect}" unless expression.is_a? Ast::FunctionExpression
|
||||
puts "compiling expression #{expression}"
|
||||
#puts "compiling expression #{expression}"
|
||||
expression_value = expression.compile(method,message )
|
||||
clazz.add_method_definition(expression_value)
|
||||
#puts "compiled expression #{expression_value.inspect}"
|
||||
end
|
||||
|
||||
|
@ -17,7 +17,7 @@ module Boot
|
||||
[:name , :super_class]
|
||||
end
|
||||
def add_method_definition method
|
||||
raise "not a method #{method}" unless method.is_a? Virtual::MethodDefinition
|
||||
raise "not a method #{method.class} #{method.inspect}" unless method.is_a? Virtual::MethodDefinition
|
||||
raise "syserr " unless method.name.is_a? Symbol
|
||||
@method_definitions << method
|
||||
end
|
||||
|
Reference in New Issue
Block a user