-Kelly Murray k...@niclos.com
The code below does the simple case, which makes the reader return
the same form as using , and ,@ so in fact, it
will print the form back using , and ,@ and not {} and {}*
(defun curl-reader-macro (stream char)
(declare (ignore char))
(when (<= excl::*backquote-count* 0)
(excl::internal-reader-error stream "{ not inside a backquote."))
(let* ((excl::*backquote-count* (1- excl::*backquote-count*))
(form (read stream t nil t)))
(case (peek-char nil stream t nil t)
(#\} (read-char stream t nil t)
(case (peek-char nil stream t nil t)
(#\*
(read-char stream t nil t)
(list 'excl::bq-comma-atsign form))
(t (list 'excl::bq-comma form))))
(t
(list 'excl::bq-comma form)))))
(set-macro-character #\{ 'curl-reader-macro nil)