|
|
@ -27,8 +27,8 @@
|
|
|
|
[else #f]))
|
|
|
|
[else #f]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define+provide+safe (validate-txexpr-attrs? x #:context [txexpr-context #f])
|
|
|
|
(define (validate-txexpr-attrs? x #:context [txexpr-context #f])
|
|
|
|
((any/c) (#:context (or/c #f txexpr?)) . ->* . txexpr-attrs?)
|
|
|
|
; ((any/c) (#:context (or/c #f txexpr?)) . ->* . txexpr-attrs?)
|
|
|
|
(define (make-reason)
|
|
|
|
(define (make-reason)
|
|
|
|
(if (not (list? x))
|
|
|
|
(if (not (list? x))
|
|
|
|
(format "because ~v is not a list" x)
|
|
|
|
(format "because ~v is not a list" x)
|
|
|
@ -54,8 +54,8 @@
|
|
|
|
[(list elem ...) (andmap txexpr-element? elem)]
|
|
|
|
[(list elem ...) (andmap txexpr-element? elem)]
|
|
|
|
[else #f]))
|
|
|
|
[else #f]))
|
|
|
|
|
|
|
|
|
|
|
|
(define+provide+safe (validate-txexpr-element? x #:context [txexpr-context #f])
|
|
|
|
(define (validate-txexpr-element? x #:context [txexpr-context #f])
|
|
|
|
((any/c) (#:context (or/c #f txexpr?)) . ->* . txexpr-element?)
|
|
|
|
; ((any/c) (#:context (or/c #f txexpr?)) . ->* . txexpr-element?)
|
|
|
|
(cond
|
|
|
|
(cond
|
|
|
|
[(or (string? x) (txexpr? x) (symbol? x)
|
|
|
|
[(or (string? x) (txexpr? x) (symbol? x)
|
|
|
|
(valid-char? x) (cdata? x)) x]
|
|
|
|
(valid-char? x) (cdata? x)) x]
|
|
|
|