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)
This commit is contained in:
18
lib/mom/builtin/space.rb
Normal file
18
lib/mom/builtin/space.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
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
|
Reference in New Issue
Block a user