[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua style guide ?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 12 Jun 2017 09:42:58 +0200
2017-06-12 9:36 GMT+02:00 steve donovan <steve.j.donovan@gmail.com>:
> On Mon, Jun 12, 2017 at 1:00 AM, Russell Haley <russ.haley@gmail.com> wrote:
>> I'd like to find a way to generate the ldoc function headers from the file automagically so I could fill in the details afterwards.
>
> It would be useful, though at least having a regular comment in front
> of the functions would go a long way. The minimal translation would
> just replace '--' with '---' - just @-free doc comments.
This is more or less as much as ihelp [1] recognizes.
--- The docstring of a function
-- A comment block from the Lua code of a function, formatted in LDoc
-- style, like this block. The comments may come immediately before the
-- first line of the function or anywhere inside it. All comments must
-- start at position 1 of their lines and the first comment must start
-- with at least three hyphens. For a very short function, the whole
-- code is used as the docstring.
--
-- Not available for functions defined from the terminal while running
-- the standalone Lua interpreter.
[1] https://github.com/dlaurie/lua-ihelp or `luarocks install ihelp`.
- References:
- Re: Lua style guide ?, Roland Yonaba
- Re: Lua style guide ?, Hisham
- Re: Lua style guide ?, Edu Araújo
- Re: Lua style guide ?, Sean Conner
- Re: Lua style guide ?, steve donovan
- Re: Lua style guide ?, Dirk Laurie
- Re: Lua style guide ?, Hisham
- Re: Lua style guide ?, Dirk Laurie
- Re: Lua style guide ?, Martin
- Re: Lua style guide ?, steve donovan
- Re: Lua style guide ?, Russell Haley
- Re: Lua style guide ?, steve donovan