Expand description
The one teaching truth for LOGOS constructs: every lesson a surface shows
— LSP hover, completion documentation, the REPL’s :explain — comes from
THIS table, so the editor and the terminal always teach the same thing.
A ConstructDoc is complete by construction: the type has no optional
teaching fields, so an entry cannot exist without a plain-English
sentence, a runnable example, and a socratic question or tip. The
doc_for match is wildcard-free (the token_class idiom): adding a
TokenType variant does not compile until someone decides whether it
deserves a lesson — the decision lives here, next to the enum, not in an
editor plugin. doc_for_block is total: every ## block type teaches.
Structs§
- Construct
Doc - A complete lesson for one construct. Every field is required by the TYPE — an entry cannot exist without a plain sentence, a runnable example, and a socratic question or tip. Clear-and-easy is structural, not aspirational.
- Literate
Doc - One documented definition pulled from a literate LOGOS module.
Statics§
- ALL_
DOCS - Every lesson, for parity ratchets and the REPL’s suggestion list.
Functions§
- doc_for
- The lesson for a statement keyword, when the token deserves one.
- doc_
for_ block - The lesson for a
##block header. TOTAL — every block type teaches, and a newBlockTypevariant does not compile until it gets a lesson. - doc_
for_ header_ at - The documentation for the
##header starting atheader_start: the body of a## Noteblock IMMEDIATELY above it (the nearest preceding header must be the Note — any other header in between means no doc). - doc_
for_ primitive - The lesson for a primitive or built-in generic type name.
- doc_
for_ word - The first lesson whose name matches the word, case-insensitively.
- docs_
for_ word - Every lesson whose name matches the word, case-insensitively — a word can
name more than one construct (
Setthe statement,Setthe type), and an honest teacher shows both. - extract_
literate_ docs - Every
## To …/## A …definition in a literate module, with its## Notedocumentation attached where one sits directly above. Types declared inside a## Definitionbody inherit the block’s Note. - module_
doc - The module-level documentation: the prose between the
# Titleline and the first##section (the region the lexer skips).