rubyx/lib/risc/builtin/space.rb
Torsten Ruger 0813312ddc using compiler_for to create all building compilers
unify api, create defaults and especially pass the right types into the
typed method creation
2018-03-18 22:08:35 +05:30

28 lines
579 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})
return compiler.method
end
end
extend ClassMethods
end
end
end
require_relative "integer"
require_relative "object"
require_relative "kernel"
require_relative "word"