Add explicit path import traversal

This commit is contained in:
2026-09-06 20:41:40 +00:00
parent 3257b2124c
commit 9f04c09be3
15 changed files with 1233 additions and 118 deletions

View File

@@ -30,6 +30,7 @@ func defaultParseLimits() parseLimits {
type parsedSource struct {
document *document.Node
source *SourceInfo
bytes int64
}
func parseSource(source Source, sourceID string, limits parseLimits) (parsedSource, []Diagnostic) {
@@ -60,7 +61,7 @@ func parseSource(source Source, sourceID string, limits parseLimits) (parsedSour
})
}
}
return parsedSource{source: read.info}, canonicalDiagnostics(diagnostics)
return parsedSource{source: read.info, bytes: int64(len(read.data))}, canonicalDiagnostics(diagnostics)
}
return parsedSource{document: root, source: read.info}, nil
return parsedSource{document: root, source: read.info, bytes: int64(len(read.data))}, nil
}