From 997502be5b815f4c199395e92e75944411e0d005 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 11 Apr 2023 22:18:00 +0200 Subject: Add an optional comment field to the fixture's attributes --- guile/starlet/fixture.scm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/guile/starlet/fixture.scm b/guile/starlet/fixture.scm index b1a3e32..9d210ff 100644 --- a/guile/starlet/fixture.scm +++ b/guile/starlet/fixture.scm @@ -65,7 +65,12 @@ (home-value #:init-value 0 #:init-keyword #:home-value - #:getter attr-home-value)) + #:getter attr-home-value) + + (comment + #:init-value "" + #:init-keyword #:comment + #:getter attr-comment)) (define-class () @@ -100,6 +105,13 @@ (define-syntax attr-continuous (syntax-rules () + ((_ attr-name attr-range attr-home-value comment) + (make + #:name attr-name + #:range attr-range + #:type 'continuous + #:home-value attr-home-value + #:comment comment)) ((_ attr-name attr-range attr-home-value) (make #:name attr-name @@ -115,11 +127,24 @@ #:name attr-name #:range attr-allowed-values #:type 'list - #:home-value attr-home-value)))) + #:home-value attr-home-value)) + ((_ attr-name attr-allowed-values attr-home-value comment) + (make + #:name attr-name + #:range attr-allowed-values + #:type 'list + #:home-value attr-home-value + #:comment comment)))) (define-syntax attr-colour (syntax-rules () + ((_ attr-name attr-home-value comment) + (make + #:name attr-name + #:type 'colour + #:home-value attr-home-value + #:comment comment)) ((_ attr-name attr-home-value) (make #:name attr-name -- cgit v1.2.3