first oo program to compile. But no worries, there is still work left to be done
This commit is contained in:
@ -32,17 +32,17 @@ module Boot
|
||||
return get_function
|
||||
end
|
||||
|
||||
def _set_instance_variable(name , value)
|
||||
def _set_instance_variable(context , name , value)
|
||||
raise name
|
||||
end
|
||||
|
||||
def _get_singleton_method(name )
|
||||
def _get_singleton_method(context , name )
|
||||
raise name
|
||||
end
|
||||
def _add_singleton_method(method)
|
||||
def _add_singleton_method(context, method)
|
||||
raise "4"
|
||||
end
|
||||
def initialize()
|
||||
def initialize(context)
|
||||
raise "4"
|
||||
end
|
||||
end
|
||||
|
15
lib/boot/string.rb
Normal file
15
lib/boot/string.rb
Normal file
@ -0,0 +1,15 @@
|
||||
module Boot
|
||||
class String
|
||||
module ClassMethods
|
||||
def get context , index = Vm::Integer
|
||||
get_function = Vm::Function.new(:get , [Vm::Integer, Vm::Integer] , Vm::Integer )
|
||||
return get_function
|
||||
end
|
||||
def set context , index = Vm::Integer , char = Vm::Integer
|
||||
set_function = Vm::Function.new(:set , [Vm::Integer, Vm::Integer, Vm::Integer] , Vm::Integer )
|
||||
return set_function
|
||||
end
|
||||
end
|
||||
extend ClassMethods
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user