summaryrefslogtreecommitdiffstats
path: root/tree.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-10-03 17:31:01 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-10-03 17:31:01 -0700
commit8660816e37a7a169ec41d50d9067b3889c9a6186 (patch)
tree466ec77e369115cd6f3831158f66c8262fa3a1fd /tree.h
parentf58f6224e6276f729a4d29732543530d561e2020 (diff)
downloadtxr-8660816e37a7a169ec41d50d9067b3889c9a6186.tar.gz
txr-8660816e37a7a169ec41d50d9067b3889c9a6186.tar.bz2
txr-8660816e37a7a169ec41d50d9067b3889c9a6186.zip
tree: tree iterators.
* tree.c (struct tree_diter): New struct type. (tree_iter_s): New symbol variable. (tree_iter_mark): New static function. (tree_iter_ops): New static struct. (tree_begin, tree_next): New functions. (tree_init): Initialize tree_iter_s; register tree-begin and tree-next intrinsics. * tree.h (tree_begin, tree_next): Declared.
Diffstat (limited to 'tree.h')
-rw-r--r--tree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tree.h b/tree.h
index 32f846e9..6233a0fc 100644
--- a/tree.h
+++ b/tree.h
@@ -36,4 +36,6 @@ val right(val node);
val key(val node);
val tree(val keys, val key_fn, val less_fn, val equal_fn);
val treep(val obj);
+val tree_begin(val tree);
+val tree_next(val iter);
void tree_init(void);