Commit | Line | Data |
---|---|---|
a4e6154d DC |
1 | (in-package :yaclml) |
2 | ||
3 | (defun funcall-with-tag (tag-spec thunk) | |
4 | (let ((%yaclml-code% nil) | |
5 | (%yaclml-indentation-depth% 0)) | |
6 | (declare (special %yaclml-code%)) | |
7 | ;; build tag's body | |
8 | (dolist (i (fold-strings | |
9 | (nreverse | |
10 | (funcall (gethash (car (ensure-list tag-spec)) *expanders*) | |
11 | (append (cdr tag-spec) (list | |
12 | thunk)))))) | |
13 | (if (functionp i) | |
14 | (funcall i) | |
15 | (write-string i *yaclml-stream*))))) |