Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the with-cached-reader-conditionals Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 18:17:02 2021 GMT+0.
• Introduction | What with-cached-reader-conditionals is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Exposes #'call-with-cached-reader-conditionals
and the macro with-cached-reader-conditionals
Calls the given function with the given args. Returns the first result of the given function as the first result and the returns a list of the 'feature-expression pairs' as the second result.
A 'feature-expression pair' is defined as: A list of length 2 where the first element is a valid lisp feature-expression and the second element is t
or nil
depending on whether the feature expression succeeded for the current system.
To get the list of features the function rebinds the #+
and #-
conditional reader macros so that they will work as normal but also record the feature expressions they are given. This accumulated list of feature expressions is then flattened and deduplicated so only a set of features remain.
This macro takes it's body, wraps in in a lambda and passes it to #'call-with-cached-reader-conditionals.
;; With this function
(defun test (string)
(with-cached-reader-conditionals
(with-input-from-string (stream string)
(loop for l = (read stream nil) while l collect l))))
;; this call
CL-USER> (test "(+ 1 2 3)
#+windows(print 1)
#+(or sbcl bsd)(print 2)
#+(or bsd sbcl)(print 3)")
;; returns these two values
((+ 1 2 3) (PRINT 2) (PRINT 3))
(((:OR :BSD :SBCL) T) (:WINDOWS NIL))
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The with-cached-reader-conditionals system |
Chris Bagley <chris.bagley@gmail.com>
BSD 2 Clause
Read whilst collecting reader conditionals
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The with-cached-reader-conditionals.asd file | ||
• The with-cached-reader-conditionals/package.lisp file | ||
• The with-cached-reader-conditionals/with-cached-reader-conditionals.lisp file |
Next: The with-cached-reader-conditionals/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
with-cached-reader-conditionals.asd
with-cached-reader-conditionals (system)
Next: The with-cached-reader-conditionals/with-cached-reader-conditionals․lisp file, Previous: The with-cached-reader-conditionals․asd file, Up: Lisp files [Contents][Index]
with-cached-reader-conditionals (system)
package.lisp
Previous: The with-cached-reader-conditionals/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
with-cached-reader-conditionals (system)
with-cached-reader-conditionals.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The with-cached-reader-conditionals package |
package.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros | ||
• Exported functions |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Previous: Exported macros, Up: Exported definitions [Contents][Index]
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal functions | ||
• Internal classes |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Next: Internal classes, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
Ugly in implementation but will always match the implementations logic :|
Previous: Internal functions, Up: Internal definitions [Contents][Index]
standard-object (class)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L W |
---|
Jump to: | F L W |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | C D F M N S W |
---|
Jump to: | C D F M N S W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
C S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*keyword-package* : | Internal special variables | ||
| |||
C | |||
cache : | Internal classes | ||
| |||
S | |||
Slot, cache : | Internal classes | ||
Special Variable, *keyword-package* : | Internal special variables | ||
|
Jump to: | *
C S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C F P S W |
---|
Jump to: | C F P S W |
---|