Add one-line comments to all defines in 5 spec files

parser.sx (3), render.sx (15), harness.sx (21), signals.sx (23),
canonical.sx (12) — 74 comments total. Each define now has a ;;
comment explaining its purpose.

Combined with the evaluator.sx commit, all 215 defines across 6 spec
files are now documented. primitives.sx and special-forms.sx already
had :doc fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 23:53:38 +00:00
parent d627746147
commit 45c2f2bfb0
5 changed files with 74 additions and 0 deletions

View File

@@ -50,6 +50,7 @@
;; --------------------------------------------------------------------------
;; Returns a list of top-level AST expressions.
;; Parse SX source string into AST
(define sx-parse :effects []
(fn ((source :as string))
(let ((pos 0)
@@ -360,6 +361,7 @@
;; Serializer — AST → SX source text
;; --------------------------------------------------------------------------
;; Serialize AST value back to SX source
(define sx-serialize :effects []
(fn (val)
(case (type-of val)
@@ -376,6 +378,7 @@
:else (str val))))
;; Serialize a dict to SX {:key val} format
(define sx-serialize-dict :effects []
(fn ((d :as dict))
(str "{"