rubyx/lib/mom/builtin/space.rb
Torsten Rüger fa0aa30386 Move builtin wholesale to Mom
Since Builtin generates risc, just like mom instructions, it was a design mistake to put builtin into risc in the first place. Now that borders are coming more into focus, it make much more sense to have the builtin in mom.
In fact the instructions should be moved out and a seperate invocation mechanism used , so functions can be parsed, not generated (wip)
2019-08-12 12:38:29 +03:00

19 lines
388 B
Ruby

module Mom
module Builtin
class Space
module ClassMethods
include CompileHelper
# main entry point, ie __init__ calls this
# defined here as empty, to be redefined
def main(context)
compiler = compiler_for(:Space , :main ,{args: :Integer})
return compiler
end
end
extend ClassMethods
end
end
end