module diode.vdoc.processor
Code to process vdoc objects raw doccomments.
Code Map
//! Code to process vdoc objects raw doccomments.
module diode.vdoc.processor;
//! Main class for processing vdoc objects.
class Processor : DocCommentParser
{
public:
groups: Parent[string];
public:
this(root: VdocRoot) { }
}
//! A single parameter result.
class DocCommentParam
{
public:
arg: string;
dir: string;
doc: string;
public:
this() { }
}
//! Helper class for DocComments.
class DocCommentParser : DocSink
{
public:
//! For lookups.
root: VdocRoot;
//! The full comment content.
full: StringSink;
//! String sink for params, briefs and more.
temp: StringSink;
//! Current param.
param: DocCommentParam;
//! The result of the processing.
results: DocCommentResult;
//! ` directive been processed.
hasBrief: bool;
public:
this(root: VdocRoot) { }
fn parseRaw(raw: string) { }
fn ingroup(sink: scope (Sink), group: string) { }
fn sectionStart(sink: scope (Sink), sec: DocSection) { }
fn sectionEnd(sink: scope (Sink), sec: DocSection) { }
fn paramStart(sink: scope (Sink), direction: string, arg: string) { }
fn paramEnd(sink: scope (Sink)) { }
fn briefStart(sink: scope (Sink)) { }
fn briefEnd(sink: scope (Sink)) { }
fn p(sink: scope (Sink), state: DocState, d: string) { }
fn link(sink: scope (Sink), state: DocState, target: string, text: string) { }
fn content(sink: scope (Sink), state: DocState, d: string) { }
fn defgroup(sink: scope (Sink), group: string, text: string) { }
fn start(sink: scope (Sink)) { }
fn end(sink: scope (Sink)) { }
}
//! Results from a doccomment parsing.
struct DocCommentResult
{
public:
//! The main content for this doccomment.
content: string;
//! Brief doccomment.
brief: string;
//! The groups this comment is in.
ingroups: string[];
//! Return documentation.
ret: string;
//! Params for functions.
params: DocCommentParam[];
//! See also sections.
sa: string[];
//! Throws sections.
_throw: string[];
//! Side-Effect sections.
se: string[];
//! The doccomment content form the return command.
returnContent: string;
}
//! Processes the given VdocRoot.
fn process(vdocRoot: VdocRoot) { }
fn process(vdocRoot: VdocRoot)
Processes the given VdocRoot.
Setting various fields and adding objects to groups.
class Processor : DocCommentParser
Main class for processing vdoc objects.
struct DocCommentResult
Results from a doccomment parsing.
content: string
The main content for this doccomment.
brief: string
Brief doccomment.
ingroups: string[]
The groups this comment is in.
ret: string
Return documentation.
params: DocCommentParam[]
Params for functions.
sa: string[]
See also sections.
_throw: string[]
Throws sections.
se: string[]
Side-Effect sections.
returnContent: string
The doccomment content form the return command.
class DocCommentParam
A single parameter result.
class DocCommentParser : DocSink
Helper class for DocComments.
root: VdocRoot
For lookups.
full: StringSink
The full comment content.
temp: StringSink
String sink for params, briefs and more.
param: DocCommentParam
Current param.
results: DocCommentResult
The result of the processing.
hasBrief: bool
Has a `@