include yslt.yml2 tstylesheet { template "pEp" { document("py_module.cc", "text") { || #include #include #include #include #include "synth_shed.h" using namespace std; namespace py = pybind11; PYBIND11_MODULE(synth_shed, m) { `` apply "method" `` apply "struct" `` apply "enum" } || } document("gen_pybind.marker", "text") > "" } template "method" { || m.def("«@name»", &«@name», ""); || } template "struct" { || py::class_<«@name»>(m, "«@name»") ``apply "field" ; || } template "field" { || .def_readwrite("«@name»", &::«../@name»::«@name») || } template "enum" { || py::enum_<::«@name»>(m, "«@name»") ``apply item ; || } template "item" { || .value("«@name»", ::«@name», "") || } }