summaryrefslogtreecommitdiffstats
path: root/stdlib/doc-syms.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-12-17 21:49:16 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-12-17 21:49:16 -0800
commit236a11759c4f0ccdd809621a990da2e0ae138def (patch)
tree0a5ec9f0155650d29cb0d4d705501835da418c35 /stdlib/doc-syms.tl
parent3cbec98b7e80e75b4cd1e164c56c6e82ab0d7240 (diff)
downloadtxr-236a11759c4f0ccdd809621a990da2e0ae138def.tar.gz
txr-236a11759c4f0ccdd809621a990da2e0ae138def.tar.bz2
txr-236a11759c4f0ccdd809621a990da2e0ae138def.zip
tree: support for duplicate keys.
* tree.c (tr_insert): New argument for allowing duplicate. If it is true, suppresses the case of replacing a node, causing the logic to fall through to traversing right, so the duplicate key effectively looks like it is greater than the existing duplicates, and gets inserted as the rightmost duplicate. (tr_do_delete_specific, tr_delete_specific): New static functions. (tree_insert_node): New parameter, passed to tr_insert. (tree_insert): New parameter, passed to tree_insert_node. (tree_delete_specific_node): New function. (tree): New parameter to allow duplicate keys in the elements sequence. (tree_construct): Pass t to tree to allow duplicate elements. (tree_init): Update registrations of tree, tree-insert and tree-insert-node. Register tree-delete-specific-node function. * tree.h (tree, tree_insert_node, tree_insert): Declarations updated. (tree_delete_specific_node): Declared. * lib.c (seq): Pass t argument to tree_insert, allowing duplicates. * parser.c (circ_backpatch): Likewise. * parser.y (tree): Pass t to new argument of tree, so duplicates are preserved in the element list of the #T literal. * y.tab.c.shipped: Updated. * tests/010/tree.tl: Test cases for duplicate keys. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'stdlib/doc-syms.tl')
-rw-r--r--stdlib/doc-syms.tl2
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl
index 654a3610..80922b42 100644
--- a/stdlib/doc-syms.tl
+++ b/stdlib/doc-syms.tl
@@ -2002,8 +2002,10 @@
("tree-bind" "N-021A9008")
("tree-case" "N-03D834A5")
("tree-clear" "N-03C88274")
+ ("tree-count" "N-032882F2")
("tree-delete" "N-022035DF")
("tree-delete-node" "N-00772FAE")
+ ("tree-delete-specific-node" "N-009B02CA")
("tree-find" "N-0149BC05")
("tree-insert" "N-0114FF9E")
("tree-insert-node" "N-008B4AD9")