check define-typed-stx has > 0 clauses to match stx-parse; add other paper abbrvs
This commit is contained in:
parent
d0c14c7e07
commit
088635c33a
|
@ -17,6 +17,7 @@
|
|||
(except-out (all-from-out racket/base) #%module-begin)
|
||||
(all-from-out syntax/parse/define)
|
||||
(for-syntax (all-defined-out)) (all-defined-out)
|
||||
(rename-out [define-syntax-category define-stx-category])
|
||||
(for-syntax
|
||||
(all-from-out racket syntax/parse racket/syntax syntax/stx
|
||||
"stx-utils.rkt"))
|
||||
|
@ -62,13 +63,13 @@
|
|||
|
||||
(define-syntax (define-typed-syntax stx)
|
||||
(syntax-parse stx
|
||||
[(_ name:id #:export-as out-name:id stx-parse-clause ...)
|
||||
[(_ name:id #:export-as out-name:id stx-parse-clause ...+)
|
||||
#'(begin
|
||||
(provide (rename-out [name out-name]))
|
||||
(define-syntax (name syntx)
|
||||
(syntax-parameterize ([stx (make-rename-transformer #'syntx)])
|
||||
(syntax-parse syntx stx-parse-clause ...))))]
|
||||
[(_ name:id stx-parse-clause ...)
|
||||
[(_ name:id stx-parse-clause ...+)
|
||||
#'(define-typed-syntax name #:export-as name
|
||||
stx-parse-clause ...)]))
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
(provide (except-out (all-from-out macrotypes/typecheck) -define-typed-syntax)
|
||||
define-typed-syntax
|
||||
(rename-out [define-typed-syntax define-typerule])
|
||||
(for-syntax syntax-parse/typed-syntax))
|
||||
|
||||
(require (except-in (rename-in
|
||||
|
@ -376,7 +377,7 @@
|
|||
[(def name:id
|
||||
(~and (~seq kw-stuff ...) :stxparse-kws)
|
||||
rule:rule
|
||||
...)
|
||||
...+)
|
||||
#'(-define-typed-syntax
|
||||
name
|
||||
kw-stuff ...
|
||||
|
|
Loading…
Reference in New Issue
Block a user