low-syntax.scm 748 B

123456789101112131415161718192021222324
  1. ; Part of Scheme 48 1.9. See file COPYING for notices and license.
  2. ; Authors: Mike Sperber
  3. ; Low-level support for different kinds of syntax transformers
  4. ; We just use a vector with a tag in slot 0. (Can't be a pair,
  5. ; because syntax transformers may be pairs of transformer and aux
  6. ; names.)
  7. ; 4-argument version of explicit-renaming transformers
  8. ; (expression name? rename compare)
  9. (define (make-explicit-renaming-transformer/4 proc)
  10. (vector 'explicit-renaming-transformer/4 proc))
  11. (define (explicit-renaming-transformer/4? thing)
  12. (and (vector? thing)
  13. (= 2 (vector-length thing))
  14. (eq? 'explicit-renaming-transformer/4 (vector-ref thing 0))))
  15. (define (explicit-renaming-transformer/4-proc thing)
  16. (vector-ref thing 1))