aboutsummaryrefslogtreecommitdiff
path: root/odb/plugin.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-19 14:36:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-19 14:36:47 +0200
commit33cd64535d2307a2e7884ee0796e1aae42937aaf (patch)
tree6f20845b78387138def085377b3a07f984f09507 /odb/plugin.cxx
parent7615f4dd87092aec82569bce68d75efcb82a90ae (diff)
Add validator pass
Detect members with anonymous types.
Diffstat (limited to 'odb/plugin.cxx')
-rw-r--r--odb/plugin.cxx16
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&)
{