summaryrefslogtreecommitdiff
path: root/xsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-04-15 13:55:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-04-15 13:55:04 +0200
commitea95e3637288a1369ac96011d0cec9feeead05f2 (patch)
tree0ae146765792520df21574eee2e1593cd2d79d12 /xsd
parent4d42a8d8ab0ec7066ded83053b0197f292dab473 (diff)
Turn on union to enum synthesis for C++/Tree
Diffstat (limited to 'xsd')
-rw-r--r--xsd/xsd.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/xsd/xsd.cxx b/xsd/xsd.cxx
index a0b26a7..1c66a8a 100644
--- a/xsd/xsd.cxx
+++ b/xsd/xsd.cxx
@@ -18,6 +18,7 @@
#include <xsd-frontend/parser.hxx>
#include <xsd-frontend/transformations/anonymous.hxx>
+#include <xsd-frontend/transformations/enum-synthesis.cxx>
#include <xsd-frontend/transformations/restriction.hxx>
#include <xsd-frontend/transformations/schema-per-type.hxx>
#include <xsd-frontend/transformations/simplifier.hxx>
@@ -718,6 +719,14 @@ main (Int argc, Char* argv[])
}
}
+ // Synthesize enumerations from unions.
+ //
+ if (cmd == "cxx-tree")
+ {
+ Transformations::EnumSynthesis trans;
+ trans.transform (*schema, tu);
+ }
+
// Simplify the schema graph.
//
if (cmd == "cxx-parser")
@@ -862,6 +871,14 @@ main (Int argc, Char* argv[])
}
}
+ // Synthesize enumerations from unions.
+ //
+ if (cmd == "cxx-tree")
+ {
+ Transformations::EnumSynthesis trans;
+ trans.transform (*schema, "");
+ }
+
// Simplify the schema graph.
//
if (cmd == "cxx-parser")