metaworm / luac-parser-rs

lua bytecode parser written in Rust using nom, part of metaworm's lua decompiler, support lua51/lua52/lua53/lua54/luajit/luau https://luadec.metaworm.site/
https://luadec.metaworm.site/
204 stars 28 forks source link

Table output improvement #21

Open toxamin opened 1 year ago

toxamin commented 1 year ago

When given the following script:

local tbl = {
    {},
    [100000] = {}
}

Metaworm's luadec either:

  1. generates a file with over 100 thousand lines (luajit):
    local r0_0 = {
    {},
    nil,
    nil,
    nil,
    nil,
    nil,
    nil,
    nil
    ...
  2. fails to generate the second value at all, like so:
    local r0_0 = {
    {}
    }