Skip to content
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

Parsing json back into ast #40

Closed
sheerun opened this issue Dec 19, 2016 · 2 comments
Closed

Parsing json back into ast #40

sheerun opened this issue Dec 19, 2016 · 2 comments

Comments

@sheerun
Copy link

sheerun commented Dec 19, 2016

Hey,

I'm interesting in writing a tool in language other than go-lang that generates a proper go-lang code. The easiest way I can think of, is to send go-lang source in JSON format (similar to output of goblin) to go-lang and allow it and generate proper go source.

Could you consider implementing a reverse operation in Goblin? That is parsing JSON back into AST of go-lang? If not, are you maybe aware of other libraries implementing such functionality?

@patrickt
Copy link
Contributor

I think this is out of scope for goblin itself, but if you happen to write/encounter any libraries that do this, I'd be happy to link to them in the README (and ensure strict semver compatibility so that their upstream doesn't break.)

If you were interested in doing this yourself, it would really not be too difficult: the goblin code is long, owing to Go's somewhat low-level nature, but it's not complicated.

@sheerun
Copy link
Author

sheerun commented Dec 19, 2016

I didn't. Thank you for response

@sheerun sheerun closed this as completed Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants