mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
If you set the macro-aux of a macro outside of (chibi syntax-case), it would previously case `syntax` to think that it was a pattern variable and try to substitute it, even if the macro-aux was being used for something else. This patch fixes that by wrapping pattern variable values in an extra typed box and checking that it has the right type before deciding that it’s actually a pattern variable.
23 lines
923 B
Scheme
23 lines
923 B
Scheme
(define-library (chibi syntax-case)
|
|
(export ... _ free-identifier=? bound-identifier=? identifier?
|
|
syntax-case syntax quasisyntax unsyntax unsyntax-splicing
|
|
datum->syntax syntax->datum
|
|
generate-temporaries with-syntax syntax-violation
|
|
with-ellipsis ellipsis-identifier?
|
|
define-syntax let-syntax letrec-syntax)
|
|
(import (rename (chibi)
|
|
(define-syntax %define-syntax)
|
|
(let-syntax %let-syntax)
|
|
(letrec-syntax %letrec-syntax))
|
|
(only (chibi ast)
|
|
env-cell macro? macro-aux macro-aux-set!
|
|
procedure-arity procedure-variadic?
|
|
procedure-variable-transformer?
|
|
make-variable-transformer)
|
|
(only (meta) environment)
|
|
(srfi 1)
|
|
(srfi 2)
|
|
(srfi 9)
|
|
(srfi 11)
|
|
(srfi 39))
|
|
(include "syntax-case.scm"))
|