[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Line number info
- From: "Jan-Eric Duden" <jeduden@...>
- Date: Thu, 11 Mar 2004 15:45:46 +0100
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. :)
----- Original Message -----
From: "Ivan Kolev" <firstname.lastname@example.org>
To: "Lua list" <email@example.com>
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.