1
0
forked from alex-eg/sex

delete what nothing calls

walk-generic-toplevel and non-empty-list? had no caller left, a type
variable's id was never read, and every expression's type was recorded
in a table nothing looked up.
This commit is contained in:
2026-10-20 12:19:41 +03:00
parent eb5bf3688b
commit d2f36d35c6
4 changed files with 3 additions and 33 deletions

View File

@@ -24,7 +24,6 @@
form-end-line
copy-form-source!
stamp-form-source!
set-form-type!
sex-error
sex-warning
(with-directory set-working-directory))
@@ -126,19 +125,6 @@
;;; The file `parse-all' is currently reading. Bound by the reader
(define current-source-file (make-parameter "<unknown>"))
;;; What type a form has, once something has worked it out. Keyed by
;;; cons cell like the sources above, so one form has one type: a body
;;; typed at two instantiations has to be copied before the second.
(define +form-types+ (make-hash-table eq?))
(define (set-form-type! form type)
(when (pair? form)
(hash-table-set! +form-types+ form type))
type)
(define (form-type form)
(hash-table-ref/default +form-types+ form #f))
(define (set-form-source! form file line #!optional (end-line line))
(hash-table-set! +form-sources+ form (list file line end-line)))