rubyx/lib/risc/builtin/space.rb

29 lines
633 B
Ruby
Raw Normal View History

2015-11-30 15:09:12 +01:00
require "ast/sexp"
require_relative "compile_helper"
2015-11-30 15:09:12 +01:00
module Risc
2015-11-30 15:09:12 +01:00
module Builtin
class Space
module ClassMethods
include AST::Sexp
include CompileHelper
2015-11-30 15:09:12 +01:00
# main entry point, ie __init__ calls this
# defined here as empty, to be redefined
2018-04-01 14:17:16 +02:00
def main(context)
compiler = compiler_for(:Space , :main ,{args: :Integer})
2018-04-01 14:17:16 +02:00
compiler.add_mom( Mom::ReturnSequence.new)
2015-11-30 15:09:12 +01:00
return compiler.method
end
end
extend ClassMethods
end
end
end
require_relative "integer"
require_relative "object"
require_relative "kernel"
require_relative "word"