2024-05-28 11:15:29 +00:00
|
|
|
(defpackage #:hsx/hsx
|
2024-05-25 16:26:26 +00:00
|
|
|
(:use #:cl)
|
2024-05-28 03:33:01 +00:00
|
|
|
(:export #:hsx))
|
2024-05-25 16:26:26 +00:00
|
|
|
(in-package #:hsx/hsx)
|
|
|
|
|
2024-05-31 22:22:01 +00:00
|
|
|
(defmacro hsx (form)
|
|
|
|
(find-builtin-symbols form))
|
2024-05-26 10:48:09 +00:00
|
|
|
|
2024-05-27 10:11:27 +00:00
|
|
|
(defun find-builtin-symbols (node)
|
|
|
|
(if (atom node)
|
2024-05-30 03:55:13 +00:00
|
|
|
(or (and (symbolp node)
|
|
|
|
(not (keywordp node))
|
|
|
|
(find-symbol (string node) :hsx/builtin))
|
2024-05-27 10:11:27 +00:00
|
|
|
node)
|
|
|
|
(cons (find-builtin-symbols (car node))
|
|
|
|
(mapcar (lambda (n)
|
|
|
|
(if (listp n)
|
|
|
|
(find-builtin-symbols n)
|
|
|
|
n))
|
|
|
|
(cdr node)))))
|