It had a severely deficient interface: it could only define fragments
with constant contents. Moreover, although it made an effort to accept
a string-literal as its text, it ended up in a tangle because
`code-fragment-item' insists on its `fragment' slot actually containing
a code fragment, and nothing does the conversion.
Rather than fix these bugs, I noticed that nothing actually used it at
all, so removing it completely seemed like a better option.
(:documentation
"A plain fragment of C to be dropped in at top-level."))
(:documentation
"A plain fragment of C to be dropped in at top-level."))
-(defmacro define-fragment ((reason name) &body things)
- (categorize (thing things)
- ((constraints (listp thing))
- (frags (typep thing '(or string c-fragment))))
- (when (null frags)
- (error "Missing code fragment"))
- (when (cdr frags)
- (error "Multiple code fragments"))
- `(add-to-module
- *module*
- (make-instance 'code-fragment-item
- :fragment ',(car frags)
- :name ,name
- :reason ,reason
- :constraints (list ,@(mapcar (lambda (constraint)
- (cons 'list constraint))
- constraints))))))
-
;;;--------------------------------------------------------------------------
;;; File searching.
;;;--------------------------------------------------------------------------
;;; File searching.