lib/import/shake_grammar/catcher.rb in tracksperanto-2.3.1 vs lib/import/shake_grammar/catcher.rb in tracksperanto-2.3.2

- old
+ new

@@ -16,14 +16,14 @@ "(#{@value.inspect}@#{@at.inspect})" end end def push(atom) - # Send primitive types to parent - return super if !atom.is_a?(Array) - return super if atom[0] != :funcall + # Send everything but funcalls to parent + return super unless atom.is_a?(Array) && atom[0] == :funcall + meth_for_shake_func, args = atom[1].downcase, atom[2..-1] if can_handle_meth?(meth_for_shake_func) super([:retval, exec_funcall(meth_for_shake_func, args)]) else # This is a funcall we cannot perform, replace the return result of the funcall @@ -31,9 +31,13 @@ super([:unknown_func]) end end private + + # Suppress comment output + def push_comment + end def can_handle_meth?(m) # Ruby 1.9 - match on stringified methname @meths ||= self.class.public_instance_methods(false).map{|mn| mn.to_s } @meths.include?(m.to_s) \ No newline at end of file