ignored → unknown

main
Matthew Butterick 3 years ago
parent 7ece173055
commit 8982ed2f21

@ -53,8 +53,8 @@
(cond
[(attr-key? ak) av]
[(symbol? ak)
(match (hash-ref attr-lookup-table ak :ignored-key)
[(== :ignored-key eq?)
(match (hash-ref attr-lookup-table ak :unknown-key)
[(== :unknown-key eq?)
#:when strict-attrs?
(raise-argument-error 'upgrade-attr-keys "known attr" ak)]
[attr-key
@ -94,10 +94,8 @@
(do-attr-iteration qs
#:which-attr attr-numeric-key?
#:attr-proc (λ (ak av attrs)
(cond
[(string->number av)]
[else
(raise-argument-error 'convert-numeric-attr-values "numeric string" av)]))))
(or (string->number av)
(raise-argument-error 'convert-numeric-attr-values "numeric string" av)))))
(define-pass (complete-attr-paths qs)
#:pre (list-of quad?)
@ -107,8 +105,7 @@
;; relies on `current-directory` being parameterized to source file's dir
(do-attr-iteration qs
#:which-attr attr-path-key?
#:attr-proc (λ (ak av attrs)
(path->complete-path av))))
#:attr-proc (λ (ak av attrs) (path->complete-path av))))
(define-pass (parse-dimension-strings qs)
#:pre (list-of quad?)

@ -9,7 +9,7 @@
(define LIST-NAME (list ATTR-NAME ...))))
(define-attr-list all-attrs
[:ignored-key (attr-ignored-key (gensym))]
[:unknown-key (attr-unknown-key (gensym))]
[:font-family (attr-uncased-string-key 'font-family)]
[:font-path (attr-path-key 'font-path)]
[:font-bold (attr-boolean-key 'font-bold)]

@ -25,4 +25,4 @@
path
numeric
boolean
ignored)
unknown)
Loading…
Cancel
Save