class Byebug::FrameCommand

:nodoc:

def execute

def execute
  if not @match[1]
    pos = 0
  else
    pos = get_int(@match[1], "Frame")
    return unless pos
  end
  #if @match[2]
  #  context = parse_thread_num('frame', @match[2])
  #  unless context
  #    errmsg "Thread #{@match[2]} doesn't exist.\n"
  #    return
  #  end
  #else
    context = @state.context
  #end
  adjust_frame(pos, true, context)
end

def help(cmd)

def help(cmd)
  %{
    f[rame] [frame-number [thread thread-number]]
    Move the current frame to the specified frame number, or the
    0 if no frame-number has been given.
    A negative number indicates position from the other end.  So
    'frame -1' moves to the oldest frame, and 'frame 0' moves to
    the newest frame.
    Without an argument, the command prints the current stack
    frame. Since the current position is redisplayed, it may trigger a
    resyncronization if there is a front end also watching over
    things.
    If a thread number is given then we set the context for evaluating
    expressions to that frame of that thread.
  }
end

def help_command

def help_command
  'frame'
end

def regexp

:nodoc:
def regexp
  / ^\s*
    f(?:rame)?
    (?: \s+ (\S+))? \s*
    (?: thread \s+ (.*))? \s*
    $/x
end