lib/x12/parser.rb
def process_loop(loop)
      loop.nodes.each{|i|
        case i
          when X12::Loop then process_loop(i)
          when X12::Segment then process_segment(i) unless i.nodes.size > 0
          else return
        end
      }
    end
def process_loop(loop)
      loop.nodes.each{|i|
        case i
          when X12::Loop then process_loop(i)
          when X12::Segment then process_segment(i) unless i.nodes.size > 0
          else return
        end
      }
    end
Recursively scan the loop and instantiate fields' definitions for all its
 segments