pub fn add_node(
tree: &mut NodeTree,
parent: Option<NodeId>,
type_name: &str,
name: &str,
) -> Result<NodeId>Expand description
Insert a node of type_name under parent (defaults to the tree root).
The id is derived from name plus a counter until unique.
Unknown types and missing parents are errors.