File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,15 @@ SiblingLinks(tree) = SiblingLinks(typeof(tree))
9292 ChildIndexing(node)
9393
9494A trait indicating whether the tree node `n` has children (as returned by [`children`](@ref)) which can be
95- indexed using 1-based indexing.
95+ indexed using 1-based indexing. Options are either [`NonIndexedChildren`](@ref) (default) or [`IndexedChildren`](@ref).
96+
97+ To declare that the tree `TreeType` supports one-based indexing on the children, define
98+ ```julia
99+ AbstractTrees.ChildIndexing(::Type{<:TreeType}) = AbstractTrees.IndexedChildren()
100+ ```
96101
97102If a node has the `IndexedChildren()` so must all connected nodes in the tree. Otherwise, use
98103`NonIndexedChildren()` instead.
99-
100- Options are either [`NonIndexedChildren`](@ref) (default) or [`IndexedChildren`](@ref).
101104"""
102105abstract type ChildIndexing end
103106
You can’t perform that action at this time.
0 commit comments