summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-10-07 20:16:49 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-10-07 20:16:49 -0700
commit6acdc55506c2da5de12e28e0b8fc405d211e09c5 (patch)
treec42811c9e3bf2b0a05603f3fe46758417ce80f47 /lib.c
parent3666309d5aa374b813f5f7be7cf186375950b7c5 (diff)
downloadtxr-6acdc55506c2da5de12e28e0b8fc405d211e09c5.tar.gz
txr-6acdc55506c2da5de12e28e0b8fc405d211e09c5.tar.bz2
txr-6acdc55506c2da5de12e28e0b8fc405d211e09c5.zip
tree: circular notation support.
* lib.c (populate_obj_hash): Handle tree object. * parser.c (circ_backpatch): Likewise.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index ef781a89..c0ad5c96 100644
--- a/lib.c
+++ b/lib.c
@@ -11808,6 +11808,11 @@ tail:
val sn = car(iter);
populate_obj_hash(slot(obj, sn), ctx);
}
+ } else if (treep(obj)) {
+ val iter = tree_begin(obj);
+ val node;
+ while ((node = tree_next(iter)))
+ populate_obj_hash(key(node), ctx);
}
break;
case FUN: