AST Node
Closed this issue · 1 comments
SquidDev commented
Currently renaming variables is broken, especially for loop variables. The trouble lies where normal variables are renamed so they conflict with existing variables:
local something = "HELLO"
local a = "HELLO"
for t=1,10 do print(a) end
becomes:
local t = "HELLO"
for t=1,10 do print(t) end
The second loop is broken. We could fix this with a proper set of nodes maybe?
What is happening is something
is converted to e
. Then e
is converted to t
for some reason?
SquidDev commented
This was a very obvious solution. I've looked at everything and it seems to work. I don't think there would be any advantages of re-writing the nodes.