Added NodeMap to all low level objects.

this sync map tracks all the nodes that apply to this object.
This commit is contained in:
quobix
2024-08-04 11:01:23 -04:00
parent 31ed123abd
commit 70f406b6cf
46 changed files with 712 additions and 44 deletions

View File

@@ -30,6 +30,7 @@ type XML struct {
Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
RootNode *yaml.Node
*low.Reference
low.NodeMap
}
// Build will extract extensions from the XML instance.
@@ -38,6 +39,7 @@ func (x *XML) Build(root *yaml.Node, _ *index.SpecIndex) error {
utils.CheckForMergeNodes(root)
x.RootNode = root
x.Reference = new(low.Reference)
x.Nodes = low.ExtractNodes(nil, root)
x.Extensions = low.ExtractExtensions(root)
return nil
}