Comments (2)
Recursively. Walk depth-first through the AST, generate code for each node and glue it together. Figure something out.
from luaparse.
@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.
from luaparse.
Related Issues (20)
- Semicolons after break statement unrecognized HOT 3
- StringLiteral.value is sometimes null HOT 1
- Add an event/notification when a function definition begins
- How to parse json back to lua? HOT 1
- Lua floor division operator not recognised HOT 1
- lua fails to parse with custom type definitions HOT 1
- How to pass the ast to escodegen.generate to make js code? HOT 1
- Incorrect parsing for return statements HOT 1
- do luaparse support bit opratation? HOT 1
- Incorrect parsing parens indiscriminately removed
- Incorrect parsing: semicolon indiscriminately removed
- Syntax error though code is valid HOT 2
- Fail to reject an invalid literal string
- The string literal's value is not passed properly. HOT 1
- Issue with unicode characters
- support for ?. operator data?.files
- onLocalDeclaration not being called HOT 1
- Any chance for bundled TypeScript definitions? HOT 3
- Support LuaJIT syntax extensions HOT 1
- Bitwize brackets disappears HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luaparse.