Open glycerine opened 9 years ago
You should used fenced code blocks for code, that way it's easier to read (indentation preserved, mono font, optional highlighting, and content won't get misinterpreted as other markup).
https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks
Hi Dmitri (@shurcooL), thanks for your comment. I've appreciated your contributions to the Go community, particularly go-goon which I find invaluable. Are you using bambam?
Hi @glycerine, I'm glad you found some of my work useful!
I found out about this repo via https://github.com/avelino/awesome-go/pull/353, but I am not using it at this time.
Hi Björn (@HyperDrummer),
I'm surfacing your email question to a ticket so it is public; other people may have the same question.
I haven't implemented enum support. If you would like to assist with this, the first step would be to write down several examples of the starting and ending text that involve transformation of enums, and then to put those into a test file. The bambam project is entirely test driven (BDD to the extent possible), and this is an especially valuable approach for compilers (like bambam). Once you have a failing test in place, we can look at how to implement it. I would suggest starting a new branch so that the master doesn't have the failing test on it.
Best regards,
Jason
You asked:
Imagine these structs:
For these go structures I want to create a schema with bambam including the code generation. Ok, now I call bambam and what I end up with ist the following schema:
In the generated code:
which leads to build errors:
./translateCapn.go:37: undefined: MTypeCapnToGo ./translateCapn.go:47: undefined: MTypeGoToCapn
The undefined data types never got generated.
Do you have an idea how to use enums with code generation? Thanks in advance
Björn