SleelaDoc API
HTML documentation for the SLeeLa standard library (/lib)
Home › Packages › sleeladoc

Package sleeladoc

This package contains 9 source unit(s) defining 9 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

SLDocComment #sleela 2.8 (lib/sleeladoc/SLDocComment.sleela)

SLDocComment class

Defines SLDocComment -- one parsed SleelaDoc block: its free-prose summary plus an ordered list of @tags.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
summaryString summary = ""The free-prose summary (text before the first @tag); "" when none.
tagsSLDocTag[] tags = new SLDocTag[0]Ordered @tags; a growable VM-managed object array.
tagNint tagN = 0No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
setSummaryvoid setSummary(String s)No description in source.
getSummaryString getSummary()No description in source.
addTagvoid addTag(SLDocTag t)Append a parsed tag, preserving source order.
addTagOfvoid addTagOf(String n, String v)Convenience: build and append a tag from name + value.
tagCountint tagCount()No description in source.
tagAtSLDocTag tagAt(int i)No description in source.
indexOfTagint indexOfTag(String n)Index of the first tag with name `n`, or -1.
hasTagboolean hasTag(String n)No description in source.
tagValueString tagValue(String n)The value of the first tag named `n`, or "" when absent.
emptyboolean empty()True when the comment carries nothing (no summary and no tags).

SLDocMember #sleela 2.8 (lib/sleeladoc/SLDocMember.sleela)

SLDocMember class

Defines SLDocMember -- a documented declaration (class, field, or method) with its signature line and the SleelaDoc comment attached to it.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
CLASSstatic final int CLASS = 0---- the member kinds ----
FIELDstatic final int FIELD = 1No description in source.
METHODstatic final int METHOD = 2No description in source.
kindint kindnodeType of this member (one of the kind codes above).
memberNameString memberNameThe member name (class name, field name, or method name).
signatureString signatureThe raw signature line as written in source.
docSLDocComment docThe attached SleelaDoc comment, or null when undocumented.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
setvoid set(int k, String n, String sig)No description in source.
attachvoid attach(SLDocComment c)No description in source.
getKindint getKind()No description in source.
getNameString getName()No description in source.
getSignatureString getSignature()No description in source.
getDocSLDocComment getDoc()No description in source.
documentedboolean documented()No description in source.
kindNameString kindName()No description in source.

SLDocModel #sleela 2.8 (lib/sleeladoc/SLDocModel.sleela)

SLDocModel class

Defines SLDocModel -- the parsed SleelaDoc model of a whole unit: the unit name and its documented members in declaration order.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
unitNameString unitName = ""The unit name (the source base name a caller supplies).
membersSLDocMember[] members = new SLDocMember[0]Documented members in declaration order; growable VM-managed object array.
memberNint memberN = 0No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
setUnitNamevoid setUnitName(String n)No description in source.
getUnitNameString getUnitName()No description in source.
addMembervoid addMember(SLDocMember m)Append a member, preserving declaration order.
memberCountint memberCount()No description in source.
memberAtSLDocMember memberAt(int i)No description in source.
countKindint countKind(int kind)Count members of a given kind (0 class, 1 field, 2 method).
documentedCountint documentedCount()Count members carrying a non-empty doc comment.

SLDocRenderer #sleela 2.8 (lib/sleeladoc/SLDocRenderer.sleela)

SLDocRenderer class

Defines SLDocRenderer -- renders a parsed SLDocModel as a Markdown or minimal HTML API page (the way javadoc renders an HTML page for Java).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
toMarkdownString toMarkdown(SLDocModel model)Render the whole model as a Markdown API page.
mdMemberString mdMember(SLDocMember m, String nl)One member as a Markdown section.
toHtmlString toHtml(SLDocModel model)Render the whole model as a minimal self-contained HTML fragment.
htmlMemberString htmlMember(SLDocMember m, String nl)No description in source.
escString esc(String s)No description in source.

SLDocScanner #sleela 2.8 (lib/sleeladoc/SLDocScanner.sleela)

SLDocScanner class

Defines SLDocScanner -- the token-stream reader that lifts SleelaDoc @doc / @page blocks and @tags out of a .sleela unit and attaches each doc comment to the declaration that follows it, building an SLDocModel.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
modelSLDocModel model---- scanner state ----
currentSLDocComment currentthe doc comment being accumulated, or null when outside a block
inBlockboolean inBlock = falsetrue while inside a doc block (between its opener and closer)
pendingSLDocComment pendingthe last completed doc comment, pending attachment to a declaration

Methods — the actions this unit can perform.

