lib/antelope/ace/grammar/generation.rb in antelope-0.1.8 vs lib/antelope/ace/grammar/generation.rb in antelope-0.1.9

- old
+ new

@@ -31,18 +31,18 @@ generators = :guess, modifiers = DEFAULT_MODIFIERS) mods = modifiers.map(&:last). map { |x| x.new(self) } mods.each do |mod| - puts "Running mod #{mod.class}..." + puts "Running mod #{mod.class}..." if options[:verbose] mod.call end hash = Hash[modifiers.map(&:first).zip(mods)] # This is when we'd generate find_generators(generators, options).each do |gen| - puts "Running generator #{gen}..." + puts "Running generator #{gen}..." if options[:verbose] gen.new(self, hash).generate end end private @@ -69,10 +69,10 @@ generators << Generator.generators.fetch(type) generators - rescue KeyError => e + rescue KeyError raise NoTypeError, "Undefined type #{type}" end end end end