[xsd-users] XSD codesynthesis code generator modification

Boris Kolpackov boris at codesynthesis.com
Mon May 11 07:02:21 EDT 2020


Laurent MONTMAILLER <lmontmailler at edap-tms.com> writes:

> The generated code I get is:
> // dbg_45, void CXX::Tree::generate_tree_source(CXX::Tree::Context&, std::size_t, std::size_t)
>                                                 /* here is my test xsd generator modification */
> 
> And not, as expected (2 lines starting at column 0):
> // dbg_45, void CXX::Tree::generate_tree_source(CXX::Tree::Context&, std::size_t, std::size_t)
> /* here is my test xsd generator modification */
> 
> Why this behavior ?

Our ad hoc indenter is a bit of a voodoo: it tries to analyze the syntax
of what's being written and indent things accordingly, which for C++ is
not exactly trivial. My guess is it mis-analyzes your first line. Try to
change it to:

ctx.os << "// dbg_45: " << __PRETTY_FUNCTION__ << ';' << endl;

Of course, you are also welcome to try to fix the indenter ;-).



More information about the xsd-users mailing list