class Byebug::CommandProcessor

def process_commands(context, file, line)


Handle byebug commands.
#
def process_commands(context, file, line)
  state, commands = always_run(context, file, line, 1)
  $byebug_state = Command.settings[:testing] ? state : nil
  splitter = lambda do |str|
    str.split(/;/).inject([]) do |m, v|
      if m.empty?
        m << v
      else
        if m.last[-1] == ?\\
          m.last[-1,1] = ''
          m.last << ';' << v
        else
          m << v
        end
      end
      m
    end
  end
  preloop(commands, context)
  if Command.settings[:autolist] == 0
    CommandProcessor.print_location_and_text(file, line)
  end
  while !state.proceed?
    input = @interface.command_queue.empty? ?
            @interface.read_command(prompt(context)) :
            @interface.command_queue.shift
    break unless input
    catch(:debug_error) do
      if input == ""
        next unless @last_cmd
        input = @last_cmd
      else
        @last_cmd = input
      end
      splitter[input].each do |cmd|
        one_cmd(commands, context, cmd)
        postcmd(commands, context, cmd)
      end
    end
  end
  postloop(commands, context)
end # process_commands