Package sleeladoc
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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
summary | String summary = "" | The free-prose summary (text before the first @tag); "" when none. |
tags | SLDocTag[] tags = new SLDocTag[0] | Ordered @tags; a growable VM-managed object array. |
tagN | int tagN = 0 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
setSummary | void setSummary(String s) | No description in source. |
getSummary | String getSummary() | No description in source. |
addTag | void addTag(SLDocTag t) | Append a parsed tag, preserving source order. |
addTagOf | void addTagOf(String n, String v) | Convenience: build and append a tag from name + value. |
tagCount | int tagCount() | No description in source. |
tagAt | SLDocTag tagAt(int i) | No description in source. |
indexOfTag | int indexOfTag(String n) | Index of the first tag with name `n`, or -1. |
hasTag | boolean hasTag(String n) | No description in source. |
tagValue | String tagValue(String n) | The value of the first tag named `n`, or "" when absent. |
empty | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CLASS | static final int CLASS = 0 | ---- the member kinds ---- |
FIELD | static final int FIELD = 1 | No description in source. |
METHOD | static final int METHOD = 2 | No description in source. |
kind | int kind | nodeType of this member (one of the kind codes above). |
memberName | String memberName | The member name (class name, field name, or method name). |
signature | String signature | The raw signature line as written in source. |
doc | SLDocComment doc | The attached SleelaDoc comment, or null when undocumented. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(int k, String n, String sig) | No description in source. |
attach | void attach(SLDocComment c) | No description in source. |
getKind | int getKind() | No description in source. |
getName | String getName() | No description in source. |
getSignature | String getSignature() | No description in source. |
getDoc | SLDocComment getDoc() | No description in source. |
documented | boolean documented() | No description in source. |
kindName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
unitName | String unitName = "" | The unit name (the source base name a caller supplies). |
members | SLDocMember[] members = new SLDocMember[0] | Documented members in declaration order; growable VM-managed object array. |
memberN | int memberN = 0 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
setUnitName | void setUnitName(String n) | No description in source. |
getUnitName | String getUnitName() | No description in source. |
addMember | void addMember(SLDocMember m) | Append a member, preserving declaration order. |
memberCount | int memberCount() | No description in source. |
memberAt | SLDocMember memberAt(int i) | No description in source. |
countKind | int countKind(int kind) | Count members of a given kind (0 class, 1 field, 2 method). |
documentedCount | int 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).
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
toMarkdown | String toMarkdown(SLDocModel model) | Render the whole model as a Markdown API page. |
mdMember | String mdMember(SLDocMember m, String nl) | One member as a Markdown section. |
toHtml | String toHtml(SLDocModel model) | Render the whole model as a minimal self-contained HTML fragment. |
htmlMember | String htmlMember(SLDocMember m, String nl) | No description in source. |
esc | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
model | SLDocModel model | ---- scanner state ---- |
current | SLDocComment current | the doc comment being accumulated, or null when outside a block |
inBlock | boolean inBlock = false | true while inside a doc block (between its opener and closer) |
pending | SLDocComment pending | the last completed doc comment, pending attachment to a declaration |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
begin | void begin(String unitName) | Begin a scan of a unit named `unitName`. |
getModel | SLDocModel getModel() | No description in source. |
joinTokens | String joinTokens(String[] toks, int from, int to) | Join tokens [from, to) with single spaces into one value string. |
isScalarType | boolean 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. |
isTypeHead | boolean 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. |
feed | void feed(String[] toks, boolean upperInitial) | No description in source. |
openBlock | void openBlock() | No description in source. |
closeBlock | void closeBlock() | No description in source. |
absorbBlockLine | void absorbBlockLine(String[] toks) | A line inside a block: the closer is handled in feed(), so absorb all here. |
absorbTokens | void absorbTokens(String[] toks, int from, int to) | No description in source. |
startsWithAt | boolean 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. |
tagNameOf | String tagNameOf(String t) | The tag name for a known "@name" marker (the marker without the "@"). |
classifyDeclaration | void classifyDeclaration(String[] toks, boolean upperInitial) | No description in source. |
hasParen | boolean hasParen(String[] toks) | True when the tokens include a "(" marker (the caller tokenizes "name(" as two tokens "name" "(" or passes "(" standalone). |
nameToken | String nameToken(String[] toks) | The declared name: the token right after the type head (toks[1]). |
addMemberRecord | void 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
tagName | String tagName | The tag name without the leading "@" (e.g. "intent"). |
tagValue | String tagValue | The trimmed value text after the tag name. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(String n, String v) | No description in source. |
getTagName | String getTagName() | No description in source. |
getTagValue | String getTagValue() | No description in source. |
is | boolean 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
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
t1 | String[] t1(String a) | No description in source. |
t2 | String[] t2(String a, String b) | No description in source. |
t3 | String[] t3(String a, String b, String c) | No description in source. |
t4 | String[] t4(String a, String b, String c, String d) | No description in source. |
t6 | String[] t6(String a, String b, String c, String d, String e, String f) | No description in source. |
main | void 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
packageName | String packageName | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
name | String name() | No description in source. |
available | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
scanner | SLDocScanner scanner | No description in source. |
renderer | SLDocRenderer renderer | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
begin | void begin(String unitName) | Begin extracting a unit named `unitName`. |
feed | void 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. |
model | SLDocModel model() | The parsed model (members in declaration order). |
toMarkdown | String toMarkdown() | Render the accumulated model as a Markdown API page. |
toHtml | String toHtml() | Render the accumulated model as a minimal HTML fragment. |
memberCount | int memberCount() | ---- quick facts ---- |
documentedCount | int documentedCount() | No description in source. |