diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-19 14:36:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-19 14:36:47 +0200 |
commit | 33cd64535d2307a2e7884ee0796e1aae42937aaf (patch) | |
tree | 6f20845b78387138def085377b3a07f984f09507 /odb/plugin.cxx | |
parent | 7615f4dd87092aec82569bce68d75efcb82a90ae (diff) |
Add validator pass
Detect members with anonymous types.
Diffstat (limited to 'odb/plugin.cxx')
-rw-r--r-- | odb/plugin.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/odb/plugin.cxx b/odb/plugin.cxx index 6cceea3..dd097cc 100644 --- a/odb/plugin.cxx +++ b/odb/plugin.cxx @@ -13,6 +13,7 @@ #include <odb/pragma.hxx> #include <odb/parser.hxx> #include <odb/options.hxx> +#include <odb/validator.hxx> #include <odb/generator.hxx> #include <odb/semantics/unit.hxx> @@ -39,8 +40,19 @@ gate_callback (void*, void*) path file (main_input_filename); auto_ptr<unit> u (p.parse (global_namespace, file)); - generator g; - g.generate (*options_, *u, file); + // + // + validator v; + if (!v.validate (*options_, *u, file)) + r = 1; + + // + // + if (r == 0) + { + generator g; + g.generate (*options_, *u, file); + } } catch (parser::failed const&) { |