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

How to generate lua code according to ast ? #52

Closed
ipengyo opened this issue Jun 9, 2017 · 2 comments
Closed

How to generate lua code according to ast ? #52

ipengyo opened this issue Jun 9, 2017 · 2 comments
Labels
question General question regarding the project

Comments

@ipengyo
Copy link

ipengyo commented Jun 9, 2017

No description provided.

@fstirlitz
Copy link
Owner

Recursively. Walk depth-first through the AST, generate code for each node and glue it together. Figure something out.

@gitgrimbo
Copy link

@ipengyo - maybe this code has some clues for you - https://github.com/trixnz/lua-fmt/blob/master/src/printer.ts

I want to create an AST from lua source code, make modifications to the AST, then output lua source code again. But I'm not a lua user and so I don't know what source to output. The link above may help us.

@fstirlitz fstirlitz added the question General question regarding the project label Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question regarding the project
Projects
None yet
Development

No branches or pull requests

3 participants