x-lang

← Index

x/doc/doc-gen

Documentation generator from x-lang source tokens; output format rides an emitter (x/doc/emit).

The two exports are the driver’s, tools/dev/doc.x: it imports them by name.

doc-build-lookup

Build a lookup alist from (doc …) forms in a token stream.

Returns: LIST — Alist of (name-string . extracted-7-tuple) pairs

Examples:

(import x/doc/doc-gen doc-build-lookup) (List map (fn (_ p) (first p)) (doc-build-lookup '((doc (def a 1) "A.") (def b 2) (doc c "C.")))) => ("a" "c")
(import x/doc/doc-gen doc-build-lookup) (doc-build-lookup '((doc foo "Foo."))) => (("foo" 'foo "Foo." () () () () ()))

doc-walk-with-prims

Walk source tokens, using prims-alist as fallback docs for bare defs.