summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-02 13:30:14 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-02 13:30:27 +0100
commit9ab45604592ec1aa23e806a10eba07b6ce2f73dd (patch)
treef020992e90d1e651921c8d6257cf2c9da74d542e
parentb7e0553b613ca2bd590dc295de2148885ab7ce15 (diff)
eolian*: replace various directory_scan/file_parse
-rw-r--r--src/bin/eolian/main.c6
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc8
-rw-r--r--src/bin/eolian_js/main.cc6
-rw-r--r--src/bin/eolian_mono/eolian_mono.cc6
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_documentation.cc6
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_parse.cc4
6 files changed, 18 insertions, 18 deletions
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index ac556a55aa..7369d9e885 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -534,7 +534,7 @@ main(int argc, char **argv)
534 534
535 if (scan_system) 535 if (scan_system)
536 { 536 {
537 if (!eolian_system_directory_scan(eos)) 537 if (!eolian_state_system_directory_add(eos))
538 { 538 {
539 fprintf(stderr, "eolian: could not scan system directory\n"); 539 fprintf(stderr, "eolian: could not scan system directory\n");
540 goto end; 540 goto end;
@@ -544,14 +544,14 @@ main(int argc, char **argv)
544 const char *inc; 544 const char *inc;
545 EINA_LIST_FREE(includes, inc) 545 EINA_LIST_FREE(includes, inc)
546 { 546 {
547 if (!eolian_directory_scan(eos, inc)) 547 if (!eolian_state_directory_add(eos, inc))
548 { 548 {
549 fprintf(stderr, "eolian: could not scan '%s'\n", inc); 549 fprintf(stderr, "eolian: could not scan '%s'\n", inc);
550 goto end; 550 goto end;
551 } 551 }
552 } 552 }
553 553
554 const Eolian_Unit *src = eolian_file_parse(eos, input); 554 const Eolian_Unit *src = eolian_state_file_parse(eos, input);
555 if (!src) 555 if (!src)
556 { 556 {
557 fprintf(stderr, "eolian: could not parse file '%s'\n", input); 557 fprintf(stderr, "eolian: could not parse file '%s'\n", input);
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 54aaa3534e..02a6fd7192 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -304,7 +304,7 @@ run(options_type const& opts)
304 304
305 for(auto&& name : opts.in_files) 305 for(auto&& name : opts.in_files)
306 { 306 {
307 Eolian_Unit const* unit = ::eolian_file_parse(opts.state, name.c_str()); 307 Eolian_Unit const* unit = ::eolian_state_file_parse(opts.state, name.c_str());
308 if(!unit) 308 if(!unit)
309 { 309 {
310 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain) 310 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
@@ -369,13 +369,13 @@ database_load(options_type const& opts)
369{ 369{
370 for (auto src : opts.include_dirs) 370 for (auto src : opts.include_dirs)
371 { 371 {
372 if (!::eolian_directory_scan(opts.state, src.c_str())) 372 if (!::eolian_state_directory_add(opts.state, src.c_str()))
373 { 373 {
374 EINA_CXX_DOM_LOG_WARN(eolian_cxx::domain) 374 EINA_CXX_DOM_LOG_WARN(eolian_cxx::domain)
375 << "Couldn't load eolian from '" << src << "'."; 375 << "Couldn't load eolian from '" << src << "'.";
376 } 376 }
377 } 377 }
378 if (!::eolian_all_eot_files_parse(opts.state)) 378 if (!::eolian_state_all_eot_files_parse(opts.state))
379 { 379 {
380 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain) 380 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
381 << "Eolian failed parsing eot files"; 381 << "Eolian failed parsing eot files";
@@ -387,7 +387,7 @@ database_load(options_type const& opts)
387 << "No input file."; 387 << "No input file.";
388 assert(false && "Error parsing input file"); 388 assert(false && "Error parsing input file");
389 } 389 }
390 if (!opts.main_header && !::eolian_file_parse(opts.state, opts.in_files[0].c_str())) 390 if (!opts.main_header && !::eolian_state_file_parse(opts.state, opts.in_files[0].c_str()))
391 { 391 {
392 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain) 392 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
393 << "Failed parsing: " << opts.in_files[0] << "."; 393 << "Failed parsing: " << opts.in_files[0] << ".";
diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc
index 796aa8693f..7a474c1e87 100644
--- a/src/bin/eolian_js/main.cc
+++ b/src/bin/eolian_js/main.cc
@@ -489,18 +489,18 @@ int main(int argc, char** argv)
489 489
490 // Add include paths to eolian library 490 // Add include paths to eolian library
491 for(auto src : include_paths) 491 for(auto src : include_paths)
492 if (!::eolian_directory_scan(src.c_str())) 492 if (!::eolian_state_directory_add(src.c_str()))
493 { 493 {
494 EINA_CXX_DOM_LOG_WARN(eolian::js::domain) 494 EINA_CXX_DOM_LOG_WARN(eolian::js::domain)
495 << "Couldn't load eolian from '" << src << "'."; 495 << "Couldn't load eolian from '" << src << "'.";
496 } 496 }
497 if (!::eolian_all_eot_files_parse()) 497 if (!::eolian_state_all_eot_files_parse())
498 { 498 {
499 EINA_CXX_DOM_LOG_WARN(eolian::js::domain) 499 EINA_CXX_DOM_LOG_WARN(eolian::js::domain)
500 << "Eolian failed parsing eot files"; 500 << "Eolian failed parsing eot files";
501 assert(false && "Error parsing eot files"); 501 assert(false && "Error parsing eot files");
502 } 502 }
503 if (!::eolian_file_parse(in_file.c_str())) 503 if (!::eolian_state_file_parse(in_file.c_str()))
504 { 504 {
505 EINA_CXX_DOM_LOG_WARN(eolian::js::domain) 505 EINA_CXX_DOM_LOG_WARN(eolian::js::domain)
506 << "Failed parsing: " << in_file << "."; 506 << "Failed parsing: " << in_file << ".";
diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc
index 616985e088..e2b0355530 100644
--- a/src/bin/eolian_mono/eolian_mono.cc
+++ b/src/bin/eolian_mono/eolian_mono.cc
@@ -212,13 +212,13 @@ database_load(options_type const& opts)
212{ 212{
213 for (auto src : opts.include_dirs) 213 for (auto src : opts.include_dirs)
214 { 214 {
215 if (!::eolian_directory_scan(opts.state, src.c_str())) 215 if (!::eolian_state_directory_add(opts.state, src.c_str()))
216 { 216 {
217 EINA_CXX_DOM_LOG_WARN(eolian_mono::domain) 217 EINA_CXX_DOM_LOG_WARN(eolian_mono::domain)
218 << "Couldn't load eolian from '" << src << "'."; 218 << "Couldn't load eolian from '" << src << "'.";
219 } 219 }
220 } 220 }
221 if (!::eolian_all_eot_files_parse(opts.state)) 221 if (!::eolian_state_all_eot_files_parse(opts.state))
222 { 222 {
223 EINA_CXX_DOM_LOG_ERR(eolian_mono::domain) 223 EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
224 << "Eolian failed parsing eot files"; 224 << "Eolian failed parsing eot files";
@@ -230,7 +230,7 @@ database_load(options_type const& opts)
230 << "No input file."; 230 << "No input file.";
231 assert(false && "Error parsing input file"); 231 assert(false && "Error parsing input file");
232 } 232 }
233 if (!::eolian_file_parse(opts.state, opts.in_file.c_str())) 233 if (!::eolian_state_file_parse(opts.state, opts.in_file.c_str()))
234 { 234 {
235 EINA_CXX_DOM_LOG_ERR(eolian_mono::domain) 235 EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
236 << "Failed parsing: " << opts.in_file << "."; 236 << "Failed parsing: " << opts.in_file << ".";
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
index 26f249432b..4ec7dfe56e 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
@@ -22,9 +22,9 @@ using efl::eolian::grammar::attributes::struct_def;
22 22
23klass_def init_test_data(efl::eolian::eolian_state const& state) 23klass_def init_test_data(efl::eolian::eolian_state const& state)
24{ 24{
25 ck_assert(::eolian_directory_scan(state.value, PACKAGE_DATA_DIR)); 25 ck_assert(::eolian_state_directory_add(state.value, PACKAGE_DATA_DIR));
26 ck_assert(::eolian_all_eot_files_parse(state.value)); 26 ck_assert(::eolian_state_all_eot_files_parse(state.value));
27 ck_assert(::eolian_file_parse(state.value, PACKAGE_DATA_DIR"/docs.eo")); 27 ck_assert(::eolian_state_file_parse(state.value, PACKAGE_DATA_DIR"/docs.eo"));
28 28
29 const Eolian_Class *c_klass = ::eolian_class_get_by_name(state.as_unit(), "Docs"); 29 const Eolian_Class *c_klass = ::eolian_class_get_by_name(state.as_unit(), "Docs");
30 ck_assert_ptr_ne(c_klass, NULL); 30 ck_assert_ptr_ne(c_klass, NULL);
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_parse.cc b/src/tests/eolian_cxx/eolian_cxx_test_parse.cc
index 48d414663e..6618bc95dc 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_parse.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_parse.cc
@@ -12,8 +12,8 @@
12START_TEST(eolian_cxx_test_parse_complex_types) 12START_TEST(eolian_cxx_test_parse_complex_types)
13{ 13{
14 efl::eolian::eolian_init init; 14 efl::eolian::eolian_init init;
15 // fail_if(!::eolian_directory_scan(PACKAGE_DATA_DIR"/data")); 15 // fail_if(!::eolian_state_directory_add(PACKAGE_DATA_DIR"/data"));
16 // fail_if(!::eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/complex_type.eo")); 16 // fail_if(!::eolian_state_file_parse(PACKAGE_DATA_DIR"/data/complex_type.eo"));
17 // TODO finish 17 // TODO finish
18} 18}
19END_TEST 19END_TEST