Support the Go language
Hi, that's a great project! How do you feel about adding Go support, is that in scope?
Sure, do you want to take a shot at adding this yourself? It's very easy and I can point you at the code to change.
On Sun, 7 Mar 2021, 11:32 я котик пур-пур, [email protected] wrote:
Hi, that's a great project! How do you feel about adding Go support, is that in scope?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aantn/reconstant/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYUB55BO52VDTPN3QNYZ3TCNB35ANCNFSM4YXVNSIA .
Yep, I'll take a look if nobody beats me to it.
Cool, there are basically three easy steps to adding a new language:
- Write a new subclass of Outputer which implements
output_enum(self, enum: Enum)andoutput_constant(self, constant: Constant). In many you can just call the base-class implementation. To start, I recommend copying the JavascriptOutputer class - Add one line to the
AllOutputsclass to automatically parse parameters for your outputer from yaml. - Add example output of test.yaml to the README file.
That is all there is to it.