[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Generating Lua code browsing information from coverage
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 16 Jul 2009 15:33:17 +0200
Hi all,
I have been playing with a little idea for a while. When comparing to
static languages, there is this irritating issue with dynamic
languages; it is hard to train development tools to browse code.
Obviously one can parse code, but generally the destination of a
particular method call is only known at run-time. So the idea is to
generate enough coverage information (which is fairly straightforward
using the debug library) from test runs to build a call graph. I can
then teach an editor like SciTE to jump to the actual function call
afterwards. Of course, there may be multiple such, but that's what
makes it interesting. Using a ctags-like trick, one doesn't store
line numbers but rather string patterns for the targets - otherwise
the database rapidly gets useless as one edits.
This does mean that you have to run the code before you can browse it,
but this is not bad practice. Also can visually highlight covered
code, etc.
Is this a worthwhile idea to pursue?
steve d.