lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


AFAIK:
There is no such function in the LUA-Api.
I needed to modify the LUA Api, for the LuaIDE patch.
If you want to I can give you the diff. 

It would be even better if the API would be updated. :)

Jan-Eric Duden
----- Original Message ----- 
From: "Ivan Kolev" <ikolev@abac.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Thursday, March 11, 2004 2:01 PM
Subject: Line number info


> Is there a way to collect the numbers of all lines in a lua file, which
> have any code associated with them?
> 
> I need this for a testing tool that I'm working on. I want to show
> coverage information, i.e. how much of the Lua code in a module has been
> covered by the test. I use a line hook to mark the visited lines, but I
> need to know the total number of lines that generated any code. Since
> not only empty lines don't generate any code (a common example is a line
> with just the "end" keyword in it), I can't just count the non-empty
> lines of the module.
> 
> Thanks,
> Ivan
> 
>