read: document datum label

This commit is contained in:
Peter McGoron 2024-09-27 12:15:16 -04:00
parent b0ce282a30
commit 5b609d4cdf
1 changed files with 8 additions and 0 deletions

View File

@ -545,6 +545,14 @@
;;; Readtable for the number part of a datum label / reference. A label ;;; Readtable for the number part of a datum label / reference. A label
;;; looks like "#[NUMBER]=" and a reference looks like "#[NUMBER]#". ;;; looks like "#[NUMBER]=" and a reference looks like "#[NUMBER]#".
;;;
;;; Datum label assignments #XXX=[DATUM] return DATUM.
;;; Datum label references #XXX# return a DATUM-LABEL object, because
;;; circular references must be resolved later. (With some trickery it
;;; cold be resolved as soon as possible, but that requires knowledge of
;;; what is complex data and what is an atom. This requires knowing all
;;; possible values that the toplevel could read, which is not possible
;;; because new items can be added to the toplevel.)
(define readtable:datum-label-next (define readtable:datum-label-next
(readtable:process (readtable:process
(readtable:empty/default (readtable:error 'datum-label-next (readtable:empty/default (readtable:error 'datum-label-next