summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-02-10 16:04:01 +0000
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-02-10 16:05:07 +0000
commit30bc1d285b871efe54a65b2c58cccea20b168817 (patch)
tree809d02e53ceebb5a6f71761a4fc611d820ef0d17 /src/bin
parent1ef076b412f3e35d576422bde74aec97d304d8a3 (diff)
downloadefl-30bc1d285b871efe54a65b2c58cccea20b168817.tar.gz
eolian: allow silencing of type errors in validation
This allows generators to silence type errors in validation in order to reduce duplicate error messages when generating multiple files. Also adjusted the C generator to only emit type errors when generating Eo header files. @feature
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian/main.c6
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 20bb7d2e9c..075ab1c8b0 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -260,7 +260,7 @@ enum
int
main(int argc, char **argv)
{
- int gen_what = GEN_NOTHING, do_legacy = 0, ret = 1;
+ int gen_what = GEN_NOTHING, do_legacy = 0, ret = 1, silent_types = 0;
Eina_Bool help = EINA_FALSE;
const char *outf = NULL;
@@ -286,6 +286,7 @@ main(int argc, char **argv)
{ "output", required_argument, NULL, 'o' },
{ "legacy", no_argument, &do_legacy, 1 },
{ "include", required_argument, NULL, 'I' },
+ { "silent-types", no_argument, &silent_types, 1 },
{ NULL, 0, NULL, 0 }
};
@@ -322,6 +323,7 @@ main(int argc, char **argv)
printf(" --gc Generate C source file [.c]\n");
printf(" --gi Generate C implementation source file [.c]. The output will be a series of functions that have to be filled.\n");
printf(" --legacy Generate legacy\n");
+ printf(" --silent-types Silence type validation\n");
ret = 0;
goto end;
}
@@ -339,7 +341,7 @@ main(int argc, char **argv)
goto end;
}
- if (!eolian_database_validate())
+ if (!eolian_database_validate(silent_types))
{
fprintf(stderr, "eolian: error validating database\n");
goto end;
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index cb33de4e53..d7f3d935b5 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -243,7 +243,7 @@ database_load(options_type const& opts)
<< "Eolian failed parsing input files";
assert(false && "Error parsing input files");
}
- if (!::eolian_database_validate())
+ if (!::eolian_database_validate(EINA_FALSE))
{
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
<< "Eolian failed validating database.";