diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-10-04 21:02:17 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-10-04 21:02:17 +0200 |
commit | 77791305d6e1483fa5ae46f26616242c00f99989 (patch) | |
tree | f71b777988f47f36cc46c724b9efdd090566f278 /module/vcomponent/base.scm | |
parent | Comments in parser. (diff) | |
download | calp-77791305d6e1483fa5ae46f26616242c00f99989.tar.gz calp-77791305d6e1483fa5ae46f26616242c00f99989.tar.xz |
HTML output seems to work in full now.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/base.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/module/vcomponent/base.scm b/module/vcomponent/base.scm index 3bd58c21..246566ee 100644 --- a/module/vcomponent/base.scm +++ b/module/vcomponent/base.scm @@ -3,6 +3,7 @@ :use-module (srfi srfi-1) :use-module (srfi srfi-17) :use-module (vcomponent primitive) + :use-module (ice-9 hash-table) :use-module ((ice-9 optargs) :select (define*-public))) ;; vline → value @@ -76,12 +77,20 @@ (define*-public (children component) (struct-ref component 1)) +(define (copy-vline vline) + (make-struct/no-tail (struct-vtable vline) + (struct-ref vline 0) + ;; TODO deep-copy on properties? + (struct-ref vline 1))) + (define-public (copy-vcomponent component) (make-struct/no-tail (struct-vtable component) (struct-ref component 0) (struct-ref component 1) (struct-ref component 2) - (struct-ref component 3))) + (alist->hash-table + (hash-map->list (lambda (key value) (cons key (copy-vline value))) + (struct-ref component 3))))) ;; (define-public filter-children! %vcomponent-filter-children!) |