Digs document comments out of source files, splits them into Declarations and Modifiers, then reports everything it finds to a ComponentCache instance.

Modules

DocumentFragment

Represents a single block of markdown text and wraps it with its context to ensure proper crosslinking.

The same markdown doc is often rendered twice, once in a parent context and again on the Component's own page. To make generated docs compatible with local file view, either all links must be local paths or the entire page must be initialized to root with a <base>. Because doczar chooses to use local links, the href for a given path changes between rendering contexts. This necessitates multiple rendering passes and therefor the link context must be passed forward.

Generic

Represents a type slotted into a generic/template type.

Modifier

Represents a modifier declaration.

| Array < Array , > Path

Paths are represented as Arrays of Arrays, each child Array representing the individual portions of a fragement path. That is, the delimiter, the String fragment name, and in the case that the fragment is an es6 symbol a third child contains another Path representing the parsed form of the fragment name. Examplia gratia:

[ [ ".", "name" ], ...]

Or with a symbol:

[ [ ".", "Symbols.iterator", [ [ ".", "Symbols" ], [ ".", "iterator" ] ] ]
Submission

An intermediate structure for data hot off the Parser and ready to integrate into a Component. Encapsulates information included in a single declaration or inner declaration.

Valtype

Represents a value type.

Static Functions

parseFile ( ) {

Submit every Modifier and Declaration in a single source file to a ComponentCache instance.

Arguments

| String fname

An OS-localized absolute filename to read.

| doczar:ComponentCache context

Parsed information will be reported to this ComponentCache instance.

processFile ( ) {

Called any number of times to request that additional files be processed.

Arguments

| String fname

The OS-localized absolute filename of another file that should be processed.

, | doczar:Parser:Path parsePath ( ) {

Convert a path String to a path Array. If no path is generated, [ [ ] ] is returned. This is because all paths have a length but the final element may be filled contextually rather than explicitly.

Arguments

Returns

| doczar:Parser:Path

Returns Arrays of path fragment Arrays. These are of the form [ [ ".", "name" ], ...] or when Symbols are used, [ [ ".", "Symbols.iterator", [ [ ".", "Symbols" ], [ ".", "iterator" ] ] ].

Local Functions

, | doczar:Parser:Path parsePath ( ) {

Convert a path String to a path Array. If no path is generated, [ [ ] ] is returned. This is because all paths have a length but the final element may be filled contextually rather than explicitly.

Arguments

Returns

| doczar:Parser:Path

Returns Arrays of path fragment Arrays. These are of the form [ [ ".", "name" ], ...] or when Symbols are used, [ [ ".", "Symbols.iterator", [ [ ".", "Symbols" ], [ ".", "iterator" ] ] ].

parseType ( ) {
Parse a standard type String. This may include any number of pipe-delimited iterations of paths
with optional generic types.

@returns Array Each type in the pipe-delimited sequence (by default, length 1) represented as a [Valtype] (:Valtype).