summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-23 15:14:44 -0300
committerGabriel Schneider <[email protected]>2026-11-23 15:47:11 -0300
commit33b1f209162f94a9200f8c00d131aae772eb02f2 (patch)
tree9bb64b28ec984326939aa42952ffd3dd34d0a4dc /dev
parentf34d3a74cc4a6b735c98ce98cef0df42bd065e67 (diff)
downloadpardes-33b1f209162f94a9200f8c00d131aae772eb02f2.tar.gz
pardes-33b1f209162f94a9200f8c00d131aae772eb02f2.zip
help: a builtin's documentation is the `///` block right above its `pub const <Word> = struct`, read at compile time into one table, `registry.doc` (its summary, the first sentence, and all of it, a line a paragraph), and every reader takes the table (the user's words of 2026-11-23: "the builtins should have their documentation in code somewhere (you may use comptime to extract that) near their definitions"): the summary was found at run time, each word's by a scan of the embedded source for `\npub const <Word> = struct` (core/ninep/ctl.zig `summaryOf`), `stripCitations` cutting `(exec.c:892)` and the like out of it: both are deleted; THE CONVENTION is written at the top of core/builtins.zig (the `///` above a builtin is what a user reads in Help, `pardes help`, /commands, `pardes words` and the glossary; no file names, no "registration", no history; notes for the code's reader are `//` lines inside the struct) and the compiler holds what it can read of it: a builtin with no `///` block, a first sentence over `summary_max` (100 bytes) or a `///` naming a .zig file fails the build, naming the builtin (one pass over the source, `registry.docs`; a setting's documentation is its `Setting.doc`, held the same); 35 builtins' docs cut to it (a first sentence over 100 bytes split at a sentence, acme and source citations into `//` notes in the struct), and DumpDir's setting doc (core/config.zig) the same; /commands prints each word's summary whole (no clip: the bound holds it); the docs' JSON (core/builtins_json.zig) takes `doc` from the table and gains `text`, the whole documentation, beside it (an addon's word: its one `.doc` in both); docs/typ/builtins-tui.json regenerated (`zig build builtins-json -Dplatform=tui`; builtins-gui.json in the change that runs the window's gates); tests: builtins.zig "a builtin's documentation is the whole `///` block above it, a line a paragraph, its summary first", ctl.zig "every word's /commands description is its documentation's summary, a line" (replacing the source-scanning one); core-test 942/1108 (166 skipped; the base measures 941/1107 here, see the report), Debug, tui, load 2-7
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev')
0 files changed, 0 insertions, 0 deletions