9fafbe4e96
since it was a class it was fake anyway moved methods to object
28 lines
607 B
Ruby
28 lines
607 B
Ruby
require "ast/sexp"
|
|
require_relative "compile_helper"
|
|
|
|
module Risc
|
|
module Builtin
|
|
class Space
|
|
module ClassMethods
|
|
include AST::Sexp
|
|
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})
|
|
compiler.add_mom( Mom::ReturnSequence.new)
|
|
return compiler.method
|
|
end
|
|
|
|
end
|
|
extend ClassMethods
|
|
end
|
|
end
|
|
end
|
|
|
|
require_relative "integer"
|
|
require_relative "object"
|
|
require_relative "word"
|