diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-11-30 09:25:45 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-11-30 09:25:45 +0100 |
commit | f187640bfff458bfc5c91b875266c5cdf780d1d0 (patch) | |
tree | 5caf989f4ee5a6a0c08b0f1cc12e4fa852456e42 /src/mds-kbdc/mds-kbdc.c | |
parent | mds-kbdc: fix nesting inside unordered (diff) | |
download | mds-f187640bfff458bfc5c91b875266c5cdf780d1d0.tar.gz mds-f187640bfff458bfc5c91b875266c5cdf780d1d0.tar.bz2 mds-f187640bfff458bfc5c91b875266c5cdf780d1d0.tar.xz |
preparing for include processing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-kbdc/mds-kbdc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mds-kbdc/mds-kbdc.c b/src/mds-kbdc/mds-kbdc.c index 55e3587..a2b5b70 100644 --- a/src/mds-kbdc/mds-kbdc.c +++ b/src/mds-kbdc/mds-kbdc.c @@ -39,6 +39,11 @@ */ int main(int argc_, char** argv_) { +#define process(expr) \ + fail_if ((expr) < 0); \ + if (fatal = mds_kbdc_parsed_is_fatal(&result), fatal) \ + goto stop; + mds_kbdc_parsed_t result; int fatal; @@ -46,10 +51,12 @@ int main(int argc_, char** argv_) argv = argv_; mds_kbdc_parsed_initialise(&result); - fail_if (parse_to_tree(argv[1], &result) < 0); - if (fatal = mds_kbdc_parsed_is_fatal(&result), fatal) - goto stop; - fail_if (simplify_tree(&result) < 0); + process (parse_to_tree(argv[1], &result)); + //process (simplify_tree(&result)); + //process (process_includes(&result)); + /* TODO process (validate_tree(&result)); */ + /* TODO process (eliminate_dead_code(&result)); */ + /* TODO process (compile_layout(&result)); */ stop: mds_kbdc_tree_print(result.tree, stderr); mds_kbdc_parsed_print_errors(&result, stderr); @@ -60,5 +67,6 @@ int main(int argc_, char** argv_) xperror(*argv); mds_kbdc_parsed_destroy(&result); return 1; +#undef process } |