Applied changes requested by @rmculpepper for PR #1587
This commit is contained in:
parent
28f1df4cff
commit
73e3f7915b
|
@ -50,7 +50,7 @@
|
||||||
(terx (1 (2 3)) (_:one _:two) "expected one")
|
(terx (1 (2 3)) (_:one _:two) "expected one")
|
||||||
(terx ((1) 2) (_:one _:two) "expected two")
|
(terx ((1) 2) (_:one _:two) "expected two")
|
||||||
|
|
||||||
(test-case "datum patterns"
|
;; datum patterns
|
||||||
(tok () ()
|
(tok () ()
|
||||||
'ok
|
'ok
|
||||||
#:pre [(_) 0] #:post [])
|
#:pre [(_) 0] #:post [])
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
(terx 1 2 "literal 2")
|
(terx 1 2 "literal 2")
|
||||||
(terx (1 2) 1 "literal 1")
|
(terx (1 2) 1 "literal 1")
|
||||||
(terx (1 2) (1 1) "literal 1"))
|
(terx (1 2) (1 1) "literal 1")
|
||||||
|
|
||||||
;; literal patterns
|
;; literal patterns
|
||||||
(test-case "literals: +"
|
(test-case "literals: +"
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
racket/syntax
|
racket/syntax
|
||||||
syntax/parse/private/minimatch
|
syntax/parse/private/minimatch
|
||||||
racket/private/stx ;; syntax/stx
|
racket/private/stx ;; syntax/stx
|
||||||
racket/private/sc
|
racket/private/sc)
|
||||||
racket/struct)
|
|
||||||
syntax/parse/private/residual
|
syntax/parse/private/residual
|
||||||
"private/substitute.rkt")
|
"private/substitute.rkt")
|
||||||
(provide template
|
(provide template
|
||||||
|
@ -410,7 +409,7 @@ instead of integers and integer vectors.
|
||||||
(and (pair? v) (quotable? (car v)) (quotable? (cdr v)))
|
(and (pair? v) (quotable? (car v)) (quotable? (cdr v)))
|
||||||
(and (vector? v) (andmap quotable? (vector->list v)))
|
(and (vector? v) (andmap quotable? (vector->list v)))
|
||||||
(and (hash? v) (andmap quotable? (hash->list v)))
|
(and (hash? v) (andmap quotable? (hash->list v)))
|
||||||
(and (prefab-struct-key v) (andmap quotable? (struct->list v)))))
|
(and (prefab-struct-key v) (andmap quotable? (cdr (vector->list (struct->vector v)))))))
|
||||||
|
|
||||||
(define (cons-guide g1 g2)
|
(define (cons-guide g1 g2)
|
||||||
(if (and (eq? g1 '_) (eq? g2 '_)) '_ (cons g1 g2)))
|
(if (and (eq? g1 '_) (eq? g2 '_)) '_ (cons g1 g2)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user