lua-users home
lua-l archive

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



On 17/03/2014 9:02 PM, steve donovan wrote:
On Mon, Mar 17, 2014 at 2:12 PM, David Crayford <dcrayford@gmail.com> wrote:
My non-stupid editor is Slickedit which has reasonably decent support for
Lua. I ran my beady eye over your LDoc which seems promising to create tag
files for SE.
Interesting idea!  The 'canonical' exuberant ctags implementation does
not do a fantastic job, especially if not using modules.  You get
"test.asserteq' as the function name, not just plain asserteq, and it
does not know that local functions are special and tag them as having
file scope (as it would do with a static C function).

LDoc is well-positioned to do the job, because it's already doing the
basic parsing.


Slickedit tag files for Lua handle packages with an interface keyword, so the os package is defined like so (which give context assist).

interface os {
   function clock();
   function date(format, time);
   function difftime(t2, t1);
   function execute(command);
   function exit(code);
   function getenv(varname);
   function remove(filename);
   function rename(oldname, newname);
   function setlocale(locale, category);
   function time(table);
   function tmpname();
}

IIRC, it's possible to annoate arguments with @format etc. Can LDoc be used to generate a table of function/arguments to generate such a structure?