1
0
forked from alex-eg/sex

test semen through semen-process alone

Its fn accessors, walk-form and macro-expand were exported to be called
on hand-built forms, checking what every compiled function and macro
already goes through; sex-fn-public? and sex-fn-body had no other caller.
This commit is contained in:
2026-10-20 11:49:29 +03:00
parent 6198c51e88
commit ab881e4c31
2 changed files with 3 additions and 53 deletions

View File

@@ -19,11 +19,7 @@
)
(export/rename (process semen-process))
(export closure-env-declaration
;; for the tests
sex-fn? sex-fn-public? sex-fn-name sex-fn-arglist
sex-fn-return-type sex-fn-prototype sex-fn-body
walk-form macro-expand)
(export closure-env-declaration)
;;; for lambda extraction, docstring processing, macro expansion,
;;; injection of module headers, i.e. all things that rearrange code
@@ -1965,9 +1961,6 @@ Returns #f if the form is not a function, returns the form otherwise"
('extern 'fn . _)) form)
(else #f)))
(define (sex-fn-public? fn-form)
(eq? (first fn-form) 'pub))
(define (sex-fn-name fn-form)
(assert (sex-fn? fn-form)
(fmt #f "Form " fn-form " is not a function"))
@@ -1982,8 +1975,3 @@ Returns #f if the form is not a function, returns the form otherwise"
(assert (sex-fn? fn-form)
(fmt #f "Form " fn-form " is not a function"))
(fourth (fn-core fn-form)))
(define (sex-fn-body fn-form)
(assert (sex-fn? fn-form)
(fmt #f "Form " fn-form " is not a function"))
(drop fn-form (fn-header-length fn-form)))