added hash-table syntax
original commit: b07819214e9c9de5a77f8fccddcd1fe596ef3dad
This commit is contained in:
parent
ccc794f7b2
commit
6b1c2172e8
|
@ -29,7 +29,9 @@
|
|||
|
||||
namespace-defined?
|
||||
this-expression-source-directory
|
||||
define-syntax-set)
|
||||
define-syntax-set
|
||||
|
||||
hash-table)
|
||||
|
||||
(define true #t)
|
||||
(define false #f)
|
||||
|
@ -488,4 +490,12 @@
|
|||
(with-syntax ([orig-stx stx])
|
||||
(syntax/loc stx
|
||||
(define-syntaxes (id ...)
|
||||
(finish-syntax-set orig-stx)))))])))
|
||||
(finish-syntax-set orig-stx)))))]))
|
||||
|
||||
(define-syntax (hash-table stx)
|
||||
(syntax-case stx ()
|
||||
[(_ (key value) ...)
|
||||
(syntax/loc stx
|
||||
(let ([ht (make-hash-table)])
|
||||
(hash-table-put! ht key value) ...
|
||||
ht))])))
|
||||
|
|
Loading…
Reference in New Issue
Block a user