2014-08-28 17:27:04 +02:00
|
|
|
module Builtin
|
2014-08-23 23:25:15 +02:00
|
|
|
class String
|
|
|
|
module ClassMethods
|
|
|
|
def get context , index = Virtual::Integer
|
2014-08-28 07:10:33 +02:00
|
|
|
get_function = Virtual::CompiledMethod.new(:get , [ Virtual::Integer] , Virtual::Integer , Virtual::Integer )
|
2014-08-23 23:25:15 +02:00
|
|
|
return get_function
|
|
|
|
end
|
|
|
|
def set context , index = Virtual::Integer , char = Virtual::Integer
|
2014-08-28 07:10:33 +02:00
|
|
|
set_function = Virtual::CompiledMethod.new(:set , [Virtual::Integer, Virtual::Integer] , Virtual::Integer ,Virtual::Integer )
|
2014-08-23 23:25:15 +02:00
|
|
|
return set_function
|
|
|
|
end
|
|
|
|
def puts context
|
2014-08-28 07:10:33 +02:00
|
|
|
puts_function = Virtual::CompiledMethod.new(:puts , [] )
|
2014-08-23 23:25:15 +02:00
|
|
|
return puts_function
|
|
|
|
end
|
|
|
|
end
|
|
|
|
extend ClassMethods
|
|
|
|
end
|
2014-06-13 23:19:12 +02:00
|
|
|
end
|