2014-08-28 17:27:04 +02:00
|
|
|
module Builtin
|
2015-05-13 15:17:10 +02:00
|
|
|
class Word
|
2014-08-23 23:25:15 +02:00
|
|
|
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
|
2015-05-13 15:17:10 +02:00
|
|
|
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
|
2015-05-13 15:17:10 +02:00
|
|
|
extend ClassMethods
|
2014-08-23 23:25:15 +02:00
|
|
|
end
|
2014-06-13 23:19:12 +02:00
|
|
|
end
|