diff options
Diffstat (limited to 'module/vcomponent')
-rw-r--r-- | module/vcomponent/output.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/vcomponent/output.scm b/module/vcomponent/output.scm index 6d346230..f55adf3b 100644 --- a/module/vcomponent/output.scm +++ b/module/vcomponent/output.scm @@ -21,7 +21,7 @@ (begin body ...) (if pred-value STR-RESET "")))) -(define* (print-vcomponent comp #:optional (port #t) #:key (depth 0)) +(define* (print-vcomponent comp #:optional (port #t) #:key (descend? #t) (depth 0)) (let ((kvs (map (lambda (key) (cons key (attr* comp key))) (attributes comp)))) (format port "~a <~a> :: ~:a~%" @@ -34,8 +34,9 @@ key (concatenate (hash-map->list list (cdr at))) (v at)))) - (for-each (lambda (e) (print-vcomponent e port #:depth (1+ depth))) - (children comp)))) + (if descend? + (for-each (lambda (e) (print-vcomponent e port #:descend? #t #:depth (1+ depth))) + (children comp))))) |