You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
464 B
Racket
15 lines
464 B
Racket
3 years ago
|
#lang racket/base
|
||
|
(require "struct.rkt")
|
||
|
(provide (all-defined-out))
|
||
|
|
||
|
(define-syntax-rule (define-attr-list LIST-NAME
|
||
|
[ATTR-NAME ATTR-EXPR] ...)
|
||
|
(begin
|
||
|
(define ATTR-NAME ATTR-EXPR) ...
|
||
|
(define LIST-NAME (list ATTR-NAME ...))))
|
||
|
|
||
|
(define-attr-list all-attrs
|
||
|
[:font-family (attr-uncased-string 'font-family)]
|
||
|
[:font-path (attr-path 'font-path)]
|
||
|
[:font-bold (attr-boolean 'font-bold)]
|
||
|
[:font-italic (attr-boolean 'font-italic)])
|