Expand description
Canonical structured documentation for Sema’s builtins and special forms.
Each builtin/special form is one markdown file (crates/sema-docs/entries/stdlib/<module>/<slug>.md)
with a single YAML frontmatter block (name, params, returns, see_also, …) followed by
a markdown body that may contain sema example code blocks.
The filename is just a slug; the name field is canonical (so operator names like *, <=,
null? are fine). From this source sema-docs gen produces a single committed JSON index
(builtin_index) consumed at runtime by the LSP (hover/completion) and the REPL (apropos/doc).
The website is intentionally not generated from this yet.
Structs§
- DocEntry
- A fully resolved documentation entry (the serialized contract shared with LSP/REPL).
- DocError
- DocIndex
- The serialized doc index (committed as JSON, loaded at runtime).
- Param
- A single documented parameter.
Functions§
- build_
index - builtin_
index - Load the committed doc index that’s compiled into the binary. Used by the LSP and REPL.
- dedupe
- Drop duplicate entries within the same module (first wins, in load order). Returns one warning per drop.
- load
- Load every entry from the stdlib doc tree and the special-forms tree.
- parse_
entry - Parse a single entry file into a
DocEntry. - validate
- Validate the loaded entries. Hard errors (
Err): duplicate (module, name) / (module, alias) pairs, unbalanced code fences, leaked VitePress:::containers. Soft warnings (Ok): empty summaries — these become hard errors understrict(the coverage gate).