.TH edoc_extract 3erl "edoc 0.7.15" "" "Erlang Module Definition" .SH NAME edoc_extract \- EDoc documentation extraction. .SH DESCRIPTION .LP EDoc documentation extraction\&. .SH "DATA TYPES" .RS 2 .TP 2 .B \fIedoc_env() = edoc_env() (see module edoc_lib)\fR\&: .TP 2 .B \fIfilename() = filename() (see module file)\fR\&: .TP 2 .B \fIproplist() = property() (see module proplists)\fR\&: .TP 2 .B \fIsyntaxTree() = syntaxTree() (see module erl_syntax)\fR\&: .TP 2 .B \fIt() = t1()\fR\&: .RS 2 .LP Some docs of t/0; Further docs of t/0\&. The same thing using -type: -type t() :: t1()\&. % Some docs of t/0; Further docs of t/0\&. .RE .RE .SH EXPORTS .LP .B file(File::filename(), Context, Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason} .br .RS .LP Types: .RS 3 Context = overview | package .br Tags = [term()] .br Reason = term() .br .RE .RE .RS .LP Reads a text file and returns the list of tags in the file\&. Any lines of text before the first tag are ignored\&. \fIEnv\fR\& is an environment created by \fBedoc_lib:get_doc_env/4\fR\&\&. Upon error, \fIReason\fR\& is an atom returned from the call to \fBfile:read_file/1\fR\& or the atom \&'invalid_unicode\&'\&. .LP See \fBtext/4\fR\& for options\&. .RE .LP .B header(File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason} .br .RS .LP Types: .RS 3 Tags = [term()] .br Reason = term() .br .RE .RE .RS .LP Similar to \fBheader/5\fR\&, but reads the syntax tree and the comments from the specified file\&. .LP \fISee also:\fR\& \fBheader/4\fR\&, \fBedoc:read_comments/2\fR\&, \fBedoc:read_source/2\fR\&\&. .RE .LP .B header(Forms, File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason} .br .RS .LP Types: .RS 3 Forms = syntaxTree() | [syntaxTree()] .br Tags = [term()] .br Reason = term() .br .RE .RE .RS .LP Extracts EDoc documentation from commented header file syntax trees\&. Similar to \fBsource/5\fR\&, but ignores any documentation that occurs before a module declaration or a function definition\&. (Warning messages are printed if content may be ignored\&.) \fIEnv\fR\& is assumed to already be set up with a suitable module context\&. .LP \fISee also:\fR\& \fBerl_recomment(3erl)\fR\&, \fBheader/5\fR\&\&. .RE .LP .B header(Forms, Comments::[comment() (see module edoc)], File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason} .br .RS .LP Types: .RS 3 Forms = syntaxTree() | [syntaxTree()] .br Tags = [term()] .br Reason = term() .br .RE .RE .RS .LP Similar to \fBheader/4\fR\&, but first inserts the given comments in the syntax trees\&. The syntax trees must contain valid position information\&. (Cf\&. \fBedoc:read_comments/2\fR\&\&.) .LP \fISee also:\fR\& \fBerl_recomment(3erl)\fR\&, \fBheader/3\fR\&, \fBheader/4\fR\&\&. .RE .LP .B source(File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module() (see module edoc)} .br .RS .LP Types: .RS 3 ModuleName = atom() .br [term()] .br .RE .RE .RS .LP Like \fBsource/5\fR\&, but reads the syntax tree and the comments from the specified file\&. .LP \fISee also:\fR\& \fBsource/4\fR\&, \fBedoc:read_comments/2\fR\&, \fBedoc:read_source/2\fR\&\&. .RE .LP .B source(Forms, File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module() (see module edoc)} .br .RS .LP Types: .RS 3 Forms = syntaxTree() | [syntaxTree()] .br ModuleName = atom() .br .RE .RE .RS .LP Extracts EDoc documentation from commented source code syntax trees\&. The given \fIForms\fR\& must be a single syntax tree of type \fIform_list\fR\&, or a list of syntax trees representing "program forms" (cf\&. \fBedoc:read_source/2\fR\&\&. \fIEnv\fR\& is an environment created by \fBedoc_lib:get_doc_env/4\fR\&\&. The \fIFile\fR\& argument is used for error reporting and output file name generation only\&. .LP See \fBedoc:get_doc/2\fR\& for descriptions of the \fIdef\fR\&, \fIhidden\fR\&, \fIprivate\fR\&, and \fItodo\fR\& options\&. .LP \fISee also:\fR\& \fBerl_recomment(3erl)\fR\&, \fBsource/5\fR\&, \fBedoc:read_comments/2\fR\&, \fBedoc:read_source/2\fR\&\&. .RE .LP .B source(Forms, Comments::[comment() (see module edoc)], File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module() (see module edoc)} .br .RS .LP Types: .RS 3 Forms = syntaxTree() | [syntaxTree()] .br ModuleName = atom() .br .RE .RE .RS .LP Like \fBsource/4\fR\&, but first inserts the given comments in the syntax trees\&. The syntax trees must contain valid position information\&. (Cf\&. \fBedoc:read_comments/2\fR\&\&.) .LP \fISee also:\fR\& \fBerl_recomment(3erl)\fR\&, \fBsource/3\fR\&, \fBsource/4\fR\&, \fBedoc:read_comments/2\fR\&, \fBedoc:read_source/2\fR\&\&. .RE .LP .B text(Text::string(), Context, Env::edoc_env(), Options::proplist()) -> Tags .br .RS .LP Types: .RS 3 Context = overview | package .br Tags = [term()] .br .RE .RE .RS .LP Returns the list of tags in the text\&. Any lines of text before the first tag are ignored\&. \fIEnv\fR\& is an environment created by \fBedoc_lib:get_doc_env/4\fR\&\&. .LP See \fBsource/4\fR\& for a description of the \fIdef\fR\& option\&. .RE .SH "SEE ALSO" .LP \fBedoc\fR\& .SH AUTHORS .LP Richard Carlsson .I