commit 5e5c8804cc1497825f6d482c26de5d74020e4d2e
parent 27fc80861aab7e7ba9eea88e3fb3cb309c9c3a2c
Author: Greg Hendershott <greghendershott@gmail.com>
Date: Sun, 5 Jun 2016 12:26:36 -0400
Merge pull request #19 from leafac/patch-2
Fix `dot notation for nested hash lookups' example
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/index.rkt b/index.rkt
@@ -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))])