I would like to use the reflexive debug interface to identify
every Lua statement that is never executed. My hope was to enumerate
all the possible statements, then to use the line hook to find those
that were executed. Any left over are not executed.
Is there any way to enumerate all statements (or even all line numbers)
in all Lua functions?
> > Is there any way to enumerate all statements (or even all line numbers)
> > in all Lua functions?
> Use 'L' in debug.getinfo. The 'activelines' field in the debug info
> table is a table whose keys are the lines that contain statements.
> Here is an example:
> for k in pairs(a.activelines) do print(k) end