nitc :: actors_injection_phase
Injects model for the classes annotated with "is actor" sonitc :: astbuilder
Instantiation and transformation of semantic nodes in the AST of expressions and statementsnitc :: commands_ini
nitc :: i18n_phase
Basic support of internationalization through the generation of id-to-string tablesSerializable::inspect
to show more useful information
nitc :: modelbuilder
more_collections :: more_collections
Highly specific, but useful, collections-related classes.threaded
annotation
serialization :: serialization_core
Abstract services to serialize Nit objects to different formatsnitc :: serialization_model_phase
Phase generating methods (model-only) to serialize Nit objectsnitc :: toolcontext
Common command-line tool infrastructure than handle options and error messagesnitc :: uml_module
Services for generation of a UML package diagram based on aModel
core :: union_find
union–find algorithm using an efficient disjoint-set data structure
# Doc down related queries
module commands_docdown
import templates::md_commands
import markdown
# Retrieve the MDoc summary
#
# List all MarkdownHeading found and their ids.
class CmdSummary
super CmdComment
# Markdown processor used to parse the headlines
var markdown_processor: MarkdownProcessor is writable
# Resulting summary
#
# Associates each headline to its id.
var summary: nullable ArrayMap[String, HeadLine] = null is optional, writable
redef fun init_command do
var res = super
if not res isa CmdSuccess then return res
var mentity = self.mentity.as(not null)
var mdoc = self.mdoc
if mdoc == null then
mdoc = if fallback then mentity.mdoc_or_fallback else mentity.mdoc
self.mdoc = mdoc
end
if mdoc == null then return new WarningNoMDoc(mentity)
markdown_processor.process(mdoc.md_documentation.write_to_string)
var summary = new ArrayMap[String, HeadLine]
summary.add_all markdown_processor.decorator.headlines
self.summary = summary
return res
end
end
src/doc/commands/commands_docdown.nit:15,1--54,3