EDoc interface to Erlang specifications and types.

EDoc interface to Erlang specifications and types.


entries() = [entry()]
entry() = #entry{}
module_info() = #module{}
syntaxTree() = syntaxTree() (see module erl_syntax)
tag_kind() = type | spec | unknown


type(Form::syntaxTree(), TypeDocs::dict()) -> #tag{}

Convert an Erlang type to EDoc representation. TypeDocs is a dict of {Name, Doc}. Note: #t_typedef.name is set to {record, R} for record types.

spec(Form::syntaxTree(), ClauseN::pos_integer()) -> #tag{}

Convert an Erlang spec to EDoc representation.

dummy_spec(Form::syntaxTree()) -> #tag{}

Create a #tag{} record where data is a string with the name of the given Erlang spec and an empty list of arguments.

docs(Forms::[syntaxTree()], CommentFun::([syntaxTree()], Line::term()) -> #tag{}) -> dict()

Find comments after -type/-opaque declarations. Postcomments "inside" the type are skipped.

add_data(Entries::entries(), Options::proplist() (see module proplists), File::filename() (see module file), Module::module_info()) -> entries()

Create tags a la EDoc for Erlang specifications and types. Exported types and types used (indirectly) by Erlang specs are added to the entries.

is_tag(Tag::atom()) -> boolean()

Return true if Tag is one of the specification and type attribute tags recognized by the Erlang compiler.

tag(Tag::atom()) -> tag_kind()

Return the kind of the attribute tag.

View Functions