Merge pull request #19 from leafac/patch-2

Fix `dot notation for nested hash lookups' example
This commit is contained in:
Greg Hendershott 2016-06-05 12:26:36 -04:00
commit 5e5c8804cc

View File

@ -1212,7 +1212,8 @@ messages when used in error. Let's try to do that here.
[(_ chain)
#'(hash.refs chain #f)]
[(_ chain default)
(raise-syntax-error #f "Expected hash.key0[.key1 ...] [default]" stx #'chain)
(unless (identifier? #'chain)
(raise-syntax-error #f "Expected hash.key0[.key1 ...] [default]" stx #'chain))
(let* ([chain-str (symbol->string (syntax->datum #'chain))]
[ids (for/list ([str (in-list (regexp-split #rx"\\." chain-str))])
(format-id #'chain "~a" str))])