Codebase list cafeobj / 82d5569
* Improved #define. It now accepts more complex arguments. * Added :doc tag to #define, though it's still empty. tswd 9 years ago
3 changed file(s) with 29 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
5959 :category :module-element
6060 :parser identity
6161 :evaluator cafeobj-eval-module-element-proc
62 :doc "
63 "
6264 )
63
6465
6566 (define ("--" "**")
6667 :category :decl-toplevel
2424 (doc-ex "" :type string) ; examples
2525 (mdkey "" :type string) ; key written to reference manual
2626 (names nil :type list) ;
27 (cache nil) ; formatted doc cache
27 (cache nil) ; formatted doc cache for online help
2828 )
2929
3030 (defun print-online-document (doc &optional (stream *standard-output*) &rest ignore)
290290 (format out "~a" doc)
291291 (setf (gethash key .out-done.) t))))))
292292
293 ;;;
294 ;;; show-undocumented
295 ;;; list up undocumented, i.e. each keyword in *cafeobj-doc-db* which has no doc-string in
296 ;;; its oldoc.
297 ;;;
298 (defparameter .todo. #~m/TODO/)
299
300 (defun show-undocumented (&rest ignore)
301 (declare (ignore ignore))
302 (let ((docs nil))
303 (maphash #'(lambda (key oldoc)
304 (declare (ignore key))
305 (let* ((str (oldoc-doc-string oldoc))
306 (doc (cl-ppcre:split "\\s+" str)))
307 (when (or (null doc)
308 (null (cdr doc))
309 (funcall .todo. str))
310 (push oldoc docs))))
311 *cafeobj-doc-db*)
312 (setq docs (sort docs #'string<= :key #'oldoc-key))
313 (format t "~%The following commands/declarations/concepts are not yet documented.")
314 (dolist (doc docs)
315 (format t "~%** key : ~s" (oldoc-key doc))
316 (format t "~& names : ~s" (oldoc-names doc)))))
317
293318 ;;; EOF
5252 (labels ((apply-macro-rule (macro term)
5353 (block the-end
5454 (multiple-value-bind (global-state subst no-match E-equal)
55 (simp-match-e (macro-lhs macro) term)
55 (first-match (macro-lhs macro) term)
5656 (declare (ignore global-state e-equal))
5757 (when no-match (return-from the-end nil))
5858 (catch 'rule-failure