implement templates (kinda)

uh oh
This commit is contained in:
2025-06-09 00:30:14 +03:00
parent 408c0c1441
commit 241d605db4
6 changed files with 243 additions and 7 deletions

View File

@@ -1,3 +1,6 @@
(declare (unit sexc)
(uses templates))
(import brev-separate
(chicken pathname)
(chicken pretty-print)
@@ -9,6 +12,8 @@
srfi-1 ; list routines
tree)
(define +debug+ #f)
(define (unkebabify sym)
(case sym
((-) sym)
@@ -75,7 +80,9 @@
(define (process-form form acc)
(case (car form)
((define) (eval form) acc)
((template) (eval form) acc)
((load) (eval form) acc)
((instance) (walk-sex-tree (eval form) acc))
(else
(walk-sex-tree form acc))))
@@ -167,5 +174,3 @@
(lambda ()
(emit-c sex-forms)))
(emit-c sex-forms)))))))
(main)