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