darklua
DocumentationTry itGitHub

convert_local_function_to_assign


Added in 0.3.3

Local functions that are not recursive will be transformed to a local assignment statement.

Note that, depending on your Lua runtime implementation, you may no longer be able to use reflection-like APIs (eg debug.info) to acquire the name of the function, or the function name may be missing from stack traces of error invocations.

Examples


local function foo(a, b)
    return a + b
end
InputOutput
local function foo(a, b)
    return a + b
end
local foo=function(a, b)    
return a + b
end