Add AST tree replacement class#74
Conversation
Support for replacing the current node during Visitor traversal.
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks I'm looking how I can integrate this feature in a more generic way into the existing visitor, I'll keep you updated. But for now you can use your implem directly in your code there is no blocker right? |
|
Thank you very much! The code is currently working fine in my project without any blocking issues. Looking forward to hearing good news. |
Stumbled upon this project and this issue when trying to fix issues with Lua 5.5 making loop variables read-only. I got all the way up to encountering this issue. Hope this can get resolved, but I understand how tricky an issue this can become with trying to make sure the round-trip edit produces a minimum diff. For my case I am able to work around this by querying the line and doing a regex substitution instead (incidentally the Wish you godspeed and success with this project. |
Support for replacing the current node during Visitor traversal.
While using it, I wanted to edit the tree to deobfuscate Lua code, but it seems editing functionality is not supported—only traversal is allowed. Of course, it's also possible that I'm not using it correctly. If that's the case, please close this issue. Currently, the code runs well in my project, though I’m not sure if there are any unknown bugs.