-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature proposal: Generate jennifer code from existing go code #54
Comments
This would be great, but more appropriate as a standalone utility - e.g. not integrated into the jennifer codebase. Similar to my html2vecty utility for doing the same thing with vecty syntax. I definitely won't have time to do this in the next 6 months so feel free to have a go. I'll happily include a link in the readme when it's finished. |
I agree, I'll look into making it but I have little experience with ASTs. The more I think about it the more appealing a tool like this becomes. You can use this tool as a starting point for generating code, filling in the logic and the variables after. Eliminating most of the monotony of writing generated code. |
Yes it would be useful. Feel free to fork html2vecty and use that as a base... |
Alright just got the project up to a usable standard: https://github.com/aloder/jenjen Let me know what you think. |
Wow this looks great! Won't have time to look at it today or tomorrow but Friday I can have a good play. |
p.s. Are you set on the jenjen name? The jennifer project has a genjen package that generates the API... might be rather confusing... |
Yea, I noticed that right after I pushed the name. I can change it. I'll start thinking of others. |
Awesome. I took a very quick look at the code and it looks great! |
Thank you, I will be improving the code and features as I use it in my own products. Let me know if you have any suggestions. |
I wanted to take an existing file like the one in #50 and convert it so that jennifer generates it. Right now I am doing this by hand. I would like a function that takes in a go file and outputs the code that generates that go file using jennifer.
This would discourage workarounds like Op and allow quick generation of static files.
Similar to #44
Solves #50
The text was updated successfully, but these errors were encountered: