edoc question

Richard Carlsson richardc@REDACTED
Fri Oct 21 12:40:31 CEST 2005


Martin Bjorklund wrote:
>%%%--------------------------------------------------------------------
>%%% edoc types
>%%% @type session_handler() = pid()
>% % @type cs() = #cs{}
>%%% @end
>%%%--------------------------------------------------------------------
>
>The error I get is:
>   at line 41: syntax error before: '%'

I thought as much. (I've been bitten by this myself once, so it's
something that maybe should be fixed somehow.)

What happens is of course that the first @type is not terminated
by the second, "out-commented" @type. Instead, that line becomes
part of the content of the first tag, effectively '...pid() % @type...'.

So maybe I should check for this sort of thing when I look for the
end of a tag. Hopefully, it's a change that won't break existing docs.

I'll put it on the todo-list. Meanwhile... just don't do that. :-)

> If you instead put the commented line after @end, it works.
> 
> %%%--------------------------------------------------------------------
> %%% edoc types
> %%% @type session_handler() = pid()
> %%% @end
> % % @type cs() = #cs{}     FIXME fix in R10-8
> %%%--------------------------------------------------------------------

Exactly.

	/Richard

----
 "Having users is like optimization: the wise course is to delay it."
   -- Paul Graham



More information about the erlang-questions mailing list