lua-users home
lua-l archive

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

2013/3/21 steve donovan <>:
> I suspect the maintainers of LuaDoc have moved onto other things, and
> in fact indicated that they were quite happy if LDoc was the
> successor.  So being a kind of defacto maintainer, let's think about
> this.
> Note: 'exactly three hyphens' is wrong. The standard is 'at least
> three hyphens' and if the first line only contains hyphens, it is
> ignored and also indicates the start of the docstring.

I have modified 'help.lua' accordingly, and corrected some bugs.


$ lua -l ml
Lua 5.2.2  Copyright (C) 1994-2013, PUC-Rio
> dofile(package.searchpath("help",package.path))
> help(ml)
Contents: Array List bind1 bind2 callable class collect collect2nd
    collect_until compose contains_keys count equal_keys escape exists
    expand extend fun2map function_arg ifilter ifind imap imap2 import
    indexby indexof insertvalues invert issubset keys makemap map2fun
    memoize range readfile removerange split splitext splitpath sub throw
    transform tstring update
> help(ml.keys)
--- extract the keys of a table as a array.
-- @param t a table
-- @return a array of keys

The temptation is strong to patch the Lua interpreter so `?code`
translates to `help(code)`.

Attachment: help.lua
Description: Binary data