|
From: | Ludovic Courtès |
Subject: | Re: Macro expansion: unknown location |
Date: | Wed, 11 Jun 2014 15:31:25 +0200 |
User-agent: | Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) |
A workaround is to get location info from the outer syntax object ‘x’: --8<---------------cut here---------------start------------->8--- (define-syntax zero! (lambda (x) (syntax-case x () ((_ var) (begin (unless (identifier? #'var) (syntax-violation 'zero! "identifier expected" x)) ; <-- here #'(set! var 0)))))) --8<---------------cut here---------------end--------------->8--- I’m not sure why ‘var’ has no location info. Ludo’.
[Prev in Thread] | Current Thread | [Next in Thread] |