class IDL::Scanner

def leave_source

def leave_source
  # make sure to close the input source
  @in.close
  # check if we have any previous source still stacked up
  if @stack.size>0
    if @stack.last[0] == :include
      @xincludepaths.pop # remove directory of finished include
      @directiver.leave_include
      _, @prefix, @ifdef, @in, @ifskip = @stack.pop
      @directiver.pragma_prefix(@prefix)
    else
      _, _, _, @in, _ = @stack.pop
      @expansions.pop
    end
  end
end