|
|
|
@ -77,11 +77,11 @@
|
|
|
|
|
(define (validate-txexpr-attrs-with-context? e) (validate-txexpr-attrs? e #:context x))
|
|
|
|
|
|
|
|
|
|
(when (match x
|
|
|
|
|
[(list (? symbol? name) rest ...) ;; is a list starting with a symbol
|
|
|
|
|
(or (null? rest)
|
|
|
|
|
(andmap txexpr-element? rest) ;; the rest is content or ...
|
|
|
|
|
(and (validate-txexpr-attrs-with-context? (car rest))
|
|
|
|
|
(andmap validate-txexpr-element-with-context? (cdr rest))))] ;; attr + content
|
|
|
|
|
[(list (? symbol?)) #t]
|
|
|
|
|
[(list (? symbol? name) (and attr-list (list (list k v ...) ...)) rest ...)
|
|
|
|
|
(and (validate-txexpr-attrs-with-context? attr-list)
|
|
|
|
|
(andmap validate-txexpr-element-with-context? rest))]
|
|
|
|
|
[(list (? symbol? name) rest ...)(andmap validate-txexpr-element-with-context? rest)]
|
|
|
|
|
[else (error (format "validate-txexpr: first element is not a symbol in ~v" x))])
|
|
|
|
|
x))
|
|
|
|
|
|
|
|
|
|