rename ClassCompiler to MomComplier
ended up not even using the class, it just came from there It actually compiles methods, and it turns out is the point where builtin comes into the picture as it's boot process also returns method compilers
This commit is contained in:
@ -15,4 +15,4 @@ module Mom
|
||||
end
|
||||
|
||||
require_relative "instruction/instruction.rb"
|
||||
require_relative "class_compiler"
|
||||
require_relative "mom_compiler"
|
||||
|
@ -1,10 +1,9 @@
|
||||
module Mom
|
||||
class ClassCompiler
|
||||
class MomCompiler
|
||||
attr_reader :clazz , :method_compilers
|
||||
|
||||
def initialize(clazz , compilers)
|
||||
@clazz = clazz
|
||||
@method_compilers = compilers
|
||||
def initialize(compilers = [])
|
||||
@method_compilers = Builtin.boot_functions + compilers
|
||||
end
|
||||
|
||||
# Translate code to whatever cpu is specified.
|
@ -29,7 +29,7 @@ module Vool
|
||||
raise "Only methods for now #{node}" unless node.is_a?(MethodStatement)
|
||||
method_compilers << node.to_mom(@clazz)
|
||||
end
|
||||
Mom::ClassCompiler.new(@clazz , method_compilers)
|
||||
Mom::MomCompiler.new(method_compilers)
|
||||
end
|
||||
|
||||
def each(&block)
|
||||
|
Reference in New Issue
Block a user