make mom:method_compiler a list

Compilers forms alist by Util::CompilerList
Change Collection to use the list instead of array
This commit is contained in:
2019-09-28 12:41:38 +03:00
parent aba42a6836
commit 2eb9364283
16 changed files with 58 additions and 63 deletions

View File

@ -5,7 +5,7 @@ module Util
attr_reader :next_compiler
def add_method_compiler(comp)
raise "not compiler #{comp.class}" unless comp.is_a?(MethodCompiler)
raise "not compiler #{comp.class}" unless comp.respond_to?(:find_compiler)
if(@next_compiler)
@next_compiler.add_method_compiler(comp)
else
@ -15,7 +15,7 @@ module Util
def each_compiler &block
block.yield(self)
@next_compiler.each(&block) if @next_compiler
@next_compiler.each_compiler(&block) if @next_compiler
end
def find_compiler &block