Integrate private destinations for layered inputs

This commit is contained in:
2026-10-14 13:14:06 +00:00
parent 667a536ae7
commit 2f1f7f4b8a
8 changed files with 179 additions and 20 deletions

View File

@@ -29,6 +29,20 @@ func normalizeDestination(path Path) (Path, error) {
return Path{segments: segments}, nil
}
func invalidDestinationDiagnostic(destination Path) Diagnostic {
return Diagnostic{
Code: CodeOptionsInvalid, Severity: SeverityError,
Path: destination.clone(),
Message: "input destination must contain only non-reserved mapping keys",
}
}
func setSourceDestinations(sources []SourceInfo, destination Path) {
for index := range sources {
sources[index].Destination = destination.clone()
}
}
// placeDocument checks all per-document bounds before allocating destination
// wrappers. Aggregate accounting remains the caller's responsibility.
func placeDocument(body *document.Node, destination Path, sourceRoot document.Location, maxDepth, maxNodes int) (Path, *document.Node, error) {