using compiler_for to create all building compilers
unify api, create defaults and especially pass the right types into the typed method creation
This commit is contained in:
@ -1,15 +1,17 @@
|
||||
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 = Risc::MethodCompiler.create_method(:Space , :main ).init_method
|
||||
compiler = compiler_for(:Space , :main ,{args: :Integer})
|
||||
return compiler.method
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user