From 9186d3f1cfff21af08d64f94612967bfa5775c9c Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 19 Jan 2026 20:24:43 -0600 Subject: T8232: add util get_subtree for reference_tree This is the direct analogue of Config_tree.get_subtree, a safe wrapper around Vytree.get. Note that the twin functions could easily have been abstracted under Tree_alg, however, for such simple functions the redundancy is preferable. --- src/reference_tree.mli | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/reference_tree.mli') diff --git a/src/reference_tree.mli b/src/reference_tree.mli index 96cb24f..f915275 100644 --- a/src/reference_tree.mli +++ b/src/reference_tree.mli @@ -51,6 +51,8 @@ val default_data : ref_node_data val default : t +val make : string -> t + val load_from_xml : t -> string -> t [@@alert exn "Reference_tree.Bad_interface_definition"] @@ -110,6 +112,8 @@ val get_default_value : t -> string list -> string option [@@alert exn "Vytree.Empty_path"] [@@alert exn "Vytree.Nonexistent_path"] +val get_subtree : ?with_node:bool -> t -> string list -> t + val refpath : t -> string list -> string list val set_tag_data : t -> Config_tree.t -> string list -> Config_tree.t -- cgit v1.2.3