aboutsummaryrefslogtreecommitdiff
path: root/odb/plugin.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-19 16:19:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-19 16:19:25 +0200
commit55df757e98329e8e09afffe274ce2ceab269f8b3 (patch)
tree738b3a5b1c46e3b1b04184cfd9aeb32eb21af48a /odb/plugin.cxx
parent6c01cad9cbfb6e69121d106226b2c50026f86fa9 (diff)
Make processing top-level action, like validation and generation
Diffstat (limited to 'odb/plugin.cxx')
-rw-r--r--odb/plugin.cxx25
1 files changed, 21 insertions, 4 deletions
diff --git a/odb/plugin.cxx b/odb/plugin.cxx
index 5364425..aba5e78 100644
--- a/odb/plugin.cxx
+++ b/odb/plugin.cxx
@@ -21,6 +21,7 @@
#include <odb/profile.hxx>
#include <odb/version.hxx>
#include <odb/validator.hxx>
+#include <odb/processor.hxx>
#include <odb/generator.hxx>
#include <odb/semantics/unit.hxx>
@@ -109,13 +110,23 @@ gate_callback (void*, void*)
parser p (*options_, loc_pragmas_, decl_pragmas_);
auto_ptr<unit> u (p.parse (global_namespace, file_));
+ // Validate.
//
- //
- validator v;
- if (!v.validate (*options_, *u, file_))
- r = 1;
+ {
+ validator v;
+ if (!v.validate (*options_, *u, file_))
+ r = 1;
+ }
+ // Process.
//
+ if (r == 0)
+ {
+ processor p;
+ p.process (*options_, *u, file_);
+ }
+
+ // Generate.
//
if (r == 0)
{
@@ -129,6 +140,12 @@ gate_callback (void*, void*)
//
r = 1;
}
+ catch (processor::failed const&)
+ {
+ // Diagnostics has aready been issued.
+ //
+ r = 1;
+ }
catch (generator::failed const&)
{
// Diagnostics has aready been issued.