private static void addDirectoryToCompileList(File dir, List<File> list) {
        File[] files = dir.listFiles();

        assert files != null;
        for (File f : files) {
            if (!f.isDirectory()) {
                int code = checkAndAddFile(list, f);
                if (code == 0) {
                    Main.log.severe("The compiler has returned error code 0 : invalid_argument_#size");
                    return;
                } else if (code == 1) {
                    Main.log.severe("The compiler has returned error code 1 : invalid_argument_#extention");
                    return;
                } else if (code == 2) {
                    Main.log.severe("The compiler has returned error code 2 : unknown_error");
                    return;
                } else if (code == 3) {
                    Main.log.severe("The compiler has returned error code 3 : file_load_failure");
                    return;
                }
            } else {
                addDirectoryToCompileList(f, list);
            }
        }
    }