elua: remove old dir scan/parse APIs

This commit is contained in:
Daniel Kolesa 2018-03-02 13:43:16 +01:00
parent e27336cee1
commit 5701ce22a3
4 changed files with 13 additions and 18 deletions

View File

@ -333,15 +333,10 @@ ffi.cdef [[
Eina_Iterator *eolian_unit_structs_get(const Eolian_Unit *unit); Eina_Iterator *eolian_unit_structs_get(const Eolian_Unit *unit);
Eina_Iterator *eolian_unit_enums_get(const Eolian_Unit *unit); Eina_Iterator *eolian_unit_enums_get(const Eolian_Unit *unit);
const Eolian_Unit *eolian_file_parse(Eolian_State *state, const char *filepath);
Eina_Iterator *eolian_all_eo_file_paths_get(Eolian_State *state); Eina_Iterator *eolian_all_eo_file_paths_get(Eolian_State *state);
Eina_Iterator *eolian_all_eot_file_paths_get(Eolian_State *state); Eina_Iterator *eolian_all_eot_file_paths_get(Eolian_State *state);
Eina_Iterator *eolian_all_eo_files_get(Eolian_State *state); Eina_Iterator *eolian_all_eo_files_get(Eolian_State *state);
Eina_Iterator *eolian_all_eot_files_get(Eolian_State *state); Eina_Iterator *eolian_all_eot_files_get(Eolian_State *state);
Eina_Bool eolian_directory_scan(Eolian_State *state, const char *dir);
Eina_Bool eolian_system_directory_scan(Eolian_State *state);
Eina_Bool eolian_all_eo_files_parse(Eolian_State *state);
Eina_Bool eolian_all_eot_files_parse(Eolian_State *state);
const Eolian_Class *eolian_class_get_by_name(const Eolian_Unit *unit, const char *class_name); const Eolian_Class *eolian_class_get_by_name(const Eolian_Unit *unit, const char *class_name);
const Eolian_Class *eolian_class_get_by_file(const Eolian_Unit *unit, const char *file_name); const Eolian_Class *eolian_class_get_by_file(const Eolian_Unit *unit, const char *file_name);
const char *eolian_class_file_get(const Eolian_Class *klass); const char *eolian_class_file_get(const Eolian_Class *klass);
@ -558,16 +553,16 @@ M.object_scope = {
ffi.metatype("Eolian_State", { ffi.metatype("Eolian_State", {
__index = { __index = {
directory_scan = function(self, dir) directory_add = function(self, dir)
return eolian.eolian_directory_scan(self, dir) ~= 0 return eolian.eolian_state_directory_add(self, dir) ~= 0
end, end,
system_directory_scan = function(self) system_directory_add = function(self)
return eolian.eolian_system_directory_scan(self) ~= 0 return eolian.eolian_state_system_directory_add(self) ~= 0
end, end,
file_parse = function(self, fpath) file_parse = function(self, fpath)
local v = eolian.eolian_file_parse(self, fpath) local v = eolian.eolian_state_file_parse(self, fpath)
if v == nil then if v == nil then
return nil return nil
end end
@ -575,11 +570,11 @@ ffi.metatype("Eolian_State", {
end, end,
all_eo_files_parse = function(self) all_eo_files_parse = function(self)
return eolian.eolian_all_eo_files_parse(self) ~= 0 return eolian.eolian_state_all_eo_files_parse(self) ~= 0
end, end,
all_eot_files_parse = function(self) all_eot_files_parse = function(self)
return eolian.eolian_all_eot_files_parse(self) ~= 0 return eolian.eolian_state_all_eot_files_parse(self) ~= 0
end, end,
all_eo_file_paths_get = function(self) all_eo_file_paths_get = function(self)

View File

@ -1516,12 +1516,12 @@ M.DocTokenizer = Node:clone {
M.scan_directory = function(dir) M.scan_directory = function(dir)
if not dir then if not dir then
if not eos:system_directory_scan() then if not eos:system_directory_add() then
error("failed scanning system directory") error("failed scanning system directory")
end end
return return
end end
if not eos:directory_scan(dir) then if not eos:directory_add(dir) then
error("failed scanning directory: " .. dir) error("failed scanning directory: " .. dir)
end end
end end

View File

@ -52,7 +52,7 @@ getopt.parse {
lualian.include_dir(v) lualian.include_dir(v)
end end
if os.getenv("EFL_RUN_IN_TREE") then if os.getenv("EFL_RUN_IN_TREE") then
lualian.system_directory_scan() lualian.system_directory_add()
end end
lualian.load_eot_files() lualian.load_eot_files()
for i, fname in ipairs(args) do for i, fname in ipairs(args) do

View File

@ -691,7 +691,7 @@ local gen_class = function(klass)
end end
M.include_dir = function(dir) M.include_dir = function(dir)
if not get_state():directory_scan(dir) then if not get_state():directory_add(dir) then
error("Failed including directory: " .. dir) error("Failed including directory: " .. dir)
end end
end end
@ -700,8 +700,8 @@ M.load_eot_files = function()
return get_state():all_eot_files_parse() return get_state():all_eot_files_parse()
end end
M.system_directory_scan = function() M.system_directory_add = function()
return get_state():system_directory_scan() return get_state():system_directory_add()
end end
M.generate = function(fname, fstream) M.generate = function(fname, fstream)