MethodSignatureWhat it does
beginvoid begin(String unitName)Begin a scan of a unit named `unitName`.
getModelSLDocModel getModel()No description in source.
joinTokensString joinTokens(String[] toks, int from, int to)Join tokens [from, to) with single spaces into one value string.
isScalarTypeboolean isScalarType(String word)True when `word` names a scalar/known declaration type head (so a line that starts with it is a field or method, not prose). Covers the surface type vocabulary plus the SL* / upper-initial class-type convention is handled by the caller marking declaration lines; here we accept the common scalars and treat any other token as a possible class-typed return/field via isTypeish.
isTypeHeadboolean isTypeHead(String word, boolean upperInitial)A token looks like a type head if it is a known scalar or begins uppercase (the SLeeLa class-name convention). The caller passes an explicit flag for ambiguous cases; this is the default heuristic.
feedvoid feed(String[] toks, boolean upperInitial)No description in source.
openBlockvoid openBlock()No description in source.
closeBlockvoid closeBlock()No description in source.
absorbBlockLinevoid absorbBlockLine(String[] toks)A line inside a block: the closer is handled in feed(), so absorb all here.
absorbTokensvoid absorbTokens(String[] toks, int from, int to)No description in source.
startsWithAtboolean startsWithAt(String t)True when token `t` is a tag marker "@name". Compares the first glyph via a single-cell token test the caller cannot give us, so we test known markers: a token equals "@" + a known tag name. This keeps it whole-string and real.
tagNameOfString tagNameOf(String t)The tag name for a known "@name" marker (the marker without the "@").
classifyDeclarationvoid classifyDeclaration(String[] toks, boolean upperInitial)No description in source.
hasParenboolean hasParen(String[] toks)True when the tokens include a "(" marker (the caller tokenizes "name(" as two tokens "name" "(" or passes "(" standalone).
nameTokenString nameToken(String[] toks)The declared name: the token right after the type head (toks[1]).
addMemberRecordvoid addMemberRecord(int kind, String nm, String sig)Record a member of `kind` named `nm` with signature `sig`, attaching the pending doc comment (then clearing it).

SLDocTag #sleela 2.8 (lib/sleeladoc/SLDocTag.sleela)

SLDocTag class

Defines SLDocTag -- one parsed SleelaDoc tag: a name (without the leading @) and its value text.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
tagNameString tagNameThe tag name without the leading "@" (e.g. "intent").
tagValueString tagValueThe trimmed value text after the tag name.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
setvoid set(String n, String v)No description in source.
getTagNameString getTagName()No description in source.
getTagValueString getTagValue()No description in source.
isboolean is(String n)True when this is the given tag name (case-sensitive; tags are lowercase).

sleeladoc-demo #sleela 2.8 (lib/sleeladoc/sleeladoc-demo.sleela)

SleeladocDemo class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
t1String[] t1(String a)No description in source.
t2String[] t2(String a, String b)No description in source.
t3String[] t3(String a, String b, String c)No description in source.
t4String[] t4(String a, String b, String c, String d)No description in source.
t6String[] t6(String a, String b, String c, String d, String e, String f)No description in source.
mainvoid main()No description in source.

SLPackage #sleela 2.8 (lib/sleeladoc/SLPackage.sleela)

SLPackage class

Defines the SLeeLa standard-library package for sleeladoc -- the SleelaDoc extractor family (the Javadoc-tool analogue for SLeeLa). Exposes the package to the SLeeLa compiler, Loader, and Nordshrift.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
packageNameString packageNameNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name)No description in source.
nameString name()No description in source.
availableboolean available()No description in source.

SLSleelaDoc #sleela 2.8 (lib/sleeladoc/SLSleelaDoc.sleela)

SLSleelaDoc class

Defines SLSleelaDoc -- the one-object facade a caller drives to extract SleelaDoc from a unit and render it: begin, feed tokenized lines, then render Markdown or HTML. The Javadoc-tool analogue entry point.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
scannerSLDocScanner scannerNo description in source.
rendererSLDocRenderer rendererNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
beginvoid begin(String unitName)Begin extracting a unit named `unitName`.
feedvoid feed(String[] toks, boolean upperInitial)Feed one tokenized source line; `upperInitial` true when its first token begins with an uppercase letter (computed by the caller at the char-cell boundary). Order of feeds is declaration order.
modelSLDocModel model()The parsed model (members in declaration order).
toMarkdownString toMarkdown()Render the accumulated model as a Markdown API page.
toHtmlString toHtml()Render the accumulated model as a minimal HTML fragment.
memberCountint memberCount()---- quick facts ----
documentedCountint documentedCount()No description in source.