expanding local macro during syntax-case compilation causes an error

Create issue
Issue #15 resolved
Takashi Kato repo owner created an issue

This should be compiled without an error.

 (let ()
   (define-syntax foo
     (syntax-rules ()
       ((_ ?atom ?stx ...)
    (or (free-identifier=? ?atom ?stx) ...))))

   (define-syntax bar
     (syntax-rules ()
       ((_ ?atom ((?s ...) ?e ...) ... )
    (cond ((foo ?atom (syntax ?s) ...) ?e ...) ... ))))

The reason why this raises an error is that foo will be expanded during compile-syntax-case then subtemplate will be invalid.

Comments (1)

  1. Log in to comment