Add identifier? check to place macro

This commit is contained in:
Kevin Tew 2011-07-07 13:45:18 -06:00
parent 3b33ed8c81
commit 5d66e52fcc

View File

@ -146,6 +146,8 @@
(define-for-syntax (gen-create-place stx)
(syntax-case stx ()
[(_ ch body ...)
(unless (identifier? #'ch)
(raise-syntax-error #f "expected an indentifier" stx #'ch))
(with-syntax ([interal-def-name
(syntax-local-lift-expression #'(lambda (ch) body ...))]
[funcname (datum->syntax stx (generate-temporary #'place/anon))])