index a unit past its first bad form

Record plain declarations, with location and docstring, and keep going
when one toplevel form is wrong. sexc --check and --symbols print
that. Specs, realizations, and closure helpers stay out of the index
for future rework (@alex-eg).
This commit is contained in:
2026-11-11 07:38:33 +03:00
parent 7315694faf
commit fb4b513efc
10 changed files with 892 additions and 59 deletions

View File

@@ -33,6 +33,7 @@
get-constructor
variant-fields
reset-declarations!
reset-name-tables!
add-spec!
get-spec
@@ -362,6 +363,13 @@
(set! +spec-db+ (make-hash-table))
(set! +realize-db+ (make-hash-table)))
;;; What `reset-declarations!' leaves, and what a second unit must not see.
(define (reset-name-tables!)
(set! +type-db+ (make-hash-table))
(set! +tag-db+ (make-hash-table))
(set! +name-db+ (make-hash-table))
(reset-declarations!))
;;; Type matcher macro
;;; (type-match type
;;; (int ...)