LuaToolkit
LuaToolkit copied to clipboard
Lua Encode/Decoder/Disassembler/Decompiler in C#
I thought you might be interested in adding support for a special type of lua 5.1 files. These are files from an emulator (NSO) and many of the decompiling tools...
IF merge failed here ```lua local function unknown1(var0, var1, var2) local var3 = var1["x"] local var4 = var1["y"] local var5 = var1["z"] local var6 = var2["x"] var6 = var6 -...
Input: ```lua local sqTolerance = tolerance ~= nil and tolerance^2 or 1 ``` Output: ```lua var113 = var11 ^ 2 if var1 == nil or not var113 then var3 =...
Original: ```lua local function simplifyDPStep(points, first, last, sqTolerance, simplified) local maxSqDist = sqTolerance local index for i=first+1, last do local sqDist = getSqSegDist(points[i], points[first], points[last]) ``` Output: ```lua local function...
Due to the way lua bytecode works it doesn't have to define the usage of a local variable, unlike Lua script. This causes some issues when decompiling as the definition...
When doing something like below it won't properly close the if chain. ```lua if A then return 0; elseif B then return 1; elseif C then return 2; end ```
The decompilation of the below snipper won't close the block correctly. _(`end` is missing)_ ```lua if test() then end ```