stxclass: fixed parsing of stxclass description
svn: r13262
This commit is contained in:
parent
2c65d062fc
commit
9b79cc7e8c
|
@ -254,8 +254,8 @@
|
||||||
(exact-nonnegative-integer? (syntax-e #'depth)))
|
(exact-nonnegative-integer? (syntax-e #'depth)))
|
||||||
(raise-syntax-error #f "bad attribute declaration" stx attr-stx))
|
(raise-syntax-error #f "bad attribute declaration" stx attr-stx))
|
||||||
(make-attr (syntax-e #'attr) (syntax-e #'depth) null))]))
|
(make-attr (syntax-e #'attr) (syntax-e #'depth) null))]))
|
||||||
description
|
|
||||||
transparent?
|
transparent?
|
||||||
|
description
|
||||||
#'parser-expr)]))
|
#'parser-expr)]))
|
||||||
|
|
||||||
(define (parse-rhs*-patterns rest)
|
(define (parse-rhs*-patterns rest)
|
||||||
|
@ -271,10 +271,10 @@
|
||||||
(raise-syntax-error #f "syntax class has no variants" ctx))
|
(raise-syntax-error #f "syntax class has no variants" ctx))
|
||||||
(let ([sattrs (intersect-attrss (map rhs:pattern-attrs patterns) ctx)])
|
(let ([sattrs (intersect-attrss (map rhs:pattern-attrs patterns) ctx)])
|
||||||
(make rhs:union stx sattrs
|
(make rhs:union stx sattrs
|
||||||
description
|
|
||||||
transparent?
|
transparent?
|
||||||
|
description
|
||||||
patterns)))
|
patterns)))
|
||||||
|
|
||||||
(syntax-case rest (pattern basic-syntax-class)
|
(syntax-case rest (pattern basic-syntax-class)
|
||||||
[((basic-syntax-class . _))
|
[((basic-syntax-class . _))
|
||||||
(parse-rhs*-basic rest)]
|
(parse-rhs*-basic rest)]
|
||||||
|
|
|
@ -158,7 +158,7 @@
|
||||||
(define-syntax (debug-rhs stx)
|
(define-syntax (debug-rhs stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(debug-rhs rhs)
|
[(debug-rhs rhs)
|
||||||
(let ([rhs (parse-rhs #'rhs #f)])
|
(let ([rhs (parse-rhs #'rhs #f stx)])
|
||||||
#`(quote #,rhs))]))
|
#`(quote #,rhs))]))
|
||||||
|
|
||||||
(define-syntax (debug-pattern stx)
|
(define-syntax (debug-pattern stx)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user