change args argument to create method to be hash

was array and didn’t carry types and names
This commit is contained in:
Torsten Ruger
2015-11-11 20:41:02 +02:00
parent 351a747bfd
commit 6137833140
7 changed files with 20 additions and 69 deletions

View File

@ -9,7 +9,7 @@ module Register
# main entry point, ie __init__ calls this
# defined here as empty, to be redefined
def main context
compiler = Soml::Compiler.new.create_method(:Object , :main , []).init_method
compiler = Soml::Compiler.new.create_method(:Object , :main ).init_method
return compiler.method
end
@ -17,7 +17,7 @@ module Register
# return is stored in return_value
# (this method returns a new method off course, like all builtin)
def get_internal context
compiler = Soml::Compiler.new.create_method(:Object , :get_internal , []).init_method
compiler = Soml::Compiler.new.create_method(:Object , :get_internal , {:Integer => :index}).init_method
source = "get_internal"
#Load self by "calling" on_name
me = compiler.process( s(:name , :self) )
@ -34,7 +34,8 @@ module Register
# self[index] = val basically. Index is the first arg , vlaue the second
# no return
def set_internal context
compiler = Soml::Compiler.new.create_method(:Object , :set_internal , []).init_method
compiler = Soml::Compiler.new.create_method(:Object , :set_internal ,
{:Integer => :index, :Object => :value} ).init_method
source = "set_internal"
#Load self by "calling" on_name
me = compiler.process( s(:name , :self) )