[erlang-questions] [edoc] macro for referring a parameter & multiple @doc tags

Salvador Tamarit stamarit@REDACTED
Fri Jul 21 17:15:40 CEST 2017


Hi,

I'm trying to write automatically some edoc in a program, but I'm finding
some difficulties.

The first barrier is not having a macro to refer a parameter of a function.
I've seen that by using edoc:get_doc/* it is possible to have the
parameters names accesible through an XML, but I would expect a easier way
to obtain them. I think that it could be very useful to have a macro like
{@p n} to refer to the nth parameter. This macro could be replaced by the
parameter name in the generated documentation.

The second barrier is the limit of one @doc tag per function. I understand
that this is due to some parsing constraint that I'm failing to see. If it
is not the case, then it would be interesting to enable multiple @doc tags
and simply join them together when they are printed. This would ease the
task of automatically generate new documentation in a function that already
had user-defined documentation.

So the question here is, is some of these edoc changes feasible?
Or even better, is what I want to do doable by using other edoc's
macros/constructions?

Thanks in advance.
Salvador Tamarit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170721/d5f35d30/attachment.htm>


More information about the erlang-questions mailing